CLOUD CONCEPT

Bidirectional Forwarding Detection

Bidirectional Forwarding Detection is a lightweight protocol that rapidly detects forwarding-path failures between network devices and notifies routing protocols.

Cloud Concepts Hub →

What is Bidirectional Forwarding Detection

Bidirectional Forwarding Detection (BFD) checks whether two peers can continue exchanging packets, independently of routing-protocol keepalive timers. In cloud and hybrid networks, it can help BGP react to failed paths sooner, reducing traffic loss when a usable alternative route exists.

Bidirectional Forwarding Detection (BFD) is a standardized failure-detection protocol used between network devices. Its purpose is to detect loss of forwarding connectivity quickly, including failures that leave a physical interface operational. BFD does not advertise prefixes, calculate routes, or select a backup connection. Instead, it reports session failure to a client such as Border Gateway Protocol (BGP), which can then invalidate the affected adjacency and its routes.

In asynchronous mode, the peers periodically exchange BFD control packets. Each peer advertises timing parameters and a detection multiplier, and the resulting detection time depends on the negotiated packet interval and the multiplier advertised by the remote peer. If expected packets stop arriving for the detection interval, the receiving peer declares the session down. The peers can use different detection times in each direction. BFD supports both single-hop and multihop applications, but a cloud service may support only a particular mode or topology.

This matters in hybrid networking because a forwarding failure does not always cause an immediate physical link-down event. For example, a router interface can remain up while an intermediate provider device stops forwarding packets. Without BFD, a BGP session may remain established until its hold timer expires. When BFD is associated with that BGP neighbor, the failure can be reported sooner, allowing BGP to remove the unusable routes and select an available alternative.

For AWS Direct Connect, asynchronous BFD is supported on virtual interfaces, and AWS enables it on its side. The customer must configure compatible BFD settings on the customer router and associate BFD with the relevant BGP neighbor. The AWS-supported minimum interval is 300 milliseconds with a detection multiplier of three, giving an approximately 900-millisecond detection interval at those settings. This is failure-detection time, not a guarantee that application traffic will recover within 900 milliseconds.

Consider two Direct Connect connections that advertise the same on-premises prefixes. If the preferred path stops forwarding but remains physically up, BFD can cause its BGP session to fail sooner than the BGP hold timer would. Traffic can then use the surviving route, provided routing policy, prefix advertisements, return-path routing, and available capacity permit it. BFD cannot create redundancy where none exists, and faster detection alone does not guarantee uninterrupted sessions.

Do not assume BFD is supported on every connection that uses BGP. AWS Site-to-Site VPN does not support BFD on its managed VPN endpoints. Its tunnel and routing failure handling instead involves mechanisms such as IPsec dead peer detection and BGP timers. Dead peer detection checks IPsec peer liveness; it is not another name for BFD. A customer-managed routing overlay may offer its own BFD capability, but that is separate from native support on the managed VPN endpoint.

Aggressive timers trade faster detection for greater sensitivity to packet loss, scheduling delays, and congestion. Excessively short intervals can produce false failures and route flapping, particularly on software routers with constrained CPU resources. Permit the required BFD traffic through relevant filters, use settings supported by both peers, and monitor session transitions alongside interface errors and BGP events. Single-hop BFD control traffic normally uses UDP destination port 3784; other BFD modes use different ports.

For troubleshooting and exam scenarios, distinguish failure detection from routing convergence and application recovery. BFD detects loss of connectivity along the path its packets exercise; it does not prove that every application flow, packet size, or downstream destination is reachable. Validate the complete design with controlled failure tests that measure detection, route withdrawal, alternate-path installation, and actual traffic restoration.

Key aspects of Bidirectional Forwarding Detection

BFD provides rapid, protocol-independent path-failure detection, but effective recovery depends on supported configuration, stable timers, and working alternate routes.

Fast forwarding-path failure detection

BFD can detect connectivity loss even when an interface remains physically up. This addresses failures that would otherwise wait for routing-protocol timers to expire.

Independent of route advertisement

BFD supplies a liveness signal to protocols such as BGP rather than exchanging routes itself. The routing protocol and its policies determine what happens after a failure.

Negotiated detection timing

Peers exchange timing parameters and detection multipliers to establish failure-detection behavior. Use mutually supported values rather than assuming a configured local interval is the effective interval.

Explicit platform and neighbor support

Both endpoints must support compatible BFD operation, and the session must be associated with the intended routing neighbor. BGP support alone does not imply BFD support.

Speed versus stability

Short detection intervals reduce failure-detection delay but increase sensitivity to transient loss and processing delays. Select timers appropriate to the platform and transport, then test for false session failures under load.

Detection is not end-to-end recovery

BFD needs a valid alternate route and sufficient backup capacity to improve service continuity. Measure routing convergence and application recovery separately from BFD detection time.

Cloud services for Bidirectional Forwarding Detection

Dedicated hybrid connectivity services such as AWS Direct Connect, Cloud Interconnect through Google Cloud Router, and Azure ExpressRoute can use BFD with supported BGP peerings to detect forwarding failures quickly. Their configuration requirements and supported timers differ, so each peering must be validated independently. AWS Site-to-Site VPN illustrates an important boundary: a managed connection can support BGP without supporting BFD. In a design that combines dedicated connectivity with VPN backup, BFD can accelerate detection on the dedicated path, while routing policy, backup advertisements, and VPN availability determine whether traffic successfully moves to the backup.

AWS Direct Connect image AWS Direct Connect

Direct Connect supports asynchronous BFD on virtual interfaces to accelerate BGP failure detection. AWS enables BFD on its side; configure the customer router to establish the corresponding BFD session and use it for the BGP neighbor.

Open AWS Direct Connect →
AWS Site to Site VPN image AWS Site-to-Site VPN

The managed VPN endpoints do not support BFD, even when dynamic routing uses BGP. Use supported IPsec dead peer detection and BGP timer behavior when designing VPN failure handling rather than applying Direct Connect BFD assumptions.

Open AWS Site-to-Site VPN →