Page MenuHomePhabricator

BFD Support via FRR
Needs testing, LowPublicFEATURE REQUEST

Description

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'.

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

syncer triaged this task as Normal priority.
pasik added a subscriber: pasik.Jan 21 2019, 9:43 PM
adestis added a subscriber: adestis.Feb 6 2019, 1:09 PM

Here is the current frr documentation:

http://docs.frrouting.org/en/latest/bfd.html

Seems that we must:

  1. enable bfdd in the frr dameons
  2. create protocols bfd for bfd configuration
  3. extend ospf ospf6 pim an bgpd to enable bfd
c-po claimed this task.Jun 15 2019, 11:05 AM
c-po lowered the priority of this task from Normal to Low.
c-po changed Difficulty level from Unknown (require assessment) to Hard (possibly days).
c-po added subscribers: hagbard, dmbaturin.EditedJun 16 2019, 6:29 PM

A preliminary CLI interface has been created:

Anyone (@dmbaturin @hagbard) kows how to interact with FRR from a Python script?

FRR BFD manual http://docs.frrouting.org/en/latest/bfd.html

c-po added a comment.Jun 21 2019, 5:36 PM

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)

c-po added a comment.Jun 23 2019, 10:26 AM

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

c-po changed the task status from Open to Needs testing.Jun 25 2019, 5:06 PM
shaneshort added a subscriber: shaneshort.EditedJul 5 2019, 7:52 AM

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.

zsdc added a subscriber: zsdc.Fri, Aug 9, 3:55 PM

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
Dmitry added a subscriber: Dmitry.Sat, Aug 10, 8:11 PM

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

PR https://github.com/vyos/vyos-1x/pull/104