Conditional Debugging

Cisco IOS debugging is a very useful feature for the troubleshooting various issues on the Cisco Routers and switches. Though useful, debugging must be run on devices with caution as it is very CPU intensive and may result in router/switch crash if low PU memory is available on the device.

Conditional debugging is used to filter out the debug information so that the CPU consumption by debug is lowered significantly. It allows us to show debug information that matches a certain interface, MAC address etc.

Let us use the example below to understand this further –

We enable the RIP debug on R2 as below:

R2#debug ip rip

RIP protocol debugging is on

R2#

*Jul 18 13:14:23.351: RIP: sending v2 update to 224.0.0.9 via FastEthernet1/0 (9.9.23.2)

*Jul 18 13:14:23.351: RIP: build update entries

*Jul 18 13:14:23.355:   9.9.12.0/24 via 0.0.0.0, metric 1, tag 0

R2#

*Jul 18 13:14:27.955: RIP: sending v2 update to 224.0.0.9 via FastEthernet0/0 (9.9.12.2)

*Jul 18 13:14:27.955: RIP: build update entries

*Jul 18 13:14:27.959:   9.9.23.0/24 via 0.0.0.0, metric 1, tag 0

We see we are getting debug messages on both interfaces Fa0/0 and Fa1/0.

Now let us enable conditional debug as below for interface Fa0/0.

R2#debug condition interface fa0/0

R2#sh debug condition

Condition 1: interface Fa0/0 (1 flags triggered)

Flags: Fa0/0

R2#

*Jul 18 13:17:20.215: RIP: sending v2 update to 224.0.0.9 via FastEthernet0/0 (9.9.12.2)

*Jul 18 13:17:20.215: RIP: build update entries

*Jul 18 13:17:20.219:   9.9.23.0/24 via 0.0.0.0, metric 1, tag 0

Now we see we only get debug messages for interface Fa0/0.

To disable the conditional debug use the following command:

R2#undebug condition interface fa0/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

Please follow and like us:

Related Post

Add Comment

Social Media Auto Publish Powered By : XYZScripts.com
Select your currency