timer keepalive hold (BGP view)

Function

The timer keepalive hold command sets the Keepalive time and hold time.

The undo timer keepalive hold command restores the default Keepalive time and hold time.

By default, the Keepalive time is 60s, and the hold time is 180s.

Format

timer keepalive keepalive-time hold hold-time [ min-holdtime min-hold-value ]

undo timer keepalive hold [ min-holdtime ]

undo timer keepalive keepalive-time hold hold-time [ min-holdtime min-hold-value ]

Parameters

Parameter Description Value
hold hold-time

Specifies the hold time.

The value is an integer that can be 0, or ranges from 3 to 65535, in seconds.

min-holdtime min-hold-value

Specifies the minimum hold time. On the same device, min-hold-value must be less than hold-time.

The value is an integer ranging from 20 to 65535, in seconds.

keepalive keepalive-time

Specifies the Keepalive time.

The value is an integer ranging from 0 to 21845, in seconds.

Views

BGP view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

After a connection is established between peers, keepalive-time and hold-time are negotiated by the peers.

  • The smaller hold-time carried by Open messages of both peers is used as the hold-time.
  • The smaller value of one third of hold-time and the locally configured keepalive-time is used as the keepalive-time.

    If the hold time configured on a remote device is less than the min-hold-value configured on the local device, no BGP peer relationship can be established between the two devices. However, if the hold time configured on the remote device is 0s, a BGP peer relationship can be established between the two devices.

Configuration Impact

The timers configured for a specific peer or peer group using the peer timer command override the timers configured for all BGP peers using the timer command.

Precautions

If the value of a timer changes, the BGP peer relationship between devices is disconnected. This is because the devices need to re-negotiate keepalive-time and hold-time. Therefore, exercise caution before changing the value of a timer.

Setting the hold time to a value at least three times the Keepalive time is recommended. When setting keepalive-time and hold-time, note the following points:

  • The keepalive-time and hold-time parameters cannot both be set to 0; otherwise, the BGP timers are invalid, and BGP is unable to detect link faults using the timers.
  • The hold-time parameter cannot be significantly greater than the keepalive-time parameter. A setting of timer keepalive 1 hold 65535, for example, would be improper. If the hold time is too long, link faults cannot be detected in time.

Example

# Set the Keepalive time, hold time, and minimum hold time to 30s, 90s, and 60s, respectively.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] timer keepalive 30 hold 90 min-holdtime 60
# On a BGP device, set the Keepalive time to 30s and the hold time to 90s.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] timer keepalive 30 hold 90
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >