Cisco IOS XR Interface and Hardware Component Configuration Guide for the Cisco XR 12000 Series Router
Configuring Bidirectional Forwarding Detection on Cisco IOS XR Software
Downloads: This chapterpdf (PDF - 509.0KB) The complete bookPDF (PDF - 5.76MB) | Feedback

Configuring Bidirectional Forwarding Detection on Cisco IOS XR Software

Table Of Contents

Configuring Bidirectional Forwarding Detection on Cisco IOS XR Software

Contents

Prerequisites for Configuring BFD

Restrictions for Configuring BFD

Information About BFD

Differences in BFD in Cisco IOS XR Software and Cisco IOS Software

BFD Modes of Operation

BFD Packet Information

BFD Source and Destination Ports

BFD Packet Intervals and Failure Detection

Priority Settings for BFD Packets

BFD for IPv4

How to Configure BFD

BFD Configuration Guidelines

If you are using BFD with Unicast Reverse Path Forwarding (uRPF) on a particular interface, then you need to use the echo disable command to disable echo mode on that interface; otherwise, echo packets will be rejected. For more information, see the "Disabling Echo Mode" section.

To enable or disable IPv4 uRPF checking on an IPv4 interface, use the [no] ipv4 verify unicast source reachable-via command in interface configuration mode.

Configuring BFD Under a Dynamic Routing Protocol or Using a Static Route

Enabling BFD on a BGP Neighbor

Enabling BFD for OSPF on an Interface

Enabling BFD on a Static Route

Enabling Echo Mode to Test the Forwarding Path to a BFD Peer

BFD Dampening

Overriding the Default Echo Packet Source Address

Specifying the Echo Packet Source Address Globally for BFD

Specifying the Echo Packet Source Address on an Individual Interface or Bundle

Configuring BFD Session Teardown Based on Echo Latency Detection

Prerequisites

Restrictions

Delaying BFD Session Startup Until Verification of Echo Path and Latency

Prerequisites

Restrictions

Disabling Echo Mode

Disabling Echo Mode on a Router

Disabling Echo Mode on an Individual Interface

Minimizing BFD Session Flapping Using BFD Dampening

Clearing and Displaying BFD Counters

Configuration Examples for Configuring BFD

BFD Over BGP: Example

BFD Over OSPF: Example

BFD Over Static Routes: Example

000000000000000000000000 Echo Packet Source Address: Examples

Echo Latency Detection: Examples

Echo Startup Validation: Examples

BFD Echo Mode Disable: Examples

BFD Dampening: Examples

BFD Peers on Routers Running Cisco IOS and Cisco IOS XR Software: Example

Where to Go Next

Additional References

Related Documents

Standards

RFCs

MIBs

Technical Assistance


Configuring Bidirectional Forwarding Detection on Cisco IOS XR Software


This module describes the configuration of bidirectional forwarding detection (BFD) on the Cisco XR 12000 Series Router.

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.

Feature History for Configuring Bidirectional Forwarding Detection on Cisco IOS XR Software

Release
Modification

Release 3.3.1

BFD was introduced on the Cisco XR 12000 Series Router.

Release 3.3.2

The echo disable command was added to enable users to disable echo mode on routers or interfaces where BFD is used in conjunction with Unicast Reverse Path Forwarding (uRPF).

A new BFD configuration mode was added, under which users can disable echo mode. The bfd command was added to allow users to enter the new BFD configuration mode.

Release 3.8.0

BFD MIB support was added on the Cisco XR 12000 Series Router.

Release 3.9.0

Support for the following applications with BFD was added:

Hot Standby Router Protocol (HSRP)

Virtual Router Redundancy Protocol (VRRP)

The dampening command was added to minimize BFD session flapping and delay session startup.

The echo ipv4 source command was added to specify a source IP address and override the default.

Release 4.0.1

Support for the following BFD features was added:

The echo latency detect command was added to enable latency detection for BFD echo packets on non-bundle interfaces.

The echo startup validate command was added to verify the echo path before starting a BFD session on non-bundle interfaces.


Contents

Prerequisites for Configuring BFD

Restrictions for Configuring BFD

Information About BFD

How to Configure BFD

Configuration Examples for Configuring BFD

Where to Go Next

Additional References

Prerequisites for Configuring BFD

You must be in a user group associated with a task group that includes the proper task IDs. The command reference guides include the task IDs required for each command. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The following prerequisites are required to implement BFD:

If enabling BFD on Multiprotocol Label Switching (MPLS), an installed composite PIE file including the MPLS package, or a composite-package image is required. For Border Gateway Protocol (BGP), Intermediate System-to-Intermediate System (IS-IS), Static, and Open Shortest Path First (OSPF), an installed Cisco IOS XR IP Unicast Routing Core Bundle image is required.

Interior Gateway Protocol (IGP) is activated on the router if you are using IS-IS or OSPF.

On the Cisco XR 12000 Series Router platform, each line card supporting BFD must be able to perform the following tasks:

Send echo packets every 50 ms (under normal conditions)

Send control packets every 250 ms (under normal conditions)

Send and receive more than 1000 User Datagram Protocol (UDP) pps on the 12000 Series platform. This sustains 50 sessions at a 50-ms echo interval.

To enable BFD for a neighbor, the neighbor router must support BFD.

In Cisco IOS XR releases before 3.9.0, we recommended that you configure the local router ID with the router-id command in global configuration mode prior to setting up a BFD session. If you did not configure the local router ID, then by default the source address of the IP packet for BFD echo mode is the IP address of the output interface. Beginning in Cisco IOS XR release 3.9.0 and later, you can use the echo ipv4 source command to specify the IP address that you want to use as the source address.

Restrictions for Configuring BFD

The following restrictions apply to BFD:

Demand mode is not supported in Cisco IOS XR software.

BFD echo mode is not supported for the following applications:

BFD for IPv4 on bundled VLANs.

BFD with uRPF (IPv4)

Rack reload and online insertion and removal (OIR) when a BFD bundle interface has member links that span multiple racks.

BFD for IPv6 is not supported in software releases before Cisco IOS XR 4.1.

Echo latency detection and echo validation are not supported on bundle interfaces.

Information About BFD

To configure BFD, you should understand the following concepts:

Differences in BFD in Cisco IOS XR Software and Cisco IOS Software

BFD Modes of Operation

BFD Packet Information

BFD for IPv4

Differences in BFD in Cisco IOS XR Software and Cisco IOS Software

