Saturday , December 7 2024
Home / Reliability / a few words about BFD

a few words about BFD

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 neighboring 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)
  • Eth-Trunk
  • VLANIF
  • MPLS LSP
  • PWs

As you already know there are two BFD session modes:

  1. Static BFD where local and remote discriminator are configured manually
  2. 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:

  1. DOWN
  2. INIT
  3. UP
  4. AdminDOWN.

Examples of using BFD:

  1. BFD for unicast static route
  2. BFD for routing protocols (OSPF, ISIS, BGP)
  3. BFD for VRRP (virtual router redundancy protocol)
  4. BFD for PST (port state table)
  5. BFD for TE
  6. BFD for PIM
  7. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *