Cisco Debug vs Show Commands: Deep Dive for Network Troubleshooting [CCNP Enterprise]

Cisco Debug vs Show Commands: Deep Dive for Network Troubleshooting [CCNP Enterprise]

If you’ve ever been stuck troubleshooting a stubborn routing issue or chasing down why BGP isn’t forming, you know that sometimes a simple show command gives you just the picture—but not the full story. That’s where debug steps in. In this guide, I’ll break down the key differences, benefits, and best practices for using show and debug commands on Cisco devices. Whether you’re preparing for your CCNA, CCNP, or battling issues in a production environment, this article will give you clarity and confidence to use these tools like a pro.


Theory in Brief

What are ‘show’ and ‘debug’ commands in Cisco IOS?
In Cisco networking, show and debug are essential commands used to gather information about the device’s current state and its live processes. They help engineers analyze and verify configurations, protocols, interfaces, and ongoing operations.

Show Commands – The Snapshot Tool

Show commands are non-intrusive. They pull current system data like routing tables, interface statuses, ARP tables, or BGP sessions. These are safe to run on production devices at any time because they do not consume excessive CPU or log data in real time.

Debug Commands – The Live Monitor

Debug commands display live, real-time events as they happen on the device. They are incredibly useful during protocol handshakes, route advertisements, or NAT translations. However, they consume CPU and should be used cautiously, especially on production routers.

When to Use What?

  • Use show for verification and periodic checks.
  • Use debug for real-time troubleshooting and protocol-level issues.
    For example, to check if OSPF is configured: use show ip ospf neighbor.
    To see why it’s failing: use debug ip ospf adj.

Summary / Comparison / Pros and Cons

Feature Comparison

Featureshow Commanddebug Command
Output TypeSnapshot / current stateReal-time live output
Performance ImpactLowHigh (especially with high traffic)
Use in ProductionSafeRisky unless filtered
Examplesshow ip route, show interfacedebug ip icmp, debug ip ospf events
Log DestinationConsole/terminalConsole/terminal, can be logged with syslog
Syntax SimplicityEasy to useRequires specific protocol knowledge

Pros and Cons

Command TypeProsCons
showSafe for production, easy to read, scriptableDoesn’t show live or internal behavior
debugReal-time view, ideal for protocol-level issuesCPU-intensive, risky in production, floods terminal if misused

Essential CLI Commands

PurposeCommandDescription
Show interface detailsshow ip interface briefDisplays IP, status, and protocol of all interfaces
Check routing tableshow ip routeShows learned/static routes
OSPF neighborsshow ip ospf neighborVerifies OSPF adjacencies
Live ICMP traffic debugdebug ip icmpShows ICMP packets (e.g., ping traffic) in real time
BGP session troubleshootingdebug ip bgp eventsDisplays BGP events like opens and keepalives
Turn off all debugsundebug all or u allStops all running debug processes
Log debug to bufferlogging buffered 100000 debuggingLogs debug messages to buffer instead of console
View debug buffer logsshow loggingDisplays messages in the log buffer

Real-World Use Case

ScenarioCommand(s) UsedReason & Outcome
OSPF not forming neighbor adjacencydebug ip ospf adjShowed Hello packets not received—mismatched timers
Interface up but no trafficshow interface, debug ip icmpDiscovered input drops due to duplex mismatch
NAT not working for usersshow ip nat translations, debug ip natTracked address mapping and found missing ACL
BGP neighbor stuck in Idle statedebug ip bgp + show ip bgp summaryHelped identify misconfigured BGP remote-as
DHCP server not assigning IPdebug ip dhcp server packetObserved offer packets blocked by upstream firewall

EVE-NG Lab – Debug vs Show Demo

Lab Topology


Objective:

  • Troubleshoot OSPF adjacency issue using both show and debug commands.
  • Simulate ping failures and analyze via ICMP debug.

Configuration (R1 and R2):

R1:

router ospf 1
 network 192.168.12.0 0.0.0.255 area 0

interface Gig0/0
 ip address 192.168.12.1 255.255.255.0
 no shutdown

R2:

router ospf 1
 network 192.168.12.0 0.0.0.255 area 0

interface Gig0/0
 ip address 192.168.12.2 255.255.255.0
 no shutdown

Verification Commands:

R1# show ip ospf neighbor
R1# debug ip ospf adj
R1# show ip route
R1# ping 192.168.12.2
R1# debug ip icmp

Troubleshooting Tips

SymptomCauseSuggested Show/Debug Commands
OSPF neighbor stuck in INIT stateHello packet mismatchdebug ip ospf hello, show ip ospf interface
NAT translation not occurringACL or interface missingdebug ip nat, show ip nat translations
High CPU usage after debuggingExcessive debug loggingundebug all, show process cpu
DHCP not assigning IPsUpstream blocks DHCPOFFERdebug ip dhcp server, show ip dhcp binding
Interface flappingDuplex mismatch or bad cableshow interface, debug interface

Frequently Asked Questions (FAQs)