If you are already familiar with BFD configuration in Cisco IOS software, be sure to consider the following differences in BFD configuration in the Cisco IOS XR software implementation:

In Cisco IOS XR software, BFD is an application that is configured under a dynamic routing protocol, such as an OSPF or BGP instance. This is not the case for BFD in Cisco IOS software, where BFD is only configured on an interface.

In Cisco IOS XR software, a BFD neighbor is established through routing. The Cisco IOS bfd neighbor interface configuration command is not supported in Cisco IOS XR software.

Instead of using a dynamic routing protocol to establish a BFD neighbor, you can establish a specific BFD peer or neighbor for BFD responses in Cisco IOS XR software using a method of static routing to define that path. In fact, you must configure a static route for BFD if you do not configure BFD under a dynamic routing protocol in Cisco IOS XR software. For more information, see the "Enabling BFD on a Static Route" section.

A router running BFD in Cisco IOS software can designate a router running BFD in Cisco IOS XR software as its peer using the bfd neighbor command; the Cisco IOS XR router must use dynamic routing or a static route back to the Cisco IOS router to establish the peer relationship. See the "BFD Peers on Routers Running Cisco IOS and Cisco IOS XR Software: Example" section.

BFD Modes of Operation

Cisco IOS XR software supports the asynchronous mode of operation only, with or without using echo packets. Asynchronous mode without echo will engage various pieces of packet switching paths on local and remote systems. However, asynchronous mode with echo is usually known to provide slightly wider test coverage as echo packets are self-destined packets which traverse same packet switching paths as normal traffic on the remote system.

BFD echo mode is enabled by default for the following interfaces:

For IPv4 on member links of BFD bundle interfaces.

For IPv4 on other physical interfaces whose minimum interval is less than two seconds.

When BFD is running asynchronously without echo packets (Figure 1), the following occurs:

Each system periodically sends BFD control packets to one another. Packets sent by BFD router "Peer A" to BFD router "Peer B" have a source address from Peer A and a destination address for Peer B.

Control packet streams are independent of each other and do not work in a request/response model.

If a number of packets in a row are not received by the other system, the session is declared down.

Figure 1 BFD Asynchronous Mode Without Echo Packets

When BFD is running asynchronously with echo packets (Figure 2), the following occurs:

BFD echo packets are looped back through the forwarding path only of the BFD peer and are not processed by any protocol stack. So, packets sent by BFD router "Peer A" can be sent with both the source and destination address of Peer A.

BFD echo packets are sent in addition to BFD control packets.

Figure 2 BFD Asynchronous Mode With Echo Packets

For more information about control and echo packet intervals in asynchronous mode, see the "BFD Packet Intervals and Failure Detection" section.

BFD Packet Information

This section includes the following topics:

BFD Source and Destination Ports

BFD Packet Intervals and Failure Detection

Priority Settings for BFD Packets

BFD Source and Destination Ports

BFD payload control packets are encapsulated in UDP packets, using destination port 3784 and source port 49152. Even on shared media, like Ethernet, BFD control packets are always sent as unicast packets to the BFD peer.

Echo packets are encapsulated in UDP packets, as well, using destination port 3785 and source port 3785.

The BFD over bundle member feature increments each byte of the UDP source port on echo packets with each transmission. UDP source port ranges from 0xC0C0 to 0xFFFF. For example:

1st echo packet: 0xC0C0

2nd echo packet: 0xC1C1

3rd echo packet: 0xC2C2

The UDP source port is incremented so that sequential echo packets are hashed to deviating bundle member.

BFD Packet Intervals and Failure Detection

BFD uses configurable intervals and multipliers to specify the periods at which control and echo packets are sent in asynchronous mode and their corresponding failure detection.

When BFD is running over physical interfaces, echo mode is used only if the configured interval is less than two seconds.

BFD sessions running over physical interfaces when echo mode is enabled send BFD control packets at a slow rate of every two seconds. There is no need to duplicate control packet failure detection at a fast rate because BFD echo packets are already being sent at fast rates and link failures will be detected when echo packets are not received within the echo failure detection time.

Control Packet Failure Detection In Asynchronous Mode

Control packet failure is detected using the values of the minimum interval (bfd minimum-interval) and multiplier (bfd multiplier) commands.

For control packet failure detection, the local multiplier value is sent to the neighbor. A failure detection timer is started based on (I x M), where I is the negotiated interval, and M is the multiplier provided by the remote end.

Whenever a valid control packet is received from the neighbor, the failure detection timer is reset. If a valid control packet is not received from the neighbor within the time period (I x M), then the failure detection timer is triggered, and the neighbor is declared down.

Echo Packet Failure Detection In Asynchronous Mode

The standard echo failure detection scheme on all BFD interfaces is done through a counter that is based on the value of the bfd multiplier command.

This counter is incremented each time the system sends an echo packet, and is reset to zero whenever any echo packet is received, regardless of the order that the packet was sent in the echo packet stream.

Under ideal conditions, this means that BFD generally detects echo failures that exceed the period of time (I x M), where:

I—Value of the minimum interval (bfd minimum-interval for non-bundle interfaces).

M—Value of the multiplier (bfd multiplier for non-bundle interfaces) commands.

So, if the system transmits one additional echo packet beyond the multiplier count without receipt of any echo packets, echo failure is detected and the neighbor is declared down (See Example 2).

However, this standard echo failure detection does not address latency between transmission and receipt of any specific echo packet, which can build beyond (I x M) over the course of the BFD session. In this case, BFD will not declare a neighbor down as long as any echo packet continues to be received within the multiplier window and resets the counter to zero. Beginning in Cisco IOS XR 4.0.1, you can configure BFD to measure this latency for non-bundle interfaces. For more information, see Example 3 and the "Echo Packet Latency" section.

Echo Failure Detection Examples

This section provides examples of several scenarios of standard echo packet processing and failure detection without configuration of latency detection for non-bundle interfaces. In these examples, consider an interval of 50 ms and a multiplier of 3.

Example 1

The following example shows an ideal case where each echo packet is returned before the next echo is transmitted. In this case, the counter increments to 1 and is returned to 0 before the next echo is sent and no echo failure occurs. As long as the roundtip delay for echo packets in the session is less than the minimum interval, this scenario occurs:

Time (T): Echo#1 TX (count = 1)
T + 1 ms: Echo#1 RX (count = 0)
T + 50 ms: Echo#2 TX (count = 1)
T + 51 ms: Echo#2 RX (count = 0)
T + 100 ms: Echo#3 TX (count = 1)
T + 101 ms: Echo#3 RX (count = 0)
T + 150 ms: Echo#4 TX (count = 1)
T + 151 ms: Echo#4 RX (count = 0)

