h1

Output-101 : Limit a Debug to an interface

October 17, 2008

Debugging is one of the best tools to use when troubleshooting problems, but also the most dangerous tool if missused in production networks.

By limiting the debug capture only to the interface that you need, instead of all 100+ client interfaces, you mitigate the risk to a reasonable degree.

The following command enables conditional debugs for interface serial1/0. This means that only debugs for ser1/0 are displayed:

Rack1R1#debug interface s1/0
Condition 1 set

Rack1R1#sh debugging
TCP:
TCP Packet debugging is on

Condition 1: interface Se1/0 (1 flags triggered)
Flags: Se1/0

-

Note that the command ‘undebug all’ does not remove conditional triggers, only the normal debugs, ie like below only the the TCP Packet debugging has been removed:

Rack1R1#un all
Port Statistics for unclassified packets is not turned on.

All possible debugging has been turned off
Rack1R1#sh debug

Condition 1: interface Se1/0 (1 flags triggered)
Flags: Se1/0

-

To remove your conditional debug, use the following:

Rack1R1#undebug interface s1/0
This condition is the last interface condition set.
Removing all conditions may cause a flood of debugging
messages to result, unless specific debugging flags
are first removed.
Proceed with removal? [yes/no]: yes
Condition 1 has been removed

Rack1R1#sh debug
Rack1R1#

Add to FacebookAdd to NewsvineAdd to DiggAdd to Del.icio.usAdd to StumbleuponAdd to RedditAdd to BlinklistAdd to Ma.gnoliaAdd to TechnoratiAdd to Furl

Leave a Comment

You must be logged in to post a comment.