timer
Use timer to configure a BGP keepalive interval and hold time.
Use undo timer to restore the default.
Syntax
timer keepalive keepalive hold holdtime
undo timer
Default
The BGP keepalive interval and the hold time are 60 seconds and 180 seconds, respectively.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
keepalive keepalive: Configures a keepalive interval in the range of 0 to 21845 seconds.
hold holdtime: Configures a hold time in seconds, whose value is 0 or in the range of 3 to 65535. The hold time must be at least three times the keepalive interval.
Usage guidelines
After establishing a BGP session, two routers send keepalive messages at the specified keepalive interval to each other to keep the session.
If a router receives no keepalive or update message from the peer within the hold time, it tears down the session.
Use the timer command to configure the keepalive interval and hold time for all BGP peers. Use the peer timer command to configure the keepalive interval and hold time for a peer or peer group. If both commands are configured, the intervals configured by the peer timer command have higher priority.
If the hold time settings on the local and peer routers are different, the smaller one is used.
If the hold time is set to 0, no keepalive message will be sent to the peer, and the peer session will never time out. If neither the hold time nor the keepalive interval is set to 0, the actual keepalive interval is the smaller one between one third of the hold time and the keepalive interval.
The timer command affects only new BGP sessions.
After the timer command is executed, no peer session is closed at once. The configured hold time is used for negotiation in session re-establishment (for example, when you reset the BGP session).
Examples
# In BGP instance view, set the keepalive interval and hold time to 60 seconds and 180 seconds, respectively.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp-default] timer keepalive 60 hold 180
Related commands
display bgp peer
peer timer