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. Cisco supports BFD asynchronous mode, which depends on the sending of BFD control packets between two systems to activate and maintain BFD neighbor sessions between routers. Therefore, in order for a BFD session to be created, you must configure BFD on both systems (or BFD peers). Once BFD has been enabled on the interfaces and at the router level for the appropriate routing protocols, a BFD session is created, BFD timers are negotiated, and the BFD peers will begin to send BFD control packets to each other at the negotiated interval.
Benefits of Using BFD for Failure Detection
When you deploy any feature, it is important to consider all the alternatives and be aware of any trade-offs being made.
The closest alternative to BFD in conventional EIGRP, IS-IS, and OSPF deployments is the use of modified failure detection mechanisms for EIGRP, IS-IS, and OSPF routing protocols.
If you set EIGRP hello and hold timers to their absolute minimums, the failure detection rate for EIGRP falls to within a one- to two-second range.
If you use fast hellos for either IS-IS or OSPF, these Interior Gateway Protocol (IGP) protocols reduce their failure detection mechanisms to a minimum of one second.
There are several advantages to implementing BFD over reduced timer mechanisms for routing protocols:
- Although reducing the EIGRP, IS-IS, and OSPF timers can result in minimum detection timer of one to two seconds, BFD can provide failure detection in less than one second.
- Because BFD is not tied to any particular routing protocol, it can be used as a generic and consistent failure detection mechanism for EIGRP, IS-IS, and OSPF.
- Because some parts of BFD can be distributed to the data plane, it can be less CPU-intensive than the reduced EIGRP, IS-IS, and OSPF timers, which exist wholly at the control plane.
How to Configure Bidirectional Forwarding Detection
Configuring BFD Session Parameters on the Interface
The steps in this procedure show how to configure BFD on the interface by setting the baseline BFD session parameters on an interface. Repeat the steps in this procedure for each interface over which you want to run BFD sessions to BFD neighbors.
SUMMARY STEPS
1. enable
2. configure terminal
3. Perform one of the following steps:
- ip address ipv4-address mask
- ipv6 address ipv6-address/mask
4. bfd interval milliseconds min_rx milliseconds multiplier interval-multiplier
5. end
DETAILED STEPS
|
Command or Action |
Purpose |
Step 1 |
enable
Example:
|
Enables privileged EXEC mode.
- Enter your password if prompted.
|
Step 2 |
configure terminal
Example:
Device# configure terminal
|
Enters global configuration mode. |
Step 3 |
Perform one of the following steps:
- ip address ipv4-address mask
- ipv6 address ipv6-address/mask
Example:
Configuring an IPv4 address for the interface:
Device(config-if)# ip address 10.201.201.1 255.255.255.0
Configuring an IPv6 address for the interface:
Device(config-if)# ipv6 address 2001:db8:1:1::1/32
|
Configures an IP address for the interface. |
Step 4 |
bfd interval milliseconds min_rx milliseconds multiplierinterval-multiplier
Example:
Device(config-if)# bfd interval 50 min_rx 50 multiplier 5
|
Enables BFD on the interface.
The bfd interval configuration is removed when the subinterface on which it is configured is removed.
The bfd interval configuration is not removed when:
- an IPv4 address is removed from an interface
- an IPv6 address is removed from an interface
- IPv6 is disabled from an interface
- an interface is shutdown
- IPv4 CEF is disabled globally or locally on an interface
- IPv6 CEF is disabled globally or locally on an interface
|
Step 5 |
end
Example:
|
Exits interface configuration mode and returns to privileged EXEC mode. |
Configuring BFD Support for Dynamic Routing Protocols
You can enable BFD support for dynamic routing protocols at the router level to enable BFD support globally for all interfaces or you can configure BFD on a per-interface basis at the interface level.
For Cisco IOS Release 12.2(18)SXE, you may configure BFD support for one or more of the following routing protocols: EIGRP, IS-IS, and OSPF.
For Cisco IOS Releases 12.2(33)SRA, you may configure BFD support for one or more of the following routing protocols: EIGRP, IS-IS, and OSPF.
For Cisco IOS Releases 12.2(33)SRB, you may configure BFD support for one or more of the following routing protocols: BGP, EIGRP, IS-IS, and OSPF.
For Cisco IOS Release 12.2(33)SRC, you may configure BFD support for static routing.
For Cisco IOS Releases 12.0(31)S and 12.4(4)T, you may configure BFD support for one or more of the following routing protocols: BGP, IS-IS, and OSPF.
For Cisco IOS Release 12.0(32)S, for the Cisco 10720 platform, you may configure BFD for one or more of the following routing protocols: BGP, IS-IS, and OSPF.
For Cisco IOS Release 12.4(11)T, BFD support for HSRP was introduced.
This section describes the following procedures:
Configuring BFD Support for Static Routing
Perform this task to configure BFD support for static routing. Repeat the steps in this procedure on each BFD neighbor. For more information, see the “Example: Configuring BFD Support for Static Routing” section.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. Perform one of the following steps:
- ip address ipv4-address mask
- ipv6 address ipv6-address/mask
5. bfd interval milliseconds mix_rx milliseconds multiplier interval-multiplier
6. exit
7. ip route static bfd interface-type interface-number ip-address [group group-name [passive]]
8. ip route [vrf vrf-name] prefix mask {ip-address | interface-type interface-number [ip-address]} [dhcp] [distance][name next-hop-name] [permanent | track number] [tag tag]
9. exit
10. show ip static route
11. show ip static route bfd
12. exit
DETAILED STEPS
|
Command or Action |
Purpose |
Step 1 |
enable
Example:
|
Enables privileged EXEC mode.
- Enter your password if prompted.
|
Step 2 |
configure terminal
Example:
Device# configure terminal
|
Enters global configuration mode. |
Step 3 |
interface type number
Example:
Device(config)# interface serial 2/0
|
Configures an interface and enters interface configuration mode. |
Step 4 |
Perform one of the following steps:
- ip address ipv4-address mask
- ipv6 address ipv6-address/mask
Example:
Configuring an IPv4 address for the interface:
Device(config-if)# ip address 10.201.201.1 255.255.255.0
Configuring an IPv6 address for the interface:
Device(config-if)# ipv6 address 2001:db8:1:1::1/32
|
Configures an IP address for the interface. |
Step 5 |
bfd interval milliseconds mix_rx milliseconds multiplier interval-multiplier
Example:
Device(config-if)# bfd interval 500 min_rx 500 multiplier 5
|
Enables BFD on the interface.
The bfd interval configuration is removed when the subinterface on which it is configured is removed.
The bfd interval configuration is not removed when:
- an IPv4 address is removed from an interface
- an IPv6 address is removed from an interface
- IPv6 is disabled from an interface
- an interface is shutdown
- IPv4 CEF is disabled globally or locally on an interface
- IPv6 CEF is disabled globally or locally on an interface
|
Step 6 |
exit
Example:
|
Exits interface configuration mode and returns to global configuration mode. |
Step 7 |
ip route static bfd interface-type interface-number ip-address [group group-name[passive]]
Example:
Device(config)# ip route static bfd serial 2/0 10.1.1.1 group group1 passive
|
Specifies a static route BFD neighbor.
- The interface-type,interface-number, and ip-addressarguments are required because BFD support exists only for directly connected neighbors.
|
Step 8 |
ip route [vrf vrf-name] prefix mask {ip-address | interface-type interface-number [ip-address]} [dhcp] [distance] [name next-hop-name] [permanent | track number] [tagtag]
Example:
Device(config)# ip route 10.0.0.0 255.0.0.0
|
Specifies a static route BFD neighbor. |
Step 9 |
exit
Example:
|
Exits global configuration mode and returns to privileged EXEC mode. |
Step 10 |
show ip static route
Example:
Device# show ip static route
|
(Optional) Displays static route database information. |
Step 11 |
show ip static route bfd
Example:
Device# show ip static route bfd
|
(Optional) Displays information about the static BFD configuration from the configured BFD groups and nongroup entries. |
Step 12 |
exit
Example:
|
Exits privileged EXEC mode and returns to user EXEC mode. |