Page MenuHomeVyOS Platform

Add BFD strict mode for BGP
Closed, ResolvedPublicFEATURE REQUEST

Description

Currently, on 1.5.0 & rolling with BGP & BFD configured. If the BFD goes down, the BGP initiates a 30s hold timer (during which the peer shows as established) before breaking the BGP session. This causes the traffic to blackhole during those 30 seconds.

To mitigate this, one can configure the following in FRR (stable versions 10.3+):

neighbor 10.208.90.5 bfd strict hold-time 1

This sets a custom hold timer for the BFD; however, the following is currently not supported by VyOS.
https://docs.frrouting.org/en/latest/bfd.html#clicmd-neighbor-A.B.C.D-X-X-X-X-WORD-bfd-strict-hold-time-seconds

Possible option:

set protocols bgp neighbor 10.208.90.5 bfd strict
set protocols bgp neighbor 10.208.90.5 bfd strict hold-time 1

On a side note:
A bug report was raised on FRR:Github (https://github.com/FRRouting/frr/issues/20215), citing that without the above command, BGP should tear down the sessions immediately on BFD down.

This was implemented as per https://github.com/FRRouting/frr/pull/20223; however, it was not backported.
For now I'd suggest adding the "hold-time" option above will be a better workaround.

Lastly, adding the command "neighbor 10.208.90.5 bfd strict hold-time 1" does not show up on running-config or /etc/frr/frr.conf. However, the command does work.

Example config to test:
Router-1:

set interfaces ethernet eth1 vif 504 address '10.208.91.10/31'
set interfaces ethernet eth1 vif 999 address '192.168.120.1/24'
set interfaces loopback lo address '10.208.90.1/32'
set protocols bfd profile DEFAULT interval receive '300'
set protocols bfd profile DEFAULT interval transmit '300'
set protocols bgp address-family ipv4-unicast redistribute connected
set protocols bgp neighbor 10.208.90.5 address-family ipv4-unicast
set protocols bgp neighbor 10.208.90.5 bfd profile 'DEFAULT'
set protocols bgp neighbor 10.208.90.5 remote-as '65550'
set protocols bgp neighbor 10.208.90.5 update-source 'lo'
set protocols bgp parameters log-neighbor-changes
set protocols bgp parameters router-id '10.208.90.1'
set protocols bgp system-as '65550'
set protocols static route 10.208.90.5/32 next-hop 10.208.91.11

Router-2:

set interfaces ethernet eth1 vif 504 address '10.208.91.11/31'
set interfaces ethernet eth1 vif 999 address '192.168.119.1/24'
set interfaces loopback lo address '10.208.90.5/32'
set protocols bfd profile DEFAULT interval receive '300'
set protocols bfd profile DEFAULT interval transmit '300'
set protocols bgp address-family ipv4-unicast redistribute connected
set protocols bgp neighbor 10.208.90.1 address-family ipv4-unicast
set protocols bgp neighbor 10.208.90.1 bfd profile 'DEFAULT'
set protocols bgp neighbor 10.208.90.1 remote-as '65550'
set protocols bgp neighbor 10.208.90.1 update-source 'lo'
set protocols bgp parameters log-neighbor-changes
set protocols bgp parameters router-id '10.208.90.5'
set protocols bgp system-as '65550'
set protocols static route 10.208.90.1/32 next-hop 10.208.91.10

To test, just shut the eth1 interface on Router-2, and enter show ip bgp neighbour 10.208.90.5 on Router-1.
You should see the following:

Estimated round trip time: 3 ms
BFD Hold Time (interval 30) timer expires in **23 seconds**
Read thread: on  Write thread: on  FD used: 26

  BFD: Type: multi hop
  Detect Multiplier: 3, Min Rx interval: 300, Min Tx interval: 300
  Status: Down, Last update: 0:00:00:06

Details

Version
1.5.0-H2
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)