Implementing BFD

Bidirectional forwarding detection (BFD) provides low-overhead, short-duration detection of failures in the path between adjacent forwarding engines. BFD allows a single mechanism to be used for failure detection over any media and at any protocol layer, with a wide range of detection times and overhead. The fast detection of failures provides immediate reaction to failure in the event of a failed link or neighbor.


Note

On the Cisco NCS 5500 Router, BFD supports up to 4 different minimum interval timers if BFD over Bundle (BoB) is configured, and up to 5 different minimum interval timers if BoB is not configured.



Tip

You can programmatically configure BFD and retrieve operational data using openconfig-bfd.yang OpenConfig data model. To get started with using data models, see the Programmability Configuration Guide for Cisco NCS 5500 Series Routers.


BFD over Bundle and BFD over Logical Bundle

Link Aggregation Control Protocol (LACP) allows a network device to negotiate an automatic bundling of links by sending LACP packets to their directly connected peer. LACP provides a keep-alive mechanism for the link members. While the default keep-alive is 30s, it is configurable to up to 1s. LACP can detect failures on a per-physical-member link. However, the LACP timers do not fulfill the criteria of current fast convergence requirements.

Differences between BFD over Bundle and BFD over Logical Bundle

BFD over Bundle (BoB) (RFC 7130) has a BFD session on each bundle member. The client is the bundle manager. If a BFD session goes down on a specific member link, the whole bundle interface goes down. That is, when the member link goes down, the number of available links falls below the required minimum. Hence the routing session is brought down.

BFD over Logical Bundle (BLB) (RFC 5880) treats a bundle interface with all its members as a single interface. BLB is a multipath (MP) single-hop session. If BLB is configured on a bundle there is only one single BFD session that is active. This implies that only one bundle member is being monitored by BFD at any given time. The client is one of the routing protocols. When BFD detects a failure, the client brings down the routing session.

The mode (BoB or BLB) is determined by how you configure BFD:

  • You can enable BoB by configuring BFD under a Bundle-Ether interface.

  • You can enable BLB by configuring BFD under a Bundle-Ether interface on a routing client.

Link Aggregation Control Protocol (LACP) allows a network device to negotiate an automatic bundling of links by sending LACP packets to their directly connected peer. LACP provides a keep-alive mechanism for the link members. While the default keep-alive is 30s, it is configurable to up to 1s. LACP can detect failures on a per-physical-member link. However, the LACP timers do not fulfill the criteria of current fast convergence requirements.

BFD over Bundle

BFD over Bundle

BFD Over Bundle (BoB) (RFC 7130) has a BFD session on each bundle member. BOB verifies the ability for each member link to be able to forward Layer 3 packets.

For BFD over Bundle, the BFD client is bundlemgr. When BFD detects a failure on a bundle member, bundlemgr removes that member from the bundle. If there are not enough members to keep the bundle up, then the main Bundle-Ether interface will go down so that all routing protocols running on the main bundle interface or a subinterface will detect an interface down.

BoB does not provide a true Layer 3 check and is not supported on subinterfaces. However, subinterfaces will go down at the same time as the main interface.

BoB implementation on NCS5500 is a standard-based fast failure detection of link aggregation (LAG) member links that is interoperable between different platforms. NCS 5500 and NCS 500 platforms only support the IETF mode.

Configure BFD Over Bundle

Perform the following tasks to configure the BOB feature:

  • Enable BFD sessions on bundle members

  • Specify the BFD destination address on a bundle

  • Configure the minimum thresholds for maintaining an active bundle

  • Configure BFD packet transmission intervals and failure detection times on a bundle

    Configure BFD over bundles IETF mode support on a per-bundle basis


/* Enable BFD sessions on bundle members */
Router(config)# interface Bundle-Ether 1
Router(config-if)# bfd address-family ipv4 fast-detect
Router(config-if)# bfd mode ietf

/* Specify the BFD destination address on a bundle */
Router(config)# interface Bundle-Ether 1
Router(config-if)# bfd address-family ipv4 destination 10.20.20.1
	 
/* Configure the minimum thresholds for maintaining an active bundle */
Router(config)# interface Bundle-Ether 1
Router(config-if)# bundle minimum-active bandwidth 580000
Router(config-if)# bundle minimum-active links 2

