Cisco Debug Command

Cisco-debug-command-www.ipcisco.com

Cisco Debug Command Explained

Troubleshooting is very important in network management. For network troubleshooting, we use various command in a router or switch. One of these commands is the debug privileged EXEC commands in other words, debug command. With Cisco debug command, we display information about Cisco router & switch operations, activities or errors in real time. You can also check Cisco terminal monitor and logging commands lesson.

 


Cisco Packet Tracer Cisco Configurations Course!


 

During the troubleshooting, we turn on debug and get the logs related of the network activities on the router on switch screen. After a while, when we got the required information, we turn off debug.

 

Debug command adds extra efforts to routers like consuming a lot of CPU resources. So, using this command unnecessarily, can cause problems in the device. This can cause even a router reboot. As a best troubleshooting practice, it is good to use this command during the troubleshooting activity and then turning it off. And using Cisco debug command only for specific protocols or events. This will reduce the extra debug load on the device.

 

Thanking all things into account, when you are using Cisco debug command in a production network, you should be very careful!

Cisco-debug-command-www.ipcisco.com


 

Cisco Debug Commands

What are the debug commands used in Cisco devices? On Cisco routers and switches, we use the below Cisco debug commands:

  • debug all
  • undebug all
  • debug “protocol”
  • show debug
  • debug ip packet “ACL-Number”
  • terminal monitor

 


 

debug all

To turn on all the possible debug levels, we use debug all command.

 

Router# debug all

This may severely impact network performance. Continue? (yes/[no]): yes

All possible debugging has been turned on

*Nov  1 00:00:32.105: corvil trace: “6547 cdkContext_TraceControl() return 0”

*Nov  1 00:00:32.124: IP routecache flags changed on Null0,added No CEF; now No CEF

*Nov  1 00:00:35.204: fh_fd_syslog_event_match: num_matches = 0

*Nov  1 00:00:35.204: fh_fd_data_syslog: num_matches = 0

 


 

undebug all

To turn off all the possible debug levels, we use undebug all command. You can also use the showr form of this command as “u all” on Cisco devices.

 

Router# undebug all

All possible debugging has been turned off

 


 

debug “protocol”

To turn on debug for a specific protocol, we use debug “protocol” command. We can do this with various protocols used in networking.

 

For example, we can need only ICMP related information. To receive this, we use debug ip icmp command.

 

Router# debug ip icmp

ICMP packet debugging is on

Router #

ICMP: echo reply sent, src 192.168.0.5, dst 192.168.0.1

ICMP: echo reply sent, src 192.168.0.5, dst 192.168.0.1

ICMP: echo reply sent, src 192.168.0.5, dst 192.168.0.1

ICMP: echo reply sent, src 192.168.0.5, dst 192.168.0.1

 

To close it we use no debug ip icmp command.

 

Roter# no debug ip icmp

ICMP packet debugging is off

 

Or we can do BGP troubleshooting, to do this we can use debug ip bgp command. We can also use specific events for bgp debug. For example, we can display only bgp updates.

 

Router# debug ip bgp updates

3w4d: %SYS-5-CONFIG_I: Configured from console by console

3w4d: BGP: 172.16.0.8 went from Idle to Active

3w4d: BGP: 172.16.0.8 open active, delay 4571ms

3w4d: BGP: 172.16.0.8 open active, local address 172.16.0.2

3w4d: BGP: 172.16.0.8 went from Active to OpenSent

 

Or we need information about Etherchannel LACP protocol, at this time we use debug lacp all or we use to display specific events related with LACP with debug lacp events command.

 


 

show debug

To display information about the types of debugging that are enabled, we use show debug command.

 

Router# show debug

 


 

debug ip packet “ACL-Number”

We can also turn on IPv4 packet debugging that matches specific criteria of an access lists. To do this, we use debug ip packet ”ACL-Number” command.

 

Roter# debug ip packet 100

 

Here, we have learned how to use Cisco Debug Command on Cisco routers and switches. Debugging is very important for network troubleshooting but you whould be careful while using these commands.

 


DOWNLOAD Cisco Packet Tracer Configuration & Cisco GNS3 Configurations


 

Back to: CCNP Enterprise 350-401 ENCOR v1.1 > Network Assurance

Leave a Reply

Your email address will not be published. Required fields are marked *

CCNP Enterprise 350-401 ENCOR v1.1

Collapse
Expand
Latest Blog Posts