Since 1.2.0 has moved to FRR 6.1, which has native BFD support, can this be implemented in VyOS? Ideally this would be in the respective protocol config structures, such as 'procotols -> ospf -> bfd -> all interfaces'.
Description
Details
- Difficulty level
- Hard (possibly days)
- Version
- -
- Why the issue appeared?
- Will be filled on close
Related Objects
- Duplicates Merged Here
- T1182: BFD Support via FRR
Event Timeline
Here is the current frr documentation:
http://docs.frrouting.org/en/latest/bfd.html
Seems that we must:
- enable bfdd in the frr dameons
- create protocols bfd for bfd configuration
- extend ospf ospf6 pim an bgpd to enable bfd
A preliminary CLI interface has been created:
- https://github.com/c-po/vyos-1x/tree/bfd
- https://github.com/c-po/vyos-1x/blob/bfd/interface-definitions/protocols-bfd.xml
Anyone (@dmbaturin @hagbard) kows how to interact with FRR from a Python script?
FRR BFD manual http://docs.frrouting.org/en/latest/bfd.html
What will be the desireded CLI syntax?
vyos@vyos# show protocols bfd peer 1.2.3.4 { local-address 4.5.6.7 } peer 2001:db8::1 { local-address 2001:db9:1::ffff local-interface eth0.201 }
or
vyos@vyos# show protocols bfd peer 1.2.3.4 { local-address 4.5.6.7 } peer 2001:db8::1 { source { address 2001:db9:1::ffff interface eth0.201 } }
or
vyos@vyos# show protocols bfd peer 1.2.3.4 { local-address 4.5.6.7 } peer 2001:db8::1 { source-address 2001:db9:1::ffff source-interface eth0.201 }
I vote for #2 as I like it the most (optically)
Next rolling will come with preliminary FRR BFD (FRR BFD manual http://docs.frrouting.org/en/latest/bfd.html) support.
Please note: the CLI design is not yet final and might change as this is still experimental!
OSPF
set interface ethernet eth0 ip ospf bfd
BGP
set protocols bgp AS neighbor IP bfd
set protocols bgp AS peer-group NAME bfd
BFD
set protocols bfd peer IP multihop
set protocols bfd peer IP shutdown
set protocols bfd peer IP multihop
set protocols bfd peer IP interval receive
set protocols bfd peer IP interval transmit
set protocols bfd peer IP interval multiplier
set protocols bfd peer IP source address
set protocols bfd peer IP source interface
show protocols bfd peer
show protocols bfd peer IP
Just a comment: wouldn't have these configuration options be inferred from the peer they're on?
IE.. why do I need to configure a BGP peer for BFD, then enable specific BFD options in a separate section? Wouldn't it make more sense to put it under the bgp peer? for example:
protocols { bgp 31337 { neighbor 1.2.3.4 { update-source lo0; bfd { interval receive 100ms; source 1.2.3.3; multihop; } } } }
I imagine you could do the same for OSPF/Static as required
For my point of view this is a dependency from the bfd protocol specs.
You are only allowed to have one bfd connection to one bfd peer via same interface. See RFC.
This means if you configure bfd via bgp and then you need it on the same target in ospf or any other protocol you will run into a hell of
configuration dependency checking... Or if you delete one of the protocols.
I have added two PRs with some fixes and new features. The most valuable changes:
- Fixed the bug, which prevents to change or delete BFD peers with custom options. For example, when any of source address/interface, multihop was used, such peers could not be deleted or changed.
- Added configuration checks, which should prevent adding BFD option to BGP neighbors or peer-groups without corresponding peers configuration in protocols bfd. If BGP and BFD configurations are out of sync, BGP sessions could be very unstable.
- Added configuration check, which should prevent to delete peers from protocols bfd if they are still used in BGP.
- Some other small fixes and changes.
Also, was added several new options:
BFD configuration:
set protocols bfd peer IP echo-mode set protocols bfd peer IP interval echo-interval
BGP configuration:
set protocols bgp ASN neighbor IP bfd check-control-plane-failure
We also can add show protocols bfd peer counters and for peer show protocols bfd peer x.x.x.x counters
vyos@vyos-rtr01# run show protocols bfd peer counters | strip-private BFD Peers: peer xxx.xxx.0.4 local-address xxx.xxx.0.1 vrf default Control packet input: 0 packets Control packet output: 988 packets Echo packet input: 0 packets Echo packet output: 0 packets Session up events: 0 Session down events: 0 Zebra notifications: 0 peer xxx.xxx.0.2 local-address xxx.xxx.0.1 vrf default Control packet input: 0 packets Control packet output: 983 packets Echo packet input: 0 packets Echo packet output: 0 packets Session up events: 0 Session down events: 0 Zebra notifications: 0
Just some feedback here, but this has been working flawlessly in all my environments so far for BGP, OSPF, and OSPFv3 ... you guys are awesome!
It would be awsome if the feature could also be made available in the next VyOS 1.2.x version.
Because it likely takes a lot more time until version 1.3 gets released.
Hi trae32566
you are using the rolling release also for production?
Have you seen any issues with BFD so far?
Regards
Markus
Yes I'm currently utilizing the rolling releases in service after basic functionality testing, and so far BFD has worked flawlessly for all protocols I've tested.
I would not backport it. Its a proof of concept and things are still unclear about peer configuration (why does cumulus FRR behave differently and has no peer config) also the FRR interface is only a PoC.
Its also against the LTS term definition. Its not a bugfix - its a feature enhancement.
Anyone has some VyOS <-> Juniper or VyOS <-> Cisco working configs for the docs?
I have a VyOS <-> Arista configuration, which should be similar to Cisco, if that works for y'all?
@trae32566 definately! As Arista is gaining more food in the marked please share it here so we can then add it to our documentation.
@c-po wrote:
I would not backport it. Its a proof of concept and things are still unclear about peer configuration (why does cumulus FRR behave differently and has no peer config) also the FRR interface is only a PoC.
BFD is an essential feature for service providers. The task list of the 1.2.x is still very long.
That means that we would get version 1.3 somewhere next year.
This really would be a problem!
So, please do a backport of this feature.
Thank you
Markus
@cpo cumulus behave differently cause they use an other implementation as in pure frr. They use PTMD see https://docs.cumulusnetworks.com/cumulus-linux/Layer-3/Bidirectional-Forwarding-Detection-BFD/ and https://github.com/CumulusNetworks/ptm
also +1 for an backport
I made a test lab at home for this, so let me know if you have any other settings or anything you need documentation for.
Configs
Arista EOS
EOS 4.20 done in a VRF to segregate:
ir01(config-s-BFD_TE)#show session-config diff | i ^\+ +++ session:/BFD_TEST-session-config +! +vlan 250 + name BFD-TEST +! +! +vrf definition BFD-TEST + description VyOS and Arista BFD testing +! +interface Vlan250 + description VyOS and Arista BFD testing + vrf forwarding BFD-TEST + ip address 192.0.2.1/30 + ipv6 enable + ipv6 address 2001:db8::192:0:2:1/64 + ipv6 address fe80::192:0:2:1/64 link-local + ip ospf bfd + ip ospf area 0.0.0.0 + ipv6 ospf bfd + ipv6 ospf 2 area 0.0.0.0 +ip routing vrf BFD-TEST +ipv6 unicast-routing vrf BFD-TEST +ipv6 router ospf 2 vrf BFD-TEST + passive-interface default + no passive-interface Vlan250 +! +router ospf 2 vrf BFD-TEST + passive-interface default + no passive-interface Vlan250 + network 192.0.2.0/30 area 0.0.0.0 + max-lsa 12000 +!
VyOS
VyOS 1.2-rolling-201910061306 diff from a virgin install:
vyos@vyos# compare saved [edit interfaces] +bonding bond0 { + address 192.0.2.2/30 + address 2001:db8::192:0:2:2/64 + description "VyOS and Arista BFD testing" + hash-policy layer3+4 + ip { + ospf { + bfd + } + } + ipv6 { + ospfv3 { + bfd + } + } + member { + interface eth0 + interface eth1 + } + mode xor-hash +} [edit] +protocols { + bfd { + peer 192.0.2.1 { + source { + interface bond0 + } + } + peer fe80::192:0:2:1 { + source { + address fe80::5054:ff:fee5:79a4 + interface bond0 + } + } + } + ospf { + area 0.0.0.0 { + network 192.0.2.0/30 + } + passive-interface default + passive-interface-exclude bond0 + } + ospfv3 { + area 0.0.0.0 { + interface bond0 + } + } +} [edit]
Output
Arista EOS
ir01#show bfd neighbors vrf BFD-TEST VRF name: BFD-TEST ----------------- DstAddr MyDisc YourDisc Interface Type LastUp LastDown LastDiag State --------------- ---------------- ---------------- ---------------- ------------ -------------------- -------------- ------------------- ----- 192.0.2.2 3357120480 2203358781 Vlan250(2) normal 10/09/19 23:19 NA No Diagnostic Up DstAddr MyDisc YourDisc Interface Type LastUp LastDown LastDiag State ----------------------------- ---------------- --------------- ---------------- ------------ -------------------- -------------- ------------------- ----- fe80::5054:ff:fee5:79a4 3802158902 931194054 Vlan250(2) normal 10/09/19 23:19 NA No Diagnostic Up ir01#show bfd neighbors vrf BFD-TEST detail VRF name: BFD-TEST ----------------- Peer Addr 192.0.2.2, Intf Vlan250, Type normal, State Up VRF BFD-TEST, LAddr 192.0.2.1, LD/RD 3357120480/2203358781 Session state is Up and not using echo function Last Up Oct 09 23:19:24 2019 Last Down NA Last Diag: No Diagnostic TxInt: 300, RxInt: 300, Multiplier: 3 Received RxInt: 300, Received Multiplier: 3 Rx Count: 4684, Rx Interval (ms) min/max/avg: 224/300/263 last: 473 ms ago Tx Count: 4767, Tx Interval (ms) min/max/avg: 192/300/258 last: 473 ms ago Detect Time: 900 Sched Delay: 1*TxInt: 6576, 2*TxInt: 3, 3*TxInt: 0, GT 3*TxInt: 0 Registered protocols: ospf Uptime: 20:31.90 Last packet: Version: 1 - Diagnostic: 0 State bit: Up - Demand bit: 0 Poll bit: 0 - Final bit: 0 Multiplier: 3 - Length: 24 My Discr.: 2203358781 - Your Discr.: 3357120480 Min tx interval: 300 - Min rx interval: 300 Min Echo interval: 50 Peer Addr fe80::5054:ff:fee5:79a4, Intf Vlan250, Type normal, State Up VRF BFD-TEST, LAddr fe80::192:0:2:1, LD/RD 3802158902/931194054 Session state is Up and not using echo function Last Up Oct 09 23:19:24 2019 Last Down NA Last Diag: No Diagnostic TxInt: 300, RxInt: 300, Multiplier: 3 Received RxInt: 300, Received Multiplier: 3 Rx Count: 4694, Rx Interval (ms) min/max/avg: 224/300/262 last: 478 ms ago Tx Count: 4763, Tx Interval (ms) min/max/avg: 215/300/258 last: 478 ms ago Detect Time: 900 Sched Delay: 1*TxInt: 6579, 2*TxInt: 1, 3*TxInt: 0, GT 3*TxInt: 0 Registered protocols: ospfv3_ipv6 Uptime: 20:31.50 Last packet: Version: 1 - Diagnostic: 0 State bit: Up - Demand bit: 0 Poll bit: 0 - Final bit: 0 Multiplier: 3 - Length: 24 My Discr.: 931194054 - Your Discr.: 3802158902 Min tx interval: 300 - Min rx interval: 300 Min Echo interval: 50
VyOS
vyos@vyos:~$ show protocols bfd peer BFD Peers: peer fe80::192:0:2:1 local-address fe80::5054:ff:fee5:79a4 vrf default interface bond0 ID: 931194054 Remote ID: 3802158902 Status: up Uptime: 17 minute(s), 42 second(s) Diagnostics: ok Remote diagnostics: ok Local timers: Receive interval: 300ms Transmission interval: 300ms Echo transmission interval: 50ms Remote timers: Receive interval: 300ms Transmission interval: 300ms Echo transmission interval: 300ms peer 192.0.2.1 vrf default interface bond0 ID: 2203358781 Remote ID: 3357120480 Status: up Uptime: 17 minute(s), 42 second(s) Diagnostics: ok Remote diagnostics: ok Local timers: Receive interval: 300ms Transmission interval: 300ms Echo transmission interval: 50ms Remote timers: Receive interval: 300ms Transmission interval: 300ms Echo transmission interval: 300ms vyos@vyos:~$ show protocols bfd peer counters BFD Peers: peer fe80::192:0:2:1 local-address fe80::5054:ff:fee5:79a4 vrf default interface bond0 Control packet input: 4164 packets Control packet output: 4100 packets Echo packet input: 0 packets Echo packet output: 0 packets Session up events: 1 Session down events: 0 Zebra notifications: 1 peer 192.0.2.1 vrf default interface bond0 Control packet input: 4166 packets Control packet output: 4090 packets Echo packet input: 0 packets Echo packet output: 0 packets Session up events: 1 Session down events: 0 Zebra notifications: 1
Just a note, I updated my docs above cause they were missing the OSPF+OSPFv3 portion of the interface config that enabled BFD :)