1.8 Describe how Bidirectional Forwarding Detection works

ENARSI 300-410 v1.1 · 1.0 Layer 3 Technologies

Bidirectional Forwarding Detection (BFD) is a light hello protocol that detects a failed path in milliseconds and tells the routing protocols, which then reconverge at once. Routing protocol hellos are too slow (OSPF's dead interval is 40 s by default), and fast hellos are expensive; BFD does one job for every client.

What you must know

Why a separate protocol

Two routers joined through a switch or a carrier Ethernet service never see the far port go down: their own link stays up. Without BFD, OSPF waits for its dead interval (40 s) before it drops the neighbour. BFD sends tiny UDP packets (ports 3784, and 3785 for echo) every few hundred milliseconds and declares the session down after a few missed ones.

R1's Gi0/0 stays up, but BFD control packets stop (1). After 3 missed intervals of 50 ms, BFD tells OSPF, which drops the adjacency and reroutes in well under a second.

How it works

ItemWhat it means
Asynchronous modeBoth ends send control packets at the agreed interval; missing multiplier of them brings the session down.
Echo modeOne end sends packets addressed to itself; the neighbour forwards them back in the data plane, testing the forwarding path. Control packets then slow down (bfd slow-timers).
Detection timeReceived interval × multiplier, for example 50 ms × 3 = 150 ms.
NegotiationEach end advertises how fast it can send and receive; the slower value wins.
ClientsOSPF, EIGRP, BGP, HSRP, static routes (ip route static bfd) register with BFD; one session serves them all.
interface GigabitEthernet0/0
 bfd interval 50 min_rx 50 multiplier 3
!
router ospf 1
 bfd all-interfaces
!
router bgp 65001
 neighbor 10.0.12.2 fall-over bfd

R1# show bfd neighbors
IPv4 Sessions
NeighAddr          LD/RD        RH/RS     State     Int
10.0.12.2          1/1          Up        Up        Gi0/0

Commands

show bfd neighbors [details]Sessions, state, negotiated timers and the client protocols.
show bfd summarySession counts per state.
show ip ospf interfaceSays when BFD is enabled on an OSPF interface.

Exam traps

Check yourself

Why is OSPF slow to notice a failure behind a switch?
Its own interface stays up, so it waits for the dead interval (40 s by default).
Interval 100 ms, multiplier 4. Detection time?
400 ms.
What does echo mode test that control packets don't?
The neighbour's forwarding path: echo packets are looped back in the data plane.
What does BGP do when its BFD session goes down?
It resets the neighbour at once (neighbor … fall-over bfd).

More topics in 1.0 Layer 3 Technologies