LearnNetwork
MPLS and the LSP lifecycle

MPLS — labels, FEC, and the LSP lifecycle

12 min

MPLS (Multi-Protocol Label Switching, RFC 3031) bolts a small label between the L2 and L3 headers. Routers in the core then forward by label, not IP destination. The result: deterministic paths, fast hardware-only forwarding, and the foundation of every L2/L3 VPN service on the planet.

The label

A 32-bit shim:

+---------+-----+---+-----+
| Label   | EXP | S | TTL |
| 20 bits | 3   | 1 | 8   |
+---------+-----+---+-----+
  • Label — the per-hop identifier, locally significant on each router.
  • EXP (now called TC — Traffic Class) — 3 bits of CoS / QoS, similar to IP DSCP.
  • S (Stack bit) — 1 if this is the bottom of the label stack, 0 otherwise. MPLS supports multiple labels stacked (push/swap/pop).
  • TTL — same as IP TTL, but for the label stack.

EtherType for unicast MPLS is 0x8847.

(empty label stack)

Press 'Next' to apply operations.

0 / 4

FEC — Forwarding Equivalence Class

An FEC is a group of packets the network treats the same way — typically "all packets destined for prefix X." When a packet enters the MPLS core, the ingress router classifies it into a FEC and assigns the appropriate label. Inside the core, routers only see the label, never the IP — forwarding is one table lookup, not a full longest-prefix match.

This is why MPLS is fast: ASICs can do label-based forwarding at much higher rates than full IP routing. (Modern hardware closes the gap, but historically that was the win.)

LSP — Label Switched Path

An LSP is the path through the network for a given FEC, defined by the chain of label swaps. End-to-end:

  1. Ingress LER (Label Edge Router) — receives IP packet, looks up FEC, pushes the outer label, sends to first P.
  2. P (Provider / transit) routers — read incoming label, look up in LFIB (Label Forwarding Information Base), swap for outgoing label, forward.
  3. Penultimate P — typically pops the label (PHP — Penultimate Hop Popping) so the egress LER just sees a plain IP packet.
  4. Egress LER — does the final IP lookup (or service lookup for VPNs) and delivers.

The whole "decision" was made at ingress; transit routers just execute.

Why operators love MPLS

  • Traffic engineering. With RSVP-TE you can explicitly choose a path through the network — for capacity, latency, or shared-risk-group avoidance.
  • L2 and L3 VPNs. A second (inner) label identifies the service / VPN. The outer label moves the packet through the core; the inner label identifies which customer/service it belongs to at egress.
  • Fast reroute. With LDP / RSVP and protection LSPs (MPLS-FRR), failover under 50 ms — fast enough for voice/video without disruption.
  • Service abstraction. Customers see a clean L2 or L3 interconnect; the operator's core is invisible.

The control plane — who hands out labels?

MPLS doesn't compute paths itself. Two main protocols populate the label tables:

| Protocol | Builds | Used for | |---|---|---| | LDP | Best-path LSPs that follow the IGP shortest path | General connectivity, L2/L3 VPN underlay | | RSVP-TE | Explicitly-routed LSPs with bandwidth reservations | Traffic engineering, MPLS-TE, fast reroute | | Segment Routing (SR-MPLS) | Source-routed LSPs using IGP-distributed labels | Modern replacement for both LDP and RSVP — simpler |

CCNA doesn't cover MPLS in depth. NRS-I covers it heavily. We'll go deeper on LDP and RSVP in the next lessons.

What to remember

  • MPLS = a 4-byte label between L2 and L3, EtherType 0x8847.
  • A FEC is "packets that get the same forwarding"; routers in the core forward by label, not IP.
  • An LSP is the path through the core for a FEC: push at ingress, swap at each P, pop near egress (PHP).
  • Control protocols: LDP (best-path) or RSVP-TE (engineered); modern networks adopt Segment Routing.
  • The whole point: deterministic paths + service multiplexing + fast hardware forwarding.