Conditional Debugging

Rashmi Bhardwaj | Blog,Routing & Switching

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


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

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

*Jul 18 13:14:23.355: via, metric 1, tag 0


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

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

*Jul 18 13:14:27.959: via, 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


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

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

*Jul 18 13:17:20.219: via, 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


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart