peer timer

Use peer timer to set a keepalive interval and hold time for a peer or peer group.

Use undo peer timer to remove the configuration.

Syntax

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } timer keepalive keepalive hold holdtime

undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } timer

Default

The keepalive interval is 60 seconds, and the hold time is 180 seconds.

Views

BGP instance view

BGP-VPN instance view

Predefined user roles

network-admin

Parameters

group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.

ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.

mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command configures a keepalive interval and hold time for all dynamic peers in the subnet.

ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.

prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command configures a keepalive interval and hold time for all dynamic peers in the subnet.

keepalive keepalive: Sets a keepalive interval in the range of 0 to 21845 seconds.

hold holdtime: Sets a hold time in the range of 3 to 65535 seconds. 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.

The timers configured with this command are preferred to the timers configured with the timer command.

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 timers configured with this command do not take effect until a session is re-established (for example, a session is reset).

Examples

# In BGP instance view, set the keepalive interval and hold time for peer group test to 60 seconds and 180 seconds, respectively.

<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer test timer keepalive 60 hold 180

Related commands

display bgp peer

timer