Bidirectional Forwarding Detection (BFD)

BFD (Bidirectional Forwarding Detection) is a super fast protocol that is able to detect link failures within milliseconds or even microseconds.. All (routing) protocols have some sort of mechanism to detect link failures. OSPF uses hello packets and a dead interval, EIGRP uses hello packets and a holddown timer etc.

Networks that use real-time traffic like VoIP require fast convergence times. Routing protocols like OSPF or EIGRP are able to quickly select another path once they lose a neighbor but it takes a while for them to realize that something is wrong.

We can tune timers for fast convergence, for example OSPF can be configured to use a dead interval of only one second. The problem however is that all of these protocols were never really designed for sub-second failover. Hello packets and such are processed by the control plane so there is quite some overhead. BFD was designed to be fast, its packets can be processed by some interface modules or line cards so there isn’t much overhead.

BFD runs independent from any other (routing) protocols. Once it’s up and running, you can configure protocols like OSPF, EIGRP, BGP, HSRP, MPLS LDP etc. to use BFD for link failure detection instead of their own mechanisms. When the link fails, BFD will inform the protocol. Here’s how you can visualize this:


R1 and R2 are configured to use BFD and will send control packets to each other. OSPF remains the same, it’s sending its OSPF packets. Once the link fails, this will happen:

BFD Informs OSPF Link Failure


When BFD doesn’t receive its control packets anymore it realizes we have a link failure and it will report this to OSPF. OSPF will then tear down the neighbor adjacency.

There are two operating modes to BFD, asynchronous mode and demand mode. The asynchronous mode is similar to the hello and holddown timers, BFD will keep sending hello packets (called BFD control packets) and when you don’t receive some of them, the session is teared down.

The demand mode is different, once BFD has found a neighbor it won’t continuously send control packets but only uses a polling mechanism. Another method has to be used to check reachability, for example it could check the receive and transmit statistics of the interface. Right now Cisco (or any other vendor I know of) doesn’t support BFD demand mode.

Both modes also support something called echo mode. When a device sends BFD echo packets then the receiver will return them without processing them. When the sender doesn’t get the echo packets back, it knows something is wrong and will tear down the session.

Anyway enough talk about BFD for now, let’s take a look at this in action!


To see why BFD is great, we will look at a scenario with and without BFD. I’ll use OSPF but many other (routing) protocols can be used.

OSPF without BFD

This is the topology that we will use:


Above we have two routers that are connected to a switch and running OSPF. Here’s the configuration:

R1 & R2
(config)#router ospf 1
(config-router)#network area 0

Nothing special, just regular OSPF. Suddenly the link fails:

BFD Link Failure R1 SW1

Here’s what will happen:

Jul 30 11:54:46.011: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
Jul 30 11:54:46.011: %OSPF-5-ADJCHG: Process 1, Nbr on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached

R1 will detect this link failure right away since it’s directly connected to SW1. It will immediately drop the neighbor adjacency. What about R2?

Jul 30 11:55:14.667: %OSPF-5-ADJCHG: Process 1, Nbr on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired

R2 stops receiving OSPF hello packets from R1 so once the dead interval expires, it decides that R1 is unreachable and it will drop the neighbor adjacency. This took about 28 seconds.

Even if you tune the OSPF timers, it will still take about one second. Let’s see how BFD performs…


Let’s enable BFD on our two routers running OSPF. Here’s the topology again:

R1 SW1 R2

Let’s take a close look at the BFD command:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 739 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

545 Sign Ups in the last 30 days

100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!


Forum Replies

  1. Hi,

    what are the disadvantages of using bfd.
    also it would be helpful if you post an article on troubleshooting bfd.

  2. BFD does not work in GNS3. I was using 7200 with IOS 15.x. Checking on forums the consensus is a GNS3 bug. Does anyone have a workaround for this?

    Hostname R1
    interface FastEthernet0/0
     ip address
     ip ospf 10 area 0
     duplex full
     bfd interval 500 min_rx 500 multiplier 3
    router ospf 10
     bfd all-interfaces


    Hostname R2
    interface FastEthernet0/0
     ip address
     ip ospf 10 area 0
     duplex full
     bfd interval 500 min_rx 500 multiplier 3
    router ospf 10
     bfd all-interfaces
    ... Continue reading in our forum

  3. Hi @tadeosho70,

    With echo mode, this is no problem. The packets you send are echoed back to you. For example, take a look at this output:

    R1(config)#interface FastEthernet 0/0
    R1(config-if)#bfd interval 300 min_rx 300 multiplier 3 
    R2(config)#interface FastEthernet 0/0
    R2(config-if)#bfd interval 300 min_rx 600 multiplier 3 

    The min_rx is set to 300 on R1 and 600 on R2. Here’s the output of R1 showing the 600 ms of R2:

    R1#show bfd neighbors details 
    NeighAddr                         LD/RD    RH/RS     State     Int                       1/1     U
    ... Continue reading in our forum

  4. Hi,

    When BFD tracking OSPF neighbor goes down, OSPF will be stuck in which state? (Down or Init)

    eg : [R1]–[Switch]—[R2]

    If R1 interface to switch goes down, in which state OSPF will be stuck in both routers?

    And also once the interface is down, If my bfd configuration is “bfd interval 300 min_rx 300 multiplier 3”, how much time it will take for BFD to come down - 300 secs ? & how much time it will take for OSPF to come down?


  5. Hello Aashish

    When configuring BFD, you configure two timer intervals. The interval, which is how often the local device will send BFD packets, and the min_rx interval which is how often we expect to receive a BFD packet from the neighbor. So the frequency with which BFD packets are sent can be different for each direction.

    For example, for a topology with R1 and R2, we can have the following configuration:

    R1 interval 50
    R1 min_rx 100

    R2 interval 100
    R2 min_rx 50

    The interval on the local device should correspond with the min_rx on the remote device.

    Now whe

    ... Continue reading in our forum

62 more replies! Ask a question or join the discussion by visiting our Community Forum