The bfd all-interfaces command enables bidirectional forwarding detection (BFD) in an OSPF process and sets the parameter values of a BFD session.
The undo bfd all-interfaces command disables BFD in an OSPF process or restores the default parameter values of a BFD session.
By default, the BFD function in an OSPF process is disabled.
bfd all-interfaces enable
bfd all-interfaces { min-rx-interval receive-interval | min-tx-interval transmit-interval | detect-multiplier multiplier-value } *
undo bfd all-interfaces enable
undo bfd all-interfaces { min-rx-interval | min-tx-interval | detect-multiplier } *
| Parameter | Description | Value |
|---|---|---|
enable |
Enables BFD. |
- |
min-rx-interval receive-interval |
Specifies the expected minimum interval for receiving BFD packets from the peer. |
The value is an integer ranging from 100 to 1000, in milliseconds. The default value is 1000. |
min-tx-interval transmit-interval |
Specifies the minimum interval for sending BFD packets to the peer. |
The value is an integer ranging from 100 to 1000, in milliseconds. The default value is 1000. |
detect-multiplier multiplier-value |
Specifies the local detection multiplier. |
The value of multiplier-value ranges from 3 to 50. The default value is 3. |
Usage Scenario
You can run this command to enable BFD and configure BFD session parameters. Faults between adjacent devices, therefore, are quickly detected, OSPF is instructed to recalculate routes, and OSPF convergence speeds up. When the OSPF neighbor relationship goes Down, the BFD session between OSPF neighbors is dynamically deleted.
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
Before configuring BFD for OSPF, BFD must have been enabled globally using the bfd command.
After BFD in the OSPF process is enabled using the bfd all-interfaces enable command, OSPF establish BFD sessions only with neighbors whose status is Full.
Follow-up Procedure
Configure a BFD session on a specified interface.
If you need to configure BFD on specified interfaces, or global BFD for OSPF is configured but some interface need to be quicker to find link faults, you can configure BFD on specified interfaces using the ospf bfd command.
An interface is prevented from dynamically creating a BFD session.
If you do not want to enable BFD on specified interfaces, you can disable the interfaces from dynamically creating BFD sessions using the ospf bfd block command.
Precautions
The bfd all-interfaces command and the ospf bfd block command are mutually exclusive.
# Enable BFD in the OSPF process, and set the minimum sending to 400 ms.
<sysname> system-view
[sysname] bfd
[sysname-bfd] quit
[sysname] ospf 1
[sysname-ospf-1] bfd all-interfaces enable
[sysname-ospf-1] bfd all-interfaces min-tx-interval 400
# Bind the status of all the interfaces in the OSPF process to the BFD status.
<sysname> system-view
[sysname] bfd
[sysname-bfd] quit
[sysname] ospf 1
[sysname-ospf-1] bfd all-interfaces enable
[sysname-ospf-1] bfd all-interfaces frr-binding