Back to Blog
โ˜…โ˜…โ˜…Advanced๐Ÿ”€ Routing & Switching
BGPRoutingTroubleshootingBest PracticesCisco

BGP Troubleshooting and Best Practices

March 8, 2026ยท10 min read

Overview

BGP is the routing protocol that holds the internet together โ€” and the one most likely to cause a major outage if misconfigured. Unlike IGPs, BGP is policy-driven, session-based, and unforgiving of small errors. This guide covers systematic troubleshooting from session establishment through route propagation, followed by hardening best practices for production deployments.






// BGP Topology โ€” eBGP Peering + iBGP Route Reflector
ISP-AAS 65100 ISP-BAS 65200 ASBR-1AS 6500110.0.0.1 RRRoute Reflector10.1.1.1 ASBR-2AS 6500110.0.0.2 PE-1RR Client10.1.1.2 PE-2RR Client10.1.1.3 eBGPeBGPiBGPiBGPRR-ClientRR-ClientDashed=iBGP | Solid=eBGP | Purple=Route Reflector
// BGP Finite State Machine
IdleConnectActiveOpenSentOpenConfirmEstablishedTCP SYNTCP failOPEN sentOPEN rcvdKEEPALIVEResetEach state = a phase of TCP + BGP session establishment

Step 1 โ€” Verify Neighborship

Start every BGP troubleshoot here. Never assume the session is up.

cisco
! Check all BGP neighbors and their stateR1# show bgp summaryR1# show bgp neighbors 10.0.0.2! Check if TCP 179 session existsR1# show tcp brief | include 179! Verify route to peer existsR1# show ip route 10.0.0.2! Check BGP process and AS numberR1# show run | section router bgp

If stuck in Active state โ€” the most common issue is a missing or wrong update-source. eBGP peers use the directly connected interface by default. iBGP peers using loopbacks must have update-source Loopback0 configured.

cisco
router bgp 65001 neighbor 10.0.0.2 remote-as 65002 neighbor 10.0.0.2 update-source Loopback0   ! required for iBGP over loopback neighbor 10.0.0.2 ebgp-multihop 2           ! required if eBGP over non-direct link

Step 2 โ€” Diagnose OPEN Message Failures

If the session reaches OpenSent but drops, it's almost always one of these:

cisco
! Check for BGP notifications (tells you exactly why session dropped)R1# show bgp neighbors 10.0.0.2 | include notification|error|hold! Common errors in output:! "Notification message sent: hold time expired"  โ†’ hold timer too short! "Notification message sent: Bad AS"             โ†’ remote-as mismatch! "Notification message received: MD5 mismatch"  โ†’ password mismatch
cisco
! Verify timers match on both sides (or set to 0 to disable hold timer)router bgp 65001 neighbor 10.0.0.2 timers 10 30        ! keepalive 10s, hold 30s neighbor 10.0.0.2 password MySecret   ! must be identical on both peers

Step 3 โ€” Route Advertisement Issues

Session is up but routes are missing. Work through these checks in order.

cisco
! What routes are we sending to the peer?R1# show bgp neighbors 10.0.0.2 advertised-routes! What routes are we receiving from the peer?R1# show bgp neighbors 10.0.0.2 received-routesR1# show bgp neighbors 10.0.0.2 routes          ! received AND passing local policy! Check if route is in BGP table at allR1# show bgp 192.168.10.0/24! If route missing from BGP table entirely โ€” check network statementR1# show run | section router bgp | include network! Route must exist EXACTLY in routing table to be advertised via network statementR1# show ip route 192.168.10.0 255.255.255.0

Common gotcha: A network statement requires an exact match in the IP routing table. If you have network 10.0.0.0 mask 255.255.0.0 but only 10.0.1.0/24 in the RIB, BGP will not advertise it.

cisco
! Alternative โ€” use redistribution (with a route-map filter!)router bgp 65001 redistribute connected route-map CONNECTED_TO_BGP redistribute static route-map STATIC_TO_BGP

Step 4 โ€” Route Not Installed in RIB

BGP has the route but it's not making it into the routing table.

