Fortinet white logo
Fortinet white logo

CLI Reference

7.2.1

diagnose sniffer packet

diagnose sniffer packet

Run a packet sniffer to view network traffic.

diag sniffer packet [<interface> <filter> <verbose> <count> <tsformat> <frame size>]

diagnose sniffer packet

Parameter

Description

Type

Size

Default

interface

Network interface to sniff (or "any").

string

-

any

filter

Flexible logical filters for sniffer (or "none").

For example: To print UDP 1812 traffic between forti1 and either forti2 or forti3:

udp and port 1812 and host forti1 and ( forti2 or forti3 )

string

-

verbose

  • 1: Print header of packets.

  • 2: Print header and data from IP of packets.

  • 3: Print header and data from ethernet of packets (if available).

  • 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 (if available) with interface name.

integer

Minimum value: 1 Maximum value: 6

1

count

Sniffer count.

integer

tsformat

Format of timestamp.

  • a: absolute UTC time, yyyy-mm-dd hh:mm:ss.ms

  • l: absolute LOCAL time, yyyy-mm-dd hh:mm:ss.ms

  • otherwise: relative to the start of sniffing, ss.ms

string

frame size

Set the frame size that is printed before truncation.

Defaults to the interface MTU.

diagnose sniffer packet

diagnose sniffer packet

Run a packet sniffer to view network traffic.

diag sniffer packet [<interface> <filter> <verbose> <count> <tsformat> <frame size>]

diagnose sniffer packet

Parameter

Description

Type

Size

Default

interface

Network interface to sniff (or "any").

string

-

any

filter

Flexible logical filters for sniffer (or "none").

For example: To print UDP 1812 traffic between forti1 and either forti2 or forti3:

udp and port 1812 and host forti1 and ( forti2 or forti3 )

string

-

verbose

  • 1: Print header of packets.

  • 2: Print header and data from IP of packets.

  • 3: Print header and data from ethernet of packets (if available).

  • 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 (if available) with interface name.

integer

Minimum value: 1 Maximum value: 6

1

count

Sniffer count.

integer

tsformat

Format of timestamp.

  • a: absolute UTC time, yyyy-mm-dd hh:mm:ss.ms

  • l: absolute LOCAL time, yyyy-mm-dd hh:mm:ss.ms

  • otherwise: relative to the start of sniffing, ss.ms

string

frame size

Set the frame size that is printed before truncation.

Defaults to the interface MTU.