0% found this document useful (0 votes)
70 views14 pages

BGP Troubleshooting Commands

This document provides a comprehensive guide on BGP troubleshooting commands, including basic and advanced commands for verifying BGP neighbor status, checking advertised and received routes, and diagnosing common issues. It outlines specific commands to use, expected outputs, and potential fixes for problems such as BGP neighbors stuck in active state, routes not being advertised, and route flapping. Additionally, it emphasizes the importance of disabling debugging after troubleshooting and offers a structured approach to resolving various BGP-related issues.

Uploaded by

Md
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views14 pages

BGP Troubleshooting Commands

This document provides a comprehensive guide on BGP troubleshooting commands, including basic and advanced commands for verifying BGP neighbor status, checking advertised and received routes, and diagnosing common issues. It outlines specific commands to use, expected outputs, and potential fixes for problems such as BGP neighbors stuck in active state, routes not being advertised, and route flapping. Additionally, it emphasizes the importance of disabling debugging after troubleshooting and offers a structured approach to resolving various BGP-related issues.

Uploaded by

Md
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

2/12/25, 2:50 AM OSPF Troubleshooting Commands

BGP Basic and Advanced Troubleshooting Commands Cheat Sheet


This cheat sheet includes essential BGP troubleshooting commands, sample outputs, and explanations.

1. Basic BGP Verification Commands


1.1 Check BGP Summary (Neighbor Status & Peering Information)
bash Copy Edit

show ip bgp summary

Output Example:

pgsql Copy Edit

BGP router identifier 192.168.1.1, local AS number 65001


BGP table version is 15, main routing table version 15
Neighbor V AS MsgRcvd MsgSent Up/Down State/PfxRcd
192.168.2.2 4 65002 200 195 2d10h 10
10.1.1.1 4 65003 100 90 1d05h 20

✅ Explanation:
Neighbor: IP address of BGP peer.

V: BGP version.

AS: Autonomous System number of the neighbor.

MsgRcvd / MsgSent: Number of BGP messages exchanged.

Up/Down: How long the session has been established.

State/PfxRcd: If "State" is "Idle, Active, or Connect", there’s an issue. If a number is present, it's the
number of prefixes received.

1.2 Check BGP Peers in Detail

bash Copy Edit

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 1/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands

show ip bgp neighbors 192.168.2.2

Output Example:

pgsql Copy Edit

BGP neighbor is 192.168.2.2, remote AS 65002, external link


BGP state = Established, up for 2d10h
Last read 00:00:21, Last write 00:00:21
Hold time is 180, keepalive interval is 60 seconds
Received 10 prefixes, Sent 12 prefixes
Route refresh: advertised and received

✅ Explanation:
State = Established → Peering is working fine.

Hold time / keepalive interval → Ensure it matches the neighbor.

Prefixes received/sent → Confirms routes exchanged.

1.3 Check BGP Advertised Routes to a Specific Neighbor


bash Copy Edit

show ip bgp neighbors 192.168.2.2 advertised-routes

Output Example:

nginx Copy Edit

Network Next Hop Metric LocPrf Weight Path


10.10.10.0/24 192.168.1.1 0 100 0 i
192.168.100.0/24 192.168.1.1 0 100 0 65001 65002 i

✅ Explanation:
Next Hop: IP address used to reach the network.

LocPrf (Local Preference): Higher is preferred.

Weight: Cisco proprietary metric (local preference within the router).

Path: AS Path showing the route traversal.

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 2/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands

1.4 Check Received Routes from a BGP Neighbor

bash Copy Edit

show ip bgp neighbors 192.168.2.2 received-routes

Output Example:

nginx Copy Edit

Network Next Hop Metric LocPrf Weight Path


172.16.1.0/24 192.168.2.2 20 100 0 65002 i
192.168.50.0/24 192.168.2.2 10 100 0 65002 65003 i

✅ Explanation:
Lists all received routes, whether they are used or not.

1.5 Check BGP Routing Table for a Specific Prefix


bash Copy Edit

show ip bgp 10.10.10.0/24

Output Example:

nginx Copy Edit

BGP routing table entry for 10.10.10.0/24, version 15


