Description

EX4k series switch, BFD for OSPF is flapped by Detect Timer Expiry with insufficient BFD timer value. This KB can be applied when EX4k has a BFD timer less than 1 sec.

Symptoms

On EX4k series switch, BFD flap might be observed by Detect Timer Expiry. Here is the sample log.
Nov 16 00:46:14.110  Switch bfdd[9122]: %DAEMON-4-BFDD_STATE_UP_TO_DOWN: BFD Session 192.168.1.1 (IFL 540) state Up -> Down LD/RD(20/16) Up time:4d 12:19 Local diag: CtlExpire Remote diag: None Reason: Detect Timer Expiry.
The issue could be seen even if there was no user operation.

Solution

In case the setup has a BFD timer less than 1 sec, BFD flap could be observed. You can verify it from configuration and CLI output.

            ospf {
                area 0.0.0.0 {
                    interface <irb.10> {
                        bfd-liveness-detection {
                            minimum-interval 500;
                            multiplier 3;
                        }
                    }
                }
root@Switch> show bfd session

                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
192.168.1.1              Up        irb.10         1.500     0.500        3      <<<< Issue is seen
192.168.2.1              Up        irb.20         3.000     1.000        3   
192.168.3.1              Up        irb.30         3.000     1.000        3   

EX4k series switch do not support BFD interval value less than 1 sec and you can find this information from technical document.
https://www.juniper.net/documentation/us/en/software/junos/ospf/topics/topic-map/configuring-ospf-fault-detection-using-bfd.html
Note: EX4600 and QFX5000 Series switches running Junos OS or Junos OS Evolved do not support minimum interval values of less than 1 second in centralized and distributed mode.

*In case of EX4650 and QFX5k, you can consider to use Inline BFD to achieve interval of less than a sec.
https://www.juniper.net/documentation/us/en/software/junos/high-availability/topics/topic-map/bfd.html#concept_tpz_stp_rpb

For reference:
https://www.juniper.net/documentation/us/en/software/junos/high-availability/topics/topic-map/nonstop-active-routing-understanding.html
Nonstop Active Routing BFD Support
For BFD sessions to remain up during a Routing Engine switchover event when nonstop active routing is configured, specify a minimum interval of 2.5 seconds for Routing Engine-based sessions.
For distributed BFD sessions with nonstop active routing configured, the minimum interval recommendations are unchanged and depend only on your network deployment.
 

Modification History

2023-11-15 : Article Created
2023-11-28 : Removed QFX5k series switch since there are some models that support inline BFD.
2024-12-23 : Updated solution section to add statement of inline BFD.

Related Information

https://www.juniper.net/documentation/us/en/software/junos/ospf/topics/topic-map/configuring-ospf-fault-detection-using-bfd.html