Configuring BFD for OSPF
The Bidirectional Forwarding Detection (BFD) protocol is a simple hello mechanism that detects failures in a network. BFD works with a wide variety of network environments and topologies. Hello packets are sent at a specified, regular interval. A neighbor failure is detected when the routing device stops receiving a reply after a specified interval. The BFD failure detection timers have shorter time limits than the OSPF failure detection mechanisms, providing faster detection. These timers are also adaptive. For example, the timer can adapt to a higher value if an adjacency fails, or a neighbor can negotiate a higher value than the one configured.
![]() | Note: BFD is supported for OSPFv3 in Junos OS Release 9.3 and later. |
To enable failure detection, include the bfd-liveness-detection statement:
For a list of hierarchy levels at which you can include these statements, see the reference page for the bfd-liveness-detection statement.
To specify the threshold for the adaptation of the detection time, include the threshold statement:
When the BFD protocol session detection time adapts to a value equal to or greater than the threshold, a single trap and a single system message are sent.
To specify the minimum transmit and receive intervals for failure detection, include the minimum-interval statement:
This value represents the minimum interval at which the local routing device transmits hello packets as well as the minimum interval at which the routing device expects to receive a reply from a neighbor with which it has established a BFD session. You can configure a number in the range from 1 through 255,000 milliseconds. You can also specify the minimum transmit and receive intervals separately.
![]() | Note: Specifying an interval less than 300 ms can cause undesired BFD flapping. |
To specify only the minimum receive interval for failure detection, include the minimum-receive-interval statement:
This value represents the minimum interval at which the local routing device expects to receive a hello packet from a neighbor with which it has established a BFD session. You can configure a number in the range from 1 through 255,000 milliseconds.
To specify the number of hello packets not received by a neighbor that causes the originating interface to be declared down, include the multiplier statement:
The default is 3, and you can configure a value in the range from 1 through 255.
To specify only the minimum transmit interval for failure detection, include the transmit-interval minimum-interval statement:
This value represents the minimum interval at which the local routing device transmits hello packets to the neighbor with which it has established a BFD session. You can configure a value in the range from 1 through 255,000 milliseconds.
To specify the threshold for detecting the adaptation of the transmit interval, include the threshold statement:
The threshold value must be greater than the transmit interval.
You can trace BFD operations by including the traceoptions statement at the [edit protocols bfd] hierarchy level. For more information, see Tracing BFD Protocol Traffic.
In Junos OS Release 9.0 and later, you can configure BFD sessions not to adapt to changing network conditions. To disable BFD adaptation, include the no-adaptation statement:
![]() | Note: We recommend that you not disable BFD adaptation unless it is preferable not to have BFD adaptation enabled in your network. |
In Junos OS Release 9.5 and later, you can configure the BFD protocol to establish BFD sessions only for OSPF neighbors in the full state. The default behavior is to establish BFD sessions for all OSPF neighbors. Include the full-neighbors-only statement:
To specify the BFD version used for detection, include the version statement:
The default is to have the version detected automatically.
Hide Navigation Pane
Show Navigation Pane
Download
SHA1
