BGP tracking can be used to adjust the interval between peer unreachability discovery and connection interruption. This suppresses BGP peer relationship flapping caused by route flapping and improves BGP network stability.
BGP can be configured to detect peer relationship status changes in order to implement rapid BGP convergence. BFD, however, needs to be configured on the entire network, and has poor extensibility. If BFD cannot be deployed on a device to detect BGP peer relationship status, BGP tracking can be enabled on the device to quickly detect link or peer unreachability, implementing rapid network convergence.
bgp { as-number-plain | as-number-dot }
peer { group-name | ipv4-address } tracking [ delay delay-time ]
By default, BGP peer tracking is disabled.
ipv4-address specifies the address of a peer. group-name specifies the name of a peer group. BGP tracking configured on a peer takes precedence over BGP peer tracking configured on the peer group of this peer.
If delay-time is not specified, the default delay (0 seconds) is used. This means that a BGP device tears down the connection with a peer immediately after detecting the peer unreachable.
A proper delay-time value can ensure network stability.
If an IBGP peer relationship is established based on an IGP route, the delay-time values set on BGP peers must be greater than the IGP route convergence time. Otherwise, if IGP route flapping occurs, the BGP peer relationship will be interrupted before network convergence is complete.
IGP GR is configured and a BGP peer relationship is established based on an IGP route. If a device becomes faulty and performs an active/standby switchover, the IGP will not delete routes received by the device. As a result, the BGP peer relationship will not be interrupted, even through BGP tracking does not take effect.