Configuring BGP Timers
When deploying BGP, there are several timers can be configured.
Configuring BGP Keepalive and Hold Timers
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 fewer network bandwidth are consumed. If the Keepalive time is too long, BGP is unable to detect link status changes in a timely manner. This is unhelpful for implementing rapid BGP network convergence and may cause many packets to be lost.
Keepalive and hold timers can be configured either for a specific peer or peer group, and the configurations for a specific peer take precedence over those for the peer group of this peer.
The following example commands set the keepalive interval to 10 seconds and the hold time to 30 seconds.
admin@XorPlus# set protocols bgp neighbor 2.2.2.2 timers keepalive 10 admin@XorPlus# set protocols bgp neighbor 2.2.2.2 timers holdtime 30 admin@XorPlus# commit
Configuring a BGP Reconnect Timer
After BGP initiates a TCP connection, the Reconnect timer will be stopped if the TCP connection is established successfully. If the first attempt to establish a TCP connection fails, BGP tries again to establish the TCP connection after the Reconnect timer expires.
- Setting a short Reconnect interval reduces the period BGP waits between attempts to establish a TCP connection. This speeds up the establishment of the TCP connection.
- Setting a long Reconnect interval suppresses routing flapping caused by peer relationship flapping.
A Reconnect timer can be configured either for a specific peer or peer group, and the configurations for a specific peer take precedence over those for the peer group of this peer.
This example sets the Re-connection value to 30 seconds.
admin@XorPlus# set protocols bgp neighbor 2.2.2.2 timers connect 30 admin@XorPlus# commit
Configuring a Advertisement Interval
BGP does not periodically update a routing table. When BGP routes change, BGP updates the changed BGP routes in the BGP routing table by sending Update messages.
- If a short Update message interval is set, BGP can fast detect route changes. This speeds up BGP network convergence, but increases the number of Update messages on the network and loads of devices, and consumes more network bandwidth resources.
- If a long Update message interval is set, the number of Update messages on the network is reduced, loads of devices are reduced, and fewer network bandwidth are consumed. This avoids network flapping. If the Update message interval is too long, BGP is unable to detect route changes in a timely manner. This is unhelpful for implementing rapid BGP network convergence and may cause many packets to be lost.
When routes change, the switch sends routing updates to notify its peers. If a route changes frequently, the set protocols bgp [vrf <vrf-name>] {neighbor <ip>| peer-group <peer-group> | interface <interface>} advertisement-interval <advert-interval> command can be used to adjust the interval at which Update packets are sent for changes of this route. This frees the switch from sending Update packets for every route change.
The following example commands set the advertisement interval to 5 seconds:
admin@XorPlus# set protocols bgp neighbor 1.1.1.1 advertisement-interval 5 admin@XorPlus# commit
Configuring the Global BGP Timers
In addition to the timers configured for a specific neighbor or a peer goup described above, BGP also supports to configure global timers for all the BGP neighbors.
The following example commands set the keepalive interval to 10 seconds and the hold time to 30 seconds globally for all the BGP neighbors.
admin@XorPlus# set protocols bgp timers keepalive 10 admin@XorPlus# set protocols bgp timers holdtime 30 admin@XorPlus# commit
Copyright © 2024 Pica8 Inc. All Rights Reserved.