Configuring BFD for BGP
IMPORTANT: If you have enabled GR, use BFD with caution because BFD might detect a failure before the system performs GR, which will result in GR failure. If you have enabled both BFD and GR for BGP, do not disable BFD during a GR process to avoid GR failure. | ||
BGP maintains neighbor relationships based on the keepalive timer and hold timer in seconds. It requires that the hold time must be at least three times the keepalive interval. This mechanism slows down link failure detection. Once a failure occurs on a high-speed link, a large quantity of packets will be dropped before routing convergence completes. BFD for BGP can solve this problem by fast detecting link failures to reduce convergence time.
For more information about BFD, see High Availability Configuration Guide.
Before you can enable BFD for the BGP peer, establish a BGP session between the local router and the peer.
To enable BFD for a BGP peer (IPv4):
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter BGP view or BGP-VPN instance view. |
| N/A |
3. Enable BFD to detect the link to the specified BGP peer. | peer ip-address [ mask-length ] bfd [ multi-hop | single-hop ] | By default, BFD is not enabled. |
To enable BFD for a BGP peer (IPv6):
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter BGP view or BGP-VPN instance view. |
| N/A |
3. Enable BFD to detect the link to the specified IPv6 BGP peer. | peer ipv6-address [ prefix-length ] bfd [ multi-hop | single-hop ] | By default, BFD is not enabled. |