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
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 to 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 to 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.
LDP automatically sends Targeted Hellos to the specified peer after one of the following features is configured:
LDP session protection.
LDP over MPLS TE.
To modify the Targeted Hello/Keepalive hold time and interval, you must use the targeted-peer command to create the LDP peer, and then perform the modification in the LDP peer view.
If the local Hello hold time and local Keepalive hold time are different from those of a peer LSR, the negotiation is as follows:
During LDP peer discovery, an LSR compares the local Hello hold time with the peer LSR's Hello hold time carried in Hellos. Then, the LSR 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.
If it is not larger than three times the local Hello interval, 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 by exchanging Initialization messages. Then, the LSR 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.
If it is not larger than three times the local Keepalive interval, the LSR sends Keepalive messages at an interval 1/3 of the negotiated Keepalive hold time.
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. As a best practice, use the default values.
Make sure all links between two LSRs have the same Keepalive hold time as the one configured in LDP peer view in either of the following situations:
Multiple Link Hello adjacencies exist when the two LSRs are directly connected through multiple links.
Both a Link Hello adjacency and a Targeted Hello adjacency exist between the two LSRs.
Keepalive hold time and keepalive interval settings take effect only on new LDP sessions. To apply the settings to existing LDP sessions, you must reset the LDP sessions by using the reset mpls ldp command.
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 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