The peer bfd enable command enables a device to establish a BFD session with its peer using default detection parameter values.
The undo peer bfd enable command cancels this function.
By default, a BGP device does not establish any BFD session with its peer.
Parameter | Description | Value |
---|---|---|
peerIpv4Addr |
Specifies the IPv4 address of a peer. |
The value is in dotted decimal notation. |
single-hop-prefer |
Preferentially creates a single-hop BFD session for BGP peers. |
- |
compatible |
Indicates the compatibility mode. If this keyword is specified, the TTL in packets sent by BFD is set to 255. |
- |
per-link |
Establishes a BFD session to monitor the link between member interfaces. |
- |
one-arm-echo |
Indicates a one-arm BFD echo session. |
- |
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. The per-link one-arm-echo parameter configures a one-arm BFD echo session for one link and ensures that the local and peer devices use the same detection mode when a Huawei device is connected to 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.<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] ipv4-family [*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both [*HUAWEI-vpn-instance-vpna-af-ipv4] quit [*HUAWEI-instance-vpna] quit [*HUAWEI] bgp 100 instance a [*HUAWEI-bgp-instance-a] vpn-instance vpna [*HUAWEI-bgp-instance-a-instance-vpna] peer 192.168.1.1 as-number 100 [*HUAWEI-bgp-instance-a-instance-vpna] peer 192.168.1.1 bfd enable