peer bfd
Use peer bfd to enable BFD for the link to a BGP peer or peer group.
Use undo peer bfd to remove the configuration.
Syntax
peer { group-name | ipv6-address [ prefix-length ] } bfd [ multi-hop | single-hop ]
undo peer { group-name | ipv6-address [ prefix-length ] } bfd
Default
BFD is disabled for the link to a BGP peer or peer group.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command enables BFD for links to all dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command enables BFD for links to all dynamic peers in the subnet.
multi-hop: Enables multi-hop BFD.
single-hop: Enables single-hop BFD.
Usage guidelines
When you do not specify the multi-hop keyword or the single-hop keyword:
If an IBGP peer or peer group is specified, this command enables multi-hop BFD for the IBGP peer or peer group.
If a directly connected EBGP peer or peer group is specified and the peer ebgp-max-hop command is not configured, this command enables single-hop BFD for the EBGP peer or peer group. If the EBGP peer or peer group is not directly connected or the peer ebgp-max-hop command is configured, this command enables multi-hop BFD for the EBGP peer or peer group.
For more information about multi-hop and single-hop BFD, see High Availability Configuration Guide.
BFD helps speed up BGP routing convergence upon link failures. However, if you have enabled GR, use BFD with caution. BFD might detect a failure before the system performs GR, resulting 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.
To establish a BFD session to a BGP peer, you must configure the same BFD detection mode (multi-hop or single-hop) on the local router and the BGP peer.
Examples
# In BGP instance view, enable BFD for the link to BGP peer group test.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp-default] peer test bfd
Related commands
display bfd session (High Availability Command Reference)
display bgp peer