The peer tracking command enables BGP peer tracking.
The undo peer tracking The command restores the interval between peer unreachability discovery and connection interruption to the default value (9s).
The peer tracking disable command disables BGP peer tracking.
The undo peer tracking disable command enables BGP peer tracking. The default interval between peer unreachability discovery and connection interruption is 9s.
By default, BGP peer tracking is enabled, and the interval between peer unreachability discovery and connection interruption is 9s.
peer { group-name | ipv4-address | ipv6-address } tracking [ delay delay-time ]
undo peer { group-name | ipv4-address | ipv6-address } tracking
peer { group-name | ipv4-address | ipv6-address } tracking disable
undo peer { group-name | ipv4-address | ipv6-address } tracking disable
Parameter | Description | Value |
---|---|---|
group-name | Specifies the name of a BGP peer group. | The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
ipv4-address | Specifies the IPv4 address of a BGP peer. | It is in dotted decimal notation. |
ipv6-address | Specifies the IPv6 address of a BGP peer. | The address is a 32-digit hexadecimal number in the X:X:X:X:X:X:X:X format. |
delay delay-time | Indicates the interval between when BGP detects the peer unreachable and when BGP tears down the corresponding connection. | The value is an integer that ranges from 0 to 65535, in seconds. The default value is 0 seconds. |
ipv4-address can be set only in the BGP view and BGP-VPN instance IPv4 address family view.
ipv6-address can be set only in the BGP view and BGP-VPN instance IPv6 address family view.
BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view
Usage Scenario
In a network where BFD is unsuitable to be deployed, you can configure BGP peer tracking on the local device to implement fast network convergence by rapidly detecting the unreachable state of the peer.
A proper value of delay-time can ensure network stability when a peer is detected unreachable.
If delay-time is set to 0, BGP immediately tears down the connection between the local device and its peer after the peer is detected unreachable.
If IGP route flapping occurs and delay-time for an IBGP peer is set to 0, the peer relationship between the local device and the peer alternates between Up and Down. Therefore, delay-time for an IBGP peer should be set to a value greater than the actual IGP route convergence time.
When BGP neighbors successfully perform the GR negotiation, the active/standby switchover occurs on the BGP neighbors, to prevent the failure of GR, delay-time should be set to a value greater than GR convergence time. If delay-time is set to be smaller than the GR convergence time, the connection between the local device and the BGP peer will be torn down, which leads to the failure of GR.
Prerequisites
The peer as-number command has been used to create a peer or peer group.
Precautions
IGP is configured with GR, and the BGP neighbor relationship is established based on IGP routes. In such a situation, when a node fails on the network and the master/slave switchover occurs on the node, IGP does not delete the routes from the node, and BGP neighbors cannot sense the fault on the node. Therefore, the BGP peer tracking function does not take effect.