|
the label for the outgoing packet
|
|
|
For example, consider the `label forwarding table` of a network node below.
|
|
|
index
|
|
|
outgoing interface
|
|
|
label
|
|
|
South
|
|
|
7
|
|
|
1
|
|
|
none
|
|
|
2
|
|
|
West
|
|
|
3
|
|
|
East
|
|
|
If this node receives a packet with `label=2`, it forwards the packet on its `West` interface and sets the `label` of the outgoing packet to `2`. If the received packet's `label` is set to `3`, then the packet is forwarded over the `East` interface and the `label` of the outgoing packet is set to `2`. If a packet is received with a label field set to `1`, the packet is discarded since the corresponding `label forwarding table` entry is invalid.
|
|
|
`Label switching` enables a full control over the path followed by packets inside the network. Consider the network below and assume that we want to use two virtual circuits : `R1->R3->R4->R2->R5` and `R2->R1->R3->R4->R5`.
|
|
|
->R2
|
|
|
->R5
|
|
|
Since a packet received with `label=1` must be forwarded to `R5` with `label=1`, `R2`'s `label forwarding table` could contain :
|
|
|
Two virtual circuits pass through `R3`. They both need to be forwarded to `R4`, but `R4` expects `label=1` for packets belonging to the virtual circuit originated by `R2` and `label=0` for packets belonging to the other virtual circuit. `R3` could choose to leave the labels unchanged.
|
|
|
->R4
|
|