/* Configure BFD packet transmission intervals and failure detection times on a bundle */
Router(config)# interface Bundle-Ether 1
Router(config-if)# bfd address-family ipv4 minimum-interval 2000
Router(config-if)# bfd address-family ipv4 multiplier 30

/* Configure BFD over bundles IETF mode support on a per-bundle basis */
Router(config)# interface Bundle-Ether 1
Router(config-if)# bfd mode ietf
Router(config-if)# bfd address-family ipv4 fast-detect

Bidirectional Forwarding Detection over Logical Bundle

BFD over Logical Bundle

The BLB feature implements and deploys BFD over bundle interfaces based on RFC 5880. In the BLB, the bundle interface is a single interface, whereas, in BOB, BFD is implemented per member link. BLB is a multipath (MP) single-hop session so at least one line card must be configured under the bfd multipath command before a BLB session can come up. Because BFD treats the bundle as a single big interface, BLB requires limited knowledge of the bundle interfaces on which the sessions run. BLB requires information about IP addresses, interface types, and caps on bundle interfaces only. Information such as a list of bundle members, member states, and configured minimum or maximum bundle links are not required. In the case of BLB, the BFD client is not the bundle link but protocols running over the bundle link. In BLB, the BFD client is not bundlemgr but the protocols running over bundle link. BLB is supported on IPv4 address, IPv6 global address, and IPv6 link-local address. The current version of the software supports a total of 200 sessions (which includes BFD Single hop for physical and logical sub-interfaces; BFD over Bundle (BoB) and BLB) per line card. The maximum processing capability of BFD control packets, per line card, has also increased to 7000 pps.

Configuration Example

  • Create VLAN subinterface under bundle interface

  • Enable BFD on a static route

  • Enable BFD on IS-IS

  • Enable BFD for OSPF on an interface

  • Enable BFD on a BGP neighbor

  • Configure multipath capability under BFD

/* Create VLAN subinterface under bundle interface */
Router# configure 
Router(config)# interface Bundle-Ether 2.1 
Router(config-if)# ipv4 address 10.1.1.1 255.255.255.0 
Router(config-if)# encapsulation dot1q 1 
Router(config-if)# end 
 
/* Enable BFD on a static route. */
Router# configure 
Router(config)# router static 
Router(config-static)# address-family ipv4 unicast 
Router(config-static)# 10.158.3.13/32 10.1.1.2 bfd fast-detect minimum-interval 300 multiplier 3 

/* Enable BFD on IS-IS. */
Router# configure 
Router(config)# router isis cybi 
Router(config-isis)# interface Bundle-Ether 2.1 
Router(config-isis-if)# bfd minimum-interval 300 
Router(config-isis-if)# bfd multiplier 3 
Router(config-isis-if)# bfd fast-detect ipv4 
Router(config-isis-if)# address-family ipv4 unicast 
Router(config-isis-if-af)# end 

/* Enable BFD for OSPF on an interface. */
Router# configure 
Router(config)# router ospf cybi 
Router(config-ospf)# area 0 
Router(config-ospf)# interface Bundle-Ether 2.1 
Router(config-ospf-if)# bfd fast-detect 
Router(config-ospf-if)# bfd minimum-interval 300 
Router(config-ospf-if)# bfd multiplier 3 
Router(config-ospf-if)# end 

/* Enable BFD on a BGP neighbor.*/
Router# configure
Router(config)# router bgp 4787 
Router(config-bgp)# neighbor 10.158.1.1 
Router(config-bgp-nbr)# remote-as 4787 
Router(config-bgp-nbr)# update-source Bundle-Ether 2.1 
Router(config-bgp-nbr)# bfd fast-detect 
Router(config-bgp-nbr)# bfd minimum-interval 300 
Router(config-bgp-nbr)# bfd multiplier 3 
Router(config-bgp-nbr)# address-family ipv4 unicast 
Router(config-bgp-nbr-af)# route-policy PASS-ALL in 
Router(config-bgp-nbr-af)# route-policy PASS-ALL out 
Router(config-bgp-nbr-af)# exit 
Router(config-bgp-nbr)# commit 

/* Configure a specific LC (or LCs) to host BLB sessions. The BLB sessions and bundle member links need not be configured on the same LC. For example, you can configure the bundle member links on LC slot 2 and slot 3 while you configure BLB sessions to be hosted on LC slot 5. */
Router(config)# bfd 
Router(config-bfd)# multipath include location 0/6/CPU0 
Router(config-bfd)# multipath include location 0/2/CPU0 

