System information

Troubleshooting Tools 2-9
Using debug Commands
Using debug Commands
The debug privileged exec commands can provide a wealth of information about the traffic being
seen (or not seen) on an interface, error messages generated by nodes on the network,
protocol-specific diagnostic packets, and other useful troubleshooting data. To access and list the
privileged exec commands, complete the following tasks:
Step 1 Enter the privileged exec mode:
Command:
Router> enable
Password: XXXXXX
Router#
Step 2 List privileged exec commands:
Router# debug ?
Note Exercise care when using debug commands. Many debug commands are processor intensive
and can cause serious network problems (such as degraded performance or loss of connectivity) if
they are enabled on an already heavily loaded router. When you finish using a debug command,
remember to disable it with its specific no debug command (or use the no debug all command to
turn off all debugging).
Use debug commands to isolate problems, not to monitor normal network operation. Because the
high processor overhead of debug commands can disrupt router operation, you should use them only
when you are looking for specific types of traffic or problems and have narrowed your problems to
a likely subset of causes.
Output formats vary with each debug command. Some generate a single line of output per packet,
and others generate multiple lines of output per packet. Some generate large amounts of output, and
others generate only occasional output. Some generate lines of text, and others generate information
in field format.
To minimize the negative impact of using debug commands, follow this procedure:
Step 1 Use the no logging console global configuration command on your router. This command
disables all logging to the console terminal.
Step 2 Telnet to a router port and enter the enable exec command. The enable exec command
will place the router in the privileged exec mode. After entering the enable password,
you will receive a prompt that will consist of the router name with a # symbol.
Step 3 Use the terminal monitor command to copy debug command output and system error
messages to your current terminal display.
By redirecting output to your current terminal display, you can view debug command
output remotely, without being connected through the console port.
If you use debug commands at the console port, character-by-character processor
interrupts are generated, maximizing the processor load already caused by using debug.
If you intend to keep the output of the debug command, spool the output to a file. The procedure for
setting up such a debug output file is described in the Debug Command Reference.
This book refers to specific debug commands that are useful when troubleshooting specific
problems. Complete details regarding the function and output of debug commands are provided in
the Debug Command Reference.