MPLS LDP (Label Distribution Protocol)

Thanks, indeed it’s clear to me now.

1 Like

Hello, everyone!

I have three short questions when it comes to LDP. Why does LDP specifically prefer a loopback interface IP over a physical interface? This isn’t like BGP where we can form a remote adjacency, wouldn’t most LDP routers be directly connected?

When it comes to these LDP packets, why are apart from the prefixes and the labels the local router associated with them also included the IP addresses of the interfaces?
obrázok

Where in the LDP packet does a PE router indicate that the P router should perform PHP? I didn’t find that anywhere.

That’s all, thank you :slight_smile:

David

Hello David

LDP prefers a loopback interface IP over a physical interface IP for stability reasons. In a typical network, physical interfaces can go down due to various reasons (cable issues, hardware failure, etc.), but a loopback interface is a virtual interface that is always up unless it is manually shut down. Since LDP sessions are tied to the router ID, using a loopback interface ensures that the LDP session remains stable even if a physical interface goes down. However, it is possible to change the source of LDP sessions if you have a specific requirement or reason for that.

You can explicitly configure the interface that LDP should use as its source for establishing sessions. On a Cisco IOS device, you’d use the following command in global configuration mode:

mpls ldp discovery transport-address GigabitEthernet0/0

The above commandwould make the Gi0/0 interface the source and destination for its the exchange of LDP messages with neighbors.

If I’m not mistaken, you’re asking why the IP addresses of the local router are included in the LDP message as shown in your wireshark capture. Well, the IP addresses of the interfaces are included in the LDP packets to identify the source of the LDP labels. This is important in MPLS networks where multiple LDP sessions may exist between routers. The receiving router needs to know which interface the LDP label came from to correctly forward traffic.

The PHP is not directly indicated in the LDP packets. PHP is a function performed by the P router just before the egress PE router in an MPLS network. The P router removes the MPLS label before forwarding the packet to the PE router. This is done to reduce the load on the PE router. The decision to perform PHP is typically based on the configuration of the P and PE routers and not indicated in the LDP packets.

I hope this has been helpful!

Laz