BFD for BGP speeds up fault detection and therefore increases the route convergence speed.
Before you configure BFD-BGP interworking, complete the following tasks on devices at both ends:
As technologies develop, voice and video services are widely applied. These services are sensitive to the packet loss and delay. BGP periodically sends Keepalive packets to its peers to detect the status of its peers. The detection mechanism, however, takes more than one second. When the data transmission rate reaches the level of Gbit/s, such slow detection will cause a large amount of data to be lost. As a result, the requirement for high reliability of carrier-class networks cannot be met.
BFD for BGP can be used to reduce packet loss and delay. BFD for BGP detects faults on links between BGP peers within 50 milliseconds. The fast detection speed ensures fast BGP route convergence and minimizes traffic loss.
system-view
bgp { as-number-plain | as-number-dot }
ipv4-family vpn-instance vpn-instance-name
BFD for BGP can be configured for the VPN in this view. To configure BFD for BGP for the public network, skip this step.
peer { group-name | ipv4-address } bfd { min-tx-interval min-tx-interval | min-rx-interval min-rx-interval | detect-multiplier multiplier | wtr wtr-value } *
The BFD parameters of peers take precedence over those of peer groups. If BFD parameters are configured on peers, they will be used in BFD session establishment.
The default interval for transmitting BFD packets and the default detection multiplier are recommended. When changing the default values, pay attention to the network status and the network reliability requirement. A short interval for transmitting BFD packets can be configured for a link that has a higher reliability requirement. A long interval for transmitting BFD packets can be configured for a link that has a lower reliability requirement.
There are three formulas: Actual interval for the local device to send BFD packets = max {Locally configured interval for transmitting BFD packets, Remotely configured interval for receiving BFD packets}, Actual interval for the local device to receive BFD packets = max {Remotely configured interval for transmitting BFD packets, Locally configured interval for receiving BFD packets}, and Local detection period = Actual interval for receiving BFD packets x Remotely configured BFD detection multiplier.
For example:
On the local device, the configured interval for transmitting BFD packets is 200 ms, the interval for receiving BFD packets is 300 ms, and the detection multiplier is 4.
On the peer device, the configured interval for transmitting BFD packets is 100 ms, the interval for receiving BFD packets is 600 ms, and the detection multiplier is 5.
Then:
On the local device, the actual interval for transmitting BFD packets is 600 ms calculated by using the formula max {200 ms, 600 ms}; the interval for receiving BFD packets is 300 ms calculated by using the formula max {100 ms, 300 ms}; the detection period is 1500 ms calculated by multiplying 300 ms by 5.
On the peer device, the actual interval for transmitting BFD packets is 300 ms calculated by using the formula max {100 ms, 300 ms}; the interval for receiving BFD packets is 600 ms calculated by using the formula max {200 ms, 600 ms}; the detection period is 2400 ms calculated by multiplying 600 ms by 4.
peer { group-name | ipv4-address } bfd enable [ single-hop-prefer ]
single-hop-prefer takes effect only on IBGP peers. By default, if single-hop-prefer is not specified, multi-hop sessions are established between direct IBGP peers (Huawei devices). To interconnect a Huawei device and a non-Huawei device that defaults the sessions between IBGP peers to single-hop, configure single-hop-prefer in the command.
After BFD is enabled for a peer group, BFD sessions will be created on the peers that belong to this peer group and are not configured with the peer bfd block command.
peer ipv4-address bfd block
If a peer joins a peer group enabled with BFD, the peer inherits the BFD configuration of the group and creates a BFD session. To prevent the peer from inheriting the BFD function of the peer group, perform this step.
The peer bfd block command and the peer bfd enable command are mutually exclusive. After the peer bfd block command is run, the BFD session is automatically deleted.