BFD is a protocol that is used in the networks to quickly detect link failures and hence enhance the speed of convergence of the routing protocols. Different routing protocols have different mechanisms to detect link failures for e.g. OSPF uses hello packets and dead interval while the EIGRP uses hello packets and hold down timers.
Though the time of convergence for OSPF and EIGRP and other protocols is fast but still some real time applications such as VOIP may face issues and require a much faster speed of convergence of the networks. We can fine tune the hello and dead/hold timers to increase convergence speed but that isn’t recommended in the networks though.
BFD can run independent of any other protocol however the other protocols i.e. OSPF,EIGRP,BGP,HSRP etc. can use BFD for link failure detection instead of using their own mechanism. Whenever a link failure occurs BFD will notify the routing protocol that link loss has occurred and the protocol using it will tear town the neighbor relation immediately and start the process to re-converge.
The BFD operates in two modes Asynchronous mode and Demand mode.
In Asynchronous mode BFD will keep sending the hello packets and if some hello packets are not received the session is torn down.The Demand mode is different, once BFD has found a neighbour 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 receive and transmit statistics of the interface. Right now Cisco (or any other vendor I know of) doesn’t support BFD demand mode.
Let us have a look at an example where we use OSPF between two routers with and without BFD.
OSPF will run between the two routers.
We will then shut the port Fa0/0 on R1 and see R1 immediately breaks OSPF neighborship as it detects the directly connected link down.
R2 however takes time to break the OSPF neighborship till the dead timer expires.
We see below R1 and R2 are OSPF neighbors
Now let’s shut down the port Fa0/0 on R1 and notice how much time R2 takes to break neighborship.
As seen below R1 immediately breaks OSPF adjacency
R2 took approx. 15 seconds to break the OSPF neighborship:
We enable BFD.
We use BFD with OSPF and then again shut Fa0/0 on R1 to break the OSPF nieghborship and check on R2 how much time it takes to break OSPF neighborship.
Enabling BFD on R1 and R2:
- BFD interval is the time in milliseconds after which BFD packet is sent.
- The second value to configure is the minimum receive interval. This is how often we expect to receive a BFD packet from our neighbor.
- The last value to configure is for the hold-down.
Now BFD is configured lets configure OSPF to use the same.
Now when we shut the Fa0/0 port on R1 we see both R1 and R2 break OSPF adjacency immediately
ABOUT THE AUTHOR
I am here to share my knowledge and experience in the field of networking with the goal being – “The more you share, the more you learn.”
I am a biotechnologist by qualification and a Network Enthusiast by interest. I developed interest in networking being in the company of a passionate Network Professional, my husband.
I am a strong believer of the fact that “learning is a constant process of discovering yourself.”
– Rashmi Bhardwaj (Author/Editor)