The MPLS Label Stack Encoding standard (RFC 3032) specifies two reserved values (among others) that are useful in the last hop of a Label Switched Path (LSP):
- 0: explicit NULL. Can be used in signaling protocols as well as label headers.
- 3: implicit NULL. Used in signaling protocols only. It should never appear in the label stack. Its use in a signaling protocol indicates that the upstream router should perform penultimate hop popping (PHP; remove the top label on the stack).
The implicit NULL should be used whenever possible, as the PHP reduces the amount of lookup required on the last hop of an LSP (sometimes that could mean the difference between hardware and software lookup).
When using the implicit NULL, the last hop of the MPLS network performs QoS actions based on the IP packet (the top label of the stack has already been removed).
Explicit NULL could be used in environments where you want to use MPLS QoS values that are different from IP DSCP/IP Precedence values.
If the egress router signals an explicit NULL, the EXP bits in the label stack are preserved throughout the MPLS network and the QoS actions performed by the penultimate router are easily based on MPLS EXP bits.
By default, Cisco routers advertise implicit NULL with LDP. To change this behavior, use the mpls ldp explicit-null global configuration command.