cisco
! Check BGP table for the prefix โ€” look at the flagsR1# show bgp 10.10.0.0/16! ">" = best path selected! "i" = learned via iBGP! No ">" = not best โ€” check why! Common reasons path is not best:! 1. Weight (Cisco-proprietary, higher = better, local to router)! 2. Local Preference (higher = better, shared within AS)! 3. AS Path length (shorter = better)! 4. Origin code (IGP < EGP < Incomplete)! 5. MED (lower = better, compared between same AS)! 6. iBGP vs eBGP (eBGP preferred)! 7. IGP metric to next-hop! Check next-hop reachability โ€” BGP routes with unreachable next-hop are unusableR1# show bgp 10.10.0.0/16 | include Next HopR1# show ip route 203.0.113.1     ! verify next-hop is reachable! iBGP next-hop issue โ€” next-hop-self fixes thisrouter bgp 65001 neighbor 10.0.0.3 next-hop-self    ! set yourself as next-hop for iBGP peers

Step 5 โ€” Route Filtering Troubleshoot

Prefix lists, route-maps, and communities are silent killers.

cisco
! Check what route-maps/prefix-lists are applied to the peerR1# show bgp neighbors 10.0.0.2 | include policy|map|list|filter! Test a prefix against a prefix-listR1# show ip prefix-list MYLIST 10.10.0.0/24! Test a prefix against a route-mapR1# debug ip bgp 10.0.0.2 updates     ! WARNING: verbose, use with caution in prodR1# undebug all! Check community values on a prefixR1# show bgp 10.10.0.0/16 | include Community

Step 6 โ€” Convergence and Route Flapping

cisco
! Check BGP flap historyR1# show bgp neighbors 10.0.0.2 | include flaps|reset|drops! Check dampening status (if enabled)R1# show bgp dampened-pathsR1# show bgp flap-statistics! Clear specific neighbor (soft reset โ€” no session drop)R1# clear ip bgp 10.0.0.2 softR1# clear ip bgp 10.0.0.2 soft in    ! re-apply inbound policyR1# clear ip bgp 10.0.0.2 soft out   ! re-advertise outbound

BGP Best Practices

CategoryBest PracticeCommand / Notes
SecurityAlways use MD5 authenticationneighbor x.x.x.x password SECRET
SecurityEnable GTSM (TTL security)neighbor x.x.x.x ttl-security hops 1
SecurityFilter bogons and private ASNs inboundUse prefix-list + AS-path filter
StabilitySet explicit timersneighbor x.x.x.x timers 10 30
StabilityUse BFD for fast failure detectionneighbor x.x.x.x fall-over bfd
StabilityEnable soft-reconfiguration inboundneighbor x.x.x.x soft-reconfiguration inbound
PolicyAlways filter with route-maps, not distribute-listsMore flexible, supports communities
PolicyUse communities for policy taggingScales better than per-peer prefix lists
iBGPUse Route Reflectors instead of full meshneighbor x.x.x.x route-reflector-client
iBGPAlways set next-hop-self on RR or ASBRneighbor x.x.x.x next-hop-self

BGP Hardening โ€” Anti-Spoofing and Prefix Limits

cisco
! Limit maximum prefixes from a peer (prevents table overflow attacks)router bgp 65001 neighbor 10.0.0.2 maximum-prefix 1000 80   ! warn at 80%, drop session at 1000! Reject private ASNs from eBGP peersrouter bgp 65001 neighbor 10.0.0.2 filter-list 10 in!ip as-path access-list 10 deny _64[5-9][0-9]2_ip as-path access-list 10 deny _6[5-9][0-9]3_ip as-path access-list 10 permit .*! Block bogon prefixes inboundip prefix-list BOGONS deny 10.0.0.0/8 le 32ip prefix-list BOGONS deny 172.16.0.0/12 le 32ip prefix-list BOGONS deny 192.168.0.0/16 le 32ip prefix-list BOGONS deny 0.0.0.0/8 le 32ip prefix-list BOGONS permit 0.0.0.0/0 le 32!router bgp 65001 neighbor 10.0.0.2 prefix-list BOGONS in

Quick Reference โ€” BGP Troubleshoot Checklist

SymptomFirst CheckFix
Stuck in ActiveRoute to peer IP, source interfaceAdd static route, set update-source
Session drops repeatedlyshow bgp neighbors โ€” notification messageFix AS, password, or hold timer
Routes not advertisedshow bgp advertised-routes to peerCheck network stmt, route-map permit
Routes received but not in RIBshow bgp prefix โ€” is it best path?Fix next-hop, weight, local-pref
iBGP routes not propagatingFull mesh or RR configured?Add RR or missing iBGP peers
Flapping sessionInterface stability, BFD, MTUFix physical, tune timers, add BFD