Chapter 2: MPLS Fundamentals
Dive deep into the core mechanisms of MPLS, including label structure, forwarding operations, and the fundamental concepts that make MPLS networking possible.
Label Structure
The MPLS label is a 32-bit header that is inserted between the Layer 2 and Layer 3 headers. Understanding its structure is crucial for MPLS operations.
Label Header Format
The 32-bit MPLS header contains four fields: Label (20 bits), EXP/TC (3 bits), S (1 bit), and TTL (8 bits).
Field | Size (bits) | Description | Purpose |
---|---|---|---|
Label | 20 | Label value for forwarding | Identifies the LSP path |
EXP/TC | 3 | Experimental/Traffic Class | QoS marking and classification |
S (BoS) | 1 | Bottom of Stack | Indicates last label in stack |
TTL | 8 | Time to Live | Prevents forwarding loops |
Label Forwarding
MPLS forwarding is based on label swapping, where each LSR examines the incoming label, looks up the corresponding outgoing label and interface, and forwards the packet accordingly.
Ingress LSR (Push)
- Receives unlabeled IP packet
- Classifies packet into FEC
- Pushes label onto packet
- Forwards to next LSR
Transit LSR (Swap)
- Receives labeled packet
- Looks up incoming label
- Swaps to outgoing label
- Forwards to next hop
Egress LSR (Pop)
- Receives labeled packet
- Removes (pops) label
- Forwards as IP packet
- Delivers to destination
PHP (Penultimate Hop Pop)
- Second-to-last router pops label
- Reduces processing at egress
- Default behavior in most implementations
- Can be disabled if needed
LSR & LSP Concepts
Understanding Label Switch Routers (LSRs) and Label Switched Paths (LSPs) is fundamental to MPLS network design and operation.
Provider (P) Router
Core MPLS router that only maintains labels and forwards based on MPLS labels. No customer routing information.
Provider Edge (PE) Router
Edge router that interfaces with customer networks. Maintains both MPLS labels and customer routing tables.
Customer Edge (CE) Router
Customer's router that connects to the MPLS network. Does not need MPLS capabilities.
Route Reflector (RR)
BGP speaker that reflects routes between PE routers to reduce full mesh requirements.
LSP Establishment
LSPs are established using signaling protocols like LDP, RSVP-TE, or BGP. The path is determined by the IGP shortest path or explicitly configured.
Label Stack Operations
MPLS supports a label stack, allowing multiple labels to be applied to a single packet. This enables hierarchical services and complex network designs.
Operation | Description | Use Case | Example |
---|---|---|---|
Push | Add label to top of stack | Traffic engineering, VPN services | PE router adding VPN label |
Pop | Remove label from top of stack | Service termination | PHP operation |
Swap | Replace top label with new label | Standard MPLS forwarding | Transit LSR operation |
Multiple Push | Add multiple labels | Hierarchical VPNs, TE tunnels | VPN over TE tunnel |
FEC Classification
Forwarding Equivalence Classes (FECs) group packets that receive the same forwarding treatment. Understanding FEC classification is essential for MPLS operation.
Destination-Based FEC
Packets with the same destination prefix are grouped together. Most common FEC type in basic MPLS.
- IP prefix: 10.1.0.0/24
- Host route: 192.168.1.1/32
QoS-Based FEC
Packets are classified based on their QoS requirements, enabling differentiated services.
- Voice traffic (EF)
- Video traffic (AF4)
VPN-Based FEC
Packets belonging to specific VPNs are classified together for proper isolation and forwarding.
- VPN instance A
- VPN instance B
Next Steps
Now that you understand MPLS fundamentals, continue to Chapter 3: Label Distribution Protocol to learn how labels are distributed throughout the network.