> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/cgw/1.9/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/cgw/1.9/introduction/bfd.md).

# Bidirectional Forwarding Detection

Bidirectional Forwarding Detection (BFD) is a protocol to test if a connection is
still active or if it is lost. This is very useful in case of Ethernet links, as well as for longer IP paths
in case of MPLS.

BFD is a lightweight protocol that can be used in different modes for checking
if the connection is still up. For our use case, the **asynchronous mode** is preferred.
In this mode, both sides send `Hello` packets.

Using BFD for link detection additionally to the keep-alive part
of the routing protocol, like BGP, has one benefit: the timeouts are tremendously
lower and therefore a switch to a healthy route is much faster.
In comparison, the timeout of common BGP sessions can range to 240 seconds and might
be reduced to 30 seconds, the BFD timeouts can range to `< 1 second`.

Therefore, it is advised to switch on BFD for link detection wherever
possible.
