MPLS reduces CPU-usage on routers, by allowing routers to make forwarding decisions depending on the attached label rather than looking to routing table. MPLS is not restricted to IP, or any specific Layer-2 technology, and thus is essentially protocol-independent.
Introduction to terms used in MPLS
Provider Edge Routers(PE) / Edge LSR (Label Switch Router) : Routers on the ISP side which is connected to Customer/Client side. Responsible for adding/removing labels from packets. Cisco refers to this as a PE (provider edge) router.
Provider Router(P) / LSR (Label Switch Router) : Routers used inside the ISP network which is not connected to customer side. Responsible for forwarding packets through the provider core based on the packet’s label
Non-Label Routers – Cisco refers to this as C (customer) routers
LSRs perform the following functions:
• Control Plane – Logical plane where exchange of routing and label information takes place
• Data Plane - forwards actual packets based on label information
Label Information Base (LIB) – label information is exchanged between LSRs using label protocols, such as LDP (Label Distribution Protocol) or TDP (Tag Distribution Protocol).
LDP is now default on Cisco devices, and uses TCP port 646. TDP is a Cisco-proprietary label protocol, and uses TCP port 711.
Label Forwarding Information Base (LFIB) – for forwarding labeled packets.
The MPLS Label
MPLS label format is a 32-bit label that is injected between the Layer-2 and Layer-3 header.Even MPLS is called as L2 service theoritically it can be called as a 2.5 layer service
Bottom of Stack
20 bit ` 3 bit 1 bit 8 bit
Label (20 bits) – 20 bits are exactly used for label representation
Experimental (3 bits) – This field is officially undefined, but is used by Cisco as an IP precedence value.
Bottom-of-Stack (1 bit) – This field indicates the last label, as multiple labels are supported in the same packet. A value of 1 identifies the last label in the stack.
TTL (8 bits)[Time to Live] – This field indicates the number of router this label can ‘live’ through.
Penultimate Hop Popping: Edge Routers(PE) need to check both normal routing table and LIB table before forwarding packets to customer side.This will slow down the process.To avoid this PE router informs adjacent router to send packets after popping up(removing) labels.This process is called Penultimate Hop Popping
Penultimate Hop Popping (PHP) is a function performed by certain routers in an MPLS enabled network. It refers to the process whereby the outermost label of an MPLS tagged packet is removed by a Label Switch Router (LSR) before the packet is passed to an adjacent Label Edge Router (LER).The process is important in a Layer 3 MPLS VPN environment as it reduces the load on the LER. If this process didn't happen, the LER would have to perform at least 2 label lookups