Example 2

The following example shows the absence in return of any echo packets. After the transmission of the fourth echo packet, the counter exceeds the multiplier value of 3 and echo failure is detected. In this case, echo failure detection occurs at the 150 ms (I x M) window:

Time (T): Echo#1 TX (count = 1)
T + 50 ms: Echo#2 TX (count = 2)
T + 100 ms: Echo#3 TX (count = 3)
T + 150 ms: Echo#4 TX (count = 4 -> echo failure

Example 3

The following example shows an example of how roundtrip latency can build beyond (I x M) for any 
particular echo packet over the course of a BFD session using the standard echo failure detection, but 
latency between return of echo packets overall in the session never exceeds the (I x M) window and 
the counter never exceeds the multiplier, so the neighbor is not declared down. 

Note You can configure BFD to detect roundtrip latency on non-bundle interfaces using the echo latency detect command beginning in Cisco IOS XR 4.0.1.


Time (T): Echo#1 TX (count = 1)
T + 1 ms: Echo#1 RX (count = 0)
T + 50 ms: Echo#2 TX (count = 1)
T + 51 ms: Echo#2 RX (count = 0)
T + 100 ms: Echo#3 TX (count = 1)
T + 150 ms: Echo#4 TX (count = 2)
T + 151 ms: Echo#3 RX (count = 0; ~50 ms roundtrip latency)
T + 200 ms: Echo#5 TX (count = 1)
T + 250 ms: Echo#6 TX (count = 2)
T + 251 ms: Echo#4 RX (count = 0; ~100 ms roundtrip latency)
T + 300 ms: Echo#7 TX (count = 1)
T + 350 ms: Echo#8 TX (count = 2)
T + 351 ms: Echo#5 RX (count = 0; ~150 ms roundtrip latency)
T + 451 ms: Echo#6 RX (count = 0; ~200 ms roundtrip latency; no failure detection)
T + 501 ms: Echo#7 RX (count = 0; ~200 ms roundtrip latency; no failure detection)
T + 551 ms: Echo#8 RX (count = 0; ~200 ms roundtrip latency; no failure detection)
 
   

Looking at the delay between receipt of echo packets for the BFD session, observe that no latency is beyond the (I x M) window:

Echo#1 RX - Echo#2 RX: 50 ms
Echo#2 RX - Echo#3 RX: 100ms
Echo#3 RX - Echo#4 RX: 100ms
Echo#4 RX - Echo#5 RX: 100ms
Echo#5 RX - Echo#6 RX: 100ms
Echo#6 RX - Echo#7 RX: 50ms
Echo#7 RX - Echo#8 RX: 50ms

Echo Packet Latency

In Cisco IOS XR software releases prior to Cisco IOS XR 4.0.1, BFD only detects an absence of receipt of echo packets, not a specific delay for TX/RX of a particular echo packet. In some cases, receipt of BFD echo packets in general can be within their overall tolerances for failure detection and packet transmission, but a longer delay might develop over a period of time for any particular roundtrip of an echo packet (See Example 3).

Beginning in Cisco IOS XR 4.0.1, you can configure the router to detect the actual latency between transmitted and received echo packets on non-bundle interfaces and also take down the session when the latency exceeds configured thresholds for that roundtrip latency. For more information, see the "Configuring BFD Session Teardown Based on Echo Latency Detection" section.

In addition, you can verify that the echo packet path is within specified latency tolerances before starting a BFD session. With echo startup validation, an echo packet is periodically transmitted on the link while it is down to verify successful transmission within the configured latency before allowing the BFD session to change state. For more information, see the "Delaying BFD Session Startup Until Verification of Echo Path and Latency" section.

Priority Settings for BFD Packets

For all interfaces under over-subscription, the internal priority needs to be assigned to remote BFD Echo packets, so that these BFD packets are not overwhelmed by other data packets. In addition, CoS values need to be set appropriately, so that in the event of an intermediate switch, the reply back of remote BFD Echo packets are protected from all other packets in the switch.

As configured CoS values in ethernet headers may not be retained in Echo messages, CoS values must be explicitly configured in the appropriate egress QoS service policy. CoS values for BFD packets attached to a traffic class can be set using the set cos command. For more information on configuring class-based unconditional packet marking, see "Configuring Modular QoS Packet Classification" in the Cisco IOS XR Modular Quality of Service Configuration Guide for the Cisco XR 12000 Series Router.

BFD for IPv4

Cisco IOS XR software supports bidirectional forwarding detection (BFD) for IPv4.

In BFD for IPv4 single-hop connectivity, Cisco IOS XR software supports both asynchronous mode and echo mode over physical numbered Packet-over-SONET/SDH (POS) and Gigabit Ethernet links, as follows:

Echo mode is initiated only after a session is established using BFD control packets. Echo mode is always enabled for BFD bundle member interfaces. For physical interfaces, the BFD minimum interval must also be less than two seconds to support echo packets.

BFD echo packets are transmitted over UDP/IPv4 using source and destination port 3785. The source address of the IP packet is the IP address of the output interface (default) or the address specified in the echo ipv4 source command, and the destination address is the local interface address.

BFD asynchronous packets are transmitted over UDP and IPv4 using source port 49152 and destination port 3784. For asynchronous mode, the source address of the IP packet is the local interface address, and the destination address is the remote interface address.

Consider the following guidelines when configuring BFD on Cisco IOS XR software:

BFD is a fixed-length hello protocol, in which each end of a connection transmits packets periodically over a forwarding path. Cisco IOS XR software supports BFD adaptive detection times.

BFD can be used with the following applications:

BGP

IS-IS

OSPF

MPLS Traffic Engineering (MPLS-TE)

Static routes (IPv4)

Protocol Independent Multicast (PIM)

Hot Standby Router Protocol (HSRP)

Virtual Router Redundancy Protocol (VRRP)


Note When multiple applications share the same BFD session, the application with the most aggressive timer wins locally. Then, the result is negotiated with the peer router.


BFD is supported for connections over the following interface types:

Gigabit Ethernet (GigE)

Ten Gigabit Ethernet (TenGigE)

Packet-over-SONET/SDH (POS)

Serial

Virtual LAN (VLAN)

Cisco IOS XR software supports BFD Version 0 and Version 1. BFD sessions are established using either version, depending upon the neighbor. BFD Version 1 is the default version and is tried initially for session creation.

