English

Things You Should Know About BFD

Posted on Mar 21, 2024 by
157

What Is BFD?

Bidirectional Forwarding Detection (BFD) is a network protocol designed to quickly detect faults in network links or neighboring nodes. It is commonly used in network devices such as routers and switches. BFD enables network devices to detect network failures within milliseconds, allowing for faster recalculation of routing paths or switching to backup paths, thereby improving network reliability and convergence speed.

The Role of BFD in Switches

In order to minimize the impact of equipment failures such as switches on services and improve network reliability, network equipment must be able to quickly detect failures in communications with adjacent devices. Actions can then be taken to correct the fault promptly to ensure continuity of service. At this time BFD plays a very important role.

The role of Bidirectional Forwarding Detection (BFD) in switches includes:

  • 1. Rapid Fault Detection: BFD allows switches to quickly detect faults in links or neighboring nodes, preventing prolonged network disruptions and minimizing the impact on network users.

  • 2. Fast Convergence: By promptly detecting link failures, switches can adjust routing tables, recalculate paths, and notify other devices in the network of routing changes more quickly, reducing packet loss and latency.

  • 3. Reducing Impact of Network Failures on Business: BFD's rapid fault detection helps to reduce network downtime, thereby improving network availability and stability, which is crucial for businesses with high demands for network connectivity and sensitivity to latency, such as VoIP and video conferencing.

  • 4. Integration with Other Protocols: BFD can be integrated with other routing protocols such as OSPF, BGP, etc. By integrating with these protocols, switches can intelligently respond to changes in link states and adjust routing paths as needed.

How Does BFD Work?

Bidirectional Forwarding Detection (BFD) operates by establishing a session between two systems and periodically exchanging BFD packets along the network path connecting them. If a system fails to receive BFD packets from its peer within a specified timeframe, the BFD session transitions to the Down state, indicating a fault along the path.

BFD's operation can be understood from three perspectives: its fault detection mechanism, session establishment process, and session establishment modes.

Fault Detection Mechanism:

When two network devices establish a BFD session, they periodically exchange BFD packets. If a device fails to receive a response within the configured time limit, it marks the forwarding path as faulty and notifies the upper-layer protocol of the fault.

The following figure shows how a BFD session is created when OSPF and BFD are used together.

Things You Should Know About BFD

Session Establishment Process

In this figure, OSPF and BFD are both configured on SwitchA and SwitchB. The process of establishing a BFD session is as follows:

  • 1. OSPF (Open Shortest Path First) employs the Hello mechanism to discover neighbors and establish neighbor relationships.

  • 2. OSPF informs BFD about neighbor information, including source and destination addresses.

  • 3. BFD establishes a session based on the received neighbor information.

  • 4. Once the BFD session is established, it monitors the link and promptly responds to any link faults.

Things You Should Know About BFD

Link Fault Detection by BFD

The process is described as follows:

  • 1. The monitored link experiences a failure.

  • 2. BFD rapidly detects the link fault and changes the session status to Down.

  • 3. BFD notifies the local OSPF process of the unreachable neighbor.

  • 4. The local OSPF process terminates the OSPF neighbor relationship.

Session Setup:

A BFD session has the following statuses: Down, Init, Up, or AdminDown. The State field in BFD packets indicates the session status. The status changes based on the local session status and the received session status of the peer.

  • Down: The session is down or a request has been sent.

  • Init: The local end can communicate with the remote end and expects the session to go Up.

  • Up: The session is successfully established.

  • AdminDown: The session is administratively taken down.

The BFD state machine implements a three-way handshake for session setup or deletion to ensure that both systems detect the status change.The following figure shows BFD session establishment to describe the state machine transition process.

Things You Should Know About BFD

The establishment of BFD sessions between SwitchA and SwitchB unfolds as follows:

  • 1. Both SwitchA and SwitchB initiate BFD state machines, starting with an initial status of Down.BFD packets, featuring the State field set to Down, are exchanged between SwitchA and SwitchB. For statically configured BFD sessions, Remote Discriminator values in BFD packets are pre-defined. In dynamically configured sessions, the Remote Discriminator value is set to 0.

  • 2. After receiving the BFD packet with the State field set to Down, SwitchB changes the BFD session status to Init and sends a BFD packet with the State field set to Init.

  • 3. After the local BFD session status of SwitchB changes to Init, SwitchB no longer processes the received BFD packets with the State field set to Down.

  • 4. SwitchA's BFD session state change is comparable to SwitchB's.

  • 5. After receiving a BFD packet with the State field set to Init, SwitchB changes the local BFD session status to Up.

  • 6. Similar to SwitchB, SwitchA undergoes a comparable status change in its BFD session.

Session Establishment:

BFD sessions can be established statically or dynamically, differing in how local and remote discriminators are configured in packets.BFD sessions are differentiated by local and remote discriminators in packets.

1. Static Establishment

BFD session parameters are manually specified, and a request for session establishment is distributed manually.

2. Dynamic Establishment

When a BFD session is established dynamically, the system processes the local and remote discriminators as follows:

  • Dynamically allocated local discriminator: When an application triggers dynamic session establishment, the system sets the local discriminator and sends a BFD packet with a remote discriminator of 0 for negotiation.

  • Self-learned remote discriminator: A BFD packet with a remote discriminator of 0 is received by one end of the BFD session, which checks the BFD packet. This end determines the value of the local discriminator in the received BFD packet to retrieve the remote discriminator if the packet matches the local BFD session.

How FS Can Help

In summary, integrating BFD into network infrastructure, especially in data center environments, is critical to maintaining high availability and minimizing downtime. As a leading company in the communications industry, FS provides a series of data center switches that support BFD functions to ensure high performance and stable operation of the network. By choosing FS, you can confidently build a powerful and reliable data center network and enjoy the improvement in network reliability brought by BFD.

You might be interested in

Knowledge
See profile for Howard.
Howard
Data Center Switch Wiki and Buying Guide
Jun 16, 2022
23.6k
Knowledge
Blog
See profile for Howard.
Howard
FAQs About FS Data Center Switches
May 31, 2022
3.6k
Knowledge
Knowledge
Knowledge
See profile for Sheldon.
Sheldon
Decoding OLT, ONU, ONT, and ODN in PON Network
Mar 14, 2023
386.2k
Knowledge
See profile for Irving.
Irving
What's the Difference? Hub vs Switch vs Router
Dec 17, 2021
367.6k
Knowledge
See profile for Sheldon.
Sheldon
What Is SFP Port of Gigabit Switch?
Jan 6, 2023
335.6k
Knowledge
Knowledge
See profile for Migelle.
Migelle
PoE vs PoE+ vs PoE++ Switch: How to Choose?
Mar 16, 2023
420.6k