Why BGP Routes Flap — Exact Troubleshooting Process
A BGP route flap occurs when a route is repeatedly advertised and withdrawn, or when the BGP neighbor session repeatedly goes up and down.
The first thing to determine is:
Is the BGP session flapping, or is only one prefix flapping?
That decision determines the troubleshooting path.
1. Check BGP Neighbor Stability
Run:
show ip bgp summaryCheck the Up/Down timer.
If the timer keeps resetting:
BGP session is flappingIf the session remains stable but a route disappears and returns:
Prefix is flapping2. If the BGP Session Is Flapping
Check the neighbor details:
show ip bgp neighbors <neighbor-ip>Look for:
Last reset reason
Hold timer expired
BFD down
TCP reset
Peer closed sessionThen verify the underlying connection.
Check the interface
show ip interface brief
show interfaces <interface>Verify:
Interface = up/up
No CRC errors
No input errors
No link flapsCheck neighbor reachability
ping <neighbor-ip>
traceroute <neighbor-ip>For loopback peering:
ping <neighbor-loopback> source <local-loopback>Check BFD
If BFD is configured:
show bfd neighborsA BFD flap can immediately reset the BGP session.
Check logs
show loggingLook for the sequence:
Interface Down
↓
BFD Down
↓
BGP Neighbor DownIf this occurs, BGP is not the root cause.
3. If Only One BGP Prefix Is Flapping
Check the prefix:
show ip bgp <prefix>Example:
show ip bgp 10.50.50.0/24Verify:
Next hop
Best path
AS path
Local preference
MED
Origin
Then check whether the route still exists at the originating router:
show ip route <prefix>If the route disappears from the RIB, BGP may withdraw it.
Example:
Connected / Static / OSPF route disappears
↓
BGP network statement no longer matches
↓
BGP withdraws the prefix4. Check BGP Next-Hop Reachability
A BGP route depends on its next hop being reachable.
Run:
show ip route <next-hop>
show ip cef <next-hop>Example:
show ip route 10.0.12.2
show ip cef 10.0.12.2If next-hop reachability keeps changing:
IGP / transport instability
↓
BGP route instabilityTroubleshoot OSPF, IS-IS, static routing, or the physical path first.
5. Check Route Origination
If the route is locally advertised using:
network 10.50.50.0 mask 255.255.255.0verify that the exact route exists:
show ip route 10.50.50.0If the RIB route disappears, BGP withdraws the advertisement.
Also check if the route comes from redistribution:
OSPF
↓
Redistribution
↓
BGPIf the OSPF route flaps, the BGP route also flaps.
6. Check Routing Policy
If the route exists but is intermittently advertised, check policy.
show route-map
show ip prefix-list
show ip bgp neighbors <neighbor> advertised-routesVerify:
Prefix-list permits the route
Route-map permits the route
Community policy is correct
No conditional advertisement issue7. Check CPU and Control Plane
High CPU can cause missed BGP keepalives or BFD packets.
Run:
show processes cpu sorted
show processes memory sorted
show policy-map control-planeLook for:
High CPU
Memory pressure
Control-plane drops8. Exact BGP Flap Troubleshooting Workflow
Use this sequence every time:
9. Most Useful Commands
show ip bgp summary
show ip bgp neighbors <neighbor>
show ip bgp <prefix>
show ip route <prefix>
show ip route <next-hop>
show ip cef <next-hop>
show ip interface brief
show interfaces
show bfd neighbors
show logging
show route-map
show ip prefix-list
show processes cpu sorted
show policy-map control-plane10. Real Troubleshooting Example
Assume this route keeps disappearing:
10.50.50.0/24First:
show ip bgp summaryIf neighbor uptime is:
00:00:10and keeps resetting, check:
show ip bgp neighbors 10.0.12.2Output:
Last reset due to BFD session downThen:
show bfd neighbors
show interfaces Gi0/0If interface errors are increasing:
CRC errors
Input errors
Link transitionsthe actual failure path is:
Physical Link Problem
↓
BFD Flap
↓
BGP Session Reset
↓
Routes Withdrawn
↓
Traffic LossSo the correct fix is the physical link, not BGP.
Key Troubleshooting Rule
Always troubleshoot BGP in this order:
LINK
↓
NEIGHBOR
↓
NEXT HOP
↓
SOURCE ROUTE
↓
POLICY
↓
FORWARDINGFinal Rule
If the neighbor uptime resets, troubleshoot the BGP session and its transport. If the neighbor stays stable but one route flaps, troubleshoot the route source, next hop, redistribution, or policy.
