MPLS (Multi-Protocol Label Switching) is a high-performance network forwarding mechanism that directs data across a network using short path labels rather than complex long-destination IP routing lookups. Operates between Layer 2 (Data Link) and Layer 3 (Network), making it a "Layer 2.5" protocol.
MPLS Network Roles & Operations
Customer Edge (CE): Standard IP router/switch at customer site; unaware of MPLS labels.
Provider Edge (PE / LER): Label Edge Router at provider border. Performs Label PUSH on ingress and Label POP / Penultimate Hop Popping (PHP) on egress.
Provider Core (P / LSR): Label Switch Router inside the core network. Performs fast Label SWAP operations based on its Label Forwarding Information Base (LFIB).
LDP (Label Distribution Protocol): Standard protocol (UDP/TCP Port 646) used by LSRs to exchange prefix-to-label bindings across the MPLS domain.
MPLS Label Frame Structure (4 Bytes / 32 Bits)
Label Value (20 Bits): Identifies the destination Label Switched Path (LSP). Values 0-15 are reserved.
Exp / Traffic Class (3 Bits): Quality of Service (QoS) and ECN markings.
Bottom of Stack (S-bit, 1 Bit): Set to 1 for the innermost/final label; 0 if additional labels exist underneath.
Time to Live (TTL, 8 Bits): Decremented at each LSR hop to prevent loops.