- Overview:
- MPLS is an IP packet routing technique that enhances the delivery rate of IP packets by using labels instead of complex routing tables.
- It operates at Layer 2.5, bridging the gap between Layer 2 (Data Link Layer) and Layer 3 (Network Layer).
- Unlike traditional IP routing, which relies on destination addresses, MPLS routes packets based on labels.
- Key Components:
- Label: A 20-bit value that identifies a specific path or route. Labels are attached to IP packets.
- Exp (Experimental Bits): A 3-bit field used for Quality of Service (QoS) purposes.
- Bottom of Stack (S): A 1-bit flag indicating whether there’s only one label left in the MPLS header (1) or multiple labels (0).
- Time to Live (TTL): An 8-bit field that decrements at each hop to prevent packets from getting stuck in the network.
- MPLS Routing Process:
- Provider Edge (PE) Router: At the edge of the MPLS network, PE routers add or remove labels from IP packets.
- Customer Edge (CE) Router: At the edge of the customer network, CE routers send/receive IP packets to/from PE routers.
- Label Switch Router (LSR): Routers within the MPLS network that understand labels.
- Ingress LSR: Adds MPLS header to packets received from CE routers.
- Intermediate LSR: Swaps labels and forwards labeled IP packets.
- Egress LSR: Removes MPLS header and sends IP packets to CE routers.
- Push, Pop, and Swap:
- Push: Addition of a label by an LSR.
- Pop: Removal of a label by an LSR.
- Swap: Replacement of one label with another by an LSR.
- Forwarding Mechanism:
- LSRs receive IP packets from CE routers and encapsulate them with an MPLS header (between Layer 3 and Layer 2).
- MPLS forwarding relies on the label attached to the IP packet.
- Label Distribution Protocol (LDP) regulates label attachment.
- PE routers learn routes from CE routers and add labels accordingly.
- When an LSR receives a packet, it checks the label and forwards it based on the label’s instructions.
- Benefits of MPLS:
- Efficiency: Faster data forwarding due to label-based routing.
- Traffic Control: Improved flow control using labels.
- Support for Multiple Protocols: MPLS can handle frames from various protocols (Frame Relay, Metro Ethernet, etc.).