BFD Configuration

Configuration Syntax and Commands

The following sections describe the Bidirectional Forwarding Detection configuration syntax and commands.

A static BFD session is configured by explicitly setting the local and peer IP addresses and interfaces along with the BFD parameters, such as 'transmit' and 'receive' intervals and 'detection multipliers'. The session is established directly between the two endpoints without depending on any routing protocol.

In contrast, a dynamic BFD session is automatically created and managed by a routing protocol, such as BGP.

Static BFD Session Configuration

A BFD session can be established through static configuration.

Static BFD sessions support transmit and receive intervals of 1000 milliseconds.

Syntax

set oam bfd session <session name>

Attribute Description

detect-multiplier

The minimum number of consecutive BFD packets that must be missed before the BFD session is declared down. Range 1 - 255. Default 3.

interface

Logical interface name.

local-v4-address

Local IPv4 address. This is the IPv4 source address of BFD packets configured on the interface used in the session.

local-v6-address

Local IPv6 address. This is the IPv6 source address of BFD packets configured on the interface used in the session.

peer-v4-address

Peer IPv4 address.

peer-v6-address

Peer IPv6 address.

receive-interval

The receive interval is the minimum amount of time (in milliseconds) that an RBFS device waits to receive a BFD control packet from its peer. Range: 100 - 255000.

Minimum: 100 milliseconds
Maximum: 10000 milliseconds
Default: 1000 milliseconds

transmit-interval

The transmit interval is the minimum amount of time (in milliseconds) that an RBFS device transmits BFD control packets to its peer. Range: <100-255000>.

Minimum: 100 milliseconds
Maximum: 10000 milliseconds
Default: 1000 milliseconds.

This configuration establishes two BFD sessions, named BFD_V4_IFP1_LINK1 and BFD_V6_IFP1_LINK1, for IPv4 and IPv6, respectively, on the same interface (ifl-0/0/0/0). Both sessions are set to a transmit/receive interval of 1000 milliseconds, meaning they exchange BFD packets once per second to quickly detect failures.

The peer IPv4 address, which is the neighbor’s IP address for BFD packets, is specified as 12.0.0.2, while the local IPv4 address is designated as 12.0.0.1. For IPv6, the peer address is set as 12::2, and the local address is specified as 12::1.

If no packet is received within the hold interval (calculated as receive interval × detect multiplier), the BFD session is declared down.

set oam bfd session BFD_V4_IFP1_LINK1
set oam bfd session BFD_V4_IFP1_LINK1 peer-v4-address 12.0.0.2
set oam bfd session BFD_V4_IFP1_LINK1 local-v4-address 12.0.0.1
set oam bfd session BFD_V4_IFP1_LINK1 transmit-interval 1000
set oam bfd session BFD_V4_IFP1_LINK1 receive-interval 1000
set oam bfd session BFD_V4_IFP1_LINK1 interface ifl-0/0/0/0
set oam bfd session BFD_V6_IFP1_LINK1
set oam bfd session BFD_V6_IFP1_LINK1 peer-v6-address 12::2
set oam bfd session BFD_V6_IFP1_LINK1 local-v6-address 12::1
set oam bfd session BFD_V6_IFP1_LINK1 transmit-interval 1000
set oam bfd session BFD_V6_IFP1_LINK1 receive-interval 1000
set oam bfd session BFD_V6_IFP1_LINK1 interface ifl-0/0/0/0
{
  "rtbrick-config:session": [
    {
      "name": "BFD_V4_IFP1_LINK1",
      "peer-v4-address": "12.0.0.2",
      "local-v4-address": "12.0.0.1",
      "transmit-interval": 1000,
      "receive-interval": 1000,
      "interface": "ifl-0/0/0/0"
    },
    {
      "name": "BFD_V6_IFP1_LINK1",
      "peer-v6-address": "12::2",
      "local-v6-address": "12::1",
      "transmit-interval": 1000,
      "receive-interval": 1000,
      "interface": "ifl-0/0/0/0"
    }
  ]
}

BFD Profile Configuration

A BFD profile contains the parameters that controls the behavior of BFD sessions. You can create BFD profiles that allow you to define common BFD parameters (such as transmit and receive intervals, detect multipliers) in the profile and associate them with the BGP protocol.

Syntax

