Configuring Bidirectional Forwarding Detection

Bidirectional Forwarding Detection (BFD) provides a low-overhead, short-duration method of detecting failures in the forwarding path between two adjacent routers, including the interfaces, data links, and forwarding planes. BFD is a detection protocol that you enable at the interface and routing protocol levels.

Understanding BFD

Cisco supports the BFD asynchronous mode, in which two routers exchange BFD control packets to activate and maintain BFD neighbor sessions. To create a BFD session, you must configure BFD on both systems (or BFD peers). After you enable BFD on the interface and the router level for the appropriate routing protocols, a BFD session is created, BFD timers are negotiated, and the BFD peers begin to send BFD control packets to each other at the negotiated interval.

Configuring BFD

This section contains the following topics:

For more information about BFD, refer to the IP Routing: BFD Configuration Guide, Cisco IOS Release 15.1S .


Note


Cisco ASR 901 supports BFD echo mode.

BFD Configuration Guidelines and Restrictions

  • The minimum time interval supported for BFD is 50 ms.
  • The maximum number of stable sessions supported for BFD with 50 ms interval is 4.
  • BFD and REP together are not recommended on Cisco ASR 901 Router while sharing the same link.
  • After enabling BFD on an interface, if you configure an IPV4 static route with BFD routing through this interface, and if the IPV4 BFD session does not get established, unconfigure BFD on the given interface, and configure it again. The BFD session comes up.
  • When you move the BFD configuration saved in flash memory to the running configuration, BFD session is re-established.
  • When BFD is configured on a port from which more than 70% of line rate data traffic is egressing, there is a drop in control packets including BFD packets. To avoid BFD packet drop, you have to configure QoS policies that give higher priority for both CPU generated BFD packets and BFD echo reply packets.

Configuring BFD for OSPF

This section describes how to configure BFD on the Cisco ASR 901 router.

Configuring BFD for OSPF on One of More Interfaces

Complete these steps to configure BFD for OSPF on a single interface.

Procedure
  Command or Action Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

interface vlan1

Specifies an interface to configure.

Step 4

ip ospf bfd

Enables BFD for OSPF on the interface.

Step 5

bfd interval 50 min_rx 50 multiplier 3

Specifies the BFD session parameters.

Step 6

end

Example:

Router(config-if)# end

Exits configuration mode.

What to do next

Note


You can also use the show bfd neighbors and show ip ospf commands to display troubleshooting information about BFD and OSPF.

Configuring BFD for OSPF on All Interfaces

Complete these steps to configure BFD for OSPF on all interfaces.

Procedure
  Command or Action Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

router ospf 100

Creates a configuration for an OSPF process.

Step 4

bfd all-interfaces

Enables BFD globally on all interfaces associated with the OSPF routing process.

Step 5

exit

Example:

Router(config)# exit

Exits configuration mode.

What to do next

Note


You can disable BFD on a single interface using the ip ospf bfd disable command when configuring the relevant interface.

Configuring BFD for BGP

Complete these steps to configure BFD for BGP.

Procedure

  Command or Action Purpose

Step 1

enable

Example:


Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Router# configure terminal

Enters global configuration mode.

Step 3

router bgp as-tag

Specifies a BGP process and enter router configuration mode.

Step 4

neighbor ip-address fall-over bfd

Enables support for BFD failover.

Step 5

exit

Example:


Router(config)# exit

Exits configuration mode.

Step 6

show bfd neighbors [details]

Example:

show ip bgp neighbor

Use the following commands to verify the BFD configuration:

  • show bfd neighbors [details] —Verifies that the BFD neighbor is active and displays the routing protocols that BFD has registered.
  • show ip bgp neighbor —Displays information about BGP and TCP connections to neighbors.

Configuring BFD for IS-IS

This section describes how to configure BFD for IS-IS routing.

Configuring BFD for IS-IS on a Single Interface

Complete these steps to configure BFD for IS-IS on a single interface.

Procedure
  Command or Action Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3

interface vlan1

Enters interface configuration mode.

Step 4

ip router isis [tag]

Enables support for IPv4 routing on the interface.

Step 5

isis bfd

Enables BFD on the interfaces.

Step 6

exit

Example:

Router(config)# exit

Exits configuration mode.

What to do next

Note


You can use the show bfd neighbors and show clns interface commands to verify your configuration.

Configuring BFD for IS-IS for All Interfaces

Complete these steps to configure BFD for IS-IS on all interfaces.

Procedure
  Command or Action Purpose

Step 1

enable

Example:

Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:
 Router# configure terminal

Enters global configuration mode.

Step 3

interface vlan1

