What is MPLS? How to implement MPLS?
MPLS defines protocols that make different paradigms for the way routers forward packets. rather than forwarding packets based on the packet’s destination IP address, MPLS defines how the router can forward packets based on the MPLS label.
What we are going to see in this section:
- How does MPLS work?
- Traditional IP routing
- Basic MPLS feature
- MPLS terminology
Let’s take an example to understand better.
- router 1, with no MPLS feature configured, forwards the unlabeled packet based on the destination IP address, and traditional IP routing, without any labels.
- MPLS router e receives the unlabeled packet and decides, as part of the MPLS forwarding process to impose(push) a new label (value 20) into the packet and forwards the packet to router 3.
- MPLS router 3 revives the labeled packet. router 3 swaps the label for a new label value (30) and then forward the packet to router 4.
- MPLS router receives the labeled packet, removes (pops) the label, and forwards the packet toward router 5
- non-MPLS router 5 forwards the unlabeled packet based on the destination IP address, as normal.
Traditional IP routing
Routing protocols are used to distribute layer routing information. A forwarding decision is made based on:
- Packet header
- Local routing table
Routing lookup is independently performed at every hop
Basic MPLS features
MPLS is a forwarding mechanism in which packets are forwarded based on labels. MPLS packets can run another layer 2 technology such as ATM, and Frame Relay. PPP, Ethernet. MPLS leverage both IP routing and CEF switching.
MPLS terminology
LSR (label switch router) is any router that pushes a label onto the packet, pops a label from the packet, or simply forwards the labeled packet. in other words, LSR forward packets based on labels and swap labels.
Edge LSP (E-LSR) Edge LSR in the MPLS network process both labeled and unlabeled
Labels IP packets (Imposes labels) and forwarded them into the MPLS domain Forwards IP packets out of the MPLS domain. A sequence of labels to reach a destination is called an LSP.
Benefits of MPLS
- MPLS support multiple applications including:
- Uncast and multicast IP routing
- MPLS decreases forwarding overhead on core routers.
- BGP free core
- MPLS can support the forwarding of non-IP protocol
- VPN
- TE
- QoS
- Atom
MPLS label
MPLS uses a 32-bit label header that is inserted between l2 & l3 of OSI
- 20-bit label
- 3-bit experiment field
- 1-bit bottom of the stuck indicator
- 8-bit time to live field
A single label corresponds to a single route and shares them with the MPLS neighbor (using LDP protocol)
MPLS label stack
Usually, only one label is assigned to a packet, but multiple labels in a label stack are supported.
These scenarios may produce more than one label:
MPLS VPN (two labels):
The top points to the egress routers, and the second label identifies the VPN.
MPLS-TE (two or more labels):
The top label points to the endpoint of the traffic engineering tunnel and the second label point to the point destination.
MPLS VPNs combined with MPLS-TE
Three or more labels)