Page MenuHomeVyOS Platform

BFD profiles configuration incorrect behavior.
Closed, ResolvedPublicBUG

Description

When configuring BFD from VyOS CLI, defined values are not correctly applied to the FRRouting configuration, causing incorrect operation:

vyos@VyOS-RR1:~$ show version

Version:          VyOS 1.4-rolling-202111160742
Release train:    sagitta

Built by:         autobuild@vyos.net
Built on:         Tue 16 Nov 2021 07:42 UTC
Build UUID:       87f482f0-189a-4b17-8397-dd927f9ff955
Build commit ID:  22a1b786c3c17c

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    0526ae76-b6b2-41e6-ac7a-5fd184a3f9bb

Copyright:        VyOS maintainers and contributors

vyos@VyOS-RR1:~$ show configuration commands | match bfd
set protocols bfd peer 10.0.0.1 multihop
set protocols bfd peer 10.0.0.1 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.1 source address '10.0.0.11'
set protocols bfd peer 10.0.0.2 multihop
set protocols bfd peer 10.0.0.2 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.2 source address '10.0.0.11'
set protocols bfd peer 10.0.0.3 multihop
set protocols bfd peer 10.0.0.3 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.3 source address '10.0.0.11'
set protocols bfd peer 10.0.0.4 multihop
set protocols bfd peer 10.0.0.4 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.4 source address '10.0.0.11'
set protocols bfd peer 10.0.0.111 multihop
set protocols bfd peer 10.0.0.111 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.111 source address '10.0.0.11'
set protocols bfd peer 10.0.0.112 multihop
set protocols bfd peer 10.0.0.112 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.112 source address '10.0.0.11'
set protocols bfd peer 10.1.11.0 profile 'BFD_OSPF'
set protocols bfd peer 10.2.11.0 profile 'BFD_OSPF'
set protocols bfd profile BFD_OSPF interval multiplier '3'
set protocols bfd profile BFD_OSPF interval receive '300'
set protocols bfd profile BFD_OSPF interval transmit '300'
set protocols bfd profile BFD_iBGP interval multiplier '3'
set protocols bfd profile BFD_iBGP interval receive '3000'
set protocols bfd profile BFD_iBGP interval transmit '3000'
set protocols bgp peer-group iBGP bfd
set protocols ospf interface eth1 bfd
set protocols ospf interface eth2 bfd

vyos@VyOS-RR1:~$ vtysh

Hello, this is FRRouting (version 7.5.1-20210619-12-g3f8a74e70).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

VyOS-RR1# show running-config
Building configuration...

Current configuration:
!
frr version 7.5.1-20210619-12-g3f8a74e70
frr defaults traditional
hostname VyOS-RR1
log syslog
log facility local7
service integrated-vtysh-config
!
interface eth1
 ip ospf bfd
 ip ospf network point-to-point
!
interface eth2
 ip ospf bfd
 ip ospf network point-to-point
!
router bgp 65000
 bgp router-id 10.0.0.11
 no bgp ebgp-requires-policy
 no bgp default ipv4-unicast
 bgp cluster-id 10.0.0.0
 no bgp network import-check
 neighbor iBGP peer-group
 neighbor iBGP remote-as internal
 neighbor iBGP bfd
 neighbor iBGP update-source 10.0.0.11
 neighbor 10.0.0.1 peer-group iBGP
 neighbor 10.0.0.2 peer-group iBGP
 neighbor 10.0.0.3 peer-group iBGP
 neighbor 10.0.0.4 peer-group iBGP
 neighbor 10.0.0.111 peer-group iBGP
 neighbor 10.0.0.112 peer-group iBGP
 !
 address-family ipv4 vpn
  neighbor 10.0.0.1 activate
  neighbor 10.0.0.1 addpath-tx-all-paths
  neighbor 10.0.0.1 route-reflector-client
  neighbor 10.0.0.2 activate
  neighbor 10.0.0.2 addpath-tx-all-paths
  neighbor 10.0.0.2 route-reflector-client
  neighbor 10.0.0.3 activate
  neighbor 10.0.0.3 addpath-tx-all-paths
  neighbor 10.0.0.3 route-reflector-client
  neighbor 10.0.0.4 activate
  neighbor 10.0.0.4 addpath-tx-all-paths
  neighbor 10.0.0.4 route-reflector-client
  neighbor 10.0.0.111 activate
  neighbor 10.0.0.111 addpath-tx-all-paths
  neighbor 10.0.0.111 route-reflector-client
  neighbor 10.0.0.112 activate
  neighbor 10.0.0.112 addpath-tx-all-paths
  neighbor 10.0.0.112 route-reflector-client
 exit-address-family
