MPLS
— Multiprotocol Label SwitchingMultiprotocol Label Switching sits between Layers 2 and 3, inserting a 4-byte shim header in front of each packet. Edge routers classify traffic into a Forwarding Equivalence Class and push a label, while core routers swap labels from a label forwarding table without inspecting the IP header, enabling fast forwarding, traffic engineering, and VPN services.
Interactive Session: How MPLS Works
Step through the packet exchange sequence between nodes.
Interactive Execution Sandbox
Interact with a live or clearly-labelled simulated instance of MPLS.
Threat Model & Attack Simulation
How this protocol is attacked in practice, what defenders can see, and which control stops it.
Threat model & attack simulation
SimulatedDefensive education. Every step runs in this page; no traffic is generated or sent.
MPLS VPN label leak
InterceptionA misconfigured label stack or route target lets traffic from one VPN reach another.
Craft a labelled packet
The attacker sends traffic with a label that belongs to another VRF.
Labels arriving from an unexpected interface.
Tenant isolation failure and data exposure.
Defences that matter
- Strict label and route-target filtering
- Inter-AS option controls
- Flow monitoring across VRFs
This is a conceptual model for defenders, not an exploit toolkit. It contains no payloads, tooling or instructions for attacking systems you do not own.
Protocol Specification & Architecture
Key characteristics, real-world deployment patterns, and trade-offs.
Core Technical Features
- 4-byte shim header with a 20-bit label, 3-bit EXP field, 1-bit bottom-of-stack, and 8-bit TTL
- Label stacks allow nested services such as Layer 3 VPNs and fast reroute
- Push, swap, and pop operations performed by ingress, transit, and egress routers
- Label bindings distributed by LDP (RFC 5036), RSVP-TE, or BGP
- Penultimate hop popping removes the final label one hop before the egress router
Real-World Use Cases
- Service provider core transport for many customers over one infrastructure
- Layer 3 VPNs that keep customer routing separate on a shared core
- Traffic engineering and fast reroute for mission-critical paths
Advantages & Strengths
- Fixed-length label lookup replaces a longest-prefix match at every core hop
- VPN and traffic engineering services share one converged packet core
- Independent of the payload protocol, so it can carry IPv4, IPv6, or Ethernet
Limitations & Vulnerabilities
- Label distribution and fault isolation demand specialist operational skills
- The extra header eats MTU and adds a control plane that must be maintained