Enabling BFD Sessions on Bundle Members

To enable BFD sessions on bundle member links, complete these steps:

SUMMARY STEPS

  1. configure
  2. interface Bundle-Ether bundle-id
  3. bfd address-family ipv4 fast-detect
  4. bfd mode ietf
  5. Use the commit or end command.

DETAILED STEPS

  Command or Action Purpose
Step 1

configure

Example:


RP/0/RP0/CPU0:router# configure

Enters global configuration mode.

Step 2

interface Bundle-Ether bundle-id

Example:


RP/0/RP0/CPU0:router(config)# interface Bundle-Ether 1

Enters interface configuration mode for the specified bundle ID.

Step 3

bfd address-family ipv4 fast-detect

Example:


RP/0/RP0/CPU0:router(config-if)# bfd address-family ipv4 fast-detect

Enables IPv4 BFD sessions on bundle member links.

Step 4

bfd mode ietf

Example:


RP/0/RP0/CPU0:router(config-if)# bfd mode ietf

Enables IETF mode for BFD over bundle for the specified bundle.

Step 5

Use the commit or end command.

commit —Saves the configuration changes and remains within the configuration session.

end —Prompts user to take one of these actions:
  • Yes — Saves configuration changes and exits the configuration session.

  • No —Exits the configuration session without committing the configuration changes.

  • Cancel —Remains in the configuration session, without committing the configuration changes.

Specifying the BFD Destination Address on a Bundle

To specify the BFD destination address on a bundle, complete these steps:

SUMMARY STEPS

  1. configure
  2. interface Bundle-Ether bundle-id
  3. bfd address-family ipv4 destination ip-address
  4. Use the commit or end command.

DETAILED STEPS

  Command or Action Purpose
Step 1

configure

Example:


RP/0/RP0/CPU0:router# configure

Enters global configuration mode.

Step 2

interface Bundle-Ether bundle-id

Example:


RP/0/RP0/CPU0:router(config)# interface Bundle-Ether 1

Enters interface configuration mode for the specified bundle ID.

Step 3

bfd address-family ipv4 destination ip-address

Example:


RP/0/RP0/CPU0:router(config-if)# bfd address-family ipv4 destination 10.20.20.1

Specifies the primary IPv4 address assigned to the bundle interface on a connected remote system, where ip-address is the 32-bit IP address in dotted-decimal format (A.B.C.D).

Step 4

Use the commit or end command.

commit —Saves the configuration changes and remains within the configuration session.

end —Prompts user to take one of these actions:
  • Yes — Saves configuration changes and exits the configuration session.

  • No —Exits the configuration session without committing the configuration changes.

  • Cancel —Remains in the configuration session, without committing the configuration changes.

Configuring the Minimum Thresholds for Maintaining an Active Bundle

The bundle manager uses two configurable minimum thresholds to determine whether a bundle can be brought up or remain up, or is down, based on the state of its member links.

  • Minimum active number of links

  • Minimum active bandwidth available

Whenever the state of a member changes, the bundle manager determines whether the number of active members or available bandwidth is less than the minimum. If so, then the bundle is placed, or remains, in DOWN state. Once the number of active links or available bandwidth reaches one of the minimum thresholds, then the bundle returns to the UP state.

To configure minimum bundle thresholds, complete these steps:

SUMMARY STEPS

  1. configure
  2. interface Bundle-Ether bundle-id
  3. bundle minimum-active bandwidth kbps
  4. bundle minimum-active links links
  5. Use the commit or end command.

DETAILED STEPS

  Command or Action Purpose
Step 1

configure

Example:


RP/0/RP0/CPU0:router# configure

Enters global configuration mode.

Step 2

interface Bundle-Ether bundle-id

Example:


RP/0/RP0/CPU0:router(config)# interface Bundle-Ether 1

Enters interface configuration mode for the specified bundle ID.

Step 3

bundle minimum-active bandwidth kbps

Example:


RP/0/RP0/CPU0:router(config-if)# bundle minimum-active bandwidth 580000

Sets the minimum amount of bandwidth required before a bundle can be brought up or remain up. The range is from 1 through a number that varies depending on the platform and the bundle type.

Step 4

bundle minimum-active links links

Example:


RP/0/RP0/CPU0:router(config-if)# bundle minimum-active links 2

Sets the number of active links required before a bundle can be brought up or remain up. The range is from 1 to 32.