!
router ospf
 ospf router-id 10.0.0.11
 log-adjacency-changes
 auto-cost reference-bandwidth 10000
 timers throttle spf 200 1000 10000
 passive-interface dum0
 network 0.0.0.0/0 area 0
!
line vty
!
bfd
 profile BFD_OSPF
 !
 profile BFD_iBGP
  transmit-interval 3000
  receive-interval 3000
 !
 peer 10.1.11.0
 !
 peer 10.2.11.0
 !
 peer 10.0.0.1 multihop local-address 10.0.0.11
 !
 peer 10.0.0.2 multihop local-address 10.0.0.11
 !
 peer 10.0.0.3 multihop local-address 10.0.0.11
 !
 peer 10.0.0.4 multihop local-address 10.0.0.11
 !
 peer 10.0.0.111 multihop local-address 10.0.0.11
 !
 peer 10.0.0.112 multihop local-address 10.0.0.11
 !
!
end

As it's visible from the output, there are 2 BFD profiles created with different tx/rx intervals: BFD_OSPF 300/300 x3, and BFD_iBGP 3000/3000 x3. Each of them has been applied to the different protocols OSPF and BGP accordingly. Looking for the FRR configuration, we can see the following issues:

  1. BFD_OSPF was created but didn't apply any parameter from the defined through the VyOS CLI:

VyOS

set protocols bfd profile BFD_OSPF interval multiplier '3'
set protocols bfd profile BFD_OSPF interval receive '300'
set protocols bfd profile BFD_OSPF interval transmit '300'

FRR

bfd
 profile BFD_OSPF
 !

Instead, FRR should have the following lines:

bfd
 profile BFD_OSPF
  transmit-interval 300
  receive-interval 300
 !
  1. Under the OSPF interface peers BFD profile has not been added. It should include the following lines:

VyOS

set protocols bfd peer 10.1.11.0 profile 'BFD_OSPF'
set protocols bfd peer 10.2.11.0 profile 'BFD_OSPF'

FRR

bfd
 peer 10.1.11.0
 !
 peer 10.2.11.0
 !

Instead, FRR should have the following lines:

bfd
 peer 10.1.11.0
  profile BFD_OSPF
 !
 peer 10.2.11.0
  profile BFD_OSPF
 !
  1. BFD profile not applied under the FRR BGP configuration:

VyOS

set protocols bgp peer-group iBGP bfd
set protocols bfd peer 10.0.0.1 multihop
set protocols bfd peer 10.0.0.1 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.1 source address '10.0.0.11'
set protocols bfd peer 10.0.0.2 multihop
set protocols bfd peer 10.0.0.2 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.2 source address '10.0.0.11'
set protocols bfd peer 10.0.0.3 multihop
set protocols bfd peer 10.0.0.3 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.3 source address '10.0.0.11'
set protocols bfd peer 10.0.0.4 multihop
set protocols bfd peer 10.0.0.4 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.4 source address '10.0.0.11'
set protocols bfd peer 10.0.0.111 multihop
set protocols bfd peer 10.0.0.111 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.111 source address '10.0.0.11'
set protocols bfd peer 10.0.0.112 multihop
set protocols bfd peer 10.0.0.112 profile 'BFD_iBGP'
set protocols bfd peer 10.0.0.112 source address '10.0.0.11'

FRR

router bgp 65000
 neighbor iBGP peer-group
 neighbor iBGP remote-as internal
 neighbor iBGP bfd
 neighbor iBGP update-source 10.0.0.11
 neighbor 10.0.0.1 peer-group iBGP
 neighbor 10.0.0.2 peer-group iBGP
 neighbor 10.0.0.3 peer-group iBGP
 neighbor 10.0.0.4 peer-group iBGP
 neighbor 10.0.0.111 peer-group iBGP
 neighbor 10.0.0.112 peer-group iBGP

