Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Debug

Direct 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.

When to use this

Use it to see real-time protocol events when show commands are not enough — carefully, to protect the CPU.

First 30 seconds

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.

Operational verification

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

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · Cisco IOS XE
Key commanddebug ip packet
Scope / prerequisiteUse it to see real-time protocol events when show commands are not enough — carefully, to protect the CPU.
Configure · 1Show · 1Troubleshoot · 6Reference · 3
What next?3 suggested next steps
Catalog command links11
Evidence0
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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.

Command lookup Jump straight to Cisco syntax
Key points
  • 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.
Key checks
  • show debugging — active debugs
  • debug condition interface <interface> — limit scope
  • undebug 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

StepCommand
1. Send output to the buffer, not the consoleno logging console, logging buffered 512000 debugging
2. Timestamp messagesservice timestamps debug datetime msec
3. Limit scopeACL or condition (debug ip packet 150, debug condition interface ...)
4. Start the debugSpecific debug only
5. Reproduce and readshow logging
6. Stopundebug 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

NeedAlternative
See packetsEmbedded Packet Capture (monitor capture), SPAN
Protocol stateShow commands (show ip ospf neighbor, show bgp summary)
Wireless client problemsRadioActive tracing on the 9800
Event historySyslog 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

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%
Embedded reference data

Quick lookup tables

Debug · operational reference

Compact protocol/state/evidence reference for fast lookup.

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

Confirm action

Continue?