Usage Scenario
BGP uses BFD to quickly detect faults in links between BGP peers. This accelerates network convergence. The peer bfd enable command is used to configure a device to establish a BFD session with its peer using default detection parameter values.
If single-hop-prefer is specified in the command, BGP peers preferentially use the single-hop detection mode when establishing BFD sessions with each other to implement link connectivity detection. Specifically, only one BFD session is created on a specified BGP interface. The single-hop-prefer parameter ensures detection mode consistency between a Huawei device and a non-Huawei device.
If a peer is added to a peer group, the peer inherits the BFD configuration of the group, regardless of whether BFD is enabled for the peer. To prevent this peer from inheriting the BFD configuration of the group, run the
peer bfd block command for the peer.
Prerequisites
A BFD session can be established only when the corresponding BGP peer relationship is in the Established state.
Configuration Impact
After the peer bfd enable command is enabled, peers or peer groups can establish IPv6 BFD sessions using default parameter values. This allows fast link fault detection.
The BFD configuration of a peer takes precedence over that of the peer group to which the peer belongs. If BFD is not configured on a peer and the peer group to which the peer belongs is enabled with BFD, the peer inherits the BFD configurations from the peer group.
Precautions
Before enabling BFD on a BGP peer, enable BFD in the system view. If no BFD detection parameter is specified, a BFD session is established using default parameter values.
If the command is run more than once, the latest configuration overrides the previous one.
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 deleted automatically.