MPLS Header


The MPLS header is 32 bits, where majority of it is the MPLS label. This document describes the label, its operations and functionality.

MPLS Header Format

  • MPLS Header format (4 Bytes):
                    1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2
0-20 Label
20-22 Experimental Bits (QoS) or Traffic Class (TC) field.
23 BoS (Bottom of Stack bit)
24-31 Time to Live (TTL)
  • Sample capture of a MPLS frame.

Label Numbering

Reserved Labels

  • Reserved labels 0 - 15 have a special meaning on LSR routers.
    • Label 3 - Implicit NULL (Penultimate Hop Popping) - the egress LSR tells the neighboring LSR to pop the topmost label before forwarding to the egress LSR. This also removes the EXP (QoS) value which may not be ideal when using MPLS DiffServ Tunneling. The benefit of doing implicit NULL is that egress LSR does not have to lookup label, strip it and then lookup IP forwarding. It is a performance improvement.
    • Label 0 - Explicit Null (IPv4) - the egress LSR tells the neighboring LSRs to forward the packet keeping the explicit null label (0). The egress router strips the label, paying attention to the QoS value, looks up the IP forwarding, without doing a lookup on the label. The biggest advantage of explicit null is transferring the QoS information.
    • Label 2 - Explicit Null (IPv6) - same as with label 0 but for IPv6.
    • Label 1 - Router Alert - label that informs the LSR to look at the packet using software instead of forwarding in hardware. This is mainly used for traceroute or other management features.
  • For more reserved labels see Multiprotocol Label Switching Architecture (MPLS) Label Values

EXP bit

  • The Experimental bit is not really experimental, but used for QoS similarly like the Class of Service field.
  • Based on RFC5462, the EXP bit has been renamed to Traffic Class field. TC name is not uses widely.

Bottom of the Stack

  • BoS is a field that is set to 1 for the last MPLS header.
  • For example with MPLS VPN the VPN label will have BoS set to 1, which tells the MPLS router to process the embedded transport protocol.
  • This bit is also referred to as S-bit in some literature.


  • Just like in IP header, the TTL field is used to prevent infinite forwarding loops of MPLS frames.
  • Max value is 255.
  • The TTL field can be used for path tracking like MPLS Traceroute.
  • See MPLS TTL Behavior for more information how MPLS' TTL field relates to the IP's TTL field.

Forwarding Labels Packets

  • Penultimate Hop Popping (PHP) - The last router advertising a connected network will send a special reserved label to the neighboring LSRs, with value 3 (implicit null). This will tells these routers to pop the label and just forward these packets using IP or if there is another label with that label. Only one label is poped. PHP reduces the process of label lookup, label pop and IP lookup to just IP lookup on the last router. This is the default forwarding for connected and summarized routes on Cisco IOS.
  • Explicit Null - the egress router advertised a label 0 of its connected routes to all LSR neighbors. When forwarding packets, they keep that explicit null label and forward to the egress router. It doesn't have to do a looking in the LFIB, but automatically strips the label still seeing the EXP value for QoS. The main reason for explicit null label is to maintain the EXP value for egress routers to see.

Relevant Commands

mpls label range

Defines a range for the MPLS labels. By default Cisco uses 16 to 100,000. This command might require a reboot. It's a good idea when working on a lab to limit the MPLS ranges for each routers. For example on R1 use range 1000-1999 and R2 use range 2000-2999. This simplifies the troubleshooting process.

R1(config)#        mpls label range (start) (end)

Additional Resources

MPLS Labels Networkers-Online
IANA Reserved MPLS Labels
RFC5462 - Multiprotocol Label Switching (MPLS) Label Stack "EXP" Field Renamed to "Traffic Class" Field
-Multiprotocol Label Switching Architecture (MPLS) Label Values
MPLS Fundamentals by Luc De Ghein


rating: 0+x
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License