9.1 MPLS Concepts and Label Operations
Key Takeaways
An MPLS stack entry is 32 bits; its label value is 20 bits.
Labels are locally significant, and an LSP is unidirectional.
Push adds labels, swap replaces a label, and pop removes one.
Implicit Null 3 is a signaling value and is not transmitted as a data-stack label.
PHP can remove the outer transport label while leaving an inner service label.
Labels and transport paths
Multiprotocol Label Switching (MPLS) forwards packets using label state. It supports shared transport for services such as Ethernet pseudowires and routed VPNs. Its value is not a universal speed advantage over IP: modern hardware can forward both efficiently. MPLS supplies useful transport and service abstractions.
A Label Switched Path (LSP) is a unidirectional forwarding path. Traffic in the opposite direction needs its own forwarding state. A Forwarding Equivalence Class (FEC) groups traffic assigned the relevant forwarding treatment. Label signaling and routing establish the state; the data plane applies it to packets.
Labels have local significance within the receiving label space. A numeric label used on one hop need not have the same value or meaning on another router.
The four-byte stack entry
Each ordinary MPLS label-stack entry is 32 bits, but its label-value field is only 20 bits.
| Field | Bits | Purpose |
|---|---|---|
| Label value | 20 | Select the local forwarding entry |
| Traffic Class (TC) | 3 | Marking used by configured QoS treatment |
| Bottom-of-stack (S) | 1 | Identify the final stack entry |
| TTL | 8 | Limit forwarding lifetime |
A 20-bit label field has values 0 through 1,048,575. Values 0–15 are base special-purpose labels, not ordinary dynamic service labels. A 32-bit Virtual Circuit ID is also different from a 20-bit service label value.
Each additional stack entry adds four bytes. An outer transport label and inner service label add eight bytes before considering a pseudowire control word or outer link header. MTU calculations must use the counting convention of the Nokia port, tunnel, and service fields.
TC offers eight marking values, not eight guaranteed latency classes. Policy decides classification, queuing, and discard behavior. S = 1 means that the current entry is the innermost label; S = 0 means another entry follows.
Push, swap, and pop
The three principal operations are:
- Push: Add one or more label entries.
- Swap: Replace a label according to the local forwarding entry.
- Pop: Remove a label entry.
An ingress Label Edge Router can classify traffic and push labels. A transit Label Switching Router commonly swaps the top label. An egress router removes terminating labels and delivers or further forwards the exposed payload. These are common roles, not a rule that every transit router must always swap: a penultimate router can pop, and hierarchical paths can require additional pushes.
For example, PE1 sends a packet with transport label 100 toward P1. P1's local entry maps incoming 100 to outgoing 240 toward P2. P2 uses its own entry for 240. The values were allocated for the relevant receiving contexts; they are not globally assigned addresses.
Special-purpose labels
The important introductory values include:
| Value | Meaning |
|---|---|
| 0 | IPv4 Explicit Null |
| 1 | Router Alert |
| 2 | IPv6 Explicit Null |
| 3 | Implicit Null, used in signaling to request popping |
Other values in 0–15 have current assignments too. For example, 7 is the Entropy Label Indicator, 13 the Generic Associated Channel Label, and 15 the Extension Label. Consult IANA rather than calling all values 4–13 unassigned.
Implicit Null (3) is not placed in an MPLS data-packet label stack on the wire. It tells the upstream router to remove the relevant label instead of transmitting that label value.
Penultimate-hop popping
Penultimate Hop Popping (PHP) removes a terminating transport label at the router immediately before its egress. If the transport carried only native IP, the final link can carry exposed IP. If a service label remains underneath, the final link still carries MPLS.
This distinction matters in VPN scenarios. PE1 can push outer transport and inner service labels. The penultimate P router pops only the outer transport label. The egress PE receives the service label and uses it to select the correct service context. PHP does not remove every label or eliminate the egress service decision.
Explicit Null keeps a stack entry across the final link. This can preserve relevant MPLS TC information for egress handling under the configured QoS model. It does not by itself guarantee the customer's application performance or require a particular number of hardware memory cycles.
A two-label service walk
Assume PE1 sends to PE2 through a labeled core:
- The inner label identifies PE2's advertised customer service handling.
- The outer label transports the packet toward PE2.
- Transit routers forward using the active transport label.
- At transport termination, PE2 processes the service label.
- PE2 delivers the Ethernet frame or routes the customer IP packet in the selected context.
The two labels can be signaled by different protocols. Link LDP can provide the transport binding; targeted LDP can provide a pseudowire label; MP-BGP can advertise a routed VPN label. Do not assume “LDP is up” proves that every service layer is working.
TTL, tables, and diagnosis
MPLS TTL prevents indefinite forwarding loops. The relationship between inner IP TTL and MPLS TTL depends on configured propagation models. Traceroute visibility also depends on error handling and return reachability; it is not a universal guarantee that every core node appears or stays hidden.
Separate the control-plane label bindings from the active forwarding entries. A retained label binding may not be the one selected for the active next hop. To diagnose a failure, check the destination transport endpoint, underlay route, signaling relationship, selected label action, service label, and MTU in order.
Primary references
MPLS architecture, label-stack encoding, and IANA label registry, checked October 20, 2026.
Which reserved MPLS label value is designated as the Implicit Null label used by an egress Label Edge Router (LER) to signal Penultimate Hop Popping (PHP) to an upstream neighbor?
Label 0
Label 3
Label 1
Label 2
A non-penultimate transit LSR has a forwarding entry specifying a label replacement for this packet. Which operation does it perform?
Pop every label
Add an unrelated customer VLAN
Convert the packet into an ATM stream
Swap the incoming active label for the specified outgoing label
In the 32-bit MPLS label shim header, what is the specific architectural function of the 1-bit Bottom-of-Stack (S) flag?
It indicates whether the current label is the innermost label directly preceding the underlying payload header (set to 1) or an outer label in a multi-label stack (set to 0)
It flags whether the packet has experienced network congestion across transit hops
It indicates whether the label was signaled using LDP rather than RSVP-TE
It forces the receiving router to forward the packet directly to the CPM CPU for OAM diagnostic processing
Sections you finish are checked off in the contents.