BFD is supported on IPv4 directly connected external BGP peers.

How to Configure BFD

This section includes the following procedures:

BFD Configuration Guidelines (required)

If you are using BFD with Unicast Reverse Path Forwarding (uRPF) on a particular interface, then you need to use the echo disable command to disable echo mode on that interface; otherwise, echo packets will be rejected. For more information, see the "Disabling Echo Mode" section. To enable or disable IPv4 uRPF checking on an IPv4 interface, use the [no] ipv4 verify unicast source reachable-via command in interface configuration mode. (required)

Enabling Echo Mode to Test the Forwarding Path to a BFD Peer (optional)

BFD Dampening (optional)

Configuring BFD Session Teardown Based on Echo Latency Detection (optional)

Delaying BFD Session Startup Until Verification of Echo Path and Latency (optional)

Minimizing BFD Session Flapping Using BFD Dampening (optional)

Disabling Echo Mode (optional)

Clearing and Displaying BFD Counters (optional)

BFD Configuration Guidelines

Before you configure BFD, consider the following guidelines:

FRR/TE using BFD is supported on POS interfaces and Ethernet interfaces.

To establish a BFD neighbor in Cisco IOS XR software, BFD must either be configured under a dynamic routing protocol, or using a static route.

The maximum rate in packets-per-second (pps) for BFD sessions is linecard-dependent. If you have multiple linecards supporting BFD, then the maximum rate for BFD sessions per system is the supported linecard rate multiplied by the number of linecards.

The maximum rate for BFD sessions per linecard is 1334 pps.

The maximum number of BFD sessions supported on any one card is 1024.

When using BFD with OSPF, consider the following guidelines:

BFD establishes sessions from a neighbor to a designated router (DR) or backup DR (BDR) only when the neighbor state is full.

BFD does not establish sessions between DR-Other neighbors (for example, when their OSPF states are both 2-way).

To_enable_or_disable_IPv4_uRPF_checking_on_an_IPv4_interface,_use_the_[no]_ipv4_verify_unicast_source_reachable-via_command_in_interface_configuration_mode.">

If you are using BFD with Unicast Reverse Path Forwarding (uRPF) on a particular interface, then you need to use the echo disable command to disable echo mode on that interface; otherwise, echo packets will be rejected. For more information, see the "Disabling Echo Mode" section.

To enable or disable IPv4 uRPF checking on an IPv4 interface, use the
[no] ipv4 verify unicast source reachable-via command in interface configuration mode.

Configuring BFD Under a Dynamic Routing Protocol or Using a Static Route

To establish a BFD neighbor, complete at least one of the following procedures to configure BFD under a dynamic routing protocol or using a static route:

Enabling BFD on a BGP Neighbor

Enabling BFD for OSPF on an Interface

Enabling BFD on a Static Route

Enabling BFD on a BGP Neighbor

BFD can be enabled per neighbor, or per interface. This task describes how to enable BFD for BGP on a neighbor router. To enable BFD per interface, use the steps in the "Enabling BFD for OSPF on an Interface" section.


Note BFD neighbor router configuration is supported for BGP only.


SUMMARY STEPS

1. configure

2. router bgp autonomous-system-number

3. bfd minimum-interval milliseconds

4. bfd multiplier multiplier

5. neighbor ip-address

6. remote-as autonomous-system-number

7. bfd fast-detect

8. end
or
commit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

RP/0/0/CPU0:router# configure

Enters global configuration mode.

Step 2 

router bgp autonomous-system-number

Example:

RP/0/0/CPU0:router(config)# router bgp 120

Enters BGP configuration mode, allowing you to configure the BGP routing process.

Use the show bgp command in EXEC mode to obtain the autonomous-system-number for the current router.

Step 3 

bfd minimum-interval milliseconds

Example:

RP/0/0/CPU0:router(config-bgp)# bfd minimum-interval 6500

Sets the BFD minimum interval. Range is 15-30000 milliseconds.

Step 4 

bfd multiplier multiplier

Example:

RP/0/0/CPU0:router(config-bgp)# bfd multiplier 7

Sets the BFD multiplier.

Step 5 

neighbor ip-address

Example:

RP/0/0/CPU0:router(config-bgp)# neighbor 172.168.40.24

Places the router in neighbor configuration mode for BGP routing and configures the neighbor IP address as a BGP peer.

This example configures the IP address 172.168.40.24 as a BGP peer.

Step 6 

remote-as autonomous-system-number

Example:

RP/0/0/CPU0:router(config-bgp-nbr)# remote-as 2002

Creates a neighbor and assigns it a remote autonomous system.

This example configures the remote autonomous system to be 2002.

Step 7 

bfd fast-detect

Example:

RP/0/0/CPU0:router(config-bgp-nbr)# bfd fast-detect

Enables BFD between the local networking devices and the neighbor whose IP address you configured to be a BGP peer in Step 5.

In the example in Step 5, the IP address 172.168.40.24 was set up as the BGP peer. In this example, BFD is enabled between the local networking devices and the neighbor 172.168.40.24.

Step 8 

end

or

commit

Example:

RP/0/0/CPU0:router (config-bgp-nbr)# end

or

RP/0/0/CPU0:router(config-bgp-nbr)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them 
before 
exiting(yes/no/cancel)? 
[cancel]:
 
        

Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

Enabling BFD for OSPF on an Interface

The following procedures describe how to configure BFD for Open Shortest Path First (OSPF) on an interface. The steps in the procedure are common to the steps for configuring BFD on IS-IS and MPLS-TE; only the command mode differs.


Note BFD per interface configuration is supported for OSPF, IS-IS, and MPLS-TE only.


SUMMARY STEPS

1. configure

2. router ospf process-name

3. bfd minimum-interval milliseconds

4. bfd multiplier multiplier

5. area area-id

6. interface type interface-path-id

7. bfd fast-detect

8. end
or
commit

9. show run router ospf

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

RP/0/0/CPU0:router# configure

Enters global configuration mode.

Step 2 

router ospf process-name

Example:

RP/0/0/CPU0:router(config)# router ospf 0

Enters OSPF configuration mode, allowing you to configure the OSPF routing process.

Use the show ospf command in EXEC mode to obtain the process-name for the current router.

Note To configure BFD for IS-IS or MPLS-TE, enter the corresponding configuration mode. For example, for MPLS-TE, enter MPLS-TE configuration mode.

Step 3 

bfd minimum-interval milliseconds

Example:

RP/0/0/CPU0:router(config-ospf)# bfd minimum-interval 6500

