7/26/2021 MPLS LDP (Label Distribution Protocol)
Get Full Access to our 731 Cisco Lessons Now Start $1 Trial
Search …
You are here: Home » MPLS
MPLS LDP (Label Distribution Protocol)
LDP is a protocol that automatically generates and exchanges labels between routers. Course Contents
Each router will locally generate labels for its prefixes and will then advertise the label
MPLS
values to its neighbors.
Unit 1: Introduction
It’s a standard, based on Cisco’s proprietary TDP (Tag Distribution Protocol). It’s pretty
Unit 2: LDP (Label Distribution Protocol)
much the same story as 802.1Q/ISL or PaGP/LACP. Cisco created a protocol and a
MPLS LDP (Label Distribution Protocol)
standard was created later. Nowadays almost everyone uses LDP instead of TDP.
MPLS LDP Label Filtering
Like many other protocols, LDP first establishes a neighbor adjacency before it Unit 3: MPLS VPN
exchanges label information. It works a bit different than most protocols though… Unit 4: MPLS L2 Encapsulation
Unit 5: IPv6 MPLS
First we send UDP multicast hello packets to discover other neighbors. Once two
routers decide to become neighbors, they build the neighbor adjacency using a TCP
connection. This connection is then used for the exchange of label information. Normally
a loopback interface is used for the neighbor adjacency. Here’s an example:
The two routers above will send multicast hello packets on their FastEthernet interfaces.
Within this hello packet, they will advertise a transport IP address. This IP address is
then used to establish the TCP connection between the two routers. Here’s what the
hello packet looks like in wireshark:
https://networklessons.com/mpls/mpls-ldp-label-distribution-protocol 1/5
7/26/2021 MPLS LDP (Label Distribution Protocol)
Get Full Access to our 731 Cisco Lessons Now Start $1 Trial
In the capture above you can see a couple of interesting things:
The hello packets are sent to multicast address 224.0.0.2 using source/destination
UDP port 646.
Each router has a unique ID called the LSR (Label Switch Router) ID. This is similar
to how most protocols select an ID, by default it will select the highest IP address
on a loopback interface. If you don’t have any loopback interfaces then we will use
the highest IP address on a physical interface.
At the bottom you find the transport address. This is what we use to build the
actual TCP connection. Like the LSR ID, the router selected the IP address on the
loopback interface as the transport address.
Make sure that the IP address that LDP has selected for the transport address
is advertised in your routing protocol. Otherwise your routers will be able to
hear each others hello packets but they can’t form a neighbor adjacency since
the transport address(es) are unreachable.
This is different compared to how routing protocols like OSPF or EIGRP form neighbor
adjacencies. For example, when you run OSPF then your routers will form neighbor
adjacencies on all interfaces that run OSPF:
LDP will only form a single neighbor adjacency, no matter how many interfaces you have
in between your routers:
https://networklessons.com/mpls/mpls-ldp-label-distribution-protocol 2/5
7/26/2021 MPLS LDP (Label Distribution Protocol)
Get Full Access to our 731 Cisco Lessons Now Start $1 Trial
LDP is a bit similar to BGP when you use the loopback interfaces for the neighbor
adjacency. When we use BGP we have to use the update-source command to select the
source, LDP does it automatically.
So once our LDP routers have become neighbors, how do we exchange label
information? To explain this, let’s do a quick review of how normal routing uses the RIB
and FIB. If you have no idea what these two are then I recommend you to read my CEF
lesson first before you continue.
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 packet. These tables are all used for IP
packets but for MPLS we use something else:
When we use LDP on Cisco IOS, we locally generate a label for each prefix that we can
find in the RIB, except for BGP prefixes. This information is then added to the LIB
(Label Information Base).
https://networklessons.com/mpls/mpls-ldp-label-distribution-protocol 3/5
7/26/2021 MPLS LDP (Label Distribution Protocol)
The information in the LIB is used to build the LFIB (Label Forwarding Information
Get Fulla Access
Base). When the router has to forward to our
packet with 731 Cisco
a MPLS Lessons
label on use the Start
it, it willNow $1 Trial
LFIB for forwarding decisions.
We're Sorry, Full Content Access is for Members Only...
If you like to keep on reading, Become a Member Now! Here is why:
Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
Full Access to our 731 Lessons. More Lessons Added Every Week!
Content created by Rene Molenaar (CCIE #41726)
Give Membership a try - it's just $1 ►
491 Sign Ups in the last 30 days
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!
« Previous Lesson
MPLS Labels and Devices
Next Lesson
MPLS LDP Label Filtering »
Tags: LDP
Forum Replies
szejiekoh
Hi Rene,
Thanks for your reply.
As you mentioned, information inside the RIB is use to build the LIB.
So i would imagine to have a LABEL for all the available routes.
e.g. I have 3 best routes to the same destination with rip, eigrp, ospf in the RIB.
192.168.0.0/24 via 192.168.1.1 - rip
192.168.0.0/24 via 192.168.2.1 - eigrp
192.168.0.0/24 via 192.168.3.1 - ospf
q1) Can i check for FIB, does it contain the same amount of available routes as in the RIB ?
q2) if the above is yes, i would believe FLIB and FIB would have the same amount of labels ?
q3) it is
... Continue reading in our forum
https://networklessons.com/mpls/mpls-ldp-label-distribution-protocol 4/5
7/26/2021 MPLS LDP (Label Distribution Protocol)
ReneMolenaar Get Full Access to our 731 Cisco Lessons Now Start $1 Trial
Hi Alan,
If OSPF, EIGRP and RIP have learned the 192.168.0.0/24 route then only one will be installed in the routing table. EIGRP will be selected since it has the
lowest administrative distance.
By default, LDP will generate a label for each route in the routing table. This is something that you can change by using access-lists if you want.
The LFIB has pretty much the same information as the FIB, however some entries in the FIB (like directly connected interfaces) won’t show up in the LFIB.
Theoretically, switching based on labels is faster than routing where
... Continue reading in our forum
ReneMolenaar
Hi Stuart,
Did you see this tutorial?
https://networklessons.com/mpls/mpls-layer-3-vpn-explained/
I think that one will be helpful to understand this better. Within the MPLS “core”, we only advertise the loopback interfaces of the PE routers in our IGP,
OSPF in most of my examples. The P router will only have these networks in its routing table. The LIB is based on the information of the RIB (Routing
Table), so you only find labels for those loopbacks there, these are the transport labels needed to get from one PE to another PE.
Only the PE routers have to know
... Continue reading in our forum
chrisnewnham17
Something else to bear in mind as well, is Targeted LDP. It means LDP neighbours don’t actually need to be directly connected.
https://community.cisco.com/t5/mpls/targeted-ldp-sessions/td-p/2288569
madhu_g1985
Hi Rene/Laz,
I see that the labels are exchanged between routers even if we are not advertising the prefixes between them through IGP. Is that the default behavior ? If
so what if R1 has full internet table and we are not advertising all of them to R2. What is the need to send the labels for each of these prefixes to R2 ?
Regards,
74 more replies! Ask a question or join the discussion by visiting our Community Forum
© 2013 - 2021 NetworkLessons.com Disclaimer Privacy Policy Support About
https://networklessons.com/mpls/mpls-ldp-label-distribution-protocol 5/5