By creating BFD sessions on both ends of an IP link, you can detect faults on the link rapidly. Static BFD sessions support one-hop detection and multi-hop detection. You can use the detection method according to the network of a session.
One-hop detection and multi-hop detection of static BFD sessions are described as follows:
One-hop detection detects the connectivity of the IP link between two directly-connected systems. One-hop refers to a hop of the IP address.
Only one BFD session exists on the specified interface between the two systems going through BFD one-hop detection.
Multi-hop detection detects any paths between two systems. The paths may cover multiple hops or even overlap in certain parts.
To detect and monitor direct links (or links connected by a Layer-2 switch) rapidly, you can configure either BFD one-hop detection or multi-hop detection. However, the former is recommended.
If the peer IP address resides on different network segments from the IP address of the local outbound interface, you can configure only multi-hop detection to rapidly detect and monitor the connectivity of IP links. By creating BFD sessions on both ends of a multi-hop path, you can detect faults on the path rapidly.
Specifying the peer IP address
If the peer IP address is known, bind the BFD session to this IP address and send BFD control packets to the IP address.
Using the default IP address
If the peer IP address cannot be specified (in some cases, the peer end does not have an IP address), bind the BFD session to a multicast address and send BFD control packets to the multicast address. The multicast address can be adjusted as required. For details, see Configuring Global BFD Functions.
Creating a BFD session through the default IP address is valid only for one-hop detection.
When multiple protocols are bound to one static BFD session, the change of the session status affects all related protocols.
system-view
According to whether the remote end is configured with an IP address, run either of the following commands to configure a BFD binding relationship:
For the Layer-3 interfaces with IP addresses, create a BFD binding and set up BFD sessions:
bfd cfg-name bind peer-ip peer-ip [ vpn-instance vpn-instance-name ] [ interface interface-type interface-number [ nexthop { nexthop-address | dhcp } ] ] [ source-ip source-ip ]
For Layer-2 interfaces and the Layer-3 interfaces without IP addresses, create a static BFD session (by using the default multicast IP address) and access the BFD session view:
bfd cfg-name bind peer-ip default-ip interface interface-type interface-number [ source-ip source-ip ]
Run:
bfd session-name bind peer-ipv6 ipv6-address [ vpn-instance vpn-name ] [ interface interface-type interface-number ] [ source-ipv6 ipv6-address ]
Configure a local discriminator.
discriminator local local-discr-value
Configure a remote discriminator.
discriminator remote remote-discr-value
commit
After all necessary parameters (such as the local and remote discriminators) are specified, you must run the commit command to successfully create a BFD session.
# Create static BFD session test on FW_A, set the peer IP address to 10.1.1.1, and set the local discriminator to 10 and remote one to 20.
<FW_A> system-view [FW_A] bfd [FW_A-bfd] quit [FW_A] bfd test bind peer-ip 10.1.1.1 [FW_A-bfd-session-test] discriminator local 10 [FW_A-bfd-session-test] discriminator remote 20 [FW_A-bfd-session-test] commit
# Create static BFD session test on FW_B, set the peer IP address to 10.1.1.2, and set the local discriminator to 20 and remote one to 10.
<FW_B> system-view [FW_B] bfd [FW_B-bfd] quit [FW_B] bfd test bind peer-ip 10.1.1.2 [FW_B-bfd-session-test] discriminator local 20 [FW_B-bfd-session-test] discriminator remote 10 [FW_B-bfd-session-test] commit
Run the display bfd configuration command to display the configuration information about the static BFD session. The following uses the information that is displayed on FW_A as an example.
<FW_A> display bfd configuration static verbose
--------------------------------------------------------------------------------
BFD Session Configuration Name : test
--------------------------------------------------------------------------------
Local Discriminator : 10 Remote Discriminator : 20
BFD Bind Type : Peer IP Address
Bind Session Type : Static
Bind Peer IP Address : 10.1.1.1
Bind Interface : -
Select Board : -
Track Interface : -
TOS-EXP : 6 Local Detect Multi : 3
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Proc interface status : Disable WTR Interval (ms) : -
Bind Application : No Application Bind
Session Description : -
Session Create Status : Success
--------------------------------------------------------------------------------
Total Commit/Uncommit CFG Number : 1/0
The local and remote discriminators, interface bound to the session, and peer IP address configured on FW_A are displayed in the output information. According to the statistics, the configuration of the session is submitted.
Run the display bfd session command to display the information about the static BFD session. The following uses the information that is displayed on FW_A as an example.
<FW_A> display bfd session static
--------------------------------------------------------------------------------
Local Remote PeerIpAddr State Type InterfaceName
--------------------------------------------------------------------------------
10 20 10.1.1.1 Up S_IP_PEER -
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 0/1
According to the output, if the BFD session is in Up state, the BFD session between two devices is established. If the BFD session is in Down state, it failed to be established.