Sets the BFD minimum interval. Range is 15-30000 milliseconds.

This example sets the BFD minimum interval to 6500 milliseconds.

Step 4 

bfd multiplier multiplier

Example:

RP/0/0/CPU0:router(config-ospf)# bfd multiplier 7

Sets the BFD multiplier.

This example sets the BFD multiplier to 7.

Step 5 

area area-id

Example:

RP/0/0/CPU0:router(config-ospf)# area 0

Configures an Open Shortest Path First (OSPF) area.

Replace area-id with the OSPF area identifier.

Step 6 

interface type interface-path-id
Example:
RP/0/0/CPU0:router(config-ospf-ar)# interface 
gigabitEthernet 0/3/0/1

Enters interface configuration mode and specifies the interface name and notation rack/slot/module/port.

The example indicates a Gigabit Ethernet interface in modular services card slot 3.

Step 7 

bfd fast-detect 
Example:
RP/0/0/CPU0:router(config-ospf-ar-if)# bfd 
fast-detect 

Enables BFD to detect failures in the path between adjacent forwarding engines.

Step 8 

end

or

commit

Example:

RP/0/0/CPU0:router (config-ospf-ar-if)# end

or

RP/0/0/CPU0:router(config-ospf-ar-if)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before 
exiting(yes/no/cancel)? 
[cancel]:
 
        

Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

Step 9 

show run router ospf

Example:

RP/0/0/CPU0:router (config-ospf-ar-if)# show run router ospf

Verify that BFD is enabled on the appropriate interface.

Enabling BFD on a Static Route

The following procedure describes how to enable BFD on a static route.

SUMMARY STEPS

1. configure

2. router static

3. address-family ipv4 unicast address nexthop bfd fast-detect [minimum interval interval] [multiplier multiplier]

4. vrf vrf-name

5. address-family ipv4 unicast address nexthop bfd fast-detect [minimum interval interval] [multiplier multiplier]

6. end
or
commit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

RP/0/0/CPU0:router# configure

Enters global configuration mode.

Step 2 

router static

Example:

RP/0/0/CPU0:router(config)# router static

Enters static route configuration mode, allowing you to configure static routing.

Step 3 

address-family ipv4 unicast address nexthop bfd fast-detect [minimum-interval interval] [multiplier multiplier]

Example:
RP/0/0/CPU0:router(config-static)# 
address-family ipv4 unicast 0.0.0.0/0 2.6.0.1 
bfd fast-detect minimum-interval 1000 
multiplier 5

Enables BFD fast-detection on the specified IPV4 unicast destination address prefix and on the forwarding next-hop address.

Note Include the optional minimum-interval keyword and argument to ensure that the next-hop is assigned with the same hello interval. Replace the interval argument with a number that specifies the interval in milliseconds. Range is from 10 through 10000.

Note Include the optional multiplier keyword argument to ensure that the next hop is assigned with the same detect multiplier. Replace the multiplier argument with a number that specifies the detect multiplier. Range is from 1 through 10.

Note

Step 4 

vrf vrf-name

Example:
RP/0/0/CPU0:router(config-static)# vrf vrf1

Specifies a VPN routing and forwarding (VRF) instance, and enters static route configuration mode for that VRF.

Step 5 

address-family ipv4 unicast address nexthop bfd fast-detect

Example:
RP/0/0/CPU0:router(config-static-vrf)# 
address-family ipv4 unicast 0.0.0.0/0 2.6.0.2 
bfd fast-detect

Enables BFD fast-detection on the specified IPV4 unicast destination address prefix and on the forwarding next-hop address.

Step 6 

end

or

commit

Example:

RP/0/0/CPU0:router (config-static-vrf)# end

or

RP/0/0/CPU0:router(config-static-vrf)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found. Commit them?

Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

Entering cancel leaves the user in the same command mode without committing the configuration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

Enabling Echo Mode to Test the Forwarding Path to a BFD Peer

BFD echo mode is enabled by default for the following interfaces:

For IPv4 on member links of BFD bundle interfaces.

For IPv4 on other physical interfaces whose minimum interval is less than two seconds.


Note If you have configured a BFD minimum interval greater than two seconds on a physical interface using the bfd minimum-interval command, then you will need to change the interval to be less than two seconds to support and enable echo mode. This does not apply to bundle member links, which always support echo mode.


BFD Dampening

By default, BFD dampening is applied to all sessions in the following manner.

If a session is brought down, then dampening is applied before a session is allowed to transition to initial/up states.

Length of time a session is dampened grows exponentially with continuous session flap.

If a session remains up for minimum two minutes, then the length of time a session dampens with the next session flap is reset to the initial dampening value.

BFD on bundle member applies dampening, only if the detected failure is specific to layer 3. BFD dampening is not invoked for L1 or L2 failures. BFD is started after Layer 1 and Layer 2 (LACP) is up to prevent a race condition and false triggers. BFD is notified to stop/ignore when L1 or L2 goes down and must be notified to start/resume when L1 or L2 recovers for a given/affected link/member.

BFD applies dampening till the session transitions from up to down state and the session is not removed. Whenever there is a failure detected at L1 or L2 , the bundle manager removes BFD session on a member.

