Pcornel
Networking · Network Assurance › Troubleshooting

Debug

Cheat sheet · https://pcornel.dk/topic.php?topic=728

Back to the Topic

Answer

Debug commands show real-time internal events (for example debug ip ospf adj) but use CPU; limit their scope with conditions or ACLs, log to the buffer instead of the console, and turn them off with undebug all.

Remember

  • Ping tests a specific ICMP path/source, not every protocol
  • Extended ping controls source, VRF, size, DF and repetition
  • Traceroute infers TTL-expiry hops and can be altered by filtering, ECMP and asymmetry
  • Debug is live and potentially expensive; scope it and disable it promptly.

First checks

  • show debugging — active debugs
  • debug condition interface <interface> — limit scope
  • undebug all — stop

Commands

debug ip ospf adj
Emit OSPF adjacency state-machine diagnostics. Use cautiously on production devices.
debug ip nat
Debug NAT translations as they are created and used; use with care on busy routers.
debug ip packet
Debug process-switched IP packets; very heavy on production devices, restrict with an ACL.
debug ip icmp
Debug ICMP messages processed by the router.
debug ip routing
Debug routing table changes.
debug ip ospf events
Debug OSPF adjacency events such as hellos and state changes.
debug condition interface <interface>
Limit debug output to one interface to reduce CPU load.
undebug all
Turn off all debugging (same as no debug all).
no debug all
Turn off all debugging.
terminal monitor
Show debug and log messages in the current VTY session.
show debugging
Read-only observation for enabled debug facilities and scope.
show log
debug ip packet 150
debug condition interface ...
show logging
show ip ospf neighbor

Verify in this order

debug condition → debug enabled → capture to buffer → undebug all

Where it usually breaks

physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result

Debug · operational reference

Debug practicePurpose
Narrow selectorReduce volume
ConditionScope endpoint/interface
Short windowLimit impact
Disable + verifyRestore normal state

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=728

Confirmation

Confirm action

Continue?