BFD (bidirectional forwarding Detection)
What to do to quickly establish an alternative path in case of communication failure between adjacent systems?
There are two detection mechanisms:
- Hardware detection, for example alarms in SDH used to detect link faults
- Hello mechanism used by routing protocols.
The main disadvantage of hardware detection is that not all media support it. For example Ethernet does not provide this kind of signalling.
When there is no hardware signalling we can use Hello in routing protocols but this mechanism is relatively slow. Sensitive services, for example voice, cannot work with more than one second delay.
The best solution is to use BFD (Bidirectional Forwarding Detection). This is simple mechanism that works independently of media, data and routing protocols. The main goal of BFD is to detect failures in the path between adjacent devices in a short time (minimum detection time for NE40E is 30ms). It does not matter if it is physical link, virtual circuit, tunnel, MPLS LSP, multi-hop path or unidirectional link. We can treat BFD as a simple Hello protocol where a pair of devices periodically sends BFD packets between them. If one device does not receive BFD packets within specified period, the system assumes that the bidirectional path to the neighbouring system has failed.
BFD operates on top of any data protocols creating, deleting and modifying BFD sessions according to information provided by upper layers, at the same time notifying upper layers applications about the session status.
BFD control packets are encapsulated in UDP packet as payload.
BFD provides the following detection modes:
- Asynchronous mode where 2 devices periodically send BFD packets to each other
- Query mode where device does not periodically send BFD packets but using for example Hello mechanism of routing protocols for failures’ detection.
Link types detected by BFD:
- IP links (both one-hop and multi-hop detection)
- MPLS LSP
As you already know there are two BFD session modes:
- Static BFD where local and remote discriminator are configured manually
- Dynamic BFD where system dynamically allocates a “My Discriminator” and then sends a BFD control packet with remote discriminator equals 0. Remote system controls the BFD packet and learns the value of “My Discriminator” as a remote discriminator.
BFD state machine implements a three-way handshake mechanism to establish BFD session.
There are four BFD session states:
Examples of using BFD:
- BFD for unicast static route
- BFD for routing protocols (OSPF, ISIS, BGP)
- BFD for VRRP (virtual router redundancy protocol)
- BFD for PST (port state table)
- BFD for TE
- BFD for PIM
- BFD for PW.
This post was only to mention about such mechanism as BFD. As BFD is often being used in current IP networks, for sure you will know how to configure it reading my next posts. At the first opportunity I will show you examples of BFD configuration.