Bidirectional Forwarding Detection (BFD) provides a general-purpose, standard, medium- and protocol-independent fast failure detection mechanism. It can detect and monitor the connectivity of links in IP to detect communication failures quickly. BFD operates independently of media, data protocols, and routing protocols.

BFD establishes a session between two network devices to detect failures on the bidirectional forwarding paths between the devices and provide services for upper-layer protocols. BFD provides no neighbor discovery mechanism. Protocols that BFD services notify BFD of devices to which it needs to establish sessions. After a session is established, if no BFD control packet is received from the peer within the negotiated BFD interval, BFD notifies a failure to the protocol, which then takes appropriate measures.

BFD operates in two modes:

  • Asynchronous mode: In this mode, an operating device periodically sends BFD control packets to another device. If the other device does not receive BFD control packet from the peer within the specified interval, it tears down the BFD session.
  • Demand mode: in this mode, it is assumed that an operating device has an independent way of verifying that it has connectivity to the peer. Once a BFD session is established, one device may request that the other device stops sending BFD control packets, except when the connection must be explicitly validated, in which case a short sequence of BFD control packets is exchanged. Demand mode may operate independently in each direction, or simultaneously.

BFD also has an echo function. When echo is active, an operating device periodically sends BFD echo packets. The peer device returns the received BFD echo packets back without processing them (it loops them through its forwarding path). If the sending device does not receive BFD echo packets from the peer within a specified interval, the session is considered down. Since the echo function is handling the task of detection, the rate of periodic transmission of control packets may be reduced in asynchronous mode, and eliminated in demand mode.