The mpls ldp local-lsr-id command configures the primary IP address of a specified interface as a local label switching router (LSR) ID of the current LDP session.
The undo mpls ldp local-lsr-id command restores the default configuration.
By default, the current LDP session uses the LSR ID of an LDP instance as a local LSR ID.
mpls ldp local-lsr-id interface-type interface-number
mpls ldp local-lsr-id interface
undo mpls ldp local-lsr-id
| Parameter | Description | Value |
|---|---|---|
| interface-type interface-number | Specifies the type and number of an interface.. | - |
| interface | Configures the primary IP address of the current interface as an LSR ID. | - |
Ethernet interface view, Ethernet sub-interface view, Eth-Trunk interface view, Eth-Trunk sub-interface view, Tunnel interface view, Dialer interface view, VLANIF interface view, Virtual-Template interface view
Usage Scenario
LDP sessions that establish LDP label switched paths (LSPs) to transmit L2VPN and L3VPN services share the LSR ID of an LDP instance. Sharing the LSR ID may cause the LDP LSPs to fail to isolate different VPN services. To address this problem, run the mpls ldp local-lsr-id command to specify an LSR ID for each LDP session.
You can specify either of the following parameters in the mpls ldp local-lsr-id command run in the interface view:
You can configure only the interface-type interface-number parameter in the mpls ldp local-lsr-id command run in the remote MPLS LDP peer view. The interface-type interface-number parameter configures the primary IP address of a specified interface as a local LSR ID of a remote LDP session.
If multiple links directly connect an LSR pair, the LSR ID configured on the interface of each link must be the same. Otherwise, the LDP session uses the LSR ID of the link that finds the adjacency first while other links with different LSR IDs cannot be bound to the LDP session. LDP LSP fails to be established on these links.
If both a local and remote LDP sessions are to be established between an LSR pair, LSR IDs configured for the two sessions must be the same. Otherwise, only the LDP session that finds the adjacency first can be established.
Prerequisites
MPLS LDP has been enabled using the mpls ldp command in the interface view before the mpls ldp local-lsr-id command is run in the same interface view.
Precautions
If the mpls ldp local-lsr-id command is run more than one time, the last configuration takes effect.
# Use the primary IP address of the current interface as a local LSR ID of a local LDP session.
<sysname> system-view
[sysname] interface GigabitEthernet 0/0/0
[sysname-GigabitEthernet0/0/0] mpls
[sysname-GigabitEthernet0/0/0] mpls ldp
[sysname-GigabitEthernet0/0/0] mpls ldp local-lsr-id interface