Note 
When BFD is started on a bundle that is already active, the BFD state of the bundle is declared when the BFD state of all the existing active members is known.
Step 5

Use the commit or end command.

commit —Saves the configuration changes and remains within the configuration session.

end —Prompts user to take one of these actions:
  • Yes — Saves configuration changes and exits the configuration session.

  • No —Exits the configuration session without committing the configuration changes.

  • Cancel —Remains in the configuration session, without committing the configuration changes.

Configuring BFD Packet Transmission Intervals and Failure Detection Times on a Bundle

BFD asynchronous packet intervals and failure detection times for BFD sessions on bundle member links are configured using a combination of the bfd address-family ipv4 minimum-interval and bfd address-family ipv4 multiplier interface configuration commands on a bundle.

The BFD control packet interval is configured directly using the bfd address-family ipv4 minimum-interval command. The failure detection times are determined by a combination of the interval and multiplier values in these commands.

To configure the minimum transmission interval and failure detection times for BFD asynchronous mode control packets on bundle member links, complete these steps:

SUMMARY STEPS

  1. configure
  2. interface Bundle-Ether bundle-id
  3. bfd address-family ipv4 minimum-interval milliseconds
  4. bfd address-family ipv4 multiplier multiplier
  5. Use the commit or end command.

DETAILED STEPS

  Command or Action Purpose
Step 1

configure

Example:


RP/0/RP0/CPU0:router# configure

Enters global configuration mode.

Step 2

interface Bundle-Ether bundle-id

Example:


RP/0/RP0/CPU0:router(config)# interface Bundle-Ether 1

Enters interface configuration mode for the specified bundle ID.

Step 3

bfd address-family ipv4 minimum-interval milliseconds

Example:


RP/0/RP0/CPU0:router(config-if)#bfd address-family ipv4 minimum-interval 2000
Note 
Specifies the minimum interval, in milliseconds, for asynchronous mode control packets on IPv4 BFD sessions on bundle member links. The range is from 4 to 30000.
Step 4

bfd address-family ipv4 multiplier multiplier

Example:


RP/0/RP0/CPU0:router(config-if)#bfd address-family ipv4 multiplier 30

Specifies a number that is used as a multiplier with the minimum interval to determine BFD control packet failure detection times and transmission intervals for IPv4 BFD sessions on bundle member links. The range is from 2 to 50. The default is 3.

Note 
Although the command allows you to configure a minimum of 2, the supported minimum is 3.
Step 5

Use the commit or end command.

commit —Saves the configuration changes and remains within the configuration session.

end —Prompts user to take one of these actions:
  • Yes — Saves configuration changes and exits the configuration session.

  • No —Exits the configuration session without committing the configuration changes.

  • Cancel —Remains in the configuration session, without committing the configuration changes.

Configure BFD over Bundles IETF Mode Support on a Per Bundle Basis

To configure BFD over Bundles IETF mode support on a per bundle basis use these steps:

SUMMARY STEPS

  1. configure
  2. interface Bundle-Ether bundle-id
  3. bfd mode ietf
  4. bfd address-family ipv4 fast-detect
  5. Use the commit or end command.
  6. show bundle bundle-ether bundle-id

DETAILED STEPS

  Command or Action Purpose
Step 1

configure

Example:


RP/0/RP0/CPU0:router# configure

Enters global configuration mode.

Step 2

interface Bundle-Ether bundle-id

Example:


RP/0/RP0/CPU0:router(config)# interface Bundle-Ether 1

Enters interface configuration mode for the specified bundle ID.

Step 3

bfd mode ietf

Example:


RP/0/RP0/CPU0:router(config-if)# bfd mode ietf

Enables IETF mode for BFD over bundle for the specified bundle.

Step 4

bfd address-family ipv4 fast-detect

Example:


RP/0/RP0/CPU0:router(config-if)# bfd address-family ipv4 
fast-detect

Enables IPv4 BFD sessions on the specified bundle.

Step 5

Use the commit or end command.

commit —Saves the configuration changes and remains within the configuration session.

end —Prompts user to take one of these actions:
  • Yes — Saves configuration changes and exits the configuration session.

  • No —Exits the configuration session without committing the configuration changes.

  • Cancel —Remains in the configuration session, without committing the configuration changes.

Step 6

show bundle bundle-ether bundle-id

Displays the selected bundle mode.