clear ip bgp *
Resets all BGP sessions and clears the BGP routing table, forcing a complete re-advertisement and re-learning of all BGP routes from all neighbors.
clear ip bgp *When to Use This Command
- After making major BGP policy changes (e.g., route maps, prefix lists) that require all sessions to reset to take effect.
- When troubleshooting BGP convergence issues and need to force a full route refresh from all peers.
- After upgrading or rebooting a BGP router to re-establish all BGP sessions and rebuild the routing table.
- When testing BGP failover scenarios by simulating a complete BGP reset.
Command Examples
Basic BGP session reset
clear ip bgp *No output is displayed. The command immediately resets all BGP sessions. Use 'show ip bgp summary' to verify sessions re-establish.
Verifying after reset
show ip bgp summaryBGP router identifier 192.168.1.1, local AS number 65001 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.0.2 4 65002 0 0 0 0 0 never Active 10.0.0.3 4 65003 0 0 0 0 0 never Active
After 'clear ip bgp *', all neighbors show 'Active' state and zero messages. The 'Up/Down' column shows 'never' indicating sessions are being re-established. Wait for them to reach 'Established' state.
Understanding the Output
The 'clear ip bgp *' command produces no direct output. To verify its effect, use 'show ip bgp summary'. Key fields: 'Neighbor' – peer IP; 'V' – BGP version; 'AS' – neighbor's AS number; 'MsgRcvd/MsgSent' – messages exchanged; 'TblVer' – table version; 'InQ/OutQ' – queued messages; 'Up/Down' – time since last state change; 'State/PfxRcd' – current session state or number of prefixes received. After a clear, all neighbors should show 'Active' or 'Connect' and eventually 'Established'. If any neighbor remains in 'Idle' or 'Active', there may be a connectivity or configuration issue.
CCNA Exam Tips
CCNA exam tip: 'clear ip bgp *' is disruptive; it resets all BGP sessions. Use 'clear ip bgp <neighbor>' to reset a single session.
CCNA exam tip: After clearing BGP, the router sends OPEN messages to re-establish sessions. The 'Up/Down' time resets to 'never' until the session comes up.
CCNA exam tip: BGP route flapping can be caused by frequent clears. Use 'bgp dampening' to mitigate instability.
CCNA exam tip: The command does not affect the BGP configuration; only runtime sessions and the routing table are cleared.
Common Mistakes
Mistake 1: Using 'clear ip bgp *' for minor policy changes; it causes unnecessary network disruption. Use 'clear ip bgp * soft' for a soft reset instead.
Mistake 2: Forgetting to verify BGP sessions after the clear; sessions may fail to re-establish due to misconfiguration.
Mistake 3: Assuming the command clears only the BGP table; it also resets all TCP sessions with BGP peers.
Related Commands
clear ip bgp *
Resets all BGP sessions and clears the BGP routing table, forcing a complete re-advertisement and re-learning of all BGP routes from all neighbors.
show ip bgp summary
Displays a summary of the BGP neighbor status and prefix counts, used to quickly verify BGP peering and routing table health.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions