The ospf bfd command enables the bidirectional forwarding detection (BFD) on the specified interface enabled with OSPF, or sets the parameter values of a BFD session.
The undo ospf bfd command deletes the BFD on the specified interface, or restores the default parameter values of a BFD session.
By default, BFD is not enabled or configured in the OSPF interface view.
ospf bfd enable
ospf bfd { min-rx-interval receive-interval | min-tx-interval transmit-interval | detect-multiplier multiplier-value } *
undo ospf bfd enable
undo ospf bfd { min-rx-interval [ receive-interval ] | min-tx-interval [ transmit-interval ] | detect-multiplier [ multiplier-value ] } *
| Parameter | Description | Value |
|---|---|---|
| enable | Enables BFD. | - |
| min-rx-interval receive-interval | Indicates the minimum interval for receiving BFD packets from the neighbor. | The value is an integer ranging from 100 to 1000, in milliseconds. The default value is 1000. |
| min-tx-interval transmit-interval | Indicates the minimum interval for sending BFD packets to the neighbor. | The value is an integer ranging from 100 to 1000, in milliseconds. The default value is 1000. |
| detect-multiplier multiplier-value | Indicates the local detection multiplier. NOTE:
|
The value of the multiplier-value ranges from 3 to 50. By default, the value is 3. |
Ethernet interface view, Ethernet sub-interface view, Eth-Trunk interface view, Eth-Trunk sub-interface view, Tunnel interface view, Dialer interface view, VLANIF interface view, Virtual-Template interface view, BDIF interface view
Usage Scenario
A link fault or a topology change causes devices to recalculate routes. Therefore, the convergence of routing protocols must be as fast as possible to improve network performance.
Link faults are inevitable. Therefore, quickly detecting faults and notifying routing protocols of the faults is a feasible solution to immediately rectify link faults. If BFD is associated with routing protocols, BFD can speed up the convergence of routing protocols when a link fault occurs.
After OSPF establishes a BFD session, the default parameter value is used. BFD session parameters can also be modified as required.
For example:
Then:
Prerequisites
The set BFD session parameters take effect only when BFD is enabled on the interface.
Configuration Impact
If the global BFD is not configured, BFD on the interface can be configured but the BFD session cannot be set up. Similarly, if the parameters of a BFD session are set but the ospf bfd enable command is not configured, the BFD session cannot be set up.
The priority of BFD configured on an interface is higher than what is configured in the process. If the BFD is enabled on the interface, the BFD session is set up by using the parameters of the BFD configured on the interface.
Precautions
After BFD is configured, OSPF establishes BFD sessions only with neighbors.
The ospf bfd enable command and the ospf bfd block command are mutually exclusive.
After BFD is disabled on the interface using the undo ospf bfd enable command, the configurations of the parameters of the BFD session on the interface still exist.
# Enable BFD on GigabitEthernet 0/0/1 and then set the minimum receiving interval to 400 ms and the local detection multiplier to 4.
<sysname> system-view [sysname] interface GigabitEthernet 0/0/1 [sysname-GigabitEthernet0/0/1] ospf bfd enable [sysname-GigabitEthernet0/0/1] ospf bfd min-rx-interval 400 detect-multiplier 4
# Delete the BFD of GigabitEthernet 0/0/1.
<sysname> system-view [sysname] interface GigabitEthernet 0/0/1 [sysname-GigabitEthernet0/0/1] undo ospf bfd enable