# MPLS LDP (Label Distribution Protocol)

**URL:** <https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285>\
**Category:** Lessons Discussion\
**Created:** [December 29, 2016, 8:06pm UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285 "2016-12-29T20:06:44Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![madhu\_g1985](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/m/3da27b/32.png) [@madhu\_g1985](https://forum.networklessons.com/u/madhu_g1985)\
**Post date:** [September 8, 2019, 10:49am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/62 "2019-09-08T10:49:11Z")

</div>

Thanks Rene.

Regards,  
Madhu

---

<div class="post-metadata">

**Author:** ![rodriarz](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/r/50afbb/32.png) [@rodriarz](https://forum.networklessons.com/u/rodriarz)\
**Post date:** [September 30, 2019, 3:44pm UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/63 "2019-09-30T15:44:51Z")

</div>

Hello  
it is impossible to form LDP neighbor adjacency between R1 and R3? I mean, in order to become LDP neighbors the routers must be directly connected. Just in that case.. so R1-R3 will never become neighbors Am I Right?

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [October 2, 2019, 6:22am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/64 "2019-10-02T06:22:01Z")

</div>

Hello Rodrigo

By default, LDP neighbors are established between directly connected devices. This is done using a link-local multicast address via which a router will join a specific multicast group to receive hellos from other LSRs that are present on the specific physical link. Once neighbors are discovered, an LDP session using TCP is established.

However, it is possible to establish what are called “non-link” neighbours that could be multiple hops away on the network. This is done using the targeted hello mechanism. In such a case, hellos are sent using a directed unicast address. More on how this can be done can be found at the following Cisco documentation:

> **[Implementing MPLS Label Distribution Protocol on Cisco IOS XR Software](https://www.cisco.com/c/en/us/td/docs/ios_xr_sw/iosxr_r3-7/mpls/configuration/guide/gc37ldp.html#wp1046503)**
>
> Implementing MPLS Label Distribution Protocol on Cisco IOS XR Software

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![erickalberto92](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/e/ea5d25/32.png) [@erickalberto92](https://forum.networklessons.com/u/erickalberto92)\
**Post date:** [October 24, 2019, 4:04am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/65 "2019-10-24T04:04:31Z")

</div>

Hi René did some labs of MPLS, but i see the “No Label” in the outgoing label fo some routers. Don’t know what can be happening here.

Thanks in advance.

```auto
R1#show mpls ldp bindings 
  lib entry: 1.1.1.0/24, rev 4
	local binding: label: imp-null
  lib entry: 1.1.1.1/32, rev 11
	remote binding: lsr: 2.2.2.2:0, label: 200
  lib entry: 2.2.2.0/24, rev 10
	remote binding: lsr: 2.2.2.2:0, label: imp-null
  lib entry: 2.2.2.2/32, rev 7
	local binding: label: 101
  lib entry: 3.3.3.3/32, rev 13
	local binding: label: 103
	remote binding: lsr: 2.2.2.2:0, label: 201
  lib entry: 192.168.12.0/24, rev 5
	local binding: label: imp-null
	remote binding: lsr: 2.2.2.2:0, label: imp-null
  lib entry: 192.168.23.0/24, rev 9
	local binding: label: 102
	remote binding: lsr: 2.2.2.2:0, label: imp-null

```

```auto
R1#show mpls forwarding-table 
Local Outgoing Prefix Bytes Label Outgoing Next Hop    
Label Label or Tunnel Id Switched interface              
101 No Label 2.2.2.2/32 0 Gi1/0 192.168.12.2
102 Pop Label 192.168.23.0/24 0 Gi1/0 192.168.12.2
103 201 3.3.3.3/32 0 Gi1/0 192.168.12.2

```

```auto
Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Loopback0
L 1.1.1.1/32 is directly connected, Loopback0
      2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 192.168.12.2, 00:39:55, GigabitEthernet1/0
      3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/3] via 192.168.12.2, 00:39:45, GigabitEthernet1/0
      192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, GigabitEthernet1/0
L 192.168.12.1/32 is directly connected, GigabitEthernet1/0
O 192.168.23.0/24 [110/2] via 192.168.12.2, 00:39:45, GigabitEthernet1/0

```

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [October 24, 2019, 6:32am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/66 "2019-10-24T06:32:16Z")

</div>

Hello Erick

A “No Label” scenario takes place when the label is no longer advertised by the appropriate router. In this case, the label for 2.2.2.2/32 is not advertised from R2 to R1. The pop label action is actually signalled from the ultimate router to the penultimate router. In other words, R2 tells R1 to perform a pop. This is done by advertising the label “implicit-null” for that particular prefix.

You can see from your output that there is no `imp-null` remote label for the 2.2.2.2/32 prefix. There is for the 2.2.2.0/24 however, but that is not enough. There is one for the 192.168.23.0/24, which shows a “Pop Label” and for 3.3.3.3/32 which also shows a “Pop Label”. The prefix must match exactly including subnet information.

Check to see what prefixes you are advertising for your loopbacks, and make sure they match the same config for 3.3.3.3/32 which is functioning correctly.

I hope this has been helpful!

Laz

The difference is that OSPF is advertising

prefix is no longer advertised by the

---

<div class="post-metadata">

**Author:** ![michael3.chung](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@michael3.chung](https://forum.networklessons.com/u/michael3.chung)\
**Post date:** [June 4, 2020, 6:30am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/67 "2020-06-04T06:30:19Z")

</div>

Hi Rene  
Thanks for the great post. Many resources for LDP explains as follows.

 ![IPv4-over-MPLS-LDP-1](https://cdn-forum.networklessons.com/uploads/default/original/2X/6/6dad39e7dc4e688db792e66652a3841296aa8c4d.jpeg)  
This figure implies the sequence, which is receiving a remote binding → local binding → advertise. According to your post, prefix 10.0.0.0 can be locally binded and advertised regardless of receiving remote binding because all routers have a common RIB. All routers have Prefix 10.0.0.0. They can bind 10.0.0.0 to local label and advertise at any time. Is it right ?

Thanks  
Michael

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [June 5, 2020, 7:03am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/68 "2020-06-05T07:03:19Z")

</div>

Hello Michael

All routers will have the 10.0.0.0/8 prefix in their LIB because it is advertised. However, the label used in each case will be different. The second router from the right in your diagram sees the remote binding of 10.0.0.0/8 with Label 33, and the same prefix has a local label of 17. This is said to be locally bound using label 17. This can indeed be advertised and is advertised to the next router to the left, which sees a remote binding of 17 and a local binding of 129.

Now routers won’t have a common RIB (each router has a unique view of the network from its point of view, so the RIBs will be different), but they will have the specific prefix in all of their RIBs and LIBs if it is advertised to them.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![michael3.chung](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@michael3.chung](https://forum.networklessons.com/u/michael3.chung)\
**Post date:** [June 9, 2020, 2:17pm UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/69 "2020-06-09T14:17:10Z")

</div>

Hi Laz  
Thanks for the reply. My point is : Is it possible for a intermediate router do local binding only after receiving a remote binding(label) ? If so, the initial local binding of a network prefix should be generated by the router which has direct connection to that network segment(prefix). All the outcome of “show mpls ldp bindingsconfiguration” in this lesson are the result, which LDP has finished.

Thanks  
Michael

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [June 11, 2020, 5:32am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/70 "2020-06-11T05:32:28Z")

</div>

Hello Michael

Yes, you are correct. A router does not need to create a local binding only after it receives the remote binding from another router. It creates it directly from the prefix found in the RIB. As soon as the prefix appears in the RIB, it creates a label binding and places it in the LIB, and this is done independently of any label information it received from other routers. But remember, this is the process for prefixes **found within the RIB**.

When using MPLS, there are customer networks that are not included in the RIB of P routers found within the MPLS infrastructure. In such cases, the local bindings are generated **only after they have received the label from neighboring routers** simply because that prefix **is not found in the RIB**.

An example of this can be found at the following lesson:

> **[MPLS Layer 3 VPN Configuration](https://networklessons.com/mpls/mpls-layer-3-vpn-configuration#Verification)**
>
> This lesson explains how to configure MPLS Layer 3 VPN on Cisco IOS routers where we use BGP as the PE-CE routing protocol.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![talk2me.ravi](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/t/4491bb/32.png) [@talk2me.ravi](https://forum.networklessons.com/u/talk2me.ravi)\
**Post date:** [July 7, 2020, 1:27pm UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/71 "2020-07-07T13:27:19Z")

</div>

Hi,

Please can someone explain hwo MPLS ping and Traceroute works ??

Thanks  
Ravi

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [July 9, 2020, 7:03am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/72 "2020-07-09T07:03:26Z")

</div>

Hello Ravi

You can find a little bit of information about traceroute for MPLS here:

> **[MPLS LDP (Label Distribution Protocol)](https://networklessons.com/mpls/mpls-ldp-label-distribution-protocol#LDP_Data_Plane)**
>
> This lesson explains how to configure MPLS LDP (Label Distribution Protocol) and how to verify that it works.

You can find a more comprehensive explanation of traceroute over MPLS at this Cisco documentation:

> **[Trace Route in MPLS Network](https://www.cisco.com/c/en/us/support/docs/multiprotocol-label-switching-mpls/mpls/200510-Trace-route-in-MPLS-network.html)**
>
> This document describes the Internet Control Message Protocol (ICMP) traceroute behavior in MPLS network and a quick comparison with LSP trace.

You can also find information about both ping and traceroute over MPLS at the following link as well:

> **[INE | INE](https://ine.com/blog/2008-11-24-mpls-ping-and-traceroute)**
>
> Explore MPLS Ping & Traceroute with INE. Learn how these tools work within MPLS networks, uncovering LSP breakages & downstream mapping.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![justin.simply](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/justin.simply/32/3722_2.png) [@justin.simply](https://forum.networklessons.com/u/justin.simply)\
**Post date:** [August 26, 2020, 1:49pm UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/73 "2020-08-26T13:49:57Z")

</div>

Hi Rene / Laz,

I have one doubt about below statement:

> 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.

If the above statement is correct, then my question is how come in lesson: **“Introduction to MPLS”** BGP advertised routes are reachable on both the CE1 and CE2.

I had a similar Lab as made on **“Introduction to MPLS”** and on PE1 i have below logs:

CE1 Loopback: 4.4.4.4  
CE2 Loopback: 5.5.5.5

I don’t see entry for 5.5.5.5 in LFIB and FIB, but when i search the specific entry in FIB i see an entry.

```
IOU2#show mpls ldp bindings            
  lib entry: 1.1.1.1/32, rev 10
	local binding: label: 102
	remote binding: lsr: 1.1.1.1:0, label: imp-null
  lib entry: 2.2.2.2/32, rev 8
	local binding: label: imp-null
	remote binding: lsr: 1.1.1.1:0, label: 203
  lib entry: 3.3.3.3/32, rev 14
	local binding: label: 104
	remote binding: lsr: 1.1.1.1:0, label: 202
  lib entry: 192.168.12.0/24, rev 5
	local binding: label: imp-null
	remote binding: lsr: 1.1.1.1:0, label: imp-null
  lib entry: 192.168.13.0/24, rev 12
	local binding: label: 103
	remote binding: lsr: 1.1.1.1:0, label: imp-null
  lib entry: 192.168.24.0/24, rev 6
	local binding: label: imp-null
IOU2#show mpls forwarding-table 
Local Outgoing Prefix Bytes Label Outgoing Next Hop    
Label Label or Tunnel Id Switched interface              
102 Pop Label 1.1.1.1/32 0 Et0/1 192.168.12.1
103 Pop Label 192.168.13.0/24 0 Et0/1 192.168.12.1
104 202 3.3.3.3/32 0 Et0/1 192.168.12.1
IOU2#show mpls forwarding-table 5.5.5.5
Local Outgoing Prefix Bytes Label Outgoing Next Hop    
Label Label or Tunnel Id Switched interface              
None 202 5.5.5.5/32 0 Et0/1 192.168.12.1

```

Regards,  
Justin

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [September 1, 2020, 9:26am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/74 "2020-09-01T09:26:06Z")

</div>

Hello Justin

In the [Introduction to MPLS](https://networklessons.com/mpls/introduction-to-mpls) lesson, BGP advertised routes are reachable on both CE1 and CE2 because they have been learned via BGP. Remember that LDP is used only for the MPLS backbone and the CE routers do not participate in this.

Now in your output, you say that you don’t see 5.5.5.5, but you see it only if you search for that particular prefix. You will find that under the **Local Label** column, you see that it says None which verifies it has not been assigned a local label.

The following Cisco documentation is quite comprehensive and useful to further describe the functionality of LDP as far as BGP goes:

> **[MPLS Label Distribution Protocol Configuration Guide, Cisco IOS Release 15SY ...](https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/mp_ldp/configuration/15-sy/mp-ldp-15-sy-book/mp-ldp-alloc-filter.html#GUID-984AEFA2-4624-4F74-BAE5-869FBFC18D6A)**
>
> MPLS Label Distribution Protocol Configuration Guide, Cisco IOS Release 15SY -MPLS LDP Local Label Allocation Filtering

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![rohitverma173](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/r/977dab/32.png) [@rohitverma173](https://forum.networklessons.com/u/rohitverma173)\
**Post date:** [September 12, 2020, 11:19pm UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/75 "2020-09-12T23:19:15Z")

</div>

can two router having the same loopback address form ldp adjacency and become neighbor ?

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [September 14, 2020, 7:33am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/76 "2020-09-14T07:33:26Z")

</div>

Hello Rohit

When becoming LDP neighbors, routers identify themselves with a unique ID called the Label Switch Router (LSR) ID. This ID by default is the highest IP address on a loopback interface. But this is not only an ID, but it is also the transport address, which is the IP address that will be used to allow these devices to communicate and exchange information over a TCP connection.

As with any communication on an IP network, the IP addresses used as transport addresses must be unique and must be advertised using a routing protocol (or static routing). If you have the same IP address on two such loopback interfaces, then as you know, this will not function correctly. So the loopbacks must be unique.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![buck](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/b/c5a1d2/32.png) [@buck](https://forum.networklessons.com/u/buck)\
**Post date:** [November 1, 2020, 2:07am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/77 "2020-11-01T02:07:41Z")

</div>

Hi Rene. In the explanation about the route table and the output of show mpls ldp bindings, you stated that R1 does’t create a label for any of the connected routes. Why would this be the case? I thought I had read earlier that a label is assigned to EVERY prefix.

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [November 3, 2020, 10:15am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/78 "2020-11-03T10:15:58Z")

</div>

Hello Buck

It is true that it is stated in the lesson that “_LDP will create a label for each prefix._” It also states that “_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)._”

You must keep in mind, however, that we can see prefixes and labels from different points of view. If you are looking from the point of view of R1, then any directly connected prefixes will not have a label **in the local LIB**. That prefix will however **participate in LDP** having a label assigned to it when viewed from other routers. When looking at the network as a whole, all prefixes on interfaces where the `mpls ip` command has been implemented will be assigned a label. It makes sense, however, from a routing point of view, that within any particular router, labels need not be assigned to a prefix that is directly connected.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![parrot95025](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@parrot95025](https://forum.networklessons.com/u/parrot95025)\
**Post date:** [November 13, 2020, 7:20pm UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/79 "2020-11-13T19:20:46Z")

</div>

Is LSR ID is same as transport address in LDP ?

Nihar

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [November 17, 2020, 9:01am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/80 "2020-11-17T09:01:42Z")

</div>

hello Nihar

By default, LDP advertises its LSR ID as the transport address within the LDP discovery hello messages. This can also be seen in the Wireshark capture shown in the lesson where the LSR ID is the same as the transport IP:

 ![image](https://cdn-forum.networklessons.com/uploads/default/original/2X/9/903ae0661563d2759d22502293c889b0942acc19.png)

However, if you choose to you can change the transport IP to use a different address using the `discovery transport-address` command. More about this command can be found here:

> **[Routers - Retired Products](https://www.cisco.com/c/en/us/support/routers/retired.html)**
>
> Cisco Category page for retired Router products.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![abhity150890](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@abhity150890](https://forum.networklessons.com/u/abhity150890)\
**Post date:** [March 23, 2021, 6:23am UTC](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285/81 "2021-03-23T06:23:50Z")

</div>

Hi Team,

Could you please explain why LDP will not add label for BGP prefix ?

 ![image](https://cdn-forum.networklessons.com/uploads/default/original/2X/3/303a16fbc7a4987c7c3c67497d266c199bc69cf1.png)

Thanks,  
Abhi

[Previous page](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285.md?page=3)

[Next page](https://forum.networklessons.com/t/mpls-ldp-label-distribution-protocol/1285.md?page=5)
