Skip to main content

Debug Sniffer

(2017-11-23)

Problem

Want to sniff traffic flow.

Solution

# diag sniffer packet <interface> <'filter'> <verbose> <count> a

Filter syntax:

'[[src|dst] host<IP1>] [[src|dst] host<IP2>] [[arp|ip|gre|esp|udp|tcp] [port_no]] [[arp|ip|gre|esp|udp|tcp] [port_no]]'

Example:

# diag sniff packet port2 'host 139.60.169.2 and port 443' 1 999

Values for <verbose>:

  • 1: print header of packets
  • 2: print header and data from IP of packets
  • 3: print header and data from Ethernet of packets
  • 4: print header of packets with interface name
  • 5: print header and data from IP of packets with interface name
  • 6: print header and data from Ethernet of packets with interface name

"a" = print times as absolute instead of relative to start time