17 July, 2014

How to filter Debug

* We have EIGRP Configured and need to debug ip packets

R1#debug ip packet 
IP packet debugging is on

*Mar  1 01:29:03.647: IP: s=10.1.146.1 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast
*Mar  1 01:29:04.155: IP: s=10.1.146.6 (FastEthernet0/0), d=224.0.0.10, len 60, rcvd 2
*Mar  1 01:29:04.755: IP: s=10.1.1.1 (local), d=224.0.0.10 (Loopback0), len 60, sending broad/multicast
*Mar  1 01:29:04.763: IP: s=10.1.1.1 (Loopback0), d=224.0.0.10, len 60, rcvd 2

* When Debuging is on we see also Hello Packets of EIGRP. 

# How to filter with Access-list this debug output.

R1#conf terminal 
R1(config)#access-list 100 deny eigrp any any        
R1(config)#access-list 100 permit ip any any 
R1(config)#do un all 
All possible debugging has been turned off
R1(config)#exit     

R1#debug ip packet ?
  <1-199>      Access list
  <1300-2699>  Access list (expanded range)
  detail       Print more debugging detail
  <cr>
  
R1#debug ip packet 100
IP packet debugging is on for access list 100

R1#ping 10.1.2.2 repeat 1
Sending 1, 100-byte ICMP Echos to 10.1.2.2, timeout is 2 seconds:
!
Success rate is 100 percent (1/1), round-trip min/avg/max = 44/44/44 ms

*Mar  1 01:34:01.467: IP: tableid=0, s=10.1.13.1 (local), d=10.1.2.2 (Serial0/0), routed via FIB
*Mar  1 01:34:01.471: IP: s=10.1.13.1 (local), d=10.1.2.2 (Serial0/0), len 100, sending
*Mar  1 01:34:01.503: IP: tableid=0, s=10.1.2.2 (Serial0/0), d=10.1.13.1 (Serial0/0), routed via RIB
*Mar  1 01:34:01.507: IP: s=10.1.2.2 (Serial0/0), d=10.1.13.1 (Serial0/0), len 100, rcvd 3

* Now you see everything, but not EIGRP packets on Debug output.