Troubleshooting notes · OSPF

BFD session down: OSPF still waits for the dead timer

BFD was supposed to make OSPF fail over in under a second, but traffic was down for 40 seconds. On IOS, an interface needs both bfd interval and ip ospf bfd; without the interval no BFD session starts. Real output from Cisco IOS XE 17.18.

The symptom

A switch port between two OSPF routers failed. Traffic was down for about 40 seconds before it moved to the backup link: the OSPF dead timer, not the sub-second failover BFD should give. R1 shows a BFD session that never came up:

R1# show bfd neighbors
NeighAddr                              LD/RD         RH/RS     State     Int
10.0.12.2                               1/0          Down      Down      Et0/0

RH/RS Down and a remote discriminator of 0 mean R1 has never heard from the neighbour's BFD.

Why it happens

On IOS you need two things on the interface: bfd interval starts BFD there, and ip ospf bfd (or bfd all-interfaces under the OSPF process) registers OSPF as a BFD client. R1 has both:

interface Ethernet0/0
 bfd interval 100 min_rx 100 multiplier 3
 ip ospf bfd

R2 has ip ospf bfd but no bfd interval, so no BFD session starts on R2, and R1 waits for the dead timer.

The fix

R2(config)# interface Ethernet0/0
R2(config-if)# bfd interval 100 min_rx 100 multiplier 3

Check it

R1# show bfd neighbors details | include Registered|interval|Multiplier
Session state is UP and using echo function with 100 ms interval.
MinTxInt: 1000000, MinRxInt: 1000000, Multiplier: 3
Registered protocols: OSPF CEF

The session is up and OSPF is registered. On a directly connected link, Cisco uses echo mode by default: the 100 ms interval applies to echo packets, which the neighbour just loops back, and the control packets slow down to one second.

Then the real test. Before the fix, failing the far-side switch port left OSPF waiting:

%OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired

With BFD working:

16:34:45.081: %BFDFSM-6-BFD_SESS_DOWN: BFD-SYSLOG: BFD session ld:1 handle:1,is going Down Reason: ECHO FAILURE
16:34:45.083: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: BFD node down

R1# show ip route 10.2.2.0 | include Known|\*
  Known via "ospf 1", distance 110, metric 101, type intra area
  * 10.0.21.2, from 2.2.2.2, 00:00:04 ago, via Ethernet0/1

OSPF went down 2 ms after BFD, and traffic was already on the backup link two seconds after the shutdown.

Test by failing something the router can't see directly, such as the far side of a switch. Shutting the router's own interface makes OSPF react immediately even without BFD, so it proves nothing.

Practise this fault

This fault is in ENARSI Lab 09 of ENARSI Troubleshooting Labs: a ready-made GNS3 project where you find and fix it yourself, alongside the other faults in the ticket, with the tested solution.

Or start with 15 free labs (5 each from CCNA, ENARSI and ENCOR), by email:

We’ll email you the download links and occasional lab tips. Unsubscribe with one click, any time. Your address is never shared.