MPLS Special Labels
MPLS label range from 0 to 1,048,575 (configurable on Cisco IOS) Labels 0 through 15 are reserved labels. An LSR cannot use them in the normal case for forwarding packets, the labels from 16 through 1,048,575 are used for normal packet forwarding. In Cisco IOS, the default range is 16 through 100,000. This number is more than enough for labeling all the IGP prefixes in large routing table, but in very large scale networks this number might be insufficient, so we can change the label range with the mpls label range min max command
LSR1(config)#mpls label range ? <16-1048575> Minimum label value
LSR1#show mpls label range Downstream Generic label region: Min/Max label: 16/100000 LSR1(config)#mpls label range ? <16-1048575> Minimum label value LSR1(config)#mpls label range 20 1000 LSR1#show mpls label range Downstream Generic label region: Min/Max label: 20/1000
MPLS Reserved Labels Range
Labels 0 through 15 are reserved labels. An LSR cannot use them in the normal case for forwarding packets. An LSR assigns a specific function to each of these labels. Label 0 is the explicit NULL label, whereas label 3 is the implicit NULL label. Label 1 is the router alert label, whereas label 14 is the OAM alert label. The other reserved labels between 0 and 15 have not been assigned yet.
Implicit NULL Label (Label3)
The implicit NULL label is the label that has a value of 3. An egress LSR assigns the implicit NULL label to directly connected and summarized routes, thus requesting the upstream LSR to perform a pop operation (PHP is the default mode on Cisco IOS).
Without Implicit-null label the Egress LSR receive the packets with only one label on top of the label stack. It would then have to do two lookups. First, it would have to look up the label in the LFIB, just to figure out that the label needs to be removed; then it would have to perform an IP lookup. These are two lookups, and the first is unnecessary.
By using implicit-null label a double lookup problem solved, The egress LSR signals the penultimate LSR to use implicit NULL by not sending a regular label, but by sending the special label with value 3. The result is that the egress LSR receives an IP packet and only needs to perform an IP lookup to be able to forward the packet. This enhances the performance on the egress LSR.
Explicit NULL Label (Label 0 V4/ 2 V6)
The use of implicit NULL solve the double problem but it has one downside: The packet is forwarded with one label less than it was received by the PHP LSR or unlabeled if it was received with only one label in the stack. Besides the label value, the label also holds the Experimental (EXP) bits. When a label is removed, the EXP bits are also removed. Because the EXP bits are exclusively used for quality of service (QoS), the QoS part of the packet is lost when the top label is removed. In some cases, you might want to keep this QoS information and have it delivered to the egress LSR. Implicit NULL cannot be used in that case, so Explicit-null is the solution to overcome the downside of implicit-null.
because the egress LSR signals the IPv4 explicit NULL label (value 0 for IPv4 or 2 for IPv6) to the PHP router. The egress LSR then receives labeled packets with a label of value 0 as the top label. The LSR cannot forward the packet by looking up the value 0 in the LFIB because it can be assigned to multiple FECs. The LSR just removes the explicit NULL label, then another lookup has to occur, but the advantage is that the router can derive the QoS information of the received packet by looking at the EXP bits of the explicit NULL label.
Router Alert Label (Label 1)
The Router Alert label is the one with value 1. This label can be present anywhere in the label stack except at the bottom. When the Router Alert label is the top label, it alerts the LSR that the packet needs a closer look. Therefore, the packet is not forwarded in hardware, but it is looked at by a software process. When the packet is forwarded, the label 1 is removed. Then a lookup of the next label in the label stack is performed in the LFIB to decide where the packet needs to be switched to. Next, a label action (pop, swap, push) is performed, the label 1 is pushed back on top of the label stack, and the packet is forwarded.
you can also have a look at MPLS Label Operations.
Mounir Mohamed, CCIE#19573