Fortinet Document Library

Version:

Version:

Version:

Version:


Table of Contents

Administration Guide

Download PDF
Copy Link

Selective packet sampling

NOTE: This feature is not supported on FS-3032.

During debugging, you might want to see whether a particular type of packet was received on an interface on the switch.

  1. Set up an access control list (ACL) on the switch with the interface that you want to monitor. See ACL. This ACL is the ingress interface.
  2. Set up a mirror for the “internal” interface.

For example, if you want to monitor interface port17 for any IP packet (ether-type 0x800) with a destination subnet of 10.10.10/24 and a source subnet of 20.20.20/24, use the following commands.

# show switch acl ingress

config switch acl ingress

edit 1

config action

set mirror "internal"

end

config classifier

set dst-ip-prefix 10.10.10.0 255.255.255.0

set ether-type 0x0800

set src-ip-prefix 20.20.20.0 255.255.255.0

end

set ingress-interface "port17"

set status active

next

end

 

To examine the packets that have been sampled in the example, use the following command:

# diagnose sniffer packet sp17 none 6

Selective packet sampling

NOTE: This feature is not supported on FS-3032.

During debugging, you might want to see whether a particular type of packet was received on an interface on the switch.

  1. Set up an access control list (ACL) on the switch with the interface that you want to monitor. See ACL. This ACL is the ingress interface.
  2. Set up a mirror for the “internal” interface.

For example, if you want to monitor interface port17 for any IP packet (ether-type 0x800) with a destination subnet of 10.10.10/24 and a source subnet of 20.20.20/24, use the following commands.

# show switch acl ingress

config switch acl ingress

edit 1

config action

set mirror "internal"

end

config classifier

set dst-ip-prefix 10.10.10.0 255.255.255.0

set ether-type 0x0800

set src-ip-prefix 20.20.20.0 255.255.255.0

end

set ingress-interface "port17"

set status active

next

end

 

To examine the packets that have been sampled in the example, use the following command:

# diagnose sniffer packet sp17 none 6