peer timer (BGP multi-instance VPN instance IPv4 address family view)

Function

The peer timer command sets the Keepalive time and hold time for a peer.

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

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

Format

peer ipv4-address timer keepalive keepalive-time hold hold-time

peer ipv4-address timer keepalive keepalive-time hold hold-time min-holdtime min-hold-value

undo peer ipv4-address timer keepalive hold [ min-holdtime ]

undo peer ipv4-address timer keepalive keepalive-time hold hold-time

undo peer ipv4-address timer keepalive keepalive-time hold hold-time min-holdtime min-hold-value

Parameters

Parameter Description Value
ipv4-address

Specifies the IPv4 address of a peer.

The value is in dotted decimal notation.

keepalive keepalive-time

Specifies the Keepalive time.

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

hold hold-time

Indicates the hold time.

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

Setting the hold time of a BGP peer to be longer than 20s is recommended. If the hold time of a BGP peer is shorter than 20s, the session may be closed.

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.

Views

BGP multi-instance VPN instance IPv4 address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

After establishing a BGP connection, two peers send Keepalive messages periodically to each other to detect the status of the BGP connection. If a device receives no Keepalive message or any other types of packets from its peer within the holdtime, the device considers the BGP connection closed, and it closes the BGP connection.

When the peers set up a connection, keepalive-time and hold-time are determined by negotiations between the peers. Each of the two peers sends the other an Open packet containing hold-time. The smaller hold-time contained in the Open packets from both peers is used. The smaller of the locally configured keepalive-time and one third of the negotiated hold-time is used as the actual keepalive-time.

The peer timer command is used to set the Keepalive time and hold time:

  • If a short Keepalive time and hold time are set, BGP can detect a link fault quickly and implement link switching. The number of Keepalive messages on the network, however, is increased. This increases device loads and consumption of network bandwidth resources.
  • If a long Keepalive time and hold time are set, the number of Keepalive messages on the network is reduced. This reduces device loads. If, however, the Keepalive time is too long, BGP is unable to detect link status changes in time, causing many packets to be lost.

    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

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.

Precautions

The Keepalive time must be at least three times of the hold time.

When setting keepalive-time and hold-time, note the following points:

  • It is recommended that keepalive-time and hold-time are not both 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.

    The Keepalive time and hold time can be configured globally, or on a specified peer. The Keepalive time and hold time configured on a specific peer or peer group takes precedence over the global Keepalive time and hold time. Using this command can still change the Keepalive time and hold time configured on a peer or peer group, although they were globally configured through the timer command.

    After the keep-all-routes command is run, the undo peer timer keepalive command becomes ineffective. To have the undo peer timer keepalive command become effective, run the undo keep-all-routes command and then the peer timer keepalive command.

Example

# Set the Keepalive time and hold time for peer.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpna
[*HUAWEI-vpn-instance-vpna] ipv4-family
[*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both
[*HUAWEI-vpn-instance-vpna-af-ipv4] quit
[*HUAWEI-instance-vpna] quit
[*HUAWEI] bgp 100 instance a
[*HUAWEI-bgp-instance-a] ipv4-family vpn-instance vpna
[*HUAWEI-bgp-instance-a-vpna] peer 10.1.1.1 as-number 100
[*HUAWEI-bgp-instance-a-vpna] peer 10.1.1.1 timer keepalive 10 hold 30
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >