Global debugging
When configuring a Cisco router, the bounds of global and interface commands are obvious. In this case, we use "global" to identify those commands that cannot be used for interface debugging or for specific transport media types and protocol debugging. For example, in the 2500 series router, you can use the Debug command to analyze the Cisco Discovery Protocol (Cisco Discovery PROTOCOL,CDP). We telnet remotely to the router by remote. By default, the output of the debug command is sent to the console, and if you are in a Telnet session, we can use the Terminal Monitor command to view the output.
Interface debugging
The Debug Serial interface command is a debugging command that is directly related to the router interface and the type of transport media. In the following example, the serial interface uses the HDLC package. End-to-end HDLC Keep active messages exchanged every 10 seconds. This indicates that the link operation is normal and the second tier is working properly. Show Interface Serial0 command indicates that the line protocol is starting normally. Use the Undebug all command to turn off all debugging.
Yh-router#debug Serial Interface
Serial network interface debugging is on
yh-router#
June 1 21:54:55 PDT:Serial0:HDLC myseq 171093, Mineseen 171093*, Yourseen 1256540,line up
June 1 21:55:05 PDT:Serial0:HDLC myseq 171094, Mineseen 171094*, Yourseen 1256541,line up
June 1 21:54:15 PDT:Serial0:HDLC myseq 171095, Mineseen 171095*, Yourseen 1256542,line up
Yh-router#undebug All
All possible debugging has been turned off
Protocol debugging
Here we give two examples of protocol debugging. All two examples are related to IP protocols. Of course, debug commands apply to all other protocols.
The first example, shown below, shows ARP debugging. ARP debugging starts, and then clears the ARP cache, resulting in ARP requests and responses. First, we use the command to clear all the ARP caches on the router, so each LAN segment that the router connects will generate an ARP message. Because we do not need to generate too many ARP packets, the selected router is connected to only one Ethernet segment.
Yh-router#debug ARP
ARP packet Debugging is on
Yh-router#clear ARP
yh-router#
*jun 1 21:57:36 pdt:ip arp:sent req src 171.136.10.1
DST 171.136.10.34 00a0.24d1.5823 Ethernet0
*jun 1 21:57:36 pdt:ip arp:sent req src 171.136.10.1
DST 171.136.10.10 0080.5f06.ca3d Ethernet0
......
*jun 1 21:57:36 pdt:ip arp:rcvd req src 171.136.10.10 0080.5f06.ca3d, DST 171.136.10.1 Ethernet0
*jun 1 21:57:36 pdt:ip arp:creating entry for IP address:171.136.10.10,hw:0080.5f06.ca3d
......
The second example, shown below, shows IP rip debugging. When debugging begins, the router table is not emptied, because the router automatically makes a RIP update every 30 seconds, so there is no need to force an update. Similar to the first example, all debugging should be turned off after sufficient information has been obtained.
Yh-router#debug IP RIP Events
RIP event Debugging is on
yh-router#
NOV 13:55:45 PST:RIP:sending v1 update to 255.255.255.255 via tokenring1/0 (165.48.65.136)
NOV 13:55:45 PST:RIP:Update contains routes
NOV 13:55:45 PST:RIP:Update Queued
NOV 13:55:45 PST:RIP:Update contains 6 routes
NOV 13:55:45 PST:RIP:Update Queued
NOV 13:55:45 PST:RIP:Update sent via tokenring1/0
......
Yh-router#undeb All
All possible debugging has been turned off