debug ip routing
Use debug ip routing to monitor real-time IP routing table updates and routing protocol events, helping troubleshoot route installation or removal issues.
debug ip routingWhen to Use This Command
- Troubleshooting why a route is not being installed in the routing table after configuring a static route or dynamic routing protocol.
- Monitoring route flapping caused by unstable links or misconfigured routing protocols.
- Verifying the sequence of events when a new route is learned via OSPF or EIGRP and added to the routing table.
- Diagnosing why a specific route is being removed unexpectedly, such as due to a higher administrative distance or route poisoning.
Command Examples
Monitoring a new static route installation
debug ip routingRT: add 192.168.2.0/24 via 10.0.0.2, static metric [1/0] RT: closer admin distance for 192.168.2.0, adding %SYS-5-CONFIG_I: Configured from console by console RT: NET-RED 192.168.2.0/24 via 10.0.0.2, static metric [1/0] RT: add 192.168.2.0/24 via 10.0.0.2, static metric [1/0]
Line 1: RT indicates routing table update; 'add' means route being added; 'via 10.0.0.2' is next-hop; 'static' is protocol; '[1/0]' is administrative distance/metric. Line 2: 'closer admin distance' means this route is preferred over existing. Line 3: syslog confirming config change. Line 4: 'NET-RED' indicates redistribution event. Line 5: repeated add confirms installation.
Observing route removal due to interface down
debug ip routingRT: del 192.168.1.0/24 via 10.0.0.1, connected metric [0/0] RT: interface GigabitEthernet0/0 changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to down RT: del 192.168.1.0/24 via 10.0.0.1, connected metric [0/0]
Line 1: 'del' indicates route deletion; 'connected' means directly connected route; '[0/0]' is AD/metric. Line 2: RT message about interface state change. Line 3: syslog confirming line protocol down. Line 4: repeated deletion confirms removal.
Understanding the Output
The debug ip routing output displays real-time routing table changes. Each line starts with 'RT:' indicating a routing table event. 'add' means a route is being inserted, 'del' means removal. The route prefix and subnet mask are shown (e.g., 192.168.2.0/24). 'via' indicates the next-hop IP address. The protocol source (e.g., static, connected, ospf, eigrp) is listed. The metric is shown in brackets: [administrative distance/metric]. For example, [1/0] means AD=1, metric=0. 'closer admin distance' messages indicate route selection when multiple sources exist. 'NET-RED' indicates redistribution. Interface state changes are also logged. Good output shows expected adds/dels; bad output includes unexpected flapping or incorrect routes. Watch for 'del' without corresponding 'add' if routes disappear unexpectedly.
CCNA Exam Tips
CCNA exam tip: debug ip routing is a privileged EXEC command; you must be in enable mode.
CCNA exam tip: Always use 'undebug all' or 'no debug ip routing' to stop debugging; leaving it on can overwhelm the router CPU.
CCNA exam tip: The output shows administrative distance in brackets; remember that lower AD is preferred (e.g., static AD 1 vs. OSPF AD 110).
CCNA exam tip: You may be asked to interpret debug output to determine why a route is not being installed (e.g., higher AD or missing next-hop).
Common Mistakes
Mistake 1: Forgetting to disable debug after troubleshooting, causing high CPU usage and potential router crash.
Mistake 2: Misinterpreting 'add' and 'del' messages; thinking a route is being added when it's actually being deleted (check for 'del' keyword).
Mistake 3: Assuming debug output shows all routing updates; it only shows changes, not the full routing table.
Related Commands
show ip protocols
Displays the current state of all IP routing protocols running on the router, including timers, filters, and network advertisements.
show ip route
Displays the current IP routing table on a Cisco router, used to verify routes, check next-hop addresses, and troubleshoot connectivity issues.
undebug all
Disables all active debug operations on the router, used to stop debugging output and reduce CPU load.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions