MPLS, short for Multiprotocol Label Switching, is a forwarding technique in which routers move packets along predetermined label-switched paths by reading a short fixed-length label instead of performing a full IP lookup at every hop. In networking and routing, it sits between the data link layer and the network layer, which is why engineers often call it a layer 2.5 technology.
MPLS does not replace routing protocols. An interior gateway protocol such as OSPF or IS-IS still computes reachability, while MPLS adds a separate forwarding plane that service providers and large enterprises use for Layer 3 VPNs, traffic engineering and fast recovery from link failures.
How MPLS forwards packets with labels
MPLS forwards packets by swapping labels rather than by matching destination prefixes. When an IP packet enters the MPLS domain, the ingress label edge router classifies it into a forwarding equivalence class (FEC), which is a group of packets that receive identical treatment, and pushes a label onto it.
Each label switching router (LSR) in the core then looks up the incoming label in its label forwarding information base, replaces it with an outgoing label and sends the packet to the next hop. Because the lookup is an exact match on a 20-bit value, it avoids the longest prefix match that ordinary IP forwarding requires. At the far edge, the egress router removes the last label and forwards the original packet normally.
The label itself lives in a 32-bit shim header inserted between the layer 2 header and the IP header. The following table describes its four fields.
| Field | Size | Purpose |
|---|---|---|
| Label | 20 bits | Identifies the path or service; values 0 to 15 are reserved |
| Traffic class | 3 bits | Carries quality of service markings, formerly called EXP |
| Bottom of stack | 1 bit | Set to 1 on the last label in the stack |
| Time to live | 8 bits | Prevents loops, usually copied from the IP header |
Labels can be stacked, so a packet may carry an outer transport label and an inner service label. This label stacking is what allows one core network to carry many independent customer VPNs at the same time.
Label operations and router roles
Every MPLS router performs one of three basic operations on the top label: push, swap or pop. Where each operation happens depends on the router’s position along the label-switched path (LSP), which is always unidirectional, so two-way traffic needs two LSPs.
| Role | Common name | Main operation |
|---|---|---|
| Ingress LER | Provider edge (PE) | Classifies traffic and pushes labels |
| Transit LSR | Provider (P) router | Swaps the top label |
| Penultimate LSR | Provider (P) router | Pops the transport label |
| Egress LER | Provider edge (PE) | Removes the service label and routes the packet |
Penultimate hop popping removes the transport label one hop before the egress router, so the egress device performs only one lookup instead of two. An egress router signals this behavior by advertising the implicit null label (value 3); it advertises explicit null instead when the traffic class marking must survive to the last hop.
Label distribution protocols in MPLS
Routers must agree on label meanings, and several control plane protocols distribute those bindings. The choice of protocol determines whether paths simply follow the IGP shortest path or are engineered explicitly.
| Protocol | What it signals | Typical use |
|---|---|---|
| LDP | Labels for IGP prefixes | Basic transport following shortest paths |
| RSVP-TE | Explicit paths with bandwidth | Traffic engineering and fast reroute |
| MP-BGP | VPN and service labels | Layer 3 VPNs and EVPN services |
| IGP extensions | Segment identifiers | Segment routing without LDP or RSVP |
LDP is the simplest option because it follows the routing table, but it cannot steer traffic away from congested links. RSVP-TE reserves bandwidth along a computed path and supports fast reroute that switches traffic to a precomputed backup in about 50 milliseconds, although it keeps per-path state on every transit router. Segment routing, a neighboring concept, moves that state into the packet header and is now a common successor design.
Services built on MPLS
The main value of MPLS today lies in the services it carries, not in faster lookups, since modern hardware performs IP lookups at line rate. Providers sell these services under names such as MPLS VPN or IP VPN.
- Layer 3 VPN (L3VPN): each customer gets a virtual routing and forwarding instance on the PE router, and MP-BGP carries customer routes with route distinguishers so that overlapping address spaces do not collide.
- Layer 2 VPN: pseudowires and VPLS emulate point-to-point circuits or a shared Ethernet segment across the core.
- EVPN: a BGP-based control plane for Ethernet services with all-active multihoming and better MAC address handling than VPLS.
- Traffic engineering: RSVP-TE or segment routing policies place flows on paths other than the shortest one to balance link utilization.
MPLS compared with related WAN approaches
Enterprises usually compare a managed MPLS service with SD-WAN over internet links and with plain IP routing. The comparison below summarizes the practical trade-offs.
| Criterion | MPLS VPN | SD-WAN over internet | Plain IP routing |
|---|---|---|---|
| Path control | Engineered by provider | Application-aware overlay | Shortest path only |
| Performance guarantees | Contractual SLA | Best effort, mitigated | None |
| Encryption | Not built in | IPsec by default | Optional |
| Cost per megabit | High | Low | Low |
| Provisioning time | Weeks to months | Days | Days |
Many organizations now run a hybrid design, keeping MPLS for latency-sensitive traffic such as voice and ERP and moving bulk traffic to SD-WAN. A common misconception is that MPLS is inherently encrypted; it provides traffic separation, not confidentiality, so sensitive data still needs IPsec or MACsec when that matters.
Limitations and common mistakes
MPLS adds operational complexity that small networks rarely need. Troubleshooting requires familiarity with label tables, LSP ping and traceroute, and a mismatch between IGP and LDP can silently drop traffic.
| Symptom | Likely cause | Remedy |
|---|---|---|
| Large packets dropped | Label overhead exceeds link MTU | Raise core MTU by 4 bytes per label |
| Traffic black-holed after IGP change | LDP not yet synchronized | Enable LDP-IGP synchronization |
| Hidden core hops | TTL propagation disabled | Adjust TTL policy as needed |
| VPN routes missing | Route target mismatch | Align import and export targets |
Another frequent mistake is assuming that an MPLS service guarantees performance end to end. The SLA covers only the provider core, so congestion on access circuits or inside the customer site still degrades applications.
Stripped to the essentials
Normally, every router reads the full address on a packet and decides where to send it next. MPLS works more like a sorting tag on a parcel. The first router decides the whole route once and attaches a short tag, and every router after that only reads the tag.
This makes it easy for a network provider to keep different customers apart, to send traffic along chosen roads instead of the shortest one, and to switch to a backup road quickly. The key point is that MPLS is about controlled, separated paths, not about secrecy, because the tags do not encrypt anything.
Where it is applied
A retail chain with 120 stores and two data centers buys a Layer 3 MPLS VPN from a regional carrier. Each store connects to the nearest provider edge router over a 50 Mbit/s access circuit, and the carrier places all sites in one virtual routing and forwarding instance, so stores reach the data centers without any tunnels on the store routers.
Point-of-sale and voice traffic is marked with a high traffic class, and the carrier’s RSVP-TE tunnels with fast reroute keep card payments flowing during a fiber cut that would otherwise interrupt them for several seconds. Guest internet and software updates go out over cheaper local broadband through SD-WAN. The result is predictable latency for critical systems at a lower total cost than carrying everything over MPLS.