
MPSL Label Distribution is done with two differetn protocols in MPLS Networks. One fom them is LDP and other is RSVP-TE. In this Lesson, we will focus on LDP Label Distribution. LDP (Label Distribution Protocol) is one of the MPLS Label Distribution protocols that is used for label signaling in MPLS (Multi Protocol Label Switching). So, how LDP works and how is the label distribution done? In this lesson, we will explain these processes detailly with an example.
LDP uses IGP (OSPF, EIGRP etc.) to determine the best path to a destination. So, before LDP configuration, IGP or in other words Routing Protocol must be configured and converged in the network.
After Routing Protocol Configuration, LDP is enabled on the routers and LDP Adjacencies are established.
The adjacent routers check their routing tables and sends labels to the upstream router about the networks that they know. Here, there is a key information. Label Distribution is done in the opposite direction of the label swapping. In other words, label learning is done in one direction and label swapping is done in another direction.
When the Upstream Router learns the labels, it stores them in the Label Databases with the associated networks. And whenever a packet comes with the destination of that network, it assigns this label and send the packet to the Downstream Router.
With such a mechanism, all the routers learn all the possible destinations and associated labels.
Now let’s do an example for this MPLS Label Distribution.
As you can see in the below topology, we have three routers and six different networks connected to these routers. Router A and Router C are Provider Edge routers and Router B is a Provider router.
After the LDP adjacencies are established, Router C checks its routing table and assigns a label for the networks, 192.168.1.0/24, 192.168.2.0/24 and 192.168.3.0/24. The assigned label by Router C is 100 for these networks and send it to Upstream Router, Router B.
After that the Upstream Router, Router B receives this label and records it in its Label Databases as Egress Label.
Then, it sends the same networks with a different label value, with label 200 to its Upstream Router, Router A.
Router A receives the label and records it in its Label Database as Eggress Label.
The Label tables are filled with this method for all the routers in the service provider network. The MPLS Label Distribution or in other words Label Learning is also done for the reverse direction, from Router A to Router C.
After all the labels are learned, now let’s see how the packets are send from Router A to a network behind Router C. Here, our destination will be 192.168.2.0/24.
When a packet comes from one of the networks connected to Router A, Router A check its Label Database. Here, Router A receives a packet from 10.2.0.0/24 network for the destination 192.168.2.0/24. Router A checks its Label database and finds a record for this network as label. This Label is 200. It adds Label 200 and sends the packet to Router B. Because, Label 200 shows this direction.
When Router B receives the packet, again, it looks the destination and sees the destination 192.168.2.0/24. Router B also checks its Label Database and finds the record related with destination as Label 100. It adds Label 100 to the packet and send it to the Router C.
In Router C, the label is removed and send to the destination 192.168.2.0/24 network.
MPLS Label Distribution and Label Swapping is basically like above.
Other Basic MPLS Lessons:
Leave a Reply