Enters interface configuration mode.

Step 4

ip router isis [tag]

Enables support for IPv4 routing on the interface.

Step 5

bfd all-interfaces

Enables BFD globally on all interfaces associated with the IS-IS routing process.

Step 6

exit

Example:
 Router(config)# exit

Exits the interface.

Step 7

interface vlan1

Example:

Router(config-if) ip router isis [tag]

If you want to enable BFD on a per-interface basis for one or more interfaces associated with the IS-IS routing process, complete the following steps:

  • Use the interface command to enter interface configuration mode.
  • Use the ip router isis command to enables support for IPv4 routing on the interface.

Step 8

exit

Example:

Router(config)# exit

Exit configuration mode.

What to do next

Note


You can use the show bfd neighbors and show clns interface commands to verify your configuration.

Configuring BFD for Static Routes

Complete these steps to configure BFD for static routes.

Procedure

  Command or Action Purpose

Step 1

enable

Example:


Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Router# configure terminal

Enters global configuration mode.

Step 3

interface vlan 150

Specifies an interface and enters interface configuration mode.

Step 4

ip address 10.201.201.1 255.255.255.0

Configures an IP address for the interface.

Step 5

bfd interval 50 min_rx 50 multiplier 3

Enables BFD on the interface.

Step 6

exit

Example:


Router(config-if)# exit

Exits configuration mode.

Step 7

ip route static bfd Vlan150 150.0.0.2

Specifies neighbors for the static routes in BFD.

Step 8

ip route 77.77.77.0 255.255.255.0 Vlan150

Specifies the exit interface for the static route in BFD.

What to do next


Note


You can use the show ip static route command to verify your configuration.

Configuration Examples for BFD

The following section contains sample configurations for each routing protocol using BFD.


Note


This section provides partial configurations intended to demonstrate a specific feature.

BFD with OSPF on All Interfaces


interface GigabitEthernet0/10
 description Core_facing
 negotiation auto
 service instance 150 ethernet
  encapsulation untagged
  bridge-domain 150
 !
interface Vlan150
 ip address 150.0.0.1 255.255.255.0
 bfd interval 50 min_rx 50 multiplier 3
!
router ospf 7
 network 99.99.99.99 0.0.0.0 area 0
 network 150.0.0.0 0.0.0.255 area 0
 bfd all-interfaces

BFD with OSPF on Individual Interfaces


interface GigabitEthernet0/10
 description Core_facing
 negotiation auto
 service instance 150 ethernet
  encapsulation untagged
  bridge-domain 150
 !
interface Vlan150
 ip address 150.0.0.1 255.255.255.0
 bfd interval 50 min_rx 50 multiplier 3
 ip ospf bfd
!
router ospf 7
 network 99.99.99.99 0.0.0.0 area 0
 network 150.0.0.0 0.0.0.255 area 0
 

BFD with BGP


interface GigabitEthernet0/10
 description Core_facing
 negotiation auto
 service instance 150 ethernet
  encapsulation untagged
  bridge-domain 150
 !
interface Vlan150
 ip address 150.0.0.1 255.255.255.0
 bfd interval 50 min_rx 50 multiplier 3
!
router bgp 1
 bgp log-neighbor-changes
 neighbor 150.0.0.2 remote-as 2
 neighbor 150.0.0.2 fall-over bfd

BFD with IS-IS on All Interfaces


interface GigabitEthernet0/10
 description Core_facing
 negotiation auto
 service instance 150 ethernet
  encapsulation untagged
  bridge-domain 150
 !
interface Vlan150
 ip address 150.0.0.1 255.255.255.0
 bfd interval 50 min_rx 50 multiplier 3
!
router isis
 net 49.0001.2222.2222.2222.00
 bfd all-interfaces
!

BFD with IS-IS on Individual Interfaces


interface GigabitEthernet0/10
 description Core_facing
 negotiation auto
 service instance 150 ethernet
  encapsulation untagged
  bridge-domain 150
 !
interface Vlan150
 ip address 150.0.0.1 255.255.255.0
 bfd interval 50 min_rx 50 multiplier 3
 isis bfd
!
router isis
 net 49.0001.2222.2222.2222.00
!

BFD with Static Routes


interface GigabitEthernet0/10
 description Core_facing
 negotiation auto
 service instance 150 ethernet
  encapsulation untagged
  bridge-domain 150
 !
interface Vlan150
 ip address 150.0.0.1 255.255.255.0
 bfd interval 50 min_rx 50 multiplier 3
!
ip route static bfd Vlan150 150.0.0.2
ip route 77.77.77.0 255.255.255.0 Vlan150 150.0.0.2