BFD Configuration

There is a list of necessary elements to know when forging a BGP configuration.

Basic Elements For Configuring BFD Entry

When forging a BFD configuration, the destination IP and the kind of BFD variant determine a BFD session.

tracker bfd main type single-hop address 10.125.0.2 vrf main

Three additional parameters determine the BFD session: the source address, the interface name and the vrf name. The source and interface options permit to stick with routing constraints.

tracker bfd other type single-hop address 10.125.0.2 source 10.125.0.1 vrf main

BFD provides low overhead. However, it provides a per peer custom configuration, that permits lowering (or increasing) the timers that determine how, and when BFD packets are sent, and received.

tracker bfd othername
   type single-hop
   address 10.125.0.2
   vrf main
   detection-multiplier 6
   required-receive-interval 600000
   desired-transmission-interval 600000

It is possible to disable bfd session usage, by using following command. Note that you will have to check that no other daemon is using BFD. Otherwise, the command will not be successful.

del tracker bfd othername

Basic Elements For General Configuration

It is possible to change general timer settings that will apply to the BFD sessions automatically created by routing protocols (like BGP). This facility avoids the heavy task to configure for each session the newly wished parameters. Note that configured values are expressed in microseconds.

routing bfd
   detection-multiplier 7
   required-receive-interval 800000
   desired-transmission-interval 200000

The default settings can be restored by deleting the configuration. By default, detect multiplier is set to 3, while default required-receive-interval and transmit-interval is set to 300 milliseconds.

routing bfd
   del detection-multiplier
   del required-receive-interval
   del desired-transmission-interval

It is also possible to define BFD session profiles to have different BFD settings for different peers. The profile name must start with ‘bfd-profile-‘.

routing bfd
   profile bfd-profile-peer-1
      detection-multiplier 7
      required-receive-interval 800000
      desired-transmission-interval 200000

Basic Elements For Monitoring

You can use the show bfd neighbor commands to watch for BFD neighbors.

Following commands gives detailed BFD information about the BFD neighbors status and statistics.

vsr> show bfd neighbor vrf main single-hop address 10.125.0.2
BFD Neighbors:
    neighbor 10.125.0.2 l3vrf default
        Local Address: 10.125.0.1
        Type: single-hop
        Label: bfd-tracker
        ID: 3388696847
        Remote ID: 786476961
        Active mode
        Status: up
        Uptime: 4 second(s)
        Diagnostics: ok
        Remote diagnostics: ok
        RTT min/avg/max: 0/0/0 usec
        Local timers:
            Detect-multiplier: 4
            Receive interval: 200ms
            Transmission interval: 200ms
            Echo receive interval: 50ms
            Echo transmission interval: 0ms
        Remote timers:
            Detect-multiplier: 4
            Receive interval: 200ms
            Transmission interval: 200ms
            Echo receive interval: 50ms
vsr> show bfd neighbor vrf main statistics
BFD Peers:
    peer 10.125.0.2 local-address 10.125.0.1 vrf default interface ntfp2
            Notification-string: /run/yams/tracker/bfd-tracker
            Label: bfd-tracker
            Control packet input: 5029 packets
            Control packet output: 5030 packets
            Echo packet input: 0 packets
            Echo packet output: 0 packets
            Session up events: 1
            Session down events: 1
            Zebra notifications: 3

Configuration With Remote Daemons

In addition to be able to create BFD peer sessions by using nc-cli of bfd, it is possible to dynamically create BFD peer sessions by relying on remote daemons.

See also