The MPLS Header and Label
The MPLS header is a 4-byte header, located immediately before the IP header. Many people
simply refer to the MPLS header as the MPLS label, but the label is actually a 20-bit field in the
MPLS header. You may also see this header referenced as an MPLS shim header. Figure 19-4
shows the entire label, and Table 19-3 defines the fields.
Figure 19-4 The MPLS Header
Of the four fields in the MPLS header, the first two, Label and EXP, should already be familiar.
The 20-bit Label is usually listed as a decimal value in show commands. The MPLS EXP bits
allow for QoS marking, which can be done using CB Marking, as covered in Chapter 12,
“Classification and Marking.” The S bit will make more sense once you examine how MPLS VPNs
work, but in short, when packets hold multiple MPLS headers, this bit allows an LSR to recognize
the last MPLS header before the IP header. Finally, the TTL field requires a little more
examination, as covered in the next section.
Table 19-3 MPLS Header Fields
Field
Length
(Bits) Purpose
Label 20 Identifies the portion of a label switched path (LSP).
Experimental (EXP) 3 Used for QoS marking; the field is no longer used for truly
experimental purposes.
Bottom-of-Stack (S) 1 Flag, which when set to 1, means that this is the label
immediately preceding the IP header.
Time-to-Live (TTL) 8 Used for the same purposes as the IP header’s TTL field.