Introduction of BFD


Overview

Bidirectional Forwarding Detection (BFD) is a two-way forwarding detection mechanism, which can provide millisecond detection and realize the rapid detection of link faults.

Traditionally, the Hello message mechanism of routing protocols such as Open Shortest Path First (OSPF) and BGP has been used for link fault detection. The time required for this mechanism to detect a fault is in seconds. However, for high-speed data transmission, such as gigabit rate level, more than 1 second detection time will lead to a large amount of data loss; for delay-sensitive services, such as voice services, more than 1 second delay is unacceptable. BFD will help solve this problem and improve the speed of fault detection.

PICOS implementation of BFD supports OSPF, BGP, and PIM protocols.

Single-Hop and Multi-Hop BFD

You can create a single-hop or multi-hop BFD session on an IP link to detect faults quickly:

  • Single-hop BFD is the IP connectivity detection of two directly connected systems, with only one hop.
  •  Multi-hop BFD detects IP connectivity of paths between two indirectly connected systems, which may span multiple hops.

BFD Working Process

The main working process of BFD is as follows:

1. BFD first establishes a BFD session on a link between two endpoints (established by relying on the upper-layer protocol, e.g., when OSPF neighbors are established, the neighbor information is synced to BFD to establish BFD neighbors based on this information).

2. After two systems establish a BFD session, they will periodically send BFD control packets along the path between them. If a link failure is detected, the BFD neighbor is removed and the upper-layer protocol is immediately notified to handle the path loss issue.

BFD Session Establishment

BFD session can be established in two ways: static establishment and dynamic establishment:

  • Static Establishment

BFD session parameters, including the local address and peer address, are manually specified. The neighbor adjacency will be established after all the configurations are manually committed.

  • Dynamic Establishment

BFD sessions are established based on the neighbor adjacencies established by other routing protocols such as OSPF, BGP, and PIM, we refer to this as Dynamic Establishment of BFD.

Echo Function

Once the BFD session is Up, a system can choose to start the Echo function. When the Echo function is active, a stream of BFD Echo packets is transmitted in such a way as to have the other system loop them back through its forwarding path. If a number of packets of the echoed data stream are not received, the session is declared to be down. For more details, please refer to RFC 5880.

This may reduce round-trip jitter and thus allow more aggressive Detection Times, as well as potentially detecting some classes of failure that might not otherwise be detected.

The Echo function can be run independently in each direction between a pair of systems.

When the Echo function is active, a system SHOULD set the minimum receive interval (the command is set protocols bfd [vrf <vrf-name>] [interface<interface-name>] peer<peer-ip> receive-interval <receive-interval>) to a value of not less than one second (1,000,000 microseconds). This is intended to keep received BFD Control traffic at a negligible level, since the actual detection function is being performed using BFD Echo packets.

Users can use the command set protocols bfd [vrf <vrf-name>] [interface<interface-name>] peer<peer-ip> echo-mode to enable echo function.

NOTEs:

  • Echo function is only supported in single-hop BFD case.
  • BFD echo mode is incompatible with that on other vendors, that is, echo mode can work only between PICOS switches. 





Copyright © 2024 Pica8 Inc. All Rights Reserved.