BGP Network Troubleshooting: Best Practices and Commands - 夜莺博客

BGP Network Troubleshooting: Best Practices and Commands

BGP is a complex protocol, and effective troubleshooting requires a calm, organized approach rather than randomly executing commands across the network. This guide lays out a checklist-based workflow that starts at layer 1 and progresses upward: verify peering status, confirm connectivity between loopbacks, check route origination, inspect update exchange, and finally audit route filtering. Each step includes the exact Cisco IOS commands and realistic output so you can reproduce the workflow on your own routers.

Step 1: Verify BGP Peering Status

Start with show ip bgp summary. When peering uses loopback interfaces, perform a loopback-to-loopback ping — a plain ping uses the outgoing interface IP, which makes iBGP fail. Then check the local configuration:

R1# show running-config | section bgp
router bgp 64500
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 64500
 neighbor 3.3.3.3 remote-as 64501
 neighbor 3.3.3.3 update-source Loopback0
 address-family ipv4
  neighbor 2.2.2.2 activate
  neighbor 3.3.3.3 activate

Use debug ip tcp transactions to see which source address the peer is initiating sessions from; if it uses the physical interface IP instead of the loopback, add update-source Loopback0 on both ends.

eBGP Multihop for Non-Directly-Connected Peers

eBGP defaults to TTL 1, so multihop peering fails unless configured. For a dual-homed design where the eBGP peer is two hops away:

router bgp 64500
 neighbor 3.3.3.3 remote-as 64501
 neighbor 3.3.3.3 ebgp-multihop 2
 neighbor 3.3.3.3 update-source Loopback0

Step 2: Verify Missing Routes and Origination

BGP only advertises locally known routes. If a network statement does not originate, check the RIB:

R2# show ip bgp | include 50.50.50.0
R2(config)# ip route 50.50.50.0 255.255.255.0 null 0

Add a static route (optionally to Null0 for blackhole aggregates) and the prefix will be originated and advertised.

Update Exchange and Route Filtering Checks

R2# show ip bgp neighbor 1.1.1.1 advertised-routes
R1# show ip bgp neighbor 2.2.2.2 routes
R1# show ip bgp neighbor 2.2.2.2 received-routes

received-routes requires soft-reconfiguration inbound. When a prefix is missing, check for prefix-list, AS_PATH and community filters applied to the neighbor, then review route-maps that modify attributes.

Best Practices Summary

Work one issue at a time, verify each layer before moving up, use monitoring tools such as BGPmon or ExaBGP for real-time visibility, and never run random debug commands in production. A disciplined checklist turns BGP incidents from firefighting into mechanical fixes.

Continue with securing BGP with ASPA, BGP TCP-AO on Arista EOS, and IOS-XR input drop troubleshooting.

原文链接:https://www.noction.com/knowledge-base/bgp-network-troubleshooting