Understanding Asymmetric Routing in Computer Networks
In the vast landscape of computer networks, various complex phenomena influence the efficiency and reliability of data transmission.…
MPLS (Multiprotocol Label Switching) forwards packets using a short, fixed-length label instead of doing a destination lookup in the IP routing table at every hop. The first router classifies the packet and pushes a label onto it; every router after that switches the packet purely on that label. It is called “multiprotocol” because the payload underneath the label can be IPv4, IPv6, Ethernet, or almost anything else.
MPLS sits between Layer 2 and Layer 3, which is why engineers call it a “Layer 2.5” technology. It was standardised by the IETF in RFC 3031 (January 2001), growing out of Cisco’s Tag Switching and IBM’s ARIS work in the late 1990s.
MPLS inserts a 4-byte (32-bit) label stack entry between the Layer 2 frame header and the Layer 3 packet header. That 4-byte entry is not all label, it carries four fields:
| Field | Size | What it does |
|---|---|---|
| Label | 20 bits | The forwarding value. Values 0–15 are reserved (label 3 = implicit null, used for PHP). |
| TC / EXP | 3 bits | Traffic Class, carries QoS priority, the MPLS equivalent of DSCP. |
| S (Bottom of Stack) | 1 bit | Set to 1 on the last label. Tells the router the IP header comes next. |
| TTL | 8 bits | Hop count, so MPLS loops still die. |
A packet can carry more than one label at a time, a label stack. In an MPLS VPN this is normal: an outer transport label gets the packet across the provider core, and an inner VPN label tells the last router which customer the packet belongs to.
| Component | Also called | Role |
|---|---|---|
| LER, Label Edge Router | PE (Provider Edge) | Sits at the edge. Classifies incoming IP packets into a FEC and pushes the first label. On the way out it pops the label and forwards normal IP. |
| LSR, Label Switching Router | P (Provider) router | Sits in the core. Never looks at the IP header, it only swaps labels. |
| CE, Customer Edge | — | The customer’s own router. It has no idea MPLS exists. |
| LSP, Label Switched Path | — | The unidirectional path a labelled packet follows from ingress LER to egress LER. Two-way traffic needs two LSPs. |
| FEC, Forwarding Equivalence Class | — | A group of packets treated identically. Usually “all traffic to this destination prefix”, but it can also be per-VPN or per-QoS class. |
| LFIB, Label Forwarding Information Base | Label forwarding table | The table an LSR actually forwards on: incoming label → outgoing label + outgoing interface + next hop. |
MPLS uses exactly three label operations. Most explanations get this wrong by claiming the label is stripped at every hop, it is not. It is swapped.
Customer traffic destined for 10.20.0.0/16 crossing a four-router provider core:
That step 4 behaviour is PHP, Penultimate Hop Popping. It exists so the egress router does not have to do two lookups (one label lookup, then one IP lookup) on the same packet. It is on by default on Cisco IOS.
Labels are only locally meaningful. Router A’s label 300 has nothing to do with Router B’s label 300. So every router has to tell its neighbours which label to use when sending it traffic for a given prefix. That job belongs to a label distribution protocol:
Label switching alone is not why providers deploy MPLS today (modern hardware does IP lookups at line rate anyway). The real driver is MPLS VPN: carrying many customers’ overlapping private address space across one shared core.
The provider edge router keeps a separate routing table per customer using VRF (Virtual Routing and Forwarding). Three pieces make it work:
The packet then carries two labels: the outer transport label to cross the core, and the inner VPN label that tells the egress PE which VRF to drop the packet into. Our Cisco MPLS multi-VRF lab walks through the configuration end to end.
Instead of routing for the customer, the provider carries their Layer 2 frames:
Plain IP routing sends everything down the shortest path, even when it is congested and an alternate path is idle. MPLS-TE lets you build an LSP along a path you choose, reserve bandwidth on it, and pin specific traffic to it. Combined with the 3-bit TC field, this is how providers deliver a genuine SLA on latency and jitter for voice and video, and what people are really buying when they buy an MPLS circuit.
MPLS-TE also enables Fast Reroute (FRR): a pre-computed backup LSP that takes over in under 50 ms when a link fails, without waiting for the IGP to reconverge.
Cisco Express Forwarding (CEF) is a hard prerequisite, not an optional optimisation. MPLS label imposition on Cisco platforms is built on the CEF forwarding table, if CEF is disabled on an interface, MPLS will not label packets on it. On any modern IOS/IOS-XE box CEF is on by default, but it is the first thing to check when labels mysteriously are not being imposed.
These are not competing versions of the same thing. MPLS is a transport a provider sells you; SD-WAN is an overlay you run yourself on top of whatever transport you have, broadband, LTE, or MPLS itself. Many networks run SD-WAN over a cheap internet link plus a smaller MPLS circuit kept for latency-sensitive traffic. The main platforms are compared in Versa vs Cisco SD-WAN, and SD-WAN interview questions covers the concepts in exam form. See the full SD-WAN vs MPLS comparison for cost and design trade-offs.
1. “MPLS encrypts your traffic.” It does not. MPLS provides isolation, not confidentiality, it is private in the same sense a leased line is private. Anyone with access to the provider core can read the payload. If you need confidentiality over MPLS you still run IPsec or a VPN on top.
2. “MPLS gives you more bandwidth or higher speed.” A label lookup is not faster than an IP lookup on modern hardware, that argument was true in 1998 when ASICs could not do longest-prefix match at line rate, and it stopped being true years ago. What MPLS actually gives you is predictability: engineered paths, reserved capacity and QoS enforcement. The circuit speed is whatever you paid for.
3. “The label is removed at every hop.” Only the penultimate router pops the label (and only because PHP tells it to). Every other core router swaps one label for another. If labels were removed and re-added at each hop, MPLS would have to consult the IP routing table each time, which is exactly what it exists to avoid.
Neither. It runs between them, which is why it is called Layer 2.5. It uses Layer 2 style fixed-length switching but is signalled by Layer 3 protocols and sits above the data link header.
The label field itself is 20 bits. The full label stack entry, label plus TC, bottom-of-stack bit and TTL, is 4 bytes.
No. MPLS depends on an IGP (OSPF or IS-IS) to build the paths, and on LDP, RSVP-TE or MP-BGP to distribute labels along them. It is a forwarding mechanism layered on top of routing, not a replacement for it.
An LER (or PE) sits at the network edge and does the label push and pop, plus the IP lookup. An LSR (or P router) sits in the core and only swaps labels, it never looks at the customer IP header.
The data plane is not, labels are still how most provider cores forward. What is being replaced is the control plane: Segment Routing is displacing LDP and RSVP-TE, and EVPN is displacing VPLS. Enterprises are also shifting bulk traffic from MPLS circuits to SD-WAN over broadband for cost reasons, while keeping MPLS for latency-critical flows. See Versa SD-WAN vs Cisco SD-WAN for a platform comparison.
Label imposition on Cisco routers is built on the CEF forwarding table. Without CEF enabled on the interface, the router will not impose labels.