When dampening is removed a syslog message `Exponential backoff dampening for BFD session has been cleared for specified BFD session. When/if same session gets created by application(s), only calculated initial wait time will be applied' is generated. If this is the desired behaviour, then dampening can be enabled by configuring the BFD configuration and by using the command bfd dampening bundle-member l3-failure-only.

For more information on bfd dampening, see "dampening (BFD)" in the Cisco IOS XR Interface and Hardware Component Command Reference for the Cisco XR 12000 Series Router.

Overriding the Default Echo Packet Source Address

If you do not specify an echo packet source address, then BFD uses the IP address of the output interface as the default source address for an echo packet.

In Cisco IOS XR releases before 3.9.0, we recommend that you configure the local router ID using the router-id command to change the default IP address for the echo packet source address to the adrdress specified as the router ID.

Beginning in Cisco IOS XR release 3.9.0 and later, you can use the echo ipv4 source command in BFD or interface BFD configuration mode to specify the IP address that you want to use as the echo packet source address.

You can override the default IP source address for echo packets for BFD on the entire router, or for a particular interface:

Specifying the Echo Packet Source Address Globally for BFD

Specifying the Echo Packet Source Address on an Individual Interface or Bundle

Specifying the Echo Packet Source Address Globally for BFD

To specify the echo packet source IP address globally for BFD on the router, complete the following steps:

SUMMARY STEPS

1. configure

2. bfd

3. echo ipv4 source ip-address

4. end
or
commit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

RP/0/0/CPU0:router# configure

Enters global configuration mode.

Step 2 

bfd

Example:

RP/0/0/CPU0:router(config)# bfd

Enters BFD configuration mode.

Step 3 

echo ipv4 source ip-address

Example:

RP/0/0/CPU0:router(config-bfd)# echo ipv4 source 10.10.10.1

Specifies an IPv4 address to be used as the source address in BFD echo packets, where ip-address is the 32-bit IP address in dotted-decimal format (A.B.C.D).

Step 4 

end

or

commit

Example:

RP/0/0/CPU0:router (config-bfd)# end

or

RP/0/0/CPU0:router(config-bfd)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before 
exiting(yes/no/cancel)? 
[cancel]:
 
        

Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

Specifying the Echo Packet Source Address on an Individual Interface or Bundle

To specify the echo packet source IP address on an individual BFD interface or bundle, complete the following steps:

SUMMARY STEPS

1. configure

2. bfd

3. interface type interface-path-id

4. echo ipv4 source ip-address

5. end
or
commit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

RP/0/0/CPU0:router# configure

Enters global configuration mode.

Step 2 

bfd

Example:

RP/0/0/CPU0:router(config)# bfd

Enters BFD configuration mode.

Step 3 

interface type interface-path-id

Example:

RP/0/0/CPU0:router(config-bfd)# interface gigabitEthernet 0/1/5/0

Enters BFD interface configuration mode for a specific interface. In BFD interface configuration mode, you can disable echo mode on an individual interface.

Step 4 

echo ipv4 source ip-address

Example:

RP/0/0/CPU0:router(config-bfd)# echo ipv4 source 10.10.10.1

Specifies an IPv4 address to be used as the source address in BFD echo packets, where ip-address is the 32-bit IP address in dotted-decimal format (A.B.C.D).

Step 5 

end

or

commit

Example:

RP/0/0/CPU0:router (config-bfd-if)# end

or

RP/0/0/CPU0:router(config-bfd-if)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before 
exiting(yes/no/cancel)? 
[cancel]:
 
        

Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

Configuring BFD Session Teardown Based on Echo Latency Detection

Beginning in Cisco IOS XR 4.0.1, you can configure BFD sessions on non-bundle interfaces to bring down a BFD session when it exceeds the configured echo latency tolerance.

To configure BFD session teardown using echo latency detection, complete the following steps.

Prerequisites

Before you enable echo latency detection, be sure that your BFD configuration supports echo mode.

Restrictions

Echo latency detection is not supported on bundle interfaces.

SUMMARY STEPS

1. configure

2. bfd

3. echo latency detect [percentage percent-value [count packet-count]

4. end
or
commit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

RP/0/0/CPU0:router# configure

Enters global configuration mode.

Step 2 

bfd

Example:

RP/0/0/CPU0:router(config)# bfd

Enters BFD configuration mode.

Step 3 

echo latency detect [percentage percent-value [count packet-count]

Example:

RP/0/0/CPU0:router(config-bfd)# echo latency detect

Enables echo packet latency detection over the course of a BFD session, where:

percentage percent-value—Specifies the percentage of the echo failure detection time to be detected as bad latency. The range is 100 to 250. The default is 100.

count packet-count—Specifies a number of consecutive packets received with bad latency that will take down a BFD session. The range is 1 to 10. The default is 1.

Step 4 

end

or

commit

Example:

RP/0/0/CPU0:router (config-bfd)# end

or

RP/0/0/CPU0:router(config-bfd)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before 
exiting(yes/no/cancel)? 
[cancel]:
 
        

Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

Delaying BFD Session Startup Until Verification of Echo Path and Latency

Beginning in Cisco IOS XR Release 4.0.1, you can verify that the echo packet path is working and within configured latency thresholds before starting a BFD session on non-bundle interfaces.

To configure BFD echo startup validation, complete the following steps.

Prerequisites

Before you enable echo startup validation, be sure that your BFD configuration supports echo mode.

Restrictions

Echo startup validation is not supported on bundle interfaces.

SUMMARY STEPS

1. configure

2. bfd

3. echo startup validate [force]

4. end
or
commit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

RP/0/0/CPU0:router# configure

Enters global configuration mode.

Step 2 

bfd

Example:

RP/0/0/CPU0:router(config)# bfd

Enters BFD configuration mode.

Step 3 

echo startup validate [force]

Example:

RP/0/0/CPU0:router(config-bfd)# echo startup validate

Enables verification of the echo packet path before starting a BFD session, where an echo packet is periodically transmitted on the link to verify successful transmission within the configured latency before allowing the BFD session to change state.

When the force keyword is not configured, the local system performs echo startup validation if the following conditions are true:

The local router is capable of running echo (echo is enabled for this session).

The remote router is capable of running echo (received control packet from remote system has non-zero "Required Min Echo RX Interval" value).

When the force keyword is configured, the local system performs echo startup validation if following conditions are true.

The local router is capable of running echo (echo is enabled for this session).

The remote router echo capability is not considered (received control packet from remote system has zero or non-zero "Required Min Echo RX Interval" value).

Step 4 

end

or

commit

Example:

RP/0/0/CPU0:router (config-bfd)# end

or

RP/0/0/CPU0:router(config-bfd)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before 
exiting(yes/no/cancel)? 
[cancel]:
 
        

Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

Disabling Echo Mode

BFD does not support asynchronous operation in echo mode in certain environments. Echo mode should be disabled when using BFD for the following applications or conditions:

BFD for IPv4 on bundled VLANs.

BFD with uRPF (IPv4)

To support rack reload and online insertion and removal (OIR) when a BFD bundle interface has member links that span multiple racks.


Note BFD echo mode is automatically disabled for BFD on physical interfaces when the minimum interval is greater than two seconds. The minimum interval does not affect echo mode on BFD bundle member links.


You can disable echo mode for BFD on the entire router, or for a particular interface:

Disabling Echo Mode on a Router

Disabling Echo Mode on an Individual Interface

Disabling Echo Mode on a Router

To disable echo mode globally on the router complete the following steps:

SUMMARY STEPS

1. configure

2. bfd

3. echo disable

4. end
or
commit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

RP/0/0/CPU0:router# configure

Enters global configuration mode.

Step 2 

bfd

Example:

RP/0/0/CPU0:router(config)# bfd

Enters BFD configuration mode.

Step 3 

echo ipv4 source ip-address

Example:

RP/0/0/CPU0:router(config-bfd)# echo ipv4 source 10.10.10.1

Specifies an IPv4 address to be used as the source address in BFD echo packets, where ip-address is the 32-bit IP address in dotted-decimal format (A.B.C.D).

Step 4 

end

or

commit

Example:

RP/0/0/CPU0:router (config-bfd)# end

or

RP/0/0/CPU0:router(config-bfd)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before 
exiting(yes/no/cancel)? 
[cancel]:
 
        

Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

Disabling Echo Mode on an Individual Interface

The following procedures describe how to disable echo mode on an interface .

SUMMARY STEPS

1. configure

2. bfd

3. interface type interface-path-id

4. echo disable

5. end
or
commit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

RP/0/0/CPU0:router# configure

Enters global configuration mode.

Step 2 

bfd

Example:

RP/0/0/CPU0:router(config)# bfd

Enters BFD configuration mode.

Step 3 

interface type interface-path-id

Example:

RP/0/0/CPU0:router(config-bfd)# interface gigabitEthernet 0/1/5/0

Enters BFD interface configuration mode for a specific interface or bundle. In BFD interface configuration mode, you can disable echo mode on an individual interface or bundle.

Step 4 

echo disable

Example:

RP/0/0/CPU0:router(config-bfd-if)# echo disable

Disables echo mode on the router.

Step 5 

end

or

commit

Example:

RP/0/0/CPU0:router (config-bfd-if)# end

or

RP/0/0/CPU0:router(config-bfd-if)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before 
exiting(yes/no/cancel)? 
[cancel]:
 
        

Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

Minimizing BFD Session Flapping Using BFD Dampening

To configure BFD dampening to control BFD session flapping, complete the following steps.

SUMMARY STEPS

1. configure

2. bfd

3. dampening [bundle-member]{initial-wait | maximum-wait | secondary-wait} milliseconds

4. end
or
commit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

RP/0/0/CPU0:router# configure

Enters global configuration mode.

Step 2 

bfd

Example:

RP/0/0/CPU0:router(config)# bfd

Enters BFD configuration mode.

Step 3 

dampening [bundle-member]{initial-wait | maximum-wait | secondary-wait} milliseconds

Example:

RP/0/0/CPU0:router(config-bfd)# dampening initial-wait 30000

Specifies delays in milliseconds for BFD session startup to control flapping.

Note The value for maximum-wait should be greater than the value for initial-wait.

Step 4 

end

or

commit

Example:

RP/0/0/CPU0:router (config-bfd)# end

or

RP/0/0/CPU0:router(config-bfd)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before 
exiting(yes/no/cancel)? 
[cancel]:
 
        

Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

Clearing and Displaying BFD Counters

The following procedure describes how to display and clear BFD packet counters. You can clear packet counters for BFD sessions that are hosted on a specific node or on a specific interface.

SUMMARY STEPS

1. show bfd counters packet [interface type interface-path-id] location node-id

2. clear bfd counters packet [interface type interface-path-id] location node-id

3. show bfd counters packet [interface type interface-path-id] location node-id

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

show bfd counters [ipv4 | all] packet [interface type interface-path-id] location node-id

Example:

RP/0/0/CPU0:router# show bfd counters all packet location 0/3/cpu0

Displays the BFD counters for IPv4 packets or all packets.

Step 2 

clear bfd counters [ipv4 | all] packet [interface type interface-path-id] location node-id

Example:

RP/0/0/CPU0:router# clear bfd counters all packet interface POS 0/5/0/1 location 0/5/cpu0

Clears the BFD counters for IPv4 packets, or all packets.

Step 3 

show bfd counters [ipv4 | all] packet [interface type interface-path-id] location node-id

Example:

RP/0/0/CPU0:router# show bfd counters all packet location 0/3/cpu0

Verifies that the BFD counters for IPv4 packets or all packets have been cleared.

Configuration Examples for Configuring BFD

This section includes the following BFD configuration examples:

BFD Over BGP: Example

BFD Over OSPF: Example

BFD Over Static Routes: Example

000000000000000000000000 Echo Packet Source Address: Examples

Echo Latency Detection: Examples

Echo Startup Validation: Examples

BFD Echo Mode Disable: Examples

BFD Dampening: Examples

BFD Peers on Routers Running Cisco IOS and Cisco IOS XR Software: Example

BFD Over BGP: Example

The following example shows how to configure BFD between autonomous system 65000 and neighbor 192.168.70.24:

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# router bgp 65000
RP/0/0/CPU0:router(config-bgp)# bfd multiplier 2
RP/0/0/CPU0:router(config-bgp)# bfd minimum-interval 20
RP/0/0/CPU0:router(config-bgp)# neighbor 192.168.70.24
RP/0/0/CPU0:router(config-bgp-nbr)# remote-as 2
RP/0/0/CPU0:router(config-bgp-nbr)# bfd fast-detect

BFD Over OSPF: Example

The following example shows how to enable BFD for OSPF on a Gigabit Ethernet interface:

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# router ospf 0
RP/0/0/CPU0:router(config-ospf)# area 0
RP/0/0/CPU0:router(config-ospf-ar)# interface gigabitEthernet 0/3/0/1
RP/0/0/CPU0:router(config-ospf-ar-if)# bfd fast-detect 
RP/0/0/CPU0:router(config-ospf-ar-if)# commit
 
   
RP/0/0/CPU0:Dec 2 07:06:48.508 : config[65685]: %MGBL-LIBTARCFG-6-COMMIT : Configuration 
committed by user 'xxx'. Use 'show configuration commit changes 1000001134' to view the 
changes. 
 
   
RP/0/0/CPU0:router(config-ospf-ar-if)# end
 
   
RP/0/0/CPU0:Dec 2 07:06:48.848 : config[65685]: %MGBL-SYS-5-CONFIG_I : Configured from 
console by lab 
 
   
RP/0/0/CPU0:router# show run router ospf
 
   
router ospf 0
area 0
interface GigabitEthernet0/3/0/1
bfd fast-detect

BFD Over Static Routes: Example

The following example shows how to enable BFD on an IPv4 static route. In this example, BFD sessions are established with the next-hop 10.3.3.3 when it becomes reachable.

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# router static
RP/0/0/CPU0:router(config-static)# address-family ipv4 unicast 10.2.2.0/24 10.3.3.3 
RP/0/0/CPU0:router(config-static)# bfd fast-detect
RP/0/0/CPU0:router(config-static)# end

000000000000000000000000 Echo Packet Source Address: Examples

The following example shows how to specify the IP address 10.10.10.1 as the source address for BFD echo packets for all BFD sessions on the router:

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# bfd

RP/0/0/CPU0:router(config-bfd)# echo ipv4 source 10.10.10.1

The following example shows how to specify the IP address 10.10.10.1 as the source address for BFD echo packets on an individual Gigabit Ethernet interface:

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# bfd
RP/0/0/CPU0:router(config-bfd)# interface gigabitethernet 0/1/0/0

RP/0/0/CPU0:router(config-bfd-if)# echo ipv4 source 10.10.10.1

 
   

The following example shows how to specify the IP address 10.10.10.1 as the source address for BFD echo packets on an individual Packet-over-SONET (POS) interface:

RP/0/0/CPU0:router # configure
RP/0/0/CPU0:router(config)# bfd
RP/0/0/CPU0:router(config-bfd)# interface pos 0/1/0/0

RP/0/0/CPU0:router(config-bfd-if)# echo ipv4 source 10.10.10.1

Echo Latency Detection: Examples

In the following examples, consider that the BFD minimum interval is 50 ms, and the multiplier is 3 for the BFD session.

The following example shows how to enable echo latency detection using the default values of 100% of the echo failure period (I x M) for a packet count of 1. In this example, when one echo packet is detected with a roundtrip delay greater than 150 ms, the session is taken down:

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# bfd

RP/0/0/CPU0:router(config-bfd)# echo latency detect

The following example shows how to enable echo latency detection based on 200% (two times) of the echo failure period for a packet count of 1. In this example, when one packet is detected with a roundtrip delay greater than 300 ms, the session is taken down:

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# bfd
RP/0/0/CPU0:router(config-bfd)# echo latency detect percentage 200
 
   

The following example shows how to enable echo latency detection based on 100% of the echo failure period for a packet count of 3. In this example, when three consecutive echo packets are detected with a roundtrip delay greater than 150 ms, the session is taken down:

RP/0/0/CPU0:router # configure
RP/0/0/CPU0:router(config)# bfd
RP/0/0/CPU0:router(config-bfd)# echo latency detect percentage 100 count 3

Echo Startup Validation: Examples

The following example shows how to enable echo startup validation for BFD sessions on non-bundle interfaces if the last received control packet contains a non-zero "Required Min Echo RX Interval" value:

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# bfd

RP/0/0/CPU0:router(config-bfd)# echo startup validate

The following example shows how to enable echo startup validation for BFD sessions on non-bundle interfaces regardless of the "Required Min Echo RX Interval" value in the last control packet:

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# bfd
RP/0/0/CPU0:router(config-bfd)# echo startup validate force

BFD Echo Mode Disable: Examples

The following example shows how to disable echo mode on a router:

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# bfd
RP/0/0/CPU0:router(config-bfd)# echo disable
 
   

The following example shows how to disable echo mode on an interface:

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# bfd
RP/0/0/CPU0:router(config-bfd)# interface gigabitethernet 0/1/0/0
RP/0/0/CPU0:router(config-bfd-if)# echo disable

BFD Dampening: Examples

/The following example shows how to change the default initial-wait for BFD on a non-bundle interface:

RP/0/0/CPU0:router # configure
RP/0/0/CPU0:router(config)# bfd
RP/0/0/CPU0:router(config-bfd)# dampening initial-wait 30000
RP/0/0/CPU0:router(config-bfd)# dampening maximum-wait 35000

BFD Peers on Routers Running Cisco IOS and Cisco IOS XR Software: Example

The following example shows how to configure BFD on a router interface on Router 1 that is running Cisco IOS software, and use the bfd neighbor command to designate the IP address 192.0.2.1 of an interface as its BFD peer on Router 2. Router 2 is running Cisco IOS XR software and uses the router static command and address-family ipv4 unicast command to designate the path back to Router 1's interface with IP address 192.0.2.2.

Router 1 (Cisco IOS software)

Router# configure
Router(config)# interface GigabitEthernet8/1/0
Router(config-if)# description to-TestBed1 G0/0/0/0
Router(config-if)# ip address 192.0.2.2 255.255.255.0
Router(config-if)# bfd interval 100 min_rx 100 multiplier 3
Router(config-if)# bfd neighbor 192.0.2.1

Router 2 (Cisco IOS XR Software)

RP/0/0/CPU0:router# configure
RP/0/0/CPU0:router(config)# router static
RP/0/0/CPU0:router(config-static)# address-family ipv4 unicast
RP/0/0/CPU0:router(config-static-afi)# 10.10.10.10/32 192.0.2.2 bfd fast-detect
RP/0/0/CPU0:router(config-static-afi)# exit
RP/0/0/CPU0:router(config-static)# exit
RP/0/0/CPU0:router(config)# interface GigabitEthernet0/0/0/0
RP/0/0/CPU0:router(config-if)# ipv4 address 192.0.2.1 255.255.255.0

Where to Go Next

BFD is supported over multiple platforms. For more detailed information about these commands, see the related chapters in the corresponding Cisco IOS XR Routing Command Reference and Cisco IOS XR MPLS Command Reference for your platform at:

http://www.cisco.com/en/US/products/ps5845/prod_command_reference_list.html

BGP Commands on Cisco IOS XR Software

IS-IS Commands on Cisco IOS XR Software

OSPF Commands on Cisco IOS XR Software

Static Routing Commands on Cisco IOS XR Software

MPLS Traffic Engineering Commands on Cisco IOS XR Software

Additional References

The following sections provide references related to implementing BFD for Cisco IOS XR software.

Related Documents

Related Topic
Document Title

BFD commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples

Cisco IOS XR Interface and Hardware Command Reference

Configuring QoS packet classification

Cisco IOS XR Modular Quality of Service Configuration Guide for the Cisco XR 12000 Series Router


Standards

Standards
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


RFCs

RFCs
Title

draft-ietf-bfd-base-06

Bidirectional Forwarding Detection, March, 2007

draft-ietf-bfd-v4v6-1hop-06

BFD for IPv4 and IPv6 (Single Hop), March, 2007


MIBs

MIBs
MIBs Link

To locate and download MIBs using Cisco IOS XR software, use the Cisco MIB Locator found at the following URL and choose a platform under the Cisco Access Products menu: http://cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml


Technical Assistance

Description
Link

The Cisco Technical Support website contains thousands of pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.

http://www.cisco.com/techsupport