Instead, FRR should have the following lines:

router bgp 65000 
 neighbor iBGP peer-group
 neighbor iBGP remote-as internal
 neighbor iBGP bfd profile BFD_iBGP
 neighbor iBGP update-source 10.0.0.11
 neighbor 10.0.0.1 peer-group iBGP
 neighbor 10.0.0.2 peer-group iBGP
 neighbor 10.0.0.3 peer-group iBGP
 neighbor 10.0.0.4 peer-group iBGP
 neighbor 10.0.0.111 peer-group iBGP
 neighbor 10.0.0.112 peer-group iBGP

After adding those statements under the FRR configuration and restarting BFD process all intervals are shown correctly under the BFD peering status information:
Before the changes

vyos@VyOS-RR1:~$ show protocols bfd peer 10.0.0.111
BFD Peer:
        peer 10.0.0.111 multihop local-address 10.0.0.11 vrf default
                ID: 915215337
                Remote ID: 2021107414
                Active mode
                Minimum TTL: 254
                Status: up
                Uptime: 30 minute(s), 1 second(s)
                Diagnostics: ok
                Remote diagnostics: ok
                Peer Type: configured
                Local timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo transmission interval: 50ms
                Remote timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo transmission interval: 50ms

After the changes

vyos@VyOS-RR1:~$ vtysh

Hello, this is FRRouting (version 7.5.1-20210619-12-g3f8a74e70).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

VyOS-RR1# configure
VyOS-RR1(config)# router bgp 65000
VyOS-RR1(config-router)# neighbor iBGP bfd profile BFD_iBGP
VyOS-RR1(config-router)# end
VyOS-RR1# exit
vyos@VyOS-RR1:~$ show protocols bfd pe
peer   peers
vyos@VyOS-RR1:~$ show protocols bfd peer 10.0.0.111
BFD Peer:
        peer 10.0.0.111 multihop local-address 10.0.0.11 vrf default
                ID: 915215337
                Remote ID: 2021107414
                Active mode
                Minimum TTL: 254
                Status: up
                Uptime: 32 minute(s), 4 second(s)
                Diagnostics: ok
                Remote diagnostics: ok
                Peer Type: configured
                Local timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo transmission interval: 50ms
                Remote timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo transmission interval: 50ms

vyos@VyOS-RR1:~$ restart bfd
WARNING: This is a potentially unsafe function!
You may lose the connection to the router or active configuration after
running this command. Use it at your own risk!

Continue? [y/N] y

vyos@VyOS-RR1:~$ show protocols bfd peer 10.0.0.111
BFD Peer:
        peer 10.0.0.111 multihop local-address 10.0.0.11 vrf default
                ID: 578382690
                Remote ID: 2021107414
                Active mode
                Minimum TTL: 254
                Status: init
                Diagnostics: ok
                Remote diagnostics: neighbor signaled session down
                Peer Type: configured
                Local timers:
                        Detect-multiplier: 3
                        Receive interval: 3000ms
                        Transmission interval: 3000ms
                        Echo transmission interval: 50ms
                Remote timers:
                        Detect-multiplier: 3
                        Receive interval: 1000ms
                        Transmission interval: 1000ms
                        Echo transmission interval: 50ms

In the case of BFD_OSPF, when it's deleted from the VyOS configuration and reconfigured from the scratch, the same result appears and it's being added to the FRR configuration without defined values.

Details

Version
1.4-rolling-202111160742
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

VyOS

set protocols bfd profile BFD_OSPF interval multiplier '3'
set protocols bfd profile BFD_OSPF interval receive '300'
set protocols bfd profile BFD_OSPF interval transmit '300'

FRR

bfd
 profile BFD_OSPF
 !

This is correct as the FRR default values are 3/300/300 and thus are not displayed on FRR cli

c-po changed the task status from Open to Confirmed.Dec 6 2021, 6:43 PM
c-po claimed this task.
c-po edited a custom field.
c-po edited a custom field.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.

BGP/OSPF bfd profile support will be implemented in T4058

c-po triaged this task as Normal priority.