Back to Blog
โ˜…โ˜…โ˜†Intermediate๐ŸŒ WAN / Service Provider
BFDOSPFBGPRoutingHigh AvailabilityCisco

BFD Deep Dive: Fast Failure Detection for OSPF, BGP, EIGRP, and Static Routes

March 13, 2026ยท10 min read

Overview

OSPF dead interval is 40 seconds by default. BGP hold timer is 90 seconds. Without BFD, a router takes that long to detect a dead neighbor โ€” during which traffic blackholes. BFD runs independently of the routing protocol, sending lightweight hellos every 300msโ€“1000ms. When it detects a failure, it immediately notifies OSPF, BGP, or EIGRP, triggering convergence in under a second instead of minutes.


BFD Detection Time Formula

bash
Detection time = Detect Multiplier ร— negotiated Rx intervalExample: tx-interval 300ms, rx-interval 300ms, multiplier 3โ†’ Detection time = 3 ร— 300ms = 900ms
ProfileInterval (tx/rx)MultiplierDetection TimeUse For
Aggressive150ms / 150ms3450msData center, direct links with capable hardware
Standard300ms / 300ms3900msMost WAN and campus deployments
Conservative1000ms / 1000ms55sLinks with high jitter, satellite, low-end hardware
Multihop BGP1000ms / 1000ms33seBGP sessions over multiple hops

Warning: Setting BFD intervals below 300ms on software-based platforms (non-ASICs) causes CPU spikes and false positives. Use aggressive timers only on platforms with hardware BFD support (ASR 1000, Nexus 9000, Catalyst 9000).


Topology

// BFD SESSION โ€” ROUTING PROTOCOL INTEGRATION RTR-A 10.0.0.1/30 RTR-B 10.0.0.2/30 Physical link โ€” Gi0/0 BFD session (300ms ร— 3 = 900ms detection) Clients: OSPF + BGP + Static All notified on BFD failure Without BFD: OSPF 40s / BGP 90s With BFD: both detect in <1s BFD is hardware-offloaded on supported platforms โ€” minimal CPU impact at standard timers

Part 1 โ€” BFD with OSPF (Single-Hop)

cisco
! Enable BFD on the interface โ€” applies to all protocols using that interfaceinterface GigabitEthernet0/0 bfd interval 300 min_rx 300 multiplier 3! Tell OSPF to use BFD on this interfaceinterface GigabitEthernet0/0 ip ospf bfd! Or enable globally for all OSPF interfacesrouter ospf 1 bfd all-interfaces! Verify BFD sessionRTR-A# show bfd neighbors detail! Look for: State: Up, Registered protocols: OSPF! "LD/RD" = Local Discriminator / Remote Discriminator (session identifiers)

RTR-A โ€” show bfd neighbors detail
RTR-A# show bfd neighbors detail
IPv4 Sessions
NeighAddr LD/RD RH/RS State Int
----------- ----- ----- ----- ---
10.0.0.2 4097/4097 Up Up Gi0/0
Session state is Up and not using echo function
OurAddr: 10.0.0.1
Local Diag: No Diagnostic, Demand mode: 0, Poll bit: 0
MinTxInt: 300000 us, MinRxInt: 300000 us, Multiplier: 3
Received MinRxInt: 300000 us, Received Multiplier: 3
Holddown (hits): 900 ms (0), Hello (hits): 300 ms (4,821)
Rx Count: 4821, Rx Interval (ms): min/300/max/300/avg/300
Tx Count: 4823, Tx Interval (ms): min/300/max/300/avg/300
Registered protocols: OSPF BGP
Uptime: 00:24:03
Last packet: Version: 1 Diagnostic: 0
              I Hear You bit: 1 Demand bit: 0
              My Discr.: 4097 Your Discr.: 4097
              Min tx interval: 300000 Min rx interval: 300000
              Min Echo interval: 0 <-- echo disabled (single-hop mode)
Detection time
900 ms
300ms × 3 multiplier
failure detected in <1 sec
Registered clients
OSPF + BGP
both notified on failure
without waiting for hold-timer
Key diagnostic field
No Diagnostic
session healthy
any other value = fault

Part 2 โ€” BFD with BGP (Single-Hop iBGP / eBGP)

cisco
! Interface BFD config (same as above)interface GigabitEthernet0/0 bfd interval 300 min_rx 300 multiplier 3! Enable BFD for a specific BGP neighborrouter bgp 65001 neighbor 10.0.0.2 fall-over bfd! Or enable for all neighbors in a peer grouprouter bgp 65001 neighbor CORE-PEERS fall-over bfd! Verify BGP is using BFDRTR-A# show bgp neighbors 10.0.0.2 | include BFD! "BFD is enabled, state: Up"

Part 3 โ€” Multi-Hop BFD for eBGP

Single-hop BFD requires direct connectivity. For eBGP sessions over multiple hops, use multi-hop BFD.

cisco
! Multi-hop BFD โ€” use longer timers (more hops = more jitter)ip route 198.51.100.1 255.255.255.255 GigabitEthernet0/0! Static route to reach eBGP peer loopbackbfd-template multi-hop MH-BGP-PROFILE interval min-tx 1000 min-rx 1000 multiplier 3router bgp 65001 neighbor 198.51.100.1 remote-as 65002 neighbor 198.51.100.1 ebgp-multihop 3 neighbor 198.51.100.1 update-source Loopback0 neighbor 198.51.100.1 fall-over bfd multi-hop! Multi-hop BFD requires explicit template associationbfd map ipv4 198.51.100.1/32 MH-BGP-PROFILE

Part 4 โ€” BFD with Static Routes

Static routes don't have a routing protocol to trigger BFD natively. Use ip route ... track with BFD-backed tracking:

cisco
! Step 1: BFD config on interfaceinterface GigabitEthernet0/1 bfd interval 300 min_rx 300 multiplier 3! Step 2: Create IP SLA using BFD (IOS-XE 16.9+)ip sla 10 icmp-echo 10.0.0.2 source-interface GigabitEthernet0/1ip sla schedule 10 life forever start-time nowtrack 10 ip sla 10 reachability! Step 3: Static route dependent on BFD-monitored trackip route 10.100.0.0 255.255.0.0 10.0.0.2 track 10! Route is installed only when BFD session is Up

Part 5 โ€” BFD on Cisco NX-OS

cisco
! NX-OS โ€” global BFD configfeature bfd! Interface-level BFDinterface Ethernet1/1 bfd interval 300 min_rx 300 multiplier 3 no bfd echo! OSPF BFD on NX-OSrouter ospf 1 bfd! BGP BFD on NX-OSrouter bgp 65001 neighbor 10.0.0.2  bfd! VerifyNX# show bfd neighborsNX# show bfd neighbors detailNX# show bfd neighbors interface ethernet1/1

Note: NX-OS supports hardware BFD on Nexus 9000 and Nexus 7000 with M3 line cards. no bfd echo disables echo mode โ€” echo mode reduces CPU load but requires the far end to loop back packets, which some platforms don't support.


Real-World Scenario

The situation: Two routers connected via a Metro-E service provider circuit. The circuit has a "silent failure" mode โ€” the physical port stays up on both routers but the provider equipment in the middle drops all traffic. OSPF dead interval is 40 seconds, so traffic blackholes for 40 seconds before OSPF reconverges.

Symptoms observed:

  • Interface state: GigabitEthernet0/0 is up, line protocol is up on both routers โ€” no carrier loss
  • show ip ospf neighbor shows neighbor stuck in FULL state for 35 seconds after the circuit fails
  • Users experience a 40-second outage before the backup path activates

Fix โ€” BFD catches the silent failure in 900ms:

cisco
interface GigabitEthernet0/0 bfd interval 300 min_rx 300 multiplier 3 ip ospf bfd! After silent failure:! BFD sends probe at t=0ms, t=300ms, t=600ms โ€” no reply! At t=900ms (3 missed intervals): BFD declares neighbor DOWN! BFD notifies OSPF immediately! OSPF removes neighbor, reconverges via backup path! Total outage: ~1 second instead of 40 seconds

Troubleshooting

BFD session flapping โ€” show bfd neighbors shows Up then Down repeatedly

Symptom: BFD neighbor bounces every few seconds. OSPF/BGP adjacency unstable.

Cause: Timer mismatch between peers, or link jitter causing missed hellos. Also common on high-CPU routers where BFD is software-processed.

Fix:

cisco
! Increase timers to reduce sensitivity to jitterinterface GigabitEthernet0/0 bfd interval 500 min_rx 500 multiplier 5! Detection time: 500ms ร— 5 = 2500ms โ€” more tolerant of jitter! Check for timer negotiation:R1# show bfd neighbors detail! "Registered protocols" and "Local Diag" fields! "TX Interval: 500ms, RX Interval: 500ms" โ€” verify both sides negotiated same

BFD not starting โ€” show bfd neighbors empty

Symptom: Configured BFD on interface and enabled under OSPF, but no BFD sessions appear.

Cause: BFD requires both the bfd interval on the interface AND the protocol command (ip ospf bfd). Missing either one = no session.

Fix:

cisco
! Verify both are present:R1# show running-config interface GigabitEthernet0/0 | include bfd! Must show: bfd interval 300 min_rx 300 multiplier 3R1# show running-config | section router ospf! Must show: bfd all-interfaces (or interface-level ip ospf bfd)

BFD session Up but BGP still takes 90 seconds to converge

Symptom: BFD shows State: Up, Registered protocols: BGP, but after link failure BGP doesn't converge faster.

Cause: fall-over bfd was configured but the BGP neighbor was already in Established state before BFD came up. BGP didn't register with BFD.

Fix:

cisco
! Clear the BGP session to force re-registration with BFDR1# clear ip bgp 10.0.0.2 soft! Or hard reset:R1# clear ip bgp 10.0.0.2! Verify BGP is registered:R1# show bfd neighbors 10.0.0.2 detail | include Registered! "Registered protocols: BGP" โ€” BFD will notify BGP on failure

BFD Deployment Checklist

  • Timer negotiation: both peers use the same bfd interval values โ€” negotiated value is the higher of the two
  • Hardware BFD verified on platform before using sub-300ms timers โ€” show platform resources on NX-OS
  • no bfd echo configured on interfaces facing devices that don't support BFD echo (common on L3 switches)
  • Multi-hop BFD template created for any eBGP sessions using loopback addresses
  • BFD enabled on both sides of every link โ€” one-sided BFD won't form a session
  • fall-over bfd configured on all critical BGP neighbors where fast convergence is needed
  • OSPF bfd all-interfaces or per-interface ip ospf bfd โ€” verify with show ip ospf neighbor
  • After BFD deployment: test by shutting one side of the interface and verifying detection time with timestamps in logs
  • show bfd neighbors detail monitored for "Diag: No Diagnostic" โ€” any other value means the session had issues