Use it to see real-time protocol events when show commands are not enough — carefully, to protect the CPU.
Debug
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.
1. Debug shows real-time protocol events and can overload CPUs.
2. Use conditional debugs and log to buffer.
3. Check CPU first.
4. Stop immediately after capture.
5. Prefer show commands and EPC.
debug condition → debug enabled → capture to buffer → undebug all
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
debug ip packetPrimary Commands
Configuration and operational commands for this Topic.
debug ip packetTroubleshootDebug process-switched IP packets; very heavy on production devices, restrict with an ACL.
Use when: Use at the Network Troubleshooting, Ping, Traceroute and Debugging boundary after prerequisite state is verified.
Quick note: Operational guidance. One successful probe does not prove all sources, packet sizes, protocols, directions or times are healthy.
Cisco IOS / IOS XE · mixeddebug ip icmpTroubleshootDebug ICMP messages processed by the router.
Use when: Use at the Network Troubleshooting, Ping, Traceroute and Debugging boundary after prerequisite state is verified.
Quick note: Operational guidance. One successful probe does not prove all sources, packet sizes, protocols, directions or times are healthy.
Cisco IOS / IOS XE · mixeddebug ip routingTroubleshootDebug routing table changes.
Use when: Use at the Network Troubleshooting, Ping, Traceroute and Debugging boundary after prerequisite state is verified.
Quick note: Operational guidance. One successful probe does not prove all sources, packet sizes, protocols, directions or times are healthy.
Cisco IOS / IOS XE · mixeddebug ip ospf adjTroubleshootEmit OSPF adjacency state-machine diagnostics. Use cautiously on production devices.
Use when: Use at the Network Troubleshooting, Ping, Traceroute and Debugging boundary after prerequisite state is verified.
Quick note: Operational guidance. One successful probe does not prove all sources, packet sizes, protocols, directions or times are healthy.
Cisco IOS XE · mixeddebug ip ospf eventsTroubleshootDebug OSPF adjacency events such as hellos and state changes.
Use when: Use at the Network Troubleshooting, Ping, Traceroute and Debugging boundary after prerequisite state is verified.
Quick note: Operational guidance. One successful probe does not prove all sources, packet sizes, protocols, directions or times are healthy.
Cisco IOS / IOS XE · mixeddebug ip natTroubleshootDebug NAT translations as they are created and used; use with care on busy routers.
Use when: Use at the Network Troubleshooting, Ping, Traceroute and Debugging boundary after prerequisite state is verified.
Quick note: Operational guidance. One successful probe does not prove all sources, packet sizes, protocols, directions or times are healthy.
Cisco IOS / IOS XE · mixeddebug condition interface <interface>ReferenceLimit debug output to one interface to reduce CPU load.
Use when: Use at the Network Troubleshooting, Ping, Traceroute and Debugging boundary after prerequisite state is verified.
Quick note: Operational guidance. One successful probe does not prove all sources, packet sizes, protocols, directions or times are healthy.
Cisco IOS / IOS XE · mixedundebug allReferenceTurn off all debugging (same as no debug all).
Use when: Use at the Network Troubleshooting, Ping, Traceroute and Debugging boundary after prerequisite state is verified.
Quick note: Operational guidance. One successful probe does not prove all sources, packet sizes, protocols, directions or times are healthy.
Cisco IOS / IOS XE · mixedno debug allConfigureTurn off all debugging.
Use when: Use at the Network Troubleshooting, Ping, Traceroute and Debugging boundary after prerequisite state is verified.
Quick note: Operational guidance. One successful probe does not prove all sources, packet sizes, protocols, directions or times are healthy.
Cisco IOS / IOS XE · mixedterminal monitorReferenceShow debug and log messages in the current VTY session.
Use when: Use at the Network Troubleshooting, Ping, Traceroute and Debugging boundary after prerequisite state is verified.
Quick note: Operational guidance. One successful probe does not prove all sources, packet sizes, protocols, directions or times are healthy.
Cisco IOS / IOS XE · mixedShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Known-good, broken and when it is fixed Verify boundary
Known-good debug use means a bounded capture answers a specific question without destabilizing the device, and subsequent show/original-workload evidence confirms the conclusion. Broken practice is unbounded debug, no stop plan, or treating one message as causation. The limit of what it shows: debug output represents events observed at one control-plane boundary; it does not by itself show data-plane forwarding or end-to-end recovery. Closure remains the original test.
Step 2 Verification and output interpretation Verify boundary
Confirm that the debug is enabled for the intended condition, generate one controlled event, timestamp/capture the relevant lines, then disable it and return to read-only state verification.
Step 3 Native failure isolation and next-check logic Narrow the fault
Before enabling debug, collect show/counter evidence and define the exact question, device, protocol instance and time window. Use conditional/filtered debug where supported, monitor CPU/logging, reproduce one controlled event, then disable debugging immediately. If no relevant event appears, verify the filter and whether traffic actually reached the device before broadening scope. Correlate timestamps with peer/server logs instead of reading isolated messages as root cause.
- 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.
show debugging— active debugsdebug condition interface <interface>— limit scopeundebug all— stop
ReferenceHow it works1 section · depth on demand
How it works
IOS/IOS XE debug output exposes live control-plane events and can provide high-fidelity evidence, but it is operationally intrusive compared with show commands. Debug scope, rate and platform CPU impact are part of the mechanism. Broad debugging on a busy production device can worsen the incident, flood logging or obscure the relevant event. Prefer the narrowest feature/object filter and a preplanned stop condition.
ReferenceImportant terms & boundaries4 sections · depth on demand
In depth
Debug
Debug commands show what a device is doing in real time, but they can hurt production devices. Cisco's ping and traceroute technote warns that debug ip packet on a production router can drive CPU high enough to cause severe degradation or an outage, and recommends limiting debug output with an access list and protecting the console by disabling console logging, buffering messages and reading them with show log.
Safe debugging
| Step | Command |
|---|---|
| 1. Send output to the buffer, not the console | no logging console, logging buffered 512000 debugging |
| 2. Timestamp messages | service timestamps debug datetime msec |
| 3. Limit scope | ACL or condition (debug ip packet 150, debug condition interface ...) |
| 4. Start the debug | Specific debug only |
| 5. Reproduce and read | show logging |
| 6. Stop | undebug all (or u all) |
R1(config)# no logging console
R1(config)# logging buffered 512000 debugging
R1(config)# service timestamps debug datetime msec
R1(config)# access-list 150 permit icmp host 10.110.0.64 host 10.30.0.15
R1# debug ip packet 150 detail
R1# show logging | include IP: s=
*Nov 28 10:41:22.101: IP: s=10.110.0.64 (Vlan110), d=10.30.0.15 (GigabitEthernet0/0/1), len 100, forward
R1# undebug all
All possible debugging has been turned off
R1# show debugging
Lower-risk alternatives
| Need | Alternative |
|---|---|
| See packets | Embedded Packet Capture (monitor capture), SPAN |
| Protocol state | Show commands (show ip ospf neighbor, show bgp summary) |
| Wireless client problems | RadioActive tracing on the 9800 |
| Event history | Syslog and platform traces |
Debugs that are usually safe and useful
Targeted protocol debugs with low event rates, such as debug ip ospf adj, debug ip bgp <neighbor> updates, debug dhcp, or debug aaa authentication, are generally safe when output goes to the buffer. Avoid broad packet-level debugs on busy devices, and always know how you'll stop the debug before starting it.
Documented example, not captured output.
Quick reference
Debug commands print real-time messages about internal processes, such as OSPF adjacency or DHCP. They are powerful but can overload the CPU, so use them with filters, send output to the buffer, and turn them off immediately afterwards.
logging buffered 128000 debugging
no logging console
access-list 199 permit ip host 10.20.0.15 host 10.60.0.10
debug ip packet 199 detail
show logging
undebug all
Documented example, not captured output.
Prefer conditional debugs (debug condition interface, debug platform condition) and Embedded Packet Capture on busy production devices.
Protocol/service mechanics and state model
Debug output hooks into runtime protocol or packet processing paths and can reveal event sequences, transitions and packet-level decisions that periodic show commands may miss. Because volume is workload-dependent, the same debug can be quiet in one environment and disruptive in another. Conditional debugging and short observation windows are essential parts of safe evidence collection.
Limits and common misconceptions
Absence of debug lines does not show absence of a problem unless the exact code path/event was instrumented. Debug output can also describe control-plane handling without proving final forwarding or application outcome. Every assurance signal has blind spots.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration intent
Start with the narrowest protocol/event and condition available, know how output reaches the terminal/log buffer, define a stop condition before enabling it, and keep undebug all/equivalent recovery ready.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network Assurance → Troubleshooting → Debug. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%Quick lookup tables
Debug · operational reference
Compact protocol/state/evidence reference for fast lookup.
| Debug practice | Purpose |
|---|---|
| Narrow selector | Reduce volume |
| Condition | Scope endpoint/interface |
| Short window | Limit impact |
| Disable + verify | Restore normal state |