set oam bfd profile <profile-name> <attribute> <value>

Attribute Description

<profile name>

Name of the BFD profile.

detect-multiplier

The minimum number of consecutive BFD packets that must be missed before the BFD session is declared down. Range 1 - 255. Default 3.

receive-interval

The receive interval is the minimum amount of time (in milliseconds) that an RBFS device waits to receive a BFD control packet from its peer. Range: 100 - 255000.

Minimum: 100 milliseconds
Maximum: 10000 milliseconds
Default: 1000 milliseconds

transmit-interval

The transmit interval is the minimum amount of time (in milliseconds) that an RBFS device transmits BFD control packets to its peer. Range: <100-255000>.

Minimum: 100 milliseconds
Maximum: 10000 milliseconds
Default: 1000 milliseconds.

Example: BFD profile configuration

The following configuration creates a BFD profile named 'BGP_BFD_PROFILE1'. In this configuration, both the transmit interval and the receive interval are set to 1000 milliseconds, while the detect multiplier is defined as 3. It also defines the number of consecutive missed BFD packets required to declare the session as down.

set oam bfd profile BGP_BFD_PROFILE1
set oam bfd profile BGP_BFD_PROFILE1 transmit-interval 1000
set oam bfd profile BGP_BFD_PROFILE1 receive-interval 1000
set oam bfd profile BGP_BFD_PROFILE1 detect-multiplier 3
{
  "rtbrick-config:profile": [
    {
      "name": "BGP_BFD_PROFILE1",
      "transmit-interval": 1000,
      "receive-interval": 1000,
      "detect-multiplier": 3
    }
  ]
}

Attaching BFD profile to BGP Peer

After creating a BFD profile, you can attach the profile to a BGP peer group.

Syntax

set instance <instance-name> protocol bgp peer interface | IPv4 | IPv6 <interface name | local address & peer address> bfd profile <profile-name>

set instance <instance-name> protocol bgp peer interface | IPv4 | IPv6 <interface name | local address & peer address> peer-group <name>

Attribute Description

<profile name>

Name of the BFD profile.

interface

Name of the interface.

IPv4

IPv4 address.

IPv6

IPv6 address.

peer-group-name

Name of the BGP peer group.

The following configuration associates BFD profiles with peer interfaces and peer groups. It establishes IPv4 and IPv6 BGP neighbors on interface ifl-0/0/0/6, organizing them into groups named 'ipv4_bgp', 'ipv6_bgp', and 'ipv6_bgp_ll'. The same BFD profile, referred to as BGP_BFD_PROFILE1, is applied to both IPv4 neighbors (12.0.4.2/12.0.4.1) and IPv6 neighbors (12:0:5::2/12:0:5::1), which are linked to their respective peer groups.

Rather than applying the BFD profile individually to each peer, it is applied at the peer group and interface levels.

This means that the BGP peer with IP address 12.0.4.2 (local IP 12.0.4.1) will utilize the BFD parameters specified in BGP_BFD_PROFILE1. Any BGP peer that connects to this interface will automatically inherit the BFD settings. Once a BFD profile is attached to a peer group, all peers within that group will receive those BFD parameters.

set instance default protocol bgp peer interface ifl-0/0/0/6 bfd-profile BGP_BFD_PROFILE1
set instance default protocol bgp peer ipv4 12.0.4.2 12.0.4.1 bfd-profile BGP_BFD_PROFILE1
set instance default protocol bgp peer ipv6 12:0:5::2 12:0:5::1 bfd-profile BGP_BFD_PROFILE1
{
  "rtbrick-config:peer": {
    "interface": [
      {
        "name": "ifl-0/0/0/6",
        "bfd-profile": "BGP_BFD_PROFILE1",
        "peer-group": "ipv6_bgp_ll"
      }
    ],
    "ipv4": [
      {
        "peer-address": "12.0.4.2",
        "update-source": "12.0.4.1",
        "bfd-profile": "BGP_BFD_PROFILE1",
        "peer-group": "ipv4_bgp"
      }
    ],
    "ipv6": [
      {
        "peer-address": "12:0:5::2",
        "update-source": "12:0:5::1",
        "bfd-profile": "BGP_BFD_PROFILE1",
        "peer-group": "ipv6_bgp"
      }
    ]
  }
}