Octet

What are the default BGP timers, and how do you detect a dead neighbor faster?

Show the answer

Say this first

Cisco IOS defaults to a 60 second keepalive and a 180 second hold time. Junos uses 30 and 90. The hold time is negotiated to the lower of the two values in the OPEN messages. Three minutes is far too slow to notice a dead peer, so I either lower the timers, for example to 10 and 30, or better, run BFD and tie BGP to it with neighbor x fall-over bfd for sub-second detection.

Go deeper

Timers

  • Keepalive: how often a KEEPALIVE is sent. Hold: how long without any message before the peer is declared dead. A hold time of 0 disables both; otherwise it must be at least 3 seconds.
  • Per neighbor: neighbor 192.0.2.1 timers 10 30. For all neighbors: timers bgp 10 30.
  • New timers take effect only when the session is next established.

Fast external fallover

bgp fast-external-fallover is on by default in IOS. When the interface to a directly connected eBGP peer goes down, the session drops immediately. It does not help when the link stays up but the far end dies, for example with a provider switch or media converter in the middle.

BFD

Cisco IOS
interface GigabitEthernet0/0/0
 bfd interval 300 min_rx 300 multiplier 3
!
router bgp 64500
 neighbor 192.0.2.1 fall-over bfd

300 ms times 3 gives about 900 ms detection. The peer must run BFD too, so for an ISP session it is something you agree with the provider. Sessions between loopbacks need multihop BFD, which is configured differently and not supported on every platform.

Traps

  • Saying the hold time is negotiated to the higher value.
  • Changing timers and expecting the running session to pick them up without a reset.
How did you do?Book 4.1 Global Internet