Description

Standalone SRX1500 running packet forwarding mode, BFD with 100ms x 3 enabled in BGP but fails to work.  Please note that BFD works well in flow mode.

Symptoms

#Configure BFD as below  in Packet mode: 
labroot@srx1500> show security flow status  
  Flow forwarding mode:
    Inet forwarding mode: packet based
    Inet6 forwarding mode: flow based
    MPLS forwarding mode: packet based
    ISO forwarding mode: drop
    Tap mode: disabled (default)
#BFD interval 100ms x3 which should result in Inline Distributed mode
labroot@srx1500> show configuration protocols bgp group test2    
type external;
local-address 10.10.11.1;
peer-as 65503;
local-as 65502;
neighbor 10.10.11.2 {
    bfd-liveness-detection {
        minimum-interval 100;
        multiplier 3;
    }
}

#BFD down: 
labroot@srx1500> show bfd session 
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
10.10.11.2               Init      irb.11         6.000     2.000        3   
#Distributed mode enabled
labroot@srx1500> show ppm adjacencies detail 

Protocol: BFD, Hold time: 12000, IFL-index: 81
Distributed: TRUE
BFD discriminator: 20, BFD routing table index: 0
Num Packets: 57, Absorbed Packets: 0, Rx Packet: 20 80 03 18 00 00 00 11 00 00 00 14 00 1E 84 80 00 1E 84 80 00 00 00 00 
Distribution handle: 58, Distribution address: fpc0

Adjacencies: 1, Remote adjacencies: 1
 

Solution

This is by Design, Inline(distributed) BFD is not supported in Packet forwarding mode despite it works in flow mode. 

 

The SRX1500 supports three BFD operational modes:

 

 

Which mode is selected in packet mode depends on the configured BFD detection timer:

* Centralised: Detection interval of 500 ms or more.
* Distributed: Detection interval under 500 ms.
* Dedicated: Requires set chassis dedicated-ukern-cpu, which reserves one CPU core for the flowd ukernel thread that handles BFD.

A sub-500 ms detection interval is simply what selects the Distributed / inline mode, so the session cannot come up and instead flaps, taking the BGP session down with it. 

 

Choose one of the following, depending on whether flow mode is feasible for the deployment. For an MPLS design where flow mode is not viable, use option 1 or 2: 

1. Raise the BFD interval to 1000 ms (Centralised) in packet mode.
Increasing the local minimum interval to 1000 or anything above 500 ms, this moves BFD to Centralised mode and stabilises the session.
This value does not need to match the peer; the peer can remain at 300 ms.

set protocols bgp group BGP-PEERS  neighbor 172.16.1.11 bfd-liveness-detection minimum-interval 1000
set protocols bgp group BGP-PEERS  neighbor 172.16.1.11 bfd-liveness-detection multiplier 3
2. Keep 300 ms and enable a dedicated core (Dedicated) in packet mode.
Configure set chassis dedicated-ukern-cpu and reboot. This reserves one core for BFD and sustains the 100 ms session.
Note the trade-off: packet-processing throughput may is reduced in this mode.

set chassis dedicated-ukern-cpu
commit
request system reboot

warning: Packet processing throughput may be impacted in dedicated-ukernel-cpu mode.
warning: A reboot is required for dedicated-ukernel-cpu mode.
3. Use flow mode with 100 ms (Distributed), no extra configuration.
If the deployment can run in flow-based forwarding, the 100 ms Distributed session comes up with no additional configuration.
Note: This may not be an option for MPLS deployments.


 

Modification History

2024-06-07 : Article Created
2024-09-27: Published to Partner and customer

Related Information

Configuring BFD

Understanding BFD Protocol Configuration Options in Junos OS