ip unnumbered Loopback0
mpls ip
mpls label protocol ldp
Specifying the LDP Router ID
The mpls ldp router-id command allows you to establish the IP address of an interface as the LDP router
ID.
The following steps describe the normal process for determining the LDP router ID:
1The router considers all the IP addresses of all operational interfaces.
2If these addresses include loopback interface addresses, the router selects the largest loopback address.
Configuring a loopback address helps ensure a stable LDP ID for the router, because the state of
loopback addresses does not change. However, configuring a loopback interface and IP address on each
router is not required.
The loopback IP address does not become the router ID of the local LDP ID under the following
circumstances:
If the loopback interface has been explicitly shut down.
If the mpls ldp router-id command specifies that a different interface should be used as the LDP
router ID.
If you use a loopback interface, make sure that the IP address for the loopback interface is configured with
a /32 network mask. In addition, make sure that the routing protocol in use is configured to advertise the
corresponding /32 network.
1Otherwise, the router selects the largest interface address.
The router might select a router ID that is not usable in certain situations. For example, the router might
select an IP address that the routing protocol cannot advertise to a neighboring router.
The router implements the router ID the next time it is necessary to select an LDP router ID. The effect of
the command is delayed until the next time it is necessary to select an LDP router ID, which is typically the
next time the interface is shut down or the address is deconfigured.
If you use the force keyword with the mpls ldp router-id command, the router ID takes effect more
quickly. However, implementing the router ID depends on the current state of the specified interface:
If the interface is up (operational) and its IP address is not currently the LDP router ID, the LDP router
ID is forcibly changed to the IP address of the interface. This forced change in the LDP router ID tears
down any existing LDP sessions, releases label bindings learned via the LDP sessions, and interrupts
MPLS forwarding activity associated with the bindings.
If the interface is down, the LDP router ID is forcibly changed to the IP address of the interface when
the interface transitions to up. This forced change in the LDP router ID tears down any existing LDP
sessions, releases label bindings learned via the LDP sessions, and interrupts MPLS forwarding
activity associated with the bindings.
Make sure the specified interface is operational before assigning it as the LDP router ID.
Specifying the LDP Router ID
How to Configure MPLS LDP
MPLS LDP Configuration Guide, Cisco IOS Release 12.4
12