NetOps Toolkit

Cisco IOS

PCAP Generator

Generate Cisco IOS-XE packet capture commands with filter, buffer, export options, and Wireshark guide

Traffic Filter

conf t
!
! === PACKET CAPTURE: CAP1 ===
!
! 1. Define capture on interface
monitor capture CAP1 interface GigabitEthernet0/0 both
monitor capture CAP1 match any
!
! 2. Set buffer size
monitor capture CAP1 buffer size 10
!
! 3. Start capturing
monitor capture CAP1 start
!
! --- Let traffic flow, then stop when done ---
!
! 4. Stop capture
monitor capture CAP1 stop
!
! 5. Verify captured packets
show monitor capture CAP1
show monitor capture CAP1 buffer brief
!
! 6. Export capture file
monitor capture CAP1 export flash:cap1.pcap
!
! Then transfer to workstation:
! copy flash:cap1.pcap tftp://192.168.1.100/cap1.pcap
!
! 7. Clean up
no monitor capture CAP1