<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>PacketHerding</title>
  <subtitle>Field notes on networks that behave. By Eric Paulu.</subtitle>
  <link href="https://packetherding.com/feed.xml" rel="self" />
  <link href="https://packetherding.com/" />
  <updated>2026-11-20T00:00:00Z</updated>
  <id>https://packetherding.com/</id>
  <author>
    <name>Eric Paulu</name>
  </author>
  <entry>
    <title>Why your BGP failover takes three minutes (and how to get it under one second)</title>
    <link href="https://packetherding.com/posts/why-bgp-failover-takes-three-minutes/" />
    <updated>2026-11-20T00:00:00Z</updated>
    <id>https://packetherding.com/posts/why-bgp-failover-takes-three-minutes/</id>
    <content type="html">&lt;p&gt;You&#39;ve got two internet circuits, two eBGP sessions, and a design doc that says &amp;quot;automatic failover.&amp;quot; Then the primary provider has a bad night, and your traffic disappears for nearly three minutes before the backup takes over. Everything &amp;quot;worked.&amp;quot; It just worked slowly.&lt;/p&gt;
&lt;p&gt;Here&#39;s why that happens and the fix I reach for first.&lt;/p&gt;
&lt;h2&gt;The link was up, so nothing noticed&lt;/h2&gt;
&lt;p&gt;On a directly connected eBGP session, most platforms tear the session down the instant the interface goes down. Cisco calls this &lt;em&gt;fast external fallover&lt;/em&gt;, and it&#39;s on by default. If someone unplugs the cable, you fail over in about a second.&lt;/p&gt;
&lt;p&gt;The trouble is that most real outages don&#39;t take your interface down. Your handoff often lands on a provider switch, a Metro Ethernet NID or a media converter. When the provider&#39;s router behind that box dies, your port stays green. The only thing left to notice is BGP itself, and BGP is patient:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Timer&lt;/th&gt;
&lt;th&gt;Cisco IOS default&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Keepalive&lt;/td&gt;
&lt;td&gt;60 seconds&lt;/td&gt;
&lt;td&gt;How often each side says &amp;quot;still here&amp;quot;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hold time&lt;/td&gt;
&lt;td&gt;180 seconds&lt;/td&gt;
&lt;td&gt;How long to wait without hearing anything before giving up&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;So the worst case is three minutes of traffic going into a router that isn&#39;t there.&lt;/p&gt;
&lt;h2&gt;Option 1: Shorter BGP timers&lt;/h2&gt;
&lt;p&gt;You can lower the timers per neighbor:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;router bgp 65010
 neighbor 203.0.113.1 remote-as 64500
 neighbor 203.0.113.1 timers 10 30&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That gets you down to 30 seconds. It&#39;s better, but it&#39;s still slow, and pushing BGP timers much lower puts load on the control plane of both routers. Some providers also won&#39;t accept a hold time below their own minimum, and the session negotiates to the lower of the two values anyway.&lt;/p&gt;
&lt;h2&gt;Option 2: BFD (the one I recommend)&lt;/h2&gt;
&lt;p&gt;Bidirectional Forwarding Detection is a tiny, purpose-built hello protocol. It runs alongside BGP, often in hardware, and its only job is answering &amp;quot;can I still forward packets to that neighbor?&amp;quot; When BFD declares the neighbor down, it tells BGP, and BGP drops the session immediately.&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;interface GigabitEthernet0/0/0
 description ISP-A handoff
 ip address 203.0.113.2 255.255.255.252
 bfd interval 300 min_rx 300 multiplier 3
!
router bgp 65010
 neighbor 203.0.113.1 remote-as 64500
 neighbor 203.0.113.1 fall-over bfd&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With a 300 ms interval and a multiplier of 3, a dead path is detected in about 900 ms. Verify it with:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;show bfd neighbors details
show ip bgp neighbors 203.0.113.1 | include BFD&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;callout warn&quot;&gt;
&lt;p&gt;&lt;strong&gt;Ask your provider first.&lt;/strong&gt; BFD has to run on both ends. Many carriers support it on business internet and MPLS handoffs, but it&#39;s often off by default and has to be requested on the order or through a ticket. Ask which intervals they support before you configure yours.&lt;/p&gt;
&lt;/div&gt;
&lt;h2&gt;Don&#39;t stop at detection&lt;/h2&gt;
&lt;p&gt;Fast detection only helps if the backup path is ready to take traffic. While you&#39;re in there, check that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Outbound preference is explicit.&lt;/strong&gt; Set &lt;code&gt;local-preference&lt;/code&gt; on routes learned from the primary so you aren&#39;t relying on tie-breakers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inbound preference is explicit.&lt;/strong&gt; AS-path prepending (or provider communities) on the backup keeps return traffic on the primary while it&#39;s healthy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You&#39;ve tested it.&lt;/strong&gt; Shut down the provider-facing side of a link in a maintenance window, or ask the carrier to drop the session, and time it. A failover you haven&#39;t tested is a hope, not a design.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;The short version&lt;/h2&gt;
&lt;p&gt;If your eBGP handoffs don&#39;t go through a direct cable to the provider router, assume an outage will leave the interface up. Add BFD where the provider supports it, shorten BGP timers where they don&#39;t, and test the failover so you know the number instead of guessing it.&lt;/p&gt;
</content>
  </entry>
</feed>