Solaris : How to capture packet with snoop and filter data

Standard

credit picture from udemy

Capture all packet

snoop -v -o <filename.pcap> host <IP>

Replace filename and ip address


Capture with condition
snoop -v -o <filename.pcap> host <IP> and port 162 or port 161
In example, I capture snmp packet by specific port.