- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
03-LDP commands | 199.77 KB |
accept-label
Use accept-label to configure a label acceptance policy.
Use undo accept-label to remove a label acceptance policy.
Syntax
accept-label peer peer-lsr-id prefix-list prefix-list-name
undo accept-label peer peer-lsr-id
Default
No label acceptance policy is configured. LDP accepts all label mappings from all peers.
Views
LDP view, LDP-VPN instance view
Predefined user roles
network-admin
mdc-admin
Parameters
peer peer-lsr-id: Specifies an LDP peer by its LSR ID.
prefix-list prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters.
Usage guidelines
This feature enables you to control the number of FEC-label mappings received from peers. LDP accepts only the FEC-label mappings whose IP prefixes are permitted by the specified IP prefix list from the specified peer.
To accept the previously denied label mappings from a peer, use the undo accept-label command or change the IP prefix list for the peer. Then, execute the reset mpls ldp command to reset the LDP session with that peer to apply the new settings.
Using a label advertisement policy on an LSR or using a label acceptance policy on its upstream LSR can achieve the same purpose. H3C recommends that you use the label advertisement policy to reduce network load.
Examples
# Configure a label acceptance policy to accept only the FEC-label mappings containing prefixes 10.1.1.0/24 and 10.2.1.0/24 from the LDP peer 1.1.1.9.
<Sysname> system-view
[Sysname] ip prefix-list prefix-from-RTA index 1 permit 10.1.1.0 24
[Sysname] ip prefix-list prefix-from-RTA index 2 permit 10.2.1.0 24
[Sysname] mpls ldp
[Sysname-ldp] accept-label peer 1.1.1.9 prefix-list prefix-from-RTA
Related commands
· display mpls ldp peer verbose
· ip prefix-list (Layer 3—IP Routing Command Reference)
advertise-label
Use advertise-label to configure a label advertisement policy.
Use undo advertise-label to delete a label advertisement policy.
Syntax
advertise-label prefix-list prefix-list-name [ peer peer-prefix-list-name ]
undo advertise-label prefix-list prefix-list-name
Default
No label advertisement policy is configured. The device advertises label mappings permitted by the LSP generation policy to all peers.
Views
LDP view, LDP-VPN instance view
Predefined user roles
network-admin
mdc-admin
Parameters
prefix-list prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters. This prefix list filters advertised label mappings.
peer peer-prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters. This prefix list filters LDP peers. If you do not specify this option, the device advertises label mappings to all peers.
Usage guidelines
Use a label advertisement policy to filter label mappings advertised to peers.
Configure multiple label advertisement policies by executing this command multiple times.
If a label mapping is permitted by an advertisement policy, LDP advertises the mapping by following these rules:
· If the policy has no peer IP prefix list (peer peer-prefix-list-name not specified), LDP advertises the label mapping to all peers.
· If the policy has a peer IP prefix list, LDP advertises the label mapping to the peers permitted by the peer IP prefix list.
If a label mapping is permitted by multiple advertisement policies, LDP advertises the label mapping according to the first configured policy.
Using a label advertisement policy on an LSR or using a label acceptance policy on its upstream LSR can achieve the same purpose. H3C recommends that you use the label advertisement policy to reduce network load.
Examples
# Configure two label advertisement policies. One policy advertises only the label mapping for subnet 10.1.1.0/24 to the peer 3.3.3.9; the other policy advertises only the label mapping for subnet 10.2.1.0/24 to the peer 4.4.4.9.
<Sysname> system-view
[Sysname] ip prefix-list prefix-to-C permit 10.1.1.0 24
[Sysname] ip prefix-list prefix-to-D permit 10.2.1.0 24
[Sysname] ip prefix-list peer-C permit 3.3.3.9 32
[Sysname] ip prefix-list peer-D permit 4.4.4.9 32
[Sysname] mpls ldp
[Sysname-ldp] advertise-label prefix-list prefix-to-C peer peer-C
[Sysname-ldp] advertise-label prefix-list prefix-to-D peer peer-D
Related commands
· display mpls ldp fec
· ip prefix-list (Layer 3—IP Routing Command Reference)
· lsp-trigger
backoff
Use backoff to configure the LDP backoff initial delay time and maximum delay time.
Use undo backoff to restore the default.
Syntax
backoff initial initial-time maximum maximum-time
undo backoff
Default
The LDP backoff initial delay time is 15 seconds and the maximum delay time is 120 seconds.
Views
LDP view, LDP-VPN instance view
Predefined user roles
network-admin
mdc-admin
Parameters
initial initial-time: Specifies the LDP backoff initial delay time in the range of 15 to 50331 seconds.
maximum maximum-time: Specifies the LDP backoff maximum delay time in the range of 120 to 50331 seconds.
Usage guidelines
LDP peers continually negotiate with each other until a session is set up. If LDP peers use incompatible negotiation parameters (for example, different label advertisement modes), a large amount of negotiation traffic will enter the network. To suppress LDP session negotiation traffic, use this command to control the interval between negotiation attempts.
After LDP fails to establish a session with a peer LSR for the first time, LDP does not start another attempt until the initial delay timer expires. If the session setup fails again, LDP waits for two times the initial delay before the next attempt. This process continues until the maximum delay time is reached. After that, the maximum delay time always takes effect.
The maximum delay time must be larger than the initial delay time.
Examples
# Configure LDP backoff for the public network, and set the initial delay time to 100 seconds and the maximum delay time to 300 seconds.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] backoff initial 100 maximum 300
display mpls ldp discovery
Use display mpls ldp discovery to display LDP discovery information.
Syntax
In standalone mode:
display mpls ldp discovery [ vpn-instance vpn-instance-name ] [ interface interface-type interface-number | peer peer-lsr-id | targeted-peer peer-lsr-id ] [ verbose ] [ standby slot slot-number ]
In IRF mode:
display mpls ldp discovery [ vpn-instance vpn-instance-name ] [ interface interface-type interface-number | peer peer-lsr-id | targeted-peer peer-lsr-id ] [ verbose ] [ standby chassis chassis-number slot slot-number ]
display mpls ldp discovery [ vpn-instance vpn-instance-name ] [ interface interface-type interface-number | peer peer-lsr-id | targeted-peer peer-lsr-id ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. This command displays LDP discovery information for the specified VPN instance. If you do not specify a VPN instance, this command displays LDP discovery information for the public network.
interface interface-type interface-number: Specifies an interface by its type and number. This command displays information about basic discovery that uses the interface to send Link Hellos.
peer peer-lsr-id: Specifies an LDP peer by its LSR ID. This command displays information about both basic discovery and extended discovery that have discovered the specified LDP peer.
targeted-peer peer-lsr-id: Specifies an LDP peer by its LSR ID. This command displays information about extended discovery that has sent Targeted Hellos to the specified LDP peer.
verbose: Displays detailed LDP discovery information. If you do not specify this keyword, the command displays brief LDP discovery information.
standby: Displays backup LDP process information. If you do not specify this keyword, the command displays primary LDP process information.
slot slot-number: Specifies the slot number of the MPU where the standby process resides. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies the MPU where the standby process resides. The chassis-number argument represents the IRF member ID of the device. The slot-number argument represents the slot number of the MPU. (In IRF mode.)
Usage guidelines
If you do not specify any parameters, this command displays all LDP basic and extended discovery information.
Examples
# Display brief LDP discovery information for the public network.
<Sysname> display mpls ldp discovery
Type: L - Link Hello, T - Targeted Hello
Discovery Source Hello Sent/Rcvd Peer LDP ID
(L) Vlan17 83/80 100.100.100.18:0
200.100.100.18:0
(T) 100.100.100.18 23/20 100.100.100.18:0
Table 1 Command output
Field |
Description |
Type |
Type of LDP discovery: · L—Basic discovery, which sends Link Hellos to discover peers. · T—Extended discovery, which sends Targeted Hellos to discover peers. |
Discovery Source |
Discovery source. · If the LDP discovery type is L, this field displays the interface that discovers the peer. · If the LDP discovery type is T, this field displays the LSR ID of the peer. |
Hello Sent/Rcvd |
Number of hellos sent or received on the interface. |
Peer LDP ID |
LDP identifier of the LDP peer. |
# Display detailed LDP discovery information for the public network.
<Sysname> display mpls ldp discovery verbose
Link Hellos:
Interface GigabitEthernet3/0/2
Hello Interval : 5000 ms Hello Sent/Rcvd : 83/160
Transport Address: 100.100.100.17
Peer LDP ID : 100.100.100.18:0
Source Address : 202.118.224.18 Transport Address: 100.100.100.18
Hello Hold Time: 15 sec (Local: 15 sec, Peer: 15 sec)
Peer LDP ID : 100.100.100.20:0
Source Address : 202.118.224.20 Transport Address: 100.100.100.20
Hello Hold Time: 15 sec (Local: 15 sec, Peer: 15 sec)
Targeted Hellos:
100.100.100.17 -> 100.100.100.18 (Active, Passive)
Hello Interval : 15000 ms Hello Sent/Rcvd : 23/20
Transport Address: 100.100.100.17
Peer LDP ID : 100.100.100.18:0
Source Address : 100.100.100.18 Transport Address: 100.100.100.18
Hello Hold Time: 45 sec (Local: 45 sec, Peer: 45 sec)
100.100.100.17 -> 100.100.100.20 (Active, Passive)
Hello Interval : 15000 ms Hello Sent/Rcvd : 23/22
Transport Address: 100.100.100.17
Peer LDP ID : 100.100.100.20:0
Source Address : 100.100.100.20 Transport Address: 100.100.100.20
Hello Hold Time: 45 sec (Local: 45 sec, Peer: 45 sec)
Table 2 Command output
Field |
Description |
Link Hellos |
Information about basic discovery that sends Link Hellos on interfaces. In a non-point-to-point network, an interface might discover multiple peers. |
Interface |
Interface using basic discovery. |
Hello Interval |
Hello interval in milliseconds. |
Hello Sent/Rcvd |
Number of hellos sent or received on the interface. |
Transport Address |
Local transport address. |
Peer LDP ID |
LDP identifier of the LDP peer. |
Source Address |
Source IP address of received Hello messages. |
Transport Address |
Transport address in the received Hello messages—the transport address of the LDP peer. |
Hello Hold Time |
Hello hold time in seconds. Local—Local hello hold time. Peer—Peer hello hold time. The negotiated hello hold time is the smaller value of the local and peer hold time values. |
Targeted Hellos |
Information about extended LDP discovery that sends Targeted Hellos to peers. |
100.100.100.17 -> 100.100.100.18 (Active, Passive) |
· The address before -> (100.100.100.17 in this example) is the local LSR ID. · The address after -> (100.100.100.18 in this example) is the LSR ID of the peer. · (Active) indicates that the local LSR is the Targeted Hello sender. · (Passive) indicates that the local LSR is the Targeted Hello receiver. · (Active, Passive) indicates that the local LSR is both the Targeted Hello sender and receiver. |
display mpls ldp fec
Use display mpls ldp fec to display LDP FEC-label mappings.
Syntax
In standalone mode:
display mpls ldp fec [ vpn-instance vpn-instance-name ] [ destination-address mask-length | summary ] [ standby slot slot-number ]
In IRF mode:
display mpls ldp fec [ vpn-instance vpn-instance-name ] [ destination-address mask-length | summary ] [ standby chassis chassis-number slot slot-number ]
display mpls ldp fec [ vpn-instance vpn-instance-name ] [ destination-address mask-length | summary ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. This command displays FEC-label mappings for the specified VPN instance. If you do not specify a VPN instance, this command displays FEC-label mappings for the public network.
destination-address mask-length: Specifies an FEC by an IP address and a mask in the range of 0 to 32.
summary: Displays summary information about all FEC-label mappings learned by LDP.
standby: Displays backup LDP process information. If you do not specify this keyword, the command displays primary LDP process information.
slot slot-number: Specifies the slot number of the MPU where the standby process resides. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies the MPU where the standby process resides. The chassis-number argument represents the IRF member ID of the device. The slot-number argument represents the slot number of the MPU. (In IRF mode.)
Usage guidelines
If you do not specify the destination-address mask-length and summary parameters, this command displays detailed information about all FEC-label mappings learned by LDP.
Examples
# Display detailed information about all FEC-label mappings learned by LDP for the public network.
<Sysname> display mpls ldp fec
FEC: 100.100.100.18/32
Flags: 0x02
In Label: 1531
Label Advertisement Policy:
FEC Prefix-list: Fec-prefix-list
Peer Prefix-list: Peer-prefix-list
Upstream Info:
Peer: 100.100.100.18:0 State: Established (stale)
Downstream Info:
Peer: 100.100.100.18:0
Out Label: 3 State: Established (stale)
Next Hops: 202.118.224.18 GE3/0/2
100.19.100.18 XGE2/0/6
Table 3 Command output
Field |
Description |
FEC |
Forwarding equivalence class identified by an IP prefix. |
Flags |
FEC flags: · 0x01—Egress LSP. · 0x02—Ingress LSP. · 0x04—Waiting to add an outgoing label to RIB. · 0x08—Waiting to add an LSP to LSM. · 0x10—Non-egress LSP waiting for the recovery during a GR process. · 0x20—Ready to advertise labels. This field displays the sum of the flags. For example, if the FEC has flags 0x01 and 0x20, this field displays 0x21. |
In Label |
Incoming label assigned by the local LSR to the FEC. |
Label Advertisement Policy |
Label advertisement policy. |
FEC Prefix-list |
IP prefix list for filtering FEC prefixes. |
Peer Prefix-list |
IP prefix list for filtering LDP peers. |
Upstream Info |
Upstream peer to which the local LSR advertised the FEC-label mapping and current state of the LSP. |
Peer |
LDP ID of an upstream peer. |
State |
Current state of the LSP established with the upstream peer: · Established—Active state. · Idle—Initial state. · Release Awaited—Waiting for a Release message. · Resource Awaited—Waiting for a label for the FEC. If the state is marked as stale, the FEC-label mapping is under a GR process. |
Downstream Info |
Downstream peer from which the local LSR received the FEC-label mapping, and current state of the LSP. |
Peer |
LDP ID of a downstream peer. |
Out Label |
Outgoing label assigned by the downstream LSR for the FEC. |
State |
Current state of the LSP established with the downstream peer: · Established—Active state. · Idle—Inactive state. If the state is marked as stale, the FEC-label mapping is under a GR process. |
Next Hops |
Next hops and outgoing interfaces. |
# Display summary information about all FEC-label mappings learned by LDP for the public network.
<Sysname> display mpls ldp fec summary
FECs : 3
Implicit Null: 1
Explicit Null: 0
Non-Null : 2
No Label : 0
No Route : 0
Sent : 3
Received : 3
Table 4 Command output
Field |
Description |
FECs |
Number of FECs that LDP has discovered from the routing protocol or FEC-label mappings advertised by peers. |
Implicit Null |
Number of FECs that are bound to the implicit null label. |
Explicit Null |
Number of FECs that are bound to the explicit null label. |
Non-Null |
Number of FECs that are bound to non-null labels. |
No Label |
Number of FECs without a label. |
No Route |
Number of FECs without matching routes. |
Sent |
Number of label mappings sent and being sent. |
Received |
Number of label mappings accepted. |
display mpls ldp interface
Use display mpls ldp interface to display LDP interface information.
Syntax
display mpls ldp interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays information about all LDP interfaces.
Examples
# Display information about all LDP interfaces.
<Sysname> display mpls ldp interface
Interface MPLS LDP Auto-config
GE3/0/2 Enabled Configured -
XGE2/0/6 Enabled Configured -
Table 5 Command output
Field |
Description |
Interface |
Interface enabled with LDP. |
MPLS |
Whether the interface is enabled with MPLS. |
LDP |
Whether the interface is configured with the mpls ldp enable command. |
Auto-config |
LDP automatic configuration information: · If LDP autoconfiguration is enabled, this field displays IGP process information, such as OSPF process ID and OSPF area ID. · If LDP autoconfiguration is disabled, this field displays a hyphen (-). |
Related commands
· mpls ldp
· mpls ldp enable
display mpls ldp lsp
Use display mpls ldp lsp to display information about LSPs generated by LDP.
Syntax
display mpls ldp lsp [ vpn-instance vpn-instance-name ] [ destination-address mask-length ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. This command displays LDP LSP information for the specified VPN instance. If you do not specify a VPN instance, this command displays LDP LSP information for the public network.
destination-address mask-length: Specifies an FEC by an IP address and a mask length in the range of 0 to 32. If you do not specify an FEC, this command displays information about LDP LSPs for all FECs.
Examples
# Display LDP LSP information for the public network.
<Sysname> display mpls ldp lsp
Status Flags: * - stale, L - liberal
Statistics:
FECs: 4 Ingress LSPs: 1 Transit LSPs: 1 Egress LSPs: 3
FEC In/Out Label Nexthop OutInterface
1.1.1.1/32 -/3 10.1.1.1 GE3/0/2
1151/3 10.1.1.1 GE3/0/2
2.2.2.2/32 3/-
-/1151(L)
10.1.1.0/24 1149/-
-/1149(L)
192.168.1.0/24 1150/-
<Sysname> display mpls ldp lsp
Status Flags: * - stale, L - liberal, B - backup
Statistics:
FECs: 4 Ingress LSPs: 1 Transit LSPs: 1 Egress LSPs: 3
FEC In/Out Label Nexthop OutInterface
1.1.1.1/32 -/3 10.1.1.1 GE3/0/2
1151/3 10.1.1.1 GE3/0/2
2.2.2.2/32 3/-
-/1151(L)
10.1.1.0/24 1149/-
-/1149(L)
192.168.1.0/24 1150/-
-/1150(L)
Table 6 Command output
Field |
Description |
Status Flags |
LSP status: · *—Stale, indicating the LSP is under a GR process. · L—Liberal, indicating the LSP is not available. |
Statistics |
LSP statistics: · FECs—Total number of FECs. · Ingress LSPs—Number of LSPs that take the local device as the ingress node. · Transit LSPs—Number of LSPs that take the local device as a transit node. · Egress LSPs—Number of LSPs that take the local device as the egress node. |
FEC |
Forwarding equivalence class identified by an IP prefix. |
In/Out Label |
Incoming/outgoing label. |
Nexthop |
Next hop address for the FEC. |
OutInterface |
Outgoing interface for the FEC. |
Related commands
display mpls lsp
display mpls ldp parameter
Use display mpls ldp parameter to display LDP running parameters.
Syntax
display mpls ldp parameter [ vpn-instance vpn-instance-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. This command displays the LDP running parameters for the specified VPN instance. If you do not specify a VPN instance, this command displays LDP running parameters for the public network.
Examples
# Display LDP running parameters for the public network.
<Sysname> display mpls ldp parameter
Protocol Version : V1 IGP Sync Delay on Restart : -
Nonstop Routing : Off Graceful Restart : Off
Reconnect Time : 120 sec Forwarding State Hold Time: 360 sec
Instance Parameters:
Instance ID : 0 Instance State : Active
LSR ID : 0.0.0.0
Loop Detection : Off
Hop Count Limit : 32 Path Vector Limit : 32
Label Retention Mode: Liberal Label Distribution Control Mode: Ordered
IGP Sync Delay : 0 sec IGP Sync Delay on Restart : -
Table 7 Command output
Field |
Description |
Global Parameters |
Global parameters for all LDP-enabled networks. |
Protocol Version |
LDP protocol version. |
Nonstop Routing |
Whether the nonstop routing function is enabled. · On—Enabled. · Off—Disabled. |
Graceful Restart |
Whether the GR function is enabled. · On—Enabled. · Off—Disabled. |
Reconnect Time |
Value of the Reconnect timer, in seconds. |
Forwarding State Hold Time |
Value of the MPLS Forwarding State Holding timer, in seconds. |
Instance Parameters |
Running parameters for a specific VPN instance or public network. |
Instance ID |
VPN instance ID. For the public network, this field displays 0. |
Instance State |
LDP status in the VPN instance, Active or Inactive. |
LSR ID |
LSR ID of the local device. |
Loop Detection |
Whether loop detection is enabled. · On—Enabled. · Off—Disabled. |
Hop Count Limit |
Hop count limit specified for loop detection. |
Path Vector Limit |
Path Vector length limit specified for loop detection. |
Label Retention Mode |
The device supports only the Liberal mode. |
IGP Sync Delay |
Delay time (in seconds) that LDP must wait before it notifies IGP of an LDP session-up event. |
IGP Sync Delay on Restart |
Delay time (in seconds) that LDP must wait before it notifies IGP of an LDP session-up event in case of LDP restart. |
display mpls ldp peer
Use display mpls ldp peer to display LDP peer and session information.
Syntax
In standalone mode:
display mpls ldp peer [ vpn-instance vpn-instance-name ] [ peer-lsr-id ] [ verbose ] [ standby slot slot-number ]
In IRF mode:
display mpls ldp peer [ vpn-instance vpn-instance-name ] [ peer-lsr-id ] [ verbose ] [ standby chassis chassis-number slot slot-number ]
display mpls ldp peer [ vpn-instance vpn-instance-name ] [ peer-lsr-id ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. This command displays LDP peer and session information for the specified VPN instance. If you do not specify a VPN instance, this command displays the LDP peer and session information of the public network.
peer peer-lsr-id: Specifies an LDP peer by its LSR ID. If you do not specify this option, the command displays all LDP peers and related session information.
verbose: Displays detailed LDP peer and session information. If you do not specify this keyword, the command displays brief LDP peer and session information.
standby: Displays backup LDP process information. If you do not specify this keyword, the command displays primary LDP process information.
slot slot-number: Specifies the slot number of the MPU where the standby process resides. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies the MPU where the standby process resides. The chassis-number argument represents the IRF member ID of the device. The slot-number argument represents the slot number of the MPU. (In IRF mode.)
Examples
# Display brief information about all LDP peers and LDP sessions for the public network.
<Sysname> display mpls ldp peer
Total number of peers: 1
Peer LDP ID State Role GR MD5 KA Sent/Rcvd
2.2.2.9:0 Operational Passive Off Off 39/39
Table 8 Command output
Field |
Description |
Peer LDP ID |
LDP identifier of the peer. |
State |
State of the LDP session between the local LSR and the peer: · Non Existent—No TCP connection is established. · Initialized—A TCP connection has been established. · OpenRecv—LDP has received an acceptable initialization message. · OpenSent—LDP has sent an initialization message. · Operational—An LDP session has been established. |
Role |
Role of the local LSR in the session, Active or Passive. In a session, the LSR with a higher IP address takes the Active role. The Active LSR initiates a TCP connection to the passive LSR. |
GR |
Whether GR is enabled on the peer. · On—Enabled. · Off—Disabled. |
MD5 |
Whether MD5 authentication is enabled for the LDP session on the local device. · On—Enabled. · Off—Disabled. |
KA Sent/Rcvd |
Number of keepalive messages sent/received. |
# Display detailed information about all LDP peers and LDP sessions for the public network.
<Sysname> display mpls ldp peer verbose
Peer LDP ID : 100.100.100.20:0
Local LDP ID : 100.100.100.17:0
TCP Connection : 100.100.100.20:47515 -> 100.100.100.17:646
Session State : Operational Session Role : Passive
Session Up Time : 0000:00:03 (DD:HH:MM)
Max PDU Length : 4096 bytes (Local: 4096 bytes, Peer: 4096 bytes)
Keepalive Time : 45 sec (Local: 45 sec, Peer: 45 sec)
Keepalive Interval : 15 sec
Msgs Sent/Rcvd : 288/426
KA Sent/Rcvd : 13/13
Label Adv Mode : DU Graceful Restart : On
Reconnect Time : 120 sec Recovery Time : 360 sec
Loop Detection : On Path Vector Limit: 32
Discovery Sources:
Targeted Hello 100.100.100.17 -> 100.100.100.20 (Active, Passive)
Hello Hold Time: 45 sec Hello Interval : 15000 ms
GigabitEthernet3/0/2
Hello Hold Time: 15 sec Hello Interval : 5000 ms
Label Acceptance Policy : prefix-from-20
Session Protection : On
State : Ready Duration : 120 sec
Addresses received from peer:
202.118.224.20 100.100.100.20 11.22.33.44 1.2.3.10
1.2.3.4
Table 9 Command output
Field |
Description |
Peer LDP ID |
LDP identifier of the peer. |
Local LDP ID |
LDP identifier of the local LSR. |
TCP connection |
TCP connection information of the session, including the IP addresses and port numbers used by both ends of the TCP connection, and whether MD5 authentication is enabled for the TCP connection. If MD5 authentication is enabled, MD5 On is displayed. If MD5 is not enabled, this field is blank. |
Session State |
State of the LDP session: · Non Existent—No TCP connection is established. · Initialized—A TCP connection has been established. · OpenRecv—LDP has received an acceptable initialization message. · OpenSent—LDP has sent an initialization message. · Operational—An LDP session has been established. |
Session Role |
Role the local LSR in the session, Active or Passive. |
Session Up time |
Duration of the session in Operational state. |
Max PDU Length |
Maximum PDU length negotiated, in bytes. Local—Maximum PDU length (in bytes) on the local LSR. Peer—Maximum PDU length (in bytes) on the peer. |
Keepalive Time |
Keepalive time negotiated, in seconds. Local—Locally configured Keepalive holding time, in seconds. Peer—Keepalive holding time (in seconds) configured on the peer. |
Keepalive Interval |
Keepalive interval in seconds. |
Msgs Sent/Rcvd |
Total number of LDP messages sent and received. |
KA Sent/Rcvd |
Total number of Keepalive messages sent and received. |
Label Adv Mode |
Label advertisement mode negotiated. The device only supports the DU mode. |
Graceful Restart |
Indicates whether GR is enabled on the peer. · On—Enabled. · Off—Disabled. |
Reconnect Time |
Reconnect time negotiated, in seconds. |
Recovery Time |
Recovery time (in seconds) carried in packets sent by the peer. |
Loop Detection |
Whether loop detection is enabled on the peer. · On—Enabled. · Off—Disabled. |
Path Vector Limit |
Maximum Path Vector length configured on the peer. |
Discovery Sources |
Discovery source of the LDP peer. |
Targeted Hello |
LDP peer discovered by the extended discovery mechanism. · The address before -> (100.100.100.17 in this example) is the local LSR ID. · The address after -> (100.100.100.20 in this example) is the LSR ID of the peer. · (Active) indicates that the local LSR is the active end. It actively sends Targeted Hellos to its peer. · (Passive) indicates that the local LSR is the passive end. It passively responds to the Targeted Hellos from its peer. · (Active, Passive) indicates that the local LSR acts as both the active end and the passive end. |
GigabitEthernet3/0/2 |
Interface running LDP basic discovery. The device discovers the LDP peer by sending Link Hellos out of the interface. |
Hello Hold Time |
Hello hold time negotiated, in seconds. |
Hello Interval |
Current Hello interval, in milliseconds. |
Label Acceptance Policy |
Label acceptance policy used to filter label mappings received from the peer. |
Session Protection |
Whether session protection is enabled. · On—Enabled. · Off—Disabled. |
State |
Session protection state: · Incomplete—Session protection is not ready. · Ready—Session protection is ready. · Protecting—The session is under protection. |
Duration |
Local session protection duration, in seconds. Infinite indicates that session protection takes effect permanently. |
Holdup time remaining |
Remaining time of the session hold timer, in seconds. This field is displayed only when the session protection state is Protecting. A value of Infinite indicates that session protection takes effect permanently. |
Addresses received from peer |
IP addresses received from the peer. |
display mpls ldp summary
Use display mpls ldp summary to display LDP summary information.
Syntax
In standalone mode:
display mpls ldp summary [ all | vpn-instance vpn-instance-name ] [ standby slot slot-number ]
In IRF mode:
display mpls ldp summary [ all | vpn-instance vpn-instance-name ] [ standby chassis chassis-number slot slot-number ]
display mpls ldp summary [ all | vpn-instance vpn-instance-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
all: Displays LDP summary information for the public network and all VPN instances.
vpn-instance vpn-instance-name: Displays LDP summary information for the specified VPN instance. The vpn-instance-name argument is a case-sensitive string of 1 to 31 characters.
standby: Displays backup LDP process information. If you do not specify this keyword, the command displays primary LDP process information.
slot slot-number: Specifies the slot number of the MPU where the standby process resides. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies the MPU where the standby process resides. The chassis-number argument represents the IRF member ID of the device. The slot-number argument represents the slot number of the MPU. (In IRF mode.)
Usage guidelines
If you do not specify any parameters, this command displays LDP summary information for the public network.
Examples
# Display LDP summary information for the public network.
<Sysname> display mpls ldp summary
Global Information:
Memory State : Minor
Discarded Hellos: 60
VPN Instance Name : Public
Instance ID : 0
Instance State : Active
Interfaces : 1 (1 active)
Targeted Peers : 0
Adjacencies : 1
Peers : 1
Operational : 1 (0 GR)
OpenSent : 0
OpenRecv : 0
Initialized : 0
Non-Existent: 0
Table 10 Command output
Field |
Description |
Memory State |
Memory state: · Normal—The memory is normal. · Minor—The memory has a minor alarm. · Severe—The memory has a severe alarm. · Critical—The memory has a critical alarm. |
Discarded Hellos |
Number of Hellos discarded when the memory is in an alarm state. If no Hello is discarded, this filed is not displayed. |
Instance ID |
VPN instance identifier. A value of 0 represents the public network. |
Instance State |
LDP status in the VPN instance, Active or Inactive. |
Interfaces |
Number of interfaces enabled with LDP. active: Number of interfaces running LDP. |
Targeted Peers |
Number of peers discovered by the LDP extended discovery mechanism, including the manually specified peers and the automatically established peers. |
Adjacencies |
Number of Hello adjacencies. |
Peers |
Total number of peers. |
Operational |
Number of peers in Operational state. GR: Number of GR-capable peers. |
OpenSent |
Number of peers in OpenSent state. |
OpenRecv |
Number of peers in OpenRecv state. |
Initialized |
Number of peers in Initialized state. |
Non-Existent |
Number of peers in Non-Existent state. |
graceful-restart
Use graceful-restart to enable Graceful Restart (GR) for LDP.
Use undo graceful-restart to disable LDP GR.
Syntax
graceful-restart
undo graceful-restart
Default
LDP GR is disabled.
Views
LDP view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
GR enables an LSR to retain MPLS forwarding entries during an LDP restart, ensuring continuous MPLS forwarding.
The graceful-restart command does not take effect on LDP sessions established before the command is executed. To apply the new setting, execute the reset mpls ldp command to re-establish LDP sessions.
Examples
# Enable GR for LDP.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] graceful-restart
Related commands
· display mpls ldp parameter
· reset mpls ldp
graceful-restart timer
Use graceful-restart timer to set the MPLS Forwarding State Holding timer and the Reconnect timer for GR.
Use undo graceful-restart timer to restore the default.
Syntax
graceful-restart timer { forwarding-hold hold-time | reconnect reconnect-time }
undo graceful-restart timer { forwarding-hold | reconnect }
Default
The MPLS Forwarding State Holding timer is 180 seconds and the Reconnect timer is 120 seconds.
Views
LDP view
Predefined user roles
network-admin
mdc-admin
Parameters
forwarding-hold hold-time: Specifies the MPLS Forwarding State Holding time in the range of 60 to 600 seconds. This time specifies how long the local LSR retains its MPLS forwarding entries after the control plane of the local LSR restarts.
reconnect reconnect-time: Specifies the Reconnect time in the range of 60 to 300 seconds. This time specifies the period the local LSR expects the peer to wait for LDP session re-establishment after the peer detects an LDP session failure. The local LSR sends the Reconnect time to the peer.
Usage guidelines
The MPLS Forwarding State Holding time must be greater than the Reconnect time.
In a GR process, the timers work as follows:
1. When LDP restarts, the GR restarter starts the MPLS Forwarding State Holding timer, and marks the MPLS forwarding entries as stale. When a GR helper detects that the LDP session with the GR restarter is down, it performs the following operations:
a. Marks the FEC-label mappings learned from the session as stale.
b. Starts the Reconnect timer received from the GR restarter.
2. After the LDP restart, the GR restarter re-establishes an LDP session to the GR helper.
¡ If the LDP session is not set up before the Reconnect timer expires, the GR helper deletes stale FEC-label mappings and corresponding MPLS forwarding entries.
¡ If the LDP session is successfully set up before the Reconnect timer expires, the GR restarter sends the remaining time of the MPLS Forwarding State Holding timer to the GR helper.
The remaining time is sent as the LDP Recovery time.
3. After the LDP session is re-established, the GR helper starts the LDP Recovery timer.
4. The GR restarter and the GR helper exchange label mappings and update their MPLS forwarding tables.
The GR restarter compares each received label mapping against stale MPLS forwarding entries. If a match is found, the restarter deletes the stale mark for the matching entry. Otherwise, it adds a new entry for the label mapping.
The GR helper compares each received label mapping against stale FEC-label mappings. If a match is found, the helper deletes the stale mark for the matching mapping. Otherwise, it adds the received FEC-label mapping and a new MPLS forwarding entry for the mapping.
5. When the MPLS Forwarding State Holding timer expires, the GR restarter deletes all stale MPLS forwarding entries.
6. When the LDP Recovery timer expires, the GR helper deletes all stale FEC-label mappings.
Examples
# Set the MPLS Forwarding State Holding time to 200 seconds, and the Reconnect time to 100 seconds.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] graceful-restart timer forwarding-hold 200
[Sysname-ldp] graceful-restart timer reconnect 100
Related commands
· display mpls ldp parameter
· graceful-restart
label-distribution
Use label-distribution to specify the label distribution control mode.
Use undo label-distribution to restore the default.
Syntax
label-distribution { independent | ordered }
undo label-distribution
Default
The label distribution control mode is ordered.
Views
LDP view, LDP-VPN instance view
Predefined user roles
network-admin
mdc-admin
Parameters
independent: Specifies Independent label distribution mode. In this mode, an LSR can distribute label mappings to the upstream LSR at any time.
ordered: Specifies Ordered label distribution mode. In this mode, an LSR distributes a label mapping for an FEC to the upstream LSR only when one of the following events occur:
· The LSR receives a label mapping for that FEC from the downstream LSR.
· The LSR is the egress node of that FEC.
Usage guidelines
In Ordered mode, an LSR can determine that the downstream LSR has established an LSP when the LSR receives an FEC-label mapping from the downstream LSR.
The Independent mode enables faster LSP convergence because each LSR independently advertises labels without waiting for labels from downstream LSRs.
Examples
# Specify the Independent LDP label distribution mode for the public network.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] label-distribution independent
Related commands
display mpls ldp parameter
loop-detect
Use loop-detect to enable loop detection.
Use undo loop-detect to disable loop detection.
Syntax
loop-detect
undo loop-detect
Default
Loop detection is disabled.
Views
LDP view, LDP-VPN instance view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
This command enables LDP to detect and terminate LSP loops. LDP loop detection uses one of the following methods:
· Hop count. For more information, see "maxhops."
· Path vector. For more information, see "pv-limit."
Use LDP loop detection only in networks with devices that do not support TTL mechanism such as ATM switches. Do not use LDP loop detection on other networks because it only results in extra LDP overhead.
Examples
# Enable LDP loop detection for the public network.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] loop-detect
Related commands
· display mpls ldp parameter
· maxhops
· pv-limit
lsp-trigger
Use lsp-trigger to configure an LSP generation policy.
Use undo lsp-trigger to restore the default.
Syntax
lsp-trigger { all | prefix-list prefix-list-name }
undo lsp-trigger
Default
LDP can only use host routes with a 32-bit mask to generate LSPs.
Views
LDP view, LDP-VPN instance view
Predefined user roles
network-admin
mdc-admin
Parameters
all: Enables LDP to use all routes to generate LSPs.
prefix-list prefix-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters. LDP can only use the routes permitted by the IP prefix list to generate LSPs.
Usage guidelines
The default LSP generation policy depends on the label distribution control mode.
· In Ordered mode, LDP can only use the following routes to generate LSPs:
¡ Loopback interface address routes with a 32-bit mask.
¡ The routes with a 32-bit mask that match the FECs of label mappings received from downstream LSRs.
· In Independent mode, LDP can use all routes with a 32-bit mask to generate LSPs.
After you configure an LSP generation policy, LDP uses all routes or the routes permitted by the IP prefix list to generate LSPs, regardless of the label distribution control mode.
H3C recommends that you use the default LSP generation policy.
Examples
# Configure an LSP generation policy to use only routes 10.10.1.0/24 and 10.20.1.0/24 to establish LSPs for the public network.
<Sysname> system-view
[Sysname] ip prefix-list egress-fec-list index 1 permit 10.10.1.0 24
[Sysname] ip prefix-list egress-fec-list index 2 permit 10.20.1.0 24
[Sysname] mpls ldp
[Sysname-ldp] lsp-trigger prefix-list egress-fec-list
Related commands
ip prefix-list (Layer 3—IP Services Command Reference)
lsr-id
Use lsr-id to configure an LDP LSR ID.
Use undo lsr-id to delete the configured LDP LSR ID.
Syntax
lsr-id lsr-id
undo lsr-id
Default
No LDP LSR ID is configured. LDP uses the MPLS LSR ID configured by the mpls lsr-id command for both the public network and VPN instances.
Views
LDP view, LDP-VPN instance view
Predefined user roles
network-admin
mdc-admin
Parameters
lsr-id: Specifies an LDP LSR ID, in dotted decimal notation.
Usage guidelines
If you configure an LDP LSR ID by using the lsr-id command in LDP view or LDP-VPN instance view, LDP uses the LDP LSR ID. Otherwise, LDP uses the LSR-ID configured by the mpls lsr-id command.
LDP uses the same LSR ID for all sessions in the same VPN instance. After you configure a new LSR ID for a VPN instance, LDP does not use the new LSR ID unless you use the reset mpls ldp command to re-establish all LDP sessions in the VPN instance.
For the public network, H3C recommends that you use the default LDP LSR ID configured by the mpls lsr-id command. If you want to configure an LDP LSR ID for the public network by using the lsr-id command, specify the IP address of a local Loopback interface as the LDP LSR ID for high reliability.
Examples
# Configure the LDP LSR ID as 2.2.2.2 for the public network.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] lsr-id 2.2.2.2
Related commands
· display mpls ldp parameter
· mpls lsr-id
maxhops
Use maxhops to set the maximum hop count for loop detection.
Use undo maxhops to restore the default.
Syntax
maxhops hop-number
undo maxhops
Default
The maximum hop count for loop detection is 32.
Views
LDP view, LDP-VPN instance view
Predefined user roles
network-admin
mdc-admin
Parameters
hop-number: Specifies the maximum hop count for loop detection, in the range of 1 to 32.
Usage guidelines
LDP adds a hop count in a label request or label mapping message. The hop count increments by 1 on each LSR. When the hop count reaches the maximum hop count configured by this command, LDP considers that a loop occurs and terminates LSP establishment.
Set a proper maximum hop count according to the number of LSRs in your network. For example, set a smaller maximum hop count in small networks to allow for fast loop detection; set a higher maximum hop count in large networks to make sure that LSPs can be successfully established.
Examples
# Set the maximum hop count to 25 for loop detection in the public network.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] maxhops 25
Related commands
· display mpls ldp parameter
· loop-detect
· pv-limit
md5-authentication
Use md5-authentication to enable LDP MD5 authentication.
Use undo md5-authentication to disable LDP MD5 authentication.
Syntax
md5-authentication peer-lsr-id { cipher | plain } password
undo md5-authentication peer-lsr-id
Default
LDP MD5 authentication is disabled.
Views
LDP view, LDP-VPN instance view
Predefined user roles
network-admin
mdc-admin
Parameters
peer-lsr-id: Specifies the LSR ID of a peer.
cipher: Specifies a ciphertext key.
plain: Specifies a plaintext key.
password: Specifies a case-sensitive key string. If plain is specified, it must be a plaintext string of 1 to 16 characters. If cipher is specified, it must be a ciphertext string of 1 to 53 characters.
Usage guidelines
To improve security for LDP sessions, you can configure MD5 authentication for the underlying TCP connections to check the integrity of LDP messages.
The local LSR and the peer LSR must have the same key. Otherwise, they cannot establish a TCP connection.
After you change the MD5 authentication key, the local LSR uses the new key to re-establish an LDP session with the specified peer.
For security purposes, all keys, including keys configured in plain text, are saved in cipher text.
Examples
# Enable LDP MD5 authentication for peer 3.3.3.3 in the public network, and set a plaintext key of pass.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] md5-authentication 3.3.3.3 plain pass
Related commands
display mpls ldp peer
mpls ldp
Use mpls ldp to enable LDP globally for an LSR and enter LDP view.
Use undo mpls ldp to disable LDP globally for an LSR and delete all LDP-VPN instances.
Syntax
mpls ldp
undo mpls ldp
Default
LDP is globally disabled.
Views
System view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
You must enable LDP globally for an LSR to run LDP.
The GR commands, the session protection command, and the targeted-peer command are available only in LDP view. All other commands available in LDP view are also available in LDP-VPN instance view.
Commands executed in LDP view take effect only for the public network. Commands executed in LDP-VPN instance view take effect only for the specified VPN instance. The GR commands are global commands and take effect on all VPN instances and the public network.
Examples
# Enable LDP globally and enter LDP view.
<Sysname> System-view
[Sysname] mpls ldp
[Sysname-ldp]
Related commands
· mpls ldp enable
· vpn-instance
mpls ldp enable
Use mpls ldp enable to enable LDP on an interface.
Use undo mpls ldp enable to disable LDP on an interface.
Syntax
mpls ldp enable
undo mpls ldp enable
Default
LDP is disabled on an interface.
Views
Interface view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
Before you enable LDP on an interface, use the mpls ldp command in system view to enable LDP globally.
Disabling LDP on an interface terminates all LDP sessions on the interface, and removes all LSPs established through the sessions.
If the interface is bound to a VPN instance, you must also use the vpn-instance command to enable LDP for the VPN instance.
An up interface enabled with LDP and MPLS sends Link Hellos for neighbor discovery.
Examples
# Enable LDP on interface VLAN-interface 2.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] quit
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] mpls ldp enable
Related commands
· display mpls ldp interface
· mpls enable
· mpls ldp
mpls ldp timer
Use mpls ldp timer to set the Hello hold time, Hello interval, Keepalive hold time, and Keepalive interval.
Use undo mpls ldp timer to restore the default.
Syntax
mpls ldp timer { hello-hold timeout | hello-interval interval | keepalive-hold timeout | keepalive-interval interval }
undo mpls ldp timer { hello-hold | hello-interval | keepalive-hold | keepalive-interval }
Default
· The Link Hello hold time is 15 seconds.
· The Link Hello interval is 5 seconds.
· The Targeted Hello hold time is 45 seconds.
· The Targeted Hello interval is 15 seconds.
· The Keepalive hold time is 45 seconds.
· The Keepalive interval is 15 seconds.
Views
Interface view, LDP peer view
Predefined user roles
network-admin
mdc-admin
Parameters
hello-hold timeout: Specifies the Hello hold time in the range of 1 to 65535 seconds. LDP keeps the hello adjacency during the Hello hold time. The negotiated Hello hold time takes the smaller value of the local Hello hold time and the peer Hello hold time. If LDP receives no Hello message from the peer before the Hello hold timer expires, LDP deletes the Hello adjacency with the peer. If you set the Hello hold time to 65535, LDP permanently keeps the Hello adjacency.
hello-interval interval: Specifies the Hello interval in the range of 1 to 65535 seconds. LDP sends Hello messages at this interval.
keepalive-hold timeout: Specifies the Keepalive hold time in the range of 15 to 65535 seconds. LDP keeps the LDP session with the peer during the Keepalive hold time. The negotiated Keepalive hold time takes the smaller value of the local Keepalive hold time and the peer Keepalive hold time. If LDP receives no LDP message from the peer before the Keepalive hold timer expires, LDP deletes the LDP session with the peer.
keepalive-interval interval: Specifies the Keepalive interval in the range of 1 to 65535 seconds. LDP sends Keepalive messages to the peer at this interval.
Usage guidelines
In interface view, this command sets a Link Hello hold time and a Link Hello interval.
In LDP peer view, this command sets a Targeted Hello hold time and a Targeted Hello interval.
If the Hello hold time and the Keepalive hold time values are too large, LDP cannot quickly detect link failures. If the values are too small, LDP might mistakenly consider a normal link failed. H3C recommends that you use the default values.
If two LSRs have multiple LDP links in between, make sure those links have the same Keepalive hold time.
During LDP session negotiation, an LSR compares the local Hello hold time with the Hello hold time of the peer LSR, and uses the smaller one as the negotiated Hello hold time. If the negotiated Hello hold time is larger than three times the local Hello interval, the LSR sends Hello messages at the local Hello interval. Otherwise, the LSR sends Hello messages at an interval 1/3 of the negotiated Hello hold time.
During LDP session negotiation, an LSR compares the local Keepalive hold time with the Keepalive hold time of the peer LSR, and uses the smaller one as the negotiated Keepalive hold time. If the negotiated Keepalive hold time is larger than three times the local Keepalive interval, the LSR sends Keepalive messages at the local Keepalive interval. Otherwise, the LSR sends Keepalive messages at an interval 1/3 of the negotiated Keepalive hold time.
Examples
# Set the Targeted Hello hold time to 1000 seconds, Targeted Hello interval to 50 seconds, Keepalive hold time to 1000 seconds, and Keepalive interval to 50 seconds for peer 3.3.3.3.
<Sysname> System-view
[Sysname] mpls ldp
[Sysname-ldp] targeted-peer 3.3.3.3
[Sysname-ldp-peer-3.3.3.3] mpls ldp timer hello-hold 1000
[Sysname-ldp-peer-3.3.3.3] mpls ldp timer hello-interval 50
[Sysname-ldp-peer-3.3.3.3] mpls ldp timer keepalive-hold 1000
[Sysname-ldp-peer-3.3.3.3] mpls ldp timer keepalive-interval 50
# On interface VLAN-interface 2, set the Link Hello hold time to 100 seconds, Link Hello interval to 20 seconds, Keepalive hold time to 50 seconds, and Keepalive interval to 10 seconds.
<Sysname> System-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] mpls ldp timer hello-hold 100
[Sysname-Vlan-interface2] mpls ldp timer hello-interval 20
[Sysname-Vlan-interface2] mpls ldp timer keepalive-hold 50
[Sysname-Vlan-interface2] mpls ldp timer keepalive-interval 10
Related commands
· display mpls ldp discovery
· display mpls ldp peer
mpls ldp transport-address
Use mpls ldp transport-address to specify the LDP transport address.
Use undo mpls ldp transport-address to restore the default.
Syntax
In interface view:
mpls ldp transport-address { ip-address | interface }
undo mpls ldp transport-address
In LDP peer view:
mpls ldp transport-address ip-address
undo mpls ldp transport-address
Default
In interface view, if the interface belongs to the public network, the LDP transport address is the local LSR ID. If the interface belongs to a VPN, the LDP transport address is the primary IP address of the interface.
In LDP peer view, the LDP transport address is the local LSR ID.
Views
Interface view, LDP peer view
Predefined user roles
network-admin
mdc-admin
Parameters
ip-address: Specifies the LDP transport address.
interface: Uses the IP address of the current interface as the LDP transport address.
Usage guidelines
Before two LSRs establish an LDP session, they must establish a TCP connection by using the LDP transport address. LDP sends the local LDP transport address to the peer in Link Hello or Targeted Hello messages.
Using mpls ldp transport-address in interface view, you specify the transport address carried in the Link Hellos sent out of the interface.
Using mpls ldp transport-address in LDP peer view, you specify the transport address carried in the Targeted Hellos sent to the LDP peer.
H3C recommends that you use the default transport address.
If two LSRs have multiple links in between and you want to establish an LDP session on each link, make sure that all the links use the same transport address.
Examples
# Specify the LDP transport address carried in Targeted Hellos sent to peer 3.3.3.3 as 2.2.2.2.
<Sysname> System-view
[Sysname] mpls ldp
[Sysname-ldp] targeted-peer 3.3.3.3
[Sysname-ldp-peer-3.3.3.3] mpls ldp transport-address 2.2.2.2
# On interface VLAN-interface 2, specify the transport address carried in Link Hellos as the IP address of the interface.
<Sysname> System-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] mpls ldp transport-address interface
Related commands
display mpls ldp discovery
pv-limit
Use pv-limit to set the path vector limit.
Use undo pv-limit to restore the default.
Syntax
pv-limit pv-number
undo pv-limit
Default
The path vector limit is 32.
Views
LDP view, LDP-VPN instance view
Predefined user roles
network-admin
mdc-admin
Parameters
pv-number: Specifies the path vector limit in the range of 1 to 32.
Usage guidelines
LDP adds LSR ID information in a label request or label mapping message. Each LSR checks whether its LSR ID is contained in the message.
· If it is not, the LSR adds its own LSR ID into the message.
· If it is, the LSR considers that a loop occurs and terminates LSP establishment.
In addition, when the number of LSR IDs in the message reaches the path vector limit, LDP also considers that a loop occurs and terminates LSP establishment.
Examples
# Set the path vector limit to 3 for LDP loop detection in the public network.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] pv-limit 3
Related commands
· display mpls ldp parameter
· loop-detect
· maxhops
reset mpls ldp
Use reset mpls ldp to reset LDP sessions.
Syntax
reset mpls ldp [ vpn-instance vpn-instance-name ] [ peer peer-id ]
Views
User view
Predefined user roles
network-admin
mdc-admin
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. This command resets the LDP sessions in the specified VPN instance. If you do not specify a VPN instance, this command resets the LDP sessions in the public network.
peer peer-id: Specifies a peer by its LSR ID. If you do not specify a peer, this command resets all LDP sessions in the specified VPN instance or the public network.
Usage guidelines
Resetting an LDP session deletes and re-establishes the session and all LSPs based on the session.
To apply new parameters to an LDP session, you must use this command to reset the LDP session.
Examples
# Reset all LDP sessions in the public network.
<Sysname> reset mpls ldp
# Reset all LDP sessions in VPN instance vpn1.
<Sysname> reset mpls ldp vpn-instance vpn1
session protection
Use session protection to enable session protection.
Use undo session protection to disable session protection.
Syntax
session protection [ duration time ] [ peer peer-prefix-list-name ]
undo session protection
Default
Session protection is disabled.
Views
LDP view
Predefined user roles
network-admin
mdc-admin
Parameters
duration time: Specifies the session protection duration time in the range of 30 to 2147483 seconds. If you do not specify the duration, session protection always takes effect.
peer peer-prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters. Sessions to the peers whose LSR IDs are permitted by the specified IP prefix list are protected. If you do not specify this option, all sessions established by the Basic Discovery mechanism are protected.
Usage guidelines
If two LDP peers have both a direct link and an indirect link in between, you can configure this feature to protect their LDP session when the direct link fails.
LDP establishes both a Link Hello adjacency over the direct link and a Targeted Hello adjacency over the indirect link with the peer. When the direct link fails, LDP deletes the Link Hello adjacency but still maintains the Targeted Hello adjacency. In this way, the LDP session between the two peers is kept available, and the FEC-label mappings based on this session are not deleted. When the direct link recovers, the LDP peers do not need to re-establish the LDP session or re-learn the FEC-label mappings.
When you enable the session protection function, you can specify the session protection duration. If the Link Hello adjacency does not recover within the duration, LDP deletes the Targeted Hello adjacency and the LDP session. If you do not specify the session protection duration, the two peers always maintain the LDP session over the Targeted Hello adjacency.
Examples
# Enable protection for the session to the peer 3.3.3.3, and set the session protection duration to 120 seconds.
<Sysname> system-view
[Sysname] ip prefix-list protected-peer-list index 1 permit 3.3.3.3 32
[Sysname] mpls ldp
[Sysname-ldp] session protection duration 120 peer protected-peer-list
Related commands
display mpls ldp peer
snmp-agent trap enable ldp
Use snmp-agent trap enable ldp to enable SNMP notifications for LDP.
Use undo snmp-agent trap enable ldp to disable SNMP notifications for LDP.
Syntax
snmp-agent trap enable ldp
undo snmp-agent trap enable ldp
Default
SNMP notifications for LDP are enabled.
Views
System view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
This command enables generating SNMP notifications for LDP upon LDP session changes, as defined in RFC 3815. The generated SNMP notifications are sent to the SNMP module.
For more information about SNMP notifications, see Network Management and Monitoring Configuration Guide.
Examples
# Enable SNMP notifications for LDP.
<Sysname> system-view
[Sysname] snmp-agent trap enable ldp
targeted-peer
Use targeted-peer to allow sending Targeted Hellos to and receiving Targeted Hellos from the specified peer, and to enter LDP peer view.
Use undo targeted-peer to cancel the configuration.
Syntax
targeted-peer peer-lsr-id
undo targeted-peer peer-lsr-id
Default
The device does not send Targeted Hellos to or receive Targeted Hellos from any peer.
Views
LDP view
Predefined user roles
network-admin
mdc-admin
Parameters
peer-lsr-id: Specifies the LSR ID of a peer.
Examples
# Configure the device to send Targeted Hellos to the peer 3.3.3.3, and enter LDP peer view.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-ldp] targeted-peer 3.3.3.3
[Sysname-ldp-peer-3.3.3.3]
Related commands
· display mpls ldp discovery
· display mpls ldp peer
vpn-instance
Use vpn-instance to enable LDP for a VPN instance and enter LDP-VPN instance view.
Use undo vpn-instance to delete the LDP-VPN instance.
Syntax
vpn-instance vpn-instance-name
undo vpn-instance vpn-instance-name
Default
LDP is disabled for a VPN instance.
Views
LDP view
Predefined user roles
network-admin
mdc-admin
Parameters
vpn-instance-name: Specifies a VPN instance by its name, a case-sensitive string of 1 to 31 characters.
Usage guidelines
Enabling LDP for VPN instances is used for the Carrier's Carrier network that uses LDP between the Level 1 carrier and Level 2 carrier PEs. In such a network, you must enable LDP for each VPN instance on each Level 1 carrier PE.
The VPN instance specified by this command must have been created by the ip vpn-instance command in system view.
The GR commands, the session protection command, and the targeted-peer command are available only in LDP view. All other commands available in LDP view are available in LDP-VPN instance view.
Commands executed in LDP view take effect only for the public network. Commands executed in LDP-VPN instance view take effect only for the specified VPN instance. The GR commands are global commands and take effect on all VPN instances and the public network.
Examples
# Enable LDP for VPN instance vpn1 and enter LDP-VPN instance view.
<Sysname> System-view
[Sysname] mpls ldp
[Sysname-ldp] vpn-instance vpn1
[Sysname-ldp-vpn-instance-vpn1]
Related commands
· ip vpn-instance
· mpls ldp