Configuring BFD for BGP
The Bidirectional Forwarding Detection (BFD) protocol is a simple hello mechanism that detects failures in a network. 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. BFD works with a wide variety of network environments and topologies. The failure detection timers for BFD have shorter time limits than default failure detection mechanisms, providing faster detection. These timers are also adaptive and can be adjusted to be more or less aggressive. For example, the timers can adapt to a higher value if the adjacency fails, or a neighbor can negotiate a higher value for a timer than the one configured.
![]() | Note: In Junos OS Release 8.3 and later, BFD is supported on IBGP and multihop EBGP sessions as well as on single-hop EBGP sessions. BFD does not support IPv6 interfaces with BGP. In Junos OS Release 9.1 and later, BFD supports IPv6 interfaces in static routes only. |
To enable failure detection, include the bfd-liveness-detection statement:
To specify the threshold for the adaptation of the detection time, include the detection-time threshold statement:
When the BFD session detection time adapts to a value equal to or higher than the threshold, a single trap and a system log message are sent.
In Junos OS Release 8.5 and later, you can configure an interval to specify how long the BFD session for an EBGP peer must remain up before a state change notification is sent. When you configure the hold-down interval for the BFD protocol for EBGP, the BFD session is unaware of the BGP session during this time. In this case, if the BGP session goes down during the configured hold-down interval, BFD already assumes it is down and does not send a state change notification. To specify the hold-down interval, include the holddown-interval statement:
You can configure a value in the range from 0 through 255,000 and the default is 0. The holddown-interval statement is supported only for EBGP peers at the [edit protocols bgp group group-name neighbor address] hierarchy level. If the BFD session goes down and then comes back up during the configured hold-down interval, the timer is restarted.
![]() | Note: You must configure the hold-down interval on both EBGP peers. |
![]() | Note: If you configure the hold-down interval for a multihop EBGP session, you must also configure a local IP address by including the local-address statement at the [edit protocols bgp group group-name] hierarchy level. For more information about configuring an EBGP multihop session, see Configuring EBGP Multihop Sessions. For more information about configuring the local address, see Configuring a Local Endpoint Address for BGP Sessions. |
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 that the routing device expects to receive a reply from a neighbor with which it has established a BFD session. You can configure a value in the range from 1 through 255,000 milliseconds. You can also specify the minimum transmit and receive intervals separately.
![]() | Note: If you specify a minimum interval for Bidirectional Forwarding Detection (BFD) less than 100 ms, the BFD session might transition down and up. On some routing devices, it is safe to configure values below 100 ms. Please contact Juniper Networks customer support for more information. |
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 reply from a neighbor with which it has established a BFD session. The values that you can configure are 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 transmit-interval threshold statement:
The threshold value must be greater than the transmit interval.
To specify the BFD version used for detection, include the version statement:
The default is to have the version detected automatically.
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. |
For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.
Hide Navigation Pane
Show Navigation Pane
Download
SHA1