1. What is the difference between show and debug commands in Cisco IOS?

Answer:
The show command provides a snapshot of the current status or configuration of a device component, such as interfaces, routing tables, or protocols. It’s static and non-intrusive. The debug command, on the other hand, offers real-time logging of dynamic events (like OSPF hello packets, BGP updates, or ICMP messages), which is essential for live troubleshooting. While show is safe for use in production, debug should be used with caution due to its potential CPU impact.


2. Is it safe to run debug commands on a production network device?

Answer:
Not always. debug commands can be CPU-intensive, especially on devices handling heavy traffic. If not scoped properly, they can overload the CPU, causing slowness or even crashes. In production environments, it’s recommended to:

  • Use specific debug commands (not debug all)
  • Log output to buffer (logging buffered)
  • Immediately stop it using undebug all when done

3. How do I stop a debug session that is overwhelming the terminal?

Answer:
If your console is flooded with debug output, press Ctrl+C to interrupt it and enter the command:

undebug all

or simply:

u all

This stops all active debug processes. It’s a good practice to always run undebug all after using any debug command.


4. Can I redirect debug output to a log file or buffer instead of the console?

Answer:
Yes. To avoid overwhelming the terminal, use:

logging buffered 100000 debugging

Then view the logs using:

show logging

This stores debug output in memory (buffer), letting you review it safely without flooding your screen.


5. What are some common debug commands used in routing protocol troubleshooting?

Answer:
Here are useful protocol-specific debug commands:

  • OSPF: debug ip ospf adj, debug ip ospf hello
  • EIGRP: debug eigrp packets, debug ip routing
  • BGP: debug ip bgp, debug ip bgp events
    These help capture events such as neighbor formation, route advertisements, or protocol errors in real time.

6. What does show ip interface brief tell me?

Answer:
This command gives a concise summary of all interfaces on a device, showing:

  • Interface name (e.g., Gig0/1)
  • Assigned IP address
  • Status (up/down)
  • Protocol (up/down)

It’s typically the first command used to verify if interfaces are correctly configured and operational.


7. How can I troubleshoot ping (ICMP) issues with debug?

Answer:
Use:

debug ip icmp

It shows each ICMP echo request and reply as it enters or leaves the router. Combine it with a ping command to verify if ICMP traffic is reaching its destination and returning successfully. This helps identify ACL issues or unreachable hosts.


8. What should I do if debug output isn’t showing anything?

Answer:
If no output appears, check:

  • Is the related event actually happening? For example, debug ip ospf won’t show anything if OSPF isn’t running or there are no neighbors.
  • Is logging enabled to the correct destination? Use show logging to verify.
  • Did you filter too narrowly with a specific debug?

Sometimes using a broader debug variant or initiating related traffic (like ping or routing updates) can help trigger visible output.


9. What are some best practices for using debug safely?

Answer:

  • Never use debug all—it enables all debugs and can crash a device.
  • Use protocol-specific or event-specific debug commands.
  • Enable buffered logging to review logs without flooding your console.
  • Monitor CPU usage with show process cpu.
  • Always end your session with undebug all.

Following these practices minimizes the risk of downtime during debugging.


10. Can I use show and debug together for end-to-end troubleshooting?

Answer:
Absolutely! That’s actually the best approach:

  1. Start with show commands to verify basic configurations and interface/routing status.
  2. If the issue is not visible or intermittent, use debug to monitor real-time behavior.
  3. Example flow:
    • show ip ospf neighbor → to verify OSPF adjacency
    • If stuck, use debug ip ospf adj to see Hello packet exchanges

This combination gives both static and live views of the issue, improving diagnosis accuracy.


YouTube Link

Watch the Complete CCNP Enterprise: Cisco Debug vs Show Commands: Deep Dive for Network Troubleshooting Lab Demo & Explanation on our channel:

Class 1 CCNP Enterprise Course and Lab Introduction | FULL COURSE 120+ HRS | Trained by Sagar Dhawan
Class 2 CCNP Enterprise: Packet Flow in Switch vs Router, Discussion on Control, Data and Management
Class 3 Discussion on Various Network Device Components
Class 4 Traditional Network Topology vs SD Access Simplified

Final Note

Understanding how to differentiate and implement Cisco Debug vs Show Commands: Deep Dive for Network Troubleshooting is critical for anyone pursuing CCNP Enterprise (ENCOR) certification or working in enterprise network roles. Use this guide in your practice labs, real-world projects, and interviews to show a solid grasp of architectural planning and CLI-level configuration skills.

If you found this article helpful and want to take your skills to the next level, I invite you to join my Instructor-Led Weekend Batch for:

CCNP Enterprise to CCIE Enterprise – Covering ENCOR, ENARSI, SD-WAN, and more!

Get hands-on labs, real-world projects, and industry-grade training that strengthens your Routing & Switching foundations while preparing you for advanced certifications and job roles.

Emailinfo@networkjourney.com
WhatsApp / Call: +91 97395 21088

Upskill now and future-proof your networking career!