TTR Networks

What is MPLS?

Multiprotocol Label Switching

MPLS (Multiprotocol Label Switching) forwards packets using short labels attached to them, rather than looking up the destination IP address at every hop.

When a packet enters an MPLS network, the ingress router chooses a path for it and pushes a label: a 32-bit shim header placed between the layer-2 header and the IP header, containing a 20-bit label value, 3 traffic class bits, a bottom-of-stack bit and an 8-bit TTL. Each router along the path looks only at the top label, swaps it for the label the next router expects, and forwards the packet. Near or at the far edge the label is popped and the packet continues as ordinary IP. The sequence of routers is a label-switched path, and labels are handed out by a control-plane protocol such as LDP, RSVP-TE or, increasingly, segment routing. Labels can be stacked, which is the key to its flexibility: an outer label gets the packet across the core, and an inner label tells the egress router what to do with it.

Engineers mostly meet MPLS in service-provider and large enterprise networks. Its best-known use is the L3VPN: customers' routes are kept in separate VRFs, exchanged between provider edge routers with BGP, and carried across the core with a two-label stack, so overlapping customer address space like 10.0.0.0/8 never collides. It's also used for traffic engineering (steering flows onto paths other than the IGP's shortest) and fast reroute. The name "multiprotocol" refers to carrying many kinds of payload, not just IPv4. A frequent confusion is to call any private WAN "MPLS"; that describes the service sold, while MPLS itself is the forwarding technology underneath. In data centres, EVPN is often carried over VXLAN instead of MPLS.

Lessons that use MPLS

  • Building a network lab on an Apple Silicon MacBeginner · 45 min

    Run real network labs on an M-series Mac: native FRR and Linux containers, x86-only images through Rosetta, and full x86 VyOS VMs under QEMU in Docker, with the pitfalls that stop most people and a starter lab that mixes all three.

  • BGP FundamentalsIntermediate · 75 min

    How the Border Gateway Protocol glues the internet together: autonomous systems, sessions, path attributes, best-path selection, iBGP scaling and a hands-on eBGP lab with real FRR configuration.

Related terms