Why Traditional IP Forwarding Has Limitations at Provider Scale
The CEF-based forwarding discussed earlier in this series makes IP forwarding decisions extremely efficient by precomputing the FIB and adjacency table, but every router along a packet's path still independently performs its own longest-prefix-match lookup, discussed earlier in this series regarding routing fundamentals, based purely on the destination IP address. In large service provider networks carrying immense traffic volumes, and needing fine-grained traffic engineering control over exactly which physical path traffic takes, this per-hop independent lookup model has real limitations.
The Core MPLS Idea: Label Once, Switch Repeatedly
MPLS (Multiprotocol Label Switching) changes this model fundamentally: rather than every router along the path making an independent forwarding decision based on the IP header, a short, fixed-length Label is attached to each packet at the network's ingress, and every subsequent router forwards the packet using this simple label rather than re-examining the IP header at all.
MPLS label structure (a 32-bit field inserted
between the Layer 2 header and the IP header,
discussed earlier in this series regarding
encapsulation):
Label: 20 bits (the actual label value, 0-1,048,575)
EXP: 3 bits (used for QoS marking, similar
in purpose to the DSCP marking discussed
earlier in this series)
S: 1 bit (indicates the bottom of the label
stack, since multiple labels can be stacked)
TTL: 8 bits (functions like the IP TTL field,
preventing infinite loops)MPLS Router Roles
Label Edge Router (LER): sits at the boundary of
the MPLS network, performing the initial IP
lookup and attaching (or removing) labels --
this is the only point where a full traditional
IP routing table lookup, discussed earlier in
this series, actually happens
Label Switch Router (LSR): sits within the core
of the MPLS network, making forwarding
decisions based purely on the label value,
without ever examining the underlying IP
header at allThis division of labor is the source of MPLS's core efficiency benefit: the computationally simpler label lookup replaces the more complex IP lookup for every router except the ones at the network's edge, where that complexity genuinely cannot be avoided.
How Labels Get Assigned: LDP
LDP (Label Distribution Protocol) is how neighboring MPLS routers automatically agree on which label value represents which destination network, building the Label Forwarding Information Base (LFIB) that LSRs use to make their simple, label-based forwarding decisions.
Router(config)# mpls ip
Router(config)# interface gigabitethernet 0/0
Router(config-if)# mpls ip
-- Enabling MPLS on an interface automatically
-- triggers LDP to begin discovering neighbors
-- and exchanging label bindings for routes
-- already known via the underlying IGP
-- (OSPF or EIGRP, discussed earlier in this
-- series), since MPLS relies entirely on the
-- existing IP routing table to determine
-- reachability -- it does not replace IP
-- routing, only the forwarding mechanismLabel Distribution: Downstream Unsolicited Advertisement
How a label binding actually gets created:
1. Router B has a route to network 192.168.1.0/24
in its IP routing table (learned via OSPF,
for example)
2. Router B assigns a local label (e.g., 100)
for this destination
3. Router B advertises this binding to its LDP
neighbor, Router A: "use label 100 when
sending traffic to 192.168.1.0/24 through me"
4. Router A records this in its own LFIB,
and will attach label 100 to any traffic
destined for that network before forwarding
it to Router BThis "downstream" labeling convention -- the router closer to the destination assigns and advertises the label -- allows each router along the path to build up a simple table mapping incoming labels to outgoing labels and interfaces, without needing any awareness of the full end-to-end path.
Following a Labeled Packet Through the Network
Router# show mpls forwarding-table
Local Outgoing Prefix Outgoing Next Hop
Label Label or Tunnel Id interface
100 102 192.168.1.0/24 Gi0/1 10.0.0.2
-- This shows label swapping in action: a packet
-- arriving with local label 100 gets its label
-- SWAPPED to 102 before being forwarded out
-- GigabitEthernet0/1 toward 10.0.0.2 -- each
-- LSR along the path performs this same simple
-- swap operation, never re-examining the
-- original IP header at allThis label-swapping mechanism, rather than a full IP lookup at each hop, is computationally simpler and was historically significantly faster in hardware, though modern CEF-based IP forwarding, discussed earlier in this series, has largely closed this specific raw-speed gap -- MPLS's more enduring practical value today lies elsewhere.
Where MPLS's Real Value Lies Today
Traffic Engineering: MPLS labels can represent
a specific, explicitly engineered path through
the network rather than simply the shortest
IGP path, allowing traffic to be steered along
a deliberately chosen route for load-balancing
or avoiding specific links
VPN Services: MPLS is the foundation for
provider-based Layer 3 VPN services, allowing
a single service provider network to carry
traffic for many separate customers while
keeping each customer's routing information
and traffic completely isolated from every
other customer, using additional labels to
distinguish between customer VPNsThis VPN application is arguably MPLS's most significant real-world use case: enterprise customers purchasing an "MPLS VPN" service from a provider are relying on exactly this label-based isolation mechanism to keep their traffic securely separated from every other customer sharing that same provider's physical infrastructure.
Why Understanding MPLS Matters for Enterprise Networking
While MPLS core internals are primarily configured and managed by service providers rather than enterprise network administrators directly, understanding how it works underneath is essential for anyone purchasing, troubleshooting, or designing around MPLS-based WAN connectivity, discussed earlier in this series regarding traditional WAN design and its SD-WAN alternative. Recognizing that an "MPLS circuit" represents a labeled, engineered path through a provider's network -- rather than simply a generic point-to-point connection -- clarifies why MPLS services carry specific guarantees and limitations that a simple internet connection does not.