Paths: (2 available, best #1)
Advertised to update-groups:
192.168.2.2
65002 65003
192.168.2.2 (metric 10) from 192.168.2.2
Origin IGP, localpref 100, valid, external, best
65004
192.168.3.3 (metric 20) from 192.168.3.3
Origin IGP, localpref 90, valid, external

✅ Explanation:
Best Path (✔): The best path chosen by BGP is marked with "best."

Local Preference: Higher preference is preferred.

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 3/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands

AS Path: Shows how the route has traveled.

2. Advanced BGP Troubleshooting Commands


2.1 Check BGP Flaps and Session History
bash Copy Edit

show ip bgp neighbors 192.168.2.2 | include Last reset

Output Example:

pgsql Copy Edit

Last reset 1w2d due to peer closing session

✅ Fix:
If frequent resets, check MTU, peer AS configuration, or network stability.

2.2 Check Routes Not Being Advertised Due to Policy


bash Copy Edit

show ip bgp filter-list

Output Example:

mathematica Copy Edit

Prefix-list DENY-ROUTES in effect, blocking 192.168.50.0/24

✅ Fix:
Check prefix-list or route-map blocking the routes.

2.3 Debug BGP Events (Use with Caution!)

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 4/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands
bash
Copy Edit

debug ip bgp events

Output Example:

yaml Copy Edit

Feb 6 10:45:12: %BGP-5-ADJCHANGE: neighbor 192.168.2.2 Down - BGP Notification received


Feb 6 10:45:13: %BGP-3-NOTIFICATION: received error: Hold Timer Expired

✅ Fix:
Ensure both peers have matching hold timers ( show ip bgp neighbors ).

2.4 Check BGP Table Version for Updates


bash Copy Edit

show ip bgp

Output Example:

pgsql Copy Edit

BGP table version is 25, main routing table version 25

✅ Explanation:
If table version isn’t increasing, routes aren’t being learned.

2.5 Check Route Dampening (Suppress Flapping Routes)


bash Copy Edit

show ip bgp dampening flap-statistics

Output Example:

yaml Copy Edit

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 5/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands

Network Flaps Penalty Suppressed


10.1.1.0/24 5 1000 Yes

✅ Fix:
Investigate link stability issues or adjust dampening parameters.

3. Common BGP Issues and Fixes


Issue Command to Check Possible Fix

No BGP Neighbor show ip bgp summary Verify peer IP, AS, and neighbor <IP> remote-as
<AS> command.

BGP Stuck in show ip bgp neighbors Ensure TCP port 179 is open, check reachability.
"Active"

Missing BGP Routes show ip bgp / show ip route bgp Check prefix lists, route maps, and neighbor
settings.

High CPU in BGP `show process cpu include BGP`


Process

Routes Not show ip bgp neighbors <IP> Verify route-maps and prefix-lists applied to the
Advertised advertised-routes neighbor.

Route Flapping show ip bgp dampening flap- Adjust dampening parameters.


statistics

4. Disabling Debugging (Important!)


To disable debugging after troubleshooting:

bash Copy Edit

undebug all

Would you like help with a specific BGP issue or detailed troubleshooting scenario?

Yes

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 6/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands

What specific BGP issue are you facing? Here are some common scenarios I can help troubleshoot in
detail:

1. BGP Neighbor Stuck in Active/Idle State

2. Routes Not Being Advertised to a BGP Peer

3. BGP Route Flapping & Stability Issues

4. BGP Load Balancing Issues (Unequal Traffic Distribution)

5. BGP Peering Failing Due to Authentication (MD5 Issues)

6. Slow Convergence or High CPU Usage in BGP

7. BGP Route Filtering Issues (Prefix-List/Route-Map Problems)

8. AS Path Manipulation Troubleshooting (Local Preference, MED, etc.)

Let me know which issue you're facing, and I'll provide step-by-step troubleshooting with commands,
outputs, and fixes.

All

Comprehensive BGP Troubleshooting Guide


This guide covers all major BGP issues with step-by-step troubleshooting commands, expected outputs,
and solutions.

1. BGP Neighbor Stuck in Active/Idle State


Symptoms:
show ip bgp summary shows "Active" or "Idle" state.

No routes exchanged between BGP neighbors.

Troubleshooting Commands:

bash Copy Edit

show ip bgp summary

✅ Expected Output (Good State):

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 7/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands
mathematica
Copy Edit

Neighbor V AS MsgRcvd MsgSent Up/Down State/PfxRcd


192.168.2.2 4 65002 100 95 1d05h 10

❌ Problematic Output:
mathematica Copy Edit

Neighbor V AS MsgRcvd MsgSent Up/Down State/PfxRcd


192.168.2.2 4 65002 0 0 00:05 Active

Fixes:
✅ Step 1: Verify Reachability to BGP Peer
bash Copy Edit

ping 192.168.2.2

If no response, check network connectivity and routing.

✅ Step 2: Check TCP Port 179 (BGP)


bash Copy Edit

telnet 192.168.2.2 179

If connection fails, check firewall or ACLs blocking TCP 179.

✅ Step 3: Verify AS Number Configuration


bash Copy Edit

show run | include neighbor

Ensure the correct AS number is configured on both sides:

bash Copy Edit

neighbor 192.168.2.2 remote-as 65002

✅ Step 4: Check Logs for Errors


bash Copy Edit

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 8/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands

show logging | include BGP

Look for errors like “BGP Notification: Hold Timer Expired”

✅ Step 5: Clear BGP Session


bash Copy Edit

clear ip bgp * soft

2. Routes Not Being Advertised to a BGP Peer


Symptoms:
show ip bgp summary shows established session, but routes aren’t exchanged.

Troubleshooting Commands:
bash Copy Edit

show ip bgp neighbors 192.168.2.2 advertised-routes

✅ Expected Output:
nginx Copy Edit

Network Next Hop Metric LocPrf Weight Path


10.10.10.0/24 192.168.1.1 0 100 0 i

❌ Problematic Output:
No routes listed → Route filtering issue

Fixes:
✅ Step 1: Check if the Route Exists in the Routing Table
bash Copy Edit

show ip route 10.10.10.0

If route is missing, BGP cannot advertise it.

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 9/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands

✅ Step 2: Verify BGP Network Statement


bash Copy Edit

show run | include network

Ensure the correct network command exists:

bash Copy Edit

network 10.10.10.0 mask 255.255.255.0

✅ Step 3: Check for Route Filters (Prefix-List, Route-Map)


bash Copy Edit

show ip bgp neighbor 192.168.2.2 | include Prefix

If prefix-list is applied, check configuration:


bash Copy Edit

show run | section prefix-list

If blocking required prefixes, modify or remove the filter.

✅ Step 4: Clear BGP Session


bash Copy Edit

clear ip bgp * soft

3. BGP Route Flapping & Stability Issues


Symptoms:
show logging | include BGP shows frequent BGP session resets.

show ip bgp summary shows constant up/down cycles.

Troubleshooting Commands:

bash Copy Edit

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 10/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands

show ip bgp flap-statistics

✅ Expected Output (Stable Route):


nginx Copy Edit

Network Flaps Penalty Suppressed


192.168.50.0/24 0 0 No

❌ Problematic Output:
yaml Copy Edit

Network Flaps Penalty Suppressed


10.1.1.0/24 5 1000 Yes

Fixes:
✅ Step 1: Identify Unstable Links
bash Copy Edit

show interfaces | include input|output|errors

If interface errors are high, fix the physical issue.

✅ Step 2: Increase BGP Keepalive/Hold Timers


bash Copy Edit

neighbor 192.168.2.2 timers 60 180

✅ Step 3: Implement Route Dampening


bash Copy Edit

router bgp 65001 bgp dampening

4. BGP Load Balancing Issues


Symptoms:
BGP learned multiple paths, but only one path is used.

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 11/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands

Troubleshooting Commands:

bash Copy Edit

show ip bgp 10.10.10.0/24

✅ Expected Output (Multiple Paths with Equal Weights):


pgsql Copy Edit

Paths: (2 available, best #1)


65002 65003
192.168.2.2, metric 10, localpref 100, valid, external, best
65002 65003
192.168.3.3, metric 10, localpref 100, valid, external

❌ Problematic Output:
Only one best path.

Fixes:
✅ Enable BGP Multipath Load Balancing
bash Copy Edit

router bgp 65001 bgp bestpath as-path multipath-relax maximum-paths 2

✅ Clear BGP Session


bash Copy Edit

clear ip bgp * soft

5. BGP Peering Failing Due to Authentication (MD5 Issues)


Symptoms:
show ip bgp summary shows "Active"

show logging shows “BGP Notification received (Authentication Failure)”

Fix:
✅ Check Authentication Configuration

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 12/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands

bash Copy Edit

show run | include neighbor

If password is configured on one router but missing on another:

bash Copy Edit

neighbor 192.168.2.2 password mysecurepassword

✅ Clear BGP Session After Fix


bash Copy Edit

clear ip bgp * soft

6. Slow BGP Convergence or High CPU Usage


Symptoms:
High CPU usage in BGP process.

Routes take a long time to update.

Troubleshooting Commands:

bash Copy Edit

show processes cpu | include BGP

✅ Fixes:
Limit route updates:

bash Copy Edit

router bgp 65001 bgp scan-time 30

Reduce log messages:

bash Copy Edit

no bgp log-neighbor-changes

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 13/14
2/12/25, 2:50 AM OSPF Troubleshooting Commands

7. BGP AS Path Manipulation Issues


Symptoms:
Traffic not taking the expected route.

Fixes:
✅ Set Local Preference for Preferred Path
bash Copy Edit

route-map PREFER-AS1 permit 10 set local-preference 200

✅ Modify AS-Path Prepending for Traffic Engineering


bash Copy Edit

route-map PREPEND-AS permit 10 set as-path prepend 65001 65001

Final Notes
After making changes, always clear BGP sessions:

bash Copy Edit

clear ip bgp * soft

Would you like more specific troubleshooting on any of these issues?

https://chatgpt.com/share/67a4ff97-2cd8-800f-b78f-a5706d39b713 14/14

You might also like