Label Allocation
Note that earlier versions of JUNOS software allocate labels on a per-interface basis. Labels on different interfaces are assigned independently. This means that a particular label received on one interface is not related to the same label received on a different interface. For this reason, labels usually are preceded by an interface name in display output (in the format
interface.label). For example,so-5/0/0.0.01024indicates that the label value01024was received on interfaceso-5/0/0.0.In the JUNOS software Release 4.2 and later, label values are allocated per router only. The display output shows only the label (for example,
01024).Labels for multicast packets are independent of those for unicast packets. Currently, the JUNOS software does not support multicast labels.
Labels are assigned by downstream routers relative to the flow of packets. A router receiving labeled packets (the next-hop router) is responsible for assigning incoming labels. A received packet containing a label that is unrecognized (unassigned) is dropped. For unrecognized labels, the router does not attempt to unwrap the label to analyze the network layer header, nor does it generate an ICMP destination unreachable message.
A packet can carry a number of labels, organized as a last-in, first-out stack. This is referred to as a label stack. At a particular router, the decision as to how to forward a labeled packet is based exclusively on the label at the top of the stack.
Figure 1 shows the encoding of a single label. The encoding appears after data link layer headers, but before any network layer header.
![]()