[Contents]
[Prev]
[Next]
[Index]
[Report an Error]
Operations on Labels
The router supports the following label operations:
- Push—Add a new label to the top of the packet. For
IPv4 packets, the new label is the first label. The TTL and S bits are derived from the IP packet header. The MPLS CoS is
derived from the queue number. If the push operation is performed
on an existing MPLS packet, you will have a packet with two or more
labels. This is called label stacking. The top label must have its S bit set to 0, and might derive CoS and time to live (TTL)
from lower levels. The new top label in a label stack always initializes
its TTL to 255, regardless of the TTL value of lower labels.
- Pop—Remove the label from the beginning of the packet.
Once the label is removed, the TTL is copied from the label into the
IP packet header, and the underlying IP packet is forwarded as a native
IP packet. In the case of multiple labels in a packet (label stacking),
removal of the top label yields another MPLS packet. The new top label
might derive CoS and TTL from a previous top label. The popped TTL
value from the previous top label is not written back to the new top
label.
- Swap—Replace the label at the top of the label stack
with a new label. The S and CoS bits are copied from the previous
label, and the TTL value is copied and decremented (unless the no-decrement-ttl or no-propagate-ttl statement is configured).
A transit router supports a label stack of any depth.
- Multiple Push—Add multiple labels (up to three)
on top of existing packets. This operation is equivalent to pushing
multiple times.
- Swap and Push—Replace the existing top of the label
stack with a new label, and then push another new label on top.
[Contents]
[Prev]
[Next]
[Index]
[Report an Error]