< Home

Configuring BGP Keepalive and Hold Timers

Context

Keepalive messages are used by BGP to maintain peer relationships.

  • If short Keepalive time and holdtime are set, BGP can detect a link fault quickly. This speeds up BGP network convergence, but increases the number of Keepalive messages on the network and loads of devices, and consumes more network bandwidth resources.
  • If long Keepalive time and holdtime are set, the number of Keepalive messages on the network is reduced, loads of devices are reduced, and less network bandwidth is consumed. If the Keepalive time is too long, BGP is unable to detect link status changes in a timely manner. This hinders the implementation of rapid BGP network convergence and may cause significant packet loss.

Keepalive and hold timers can be configured either for all peers or peer groups, or for a specific peer or peer group. Keepalive and hold timers configured for a specific peer take precedence over those configured for the peer group of the peer. In addition, Keepalive and hold timers configured for a specific peer or peer group take precedence over those configured for all peers or peer groups.

Changing timer values using the timer command or the peer timer command interrupts BGP peer relationships between switches.

Setting the Keepalive time to 20s is recommended. If the Keepalive time is less than 20s, sessions between peers may be closed.

Procedure

  • Configure BGP timers for all peers or peer groups.
    1. Run system-view

      The system view is displayed.

    2. Run bgp { as-number-plain | as-number-dot }

      The BGP view is displayed.

    3. Run timer keepalive keepalive-time hold hold-time [ min-holdtime min-holdtime ]

      BGP timers are configured.

      The proper maximum interval at which Keepalive messages are sent is one third the holdtime. By default, the Keepalive time is 60s and the holdtime is 180s.

  • Configure BGP timers for a specific peer or peer group.
    1. Run system-view

      The system view is displayed.

    2. Run bgp { as-number-plain | as-number-dot }

      The BGP view is displayed.

    3. Run peer { ipv4-address | group-name | ipv6-address } timer keepalive keepalive-time hold hold-time [ min-holdtime min-holdtime ]

      The Keepalive and hold timers are configured for a specific peer or peer group.

      The proper maximum interval at which Keepalive messages are sent is one third the holdtime. By default, the Keepalive time is 60s and the holdtime is 180s.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >