Packet capture on Cisco ISR/CSR


Learned this from my friend Ricardo today, no longer running blind trying to figure out if a specific packet is received and what the router did with it.

To check if packet capture is already enabled:

show debugging

To enable capture from specific IP

debug platform condition ipv4 <ip/cidr> both

To start the capture and tell it the max packet to be captured

debug platform condition start
debug platform packet-trace packet 1024

To check the capture result

show platform packet-trace summary

Example output of above command

Pkt   Input             Output            State  Reason
0     Gi0/0/0.703       Gi0/0/1.32        FWD    
1     Gi0/0/0.703       Gi0/0/1.32        FWD    
2     Gi0/0/0.703       Gi0/0/1.32        FWD    
3     Gi0/0/0.703       Gi0/0/1.32        FWD    
4     Gi0/0/0.703       Gi0/0/1.32        FWD   

To check the detail of specific packet, eg packet 3

show platform packet-trace packet 3

Example of above command:

Packet: 3           CBUG ID: 18
Summary
  Input     : GigabitEthernet0/0/0.703
  Output    : GigabitEthernet0/0/1.32
  State     : FWD 
  Timestamp
    Start   : 90348958754799 ns (09/22/2022 18:40:07.21077 UTC)
    Stop    : 90348958764809 ns (09/22/2022 18:40:07.21087 UTC)
Path Trace
  Feature: IPV4(Input)
    Input       : GigabitEthernet0/0/0.703
    Output      : <unknown>
    Source      : 10.64.0.73
    Destination : 10.1.32.100
    Protocol    : 1 (ICMP)



To reset

clear platform condition all
clear platform packet-trace statistics



Leave a Reply

Your email address will not be published.