During an INE Volume II lab I discovered a great way to filter the debug output from a router. The Debug Condition Interface command allows you to only show the debug output from a specific interface.
There are other conditions you can filter on as well including application, mac-address, vlan and there are a number of voice related commands which I am not interested in at this time.
For this example I had to configure OSPF to use unicast and not multicast, I then had to verify this was working, so I considered using an access list, and then discovered the debug condition command.
To filter the debug output to only interface fa0/1 use the following command
Rack6R5#debug condition interface fa0/1 Condition 1 set
To then filter this even more we are going to filter to only ospf hello’s
Rack6R5#debug ip ospf hello OSPF hello events debugging is on
The output from this is now a very filtered view of exaclty what I want to see
Rack6R5# *Mar 1 00:59:01.573: OSPF: Rcv hello from 150.6.4.4 area 45 from FastEthernet0/1 183.6.45.4 *Mar 1 00:59:01.573: OSPF: End of hello processing
Darren
Just remember that when you do this and then type undebug all, it does not remove the condition. You need to remove the condition separately.
If not, yo’r future debugs may show nothing at all as it’s on the wrong interface 🙂
Lee
Thanks for the post.
I have been trying to get my head around this command and I am also using the INE WBs. Do you know whether this command will also filter out debug information from other interfaces when used in conjuction with the ‘debug ip packet 100 detail’?
So – I want to debug all IP packets based on my ACL100, but only display whats on a particular interface.?
Many thanks