
In today’s article, I’ll show you some useful ways that you can take advantage of the Cisco IOS debug feature.
First of all, I’d like to point out that all the commands presented in this article, and in general all IOS debug commands, should be used with great caution.
Cisco recommends that the use of debug commands should be performed under the direction and guidance of specialized technical personnel, because they may lead to operation disruption and even total device failure.

Although the commands that I’ll introduce in this article are not that dangerous, I recommend you don’t use them on a production router with high load traffic.
It’s best to test them first on a test router before applying them on a live platform.
Before getting into all the details of these useful debug commands, let’s go over some important pre-debug tasks.
You’ll need to follow these closely if you want to preserve your router’s operability and get the most benefit from your troubleshooting activity.
Before enabling a debug command, always ask yourself this:
What output am I expecting from this debug command and how much traffic load will I introduce by applying this command?
It is very important to know what traffic passes through your router and the volume of this traffic. For example, if you have an AS5300 gateway with four T1 interfaces, all running at high traffic volume, debugging isdn events on the gateway will probably generate so much traffic that may crash the system.
Therefore, it is very important to know your router’s activities and estimate the consequences of your debug commands.
The following key points should be followed prior to debugging:
Use the debug ip packet command to monitor packets that are processed by the routers routing engine and are not fast switched.
This command generates an output for every single packet, therefore it should be used with great caution.
A sample output of the debug ip packet command is presented below:

The best way to limit the output is to create an access list and apply it to the debug process so that only packets that match the access list will be processed by the debug command.
(Learn all about access lists in my next post — grab our RSS feed to get it first!)
For example if you want to monitor traffic from 200.30.100.196 to 212.30.100.201 then you should apply the following commands:

Similar to the debug ip packet command, the debug ip packet detail command presents a more detailed output of the packet’s processes by the routing engine.
A sample output is presented below. I recommend that you use this command in conjunction with an access list to limit the traffic load logged by this command.

Use the debug ip udp command to monitor UDP traffic only. Sample output from this command is presented below:

Use the debug isdn q931 command when investigating ISDN routing errors (layer 3). To troubleshoot ISDN layer 2 problems use the debug isdn q921 command.
A sample output from the debug isdn q931 command is presented below. Notice the details obtained regarding calling and called party numbers, bearer capability, message sequence, etc.

Use the debug cch323 all command to investigate H323 VoIP problems. This debug command presents details regarding the H323 message flow and it’s useful in determining the correct handling of H323 protocol stack (H225 RAS, H225 call setup , H245 ,etc.).
A sample output from this command is presented below:

Be very careful when applying these and other debug commands.
It’s always good to do a little bit of research on each debug command that you’re about to use. It will give you a chance to find any potential caveats and harmful effects that you might need to be aware of.
If at any time you enabled a debugging that floods your screen with a great amount of messages the quickest way to turn it off is to run the undebug all or for short the un all command. Then use the show debug command to verify that you have stopped the debug.
Remember that the commands no logging console and terminal no monitor are used only to prevent debug output from being displayed on the console, aux or vty ports respectively. But remember, these commands do not stop the debugging process.
Use the no logging all command to turn off all message logging (buffer, syslog, aux, vty) except console logging (always on).
Get the most comprehensive training available and learn from a CCIE certified instructor with over 10 years of experience!
Prepare for your CCNA with top-notch instruction, lots of practice exam questions and a complete CCNA “how to” guide!