04-01-2024 10:52 AM - edited 04-01-2024 06:38 PM
Multi-Protocol Label Switching (MPLS)
First....Why we need MPLS ?
A full internet routing table currently has >800000 prefixes and 8 ISP routers running iBGP, we need 28 iBGP peerings. We can reduce this number by using Route-reflectors or a Confederation. All routers have to do lookups in the routing table for any possible destination and forwardig decisions happens by using traditional ipv4 destination address.
Another best way to provide connectivity between Customer A or Customer B sites is….using MPLS (Multi-Protocol Label Switching).
Multi-Protocol Label Switching (MPLS):
MPLS decreases forwarding overhead on core routers making them more efficient. Note that MPLS was designed to support many different Layer 3 protocols. However, in this section we will focus on IP only. Therefore, in our scenarios, we will analyze how labels can be used to forward IP packets instead of the destination IPv4 address.
MPLS can forward other L3 protocols besides IPv4, MPLS also supports multiple services such as unicast routing, multicast routing, VPNs, TE (Traffic Engineering), QoS, and AToM (Any Transport over MPLS) . Therefore, MPLS is very efficient and flexible.
With normal routing, we use routing protocols like EIGRP, OSPF or BGP to learn prefixes from other routers. These are all stored in the RIB (Routing Information Base), this is your routing table. The information in the RIB is used to build the FIB (Forwarding Information Base) which is what we use for actual forwarding of IP packets.
The control plane of the MPLS enabled router will be responsible for exchanging labels with other MPLS enabled routers using a Label Distribution Protocol (LDP). Once labels have been exchanged, the label information is used to populate the Label Information Base (LIB) and then is downloaded to Data Plane (Forwarding Plane) as Label Forwarding Information Base (LFIB).
MPLS Devices:
Refer to the above diagram... Routers R1 through R5 are part of the MPLS domain. They are known as Label Switch Routers (LSR) because they support MPLS. They understand MPLS labels and can receive and transmit labeled packets on their interfaces. In this case R1 and R5 are considered Edge LSRs and R2, R3, and R4 are considered Intermediate LSRs.
1. Let’s say an unlabeled IP packet arrives with a destination of 10.0.0.5. Since it is unlabeled the FIB will be used to make a forwarding decision.
2. If the FIB indicates that the outgoing interface is not an MPLS enabled interface, the packet will be forwarded unlabeled.
3. If the FIB indicates that the outgoing interface is an MPLS enabled interface, a label will be added to the packet and the labeled packet will be forwarded labeled out the MPLS interface.
4. Let’s say a labeled packet arrives on an MPLS enabled interface. Since it is labeled the LFIB will be used to make a forwarding decision.
5. If the LFIB indicates that the outgoing interface is an MPLS enabled interface, the label will be removed, a new label will be added and the labeled packet will be forwarded out the MPLS interface labeled.
6. If the LFIB indicates that the outgoing interface is not an MPLS enabled interface, the label will be removed, and the unlabeled packet will be forwarded unlabeled using the information in the FIB.
MPLS Operation:
Label Switch Path
The Label-Switched Path (LSP) is the cumulative labeled path (sequence of routers) that the labeled packet will take through the MPLS domain.
It is a unidirectional path as shown in the below figure; therefore, in a complex network with multiple potential paths between source and destination.
Label Distribution Protocol (LDP)
MPLS Label:
For MPLS to work, a label needs to be added to the packet. The label is added as a shim header between the Layer 2 Frame Header and the Layer 3 Packet Header. The MPLS header is added in between the L2 and L3 header. That’s why we call it a “layer 2.5” protocol. The label is 4 bytes (32 bits) in size and contains four different fields as shown in Figure:
MPLS Configuration
R1(config)#router ospf 1
R1(config-router)#network 192.168.12.0 0.0.0.255 area 0
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R2(config)#router ospf 1
R2(config-router)#network 192.168.12.0 0.0.0.255 area 0
R2(config-router)#network 192.168.23.0 0.0.0.255 area 0
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0
R3(config)#router ospf 1
R3(config-router)#network 192.168.23.0 0.0.0.255 area 0
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0
When you use LDP, all routers will start assigning labels with label value 16. This might be a bit annoying if you are new to MPLS as some routers will use the same label value.
R1(config)#mpls label range 100 199
R2(config)#mpls label range 200 299
R3(config)#mpls label range 300 399
R1(config)#interface FastEthernet 0/0
R1(config-if)#mpls ip
R2(config)#interface FastEthernet 0/0
R2(config-if)#mpls ip
R2(config)#interface FastEthernet 0/1
R2(config-if)#mpls ip
R3(config)#interface FastEthernet 0/0
R3(config-if)#mpls ip
R1#
%LDP-5-NBRCHG: LDP Neighbor 2.2.2.2:0 (1) is UP
Let's see...some mpls verification commands....
The above traceroute command output tells us the packet is label switched between R1 to R3.
Thanks you very much...!!
---------------------------------------------------- The End ---------------------------------------------
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: