Fortinet black logo

Hyperscale Firewall Guide

config hpe

config hpe

The NP7 host protection engine (HPE) uses NP7 processors to protect the FortiGate CPU from excessive amounts of ingress traffic, which typically occurs during DDoS attacks or network problems (for example an ARP flood due to a network loop). You can use the HPE to prevent ingress traffic received on data interfaces connected to NP7 processors from overloading the FortiGate CPU.

For more information about the NP7 HPE, see NP7 Host Protection Engine (HPE).

You can use the following command to configure the HPE.

config system npu

config hpe

set all-protocol <packets-per-second>

set tcpsyn-max <packets-per-second>

set tcpsyn-ack-max <packets-per-second>

set tcpfin-rst-max <packets-per-second>

set tcp-max <packets-per-second>

set udp-max <packets-per-second>

set icmp-max <packets-per-second>

set sctp-max <packets-per-second>

set esp-max <packets-per-second>

set ip-frag-max <packets-per-second>

set ip-others-max <packets-per-second>

set arp-max <packets-per-second>

set l2-others-max <packets-per-second>

set high-priority <packets-per-second>

set enable-shaper {disable | enable}

end

Option Description Default

all-protocol

The optimal way to set up the NP7 HPE is to set the all-protocol option to a maximum packet rate threshold that protects the FortiGate CPU from excessive traffic. If all-protocolis set to a value other than 0, the number of host packets received for all traffic of all packet types that the HPE shapes is controlled by the all-protocol threshold. By default all-protocol is set to 400000. This default threshold is designed to work well for most FortiGates and most networks.

If you want to set different maximum packet rates for different packet types, you can disable all-protocol by setting it 0. When you do this, the NP7 HPE supports setting individual limits for the following traffic types.

400000

tcpsyn-max Limit the maximum number of TCP SYN packets received per second per host queue. The range is 1000 to 40000000 pps. 40000

tcpsyn-ack-max

Prevent SYN_ACK reflection attacks by limiting the number of TCP SYN_ACK packets received per second per host queue. The range is 1000 to 40000000 pps. TCP SYN_ACK reflection attacks consist of an attacker sending large amounts of SYN_ACK packets without first sending SYN packets. These attacks can cause high CPU usage because the firewall assumes that these SYN_ACK packets are the first packets in a session, so the packets are processed by the CPU instead of the NP7 processors. The range is 1000 to 40000000 pps.

40000

tcpfin-rst-max

Limit the maximum number of TCP FIN and RST packets received per second per host queue. The range is 1000 to 40000000 pps.

40000

tcp-max Limit the maximum number of TCP packets received per second per host queue that are not filtered by tcpsyn-max, tcpsyn-ack-max, or tcpfin-rst-max. The range is 1000 to 40000000 pps. 40000
udp-max Limit the maximum number of UDP packets received per second per host queue. The range is 1000 to 40000000 pps. 40000
icmp-max Limit the maximum number of ICMP packets received per second per host queue. The range is 1000 to 40000000 pps. 5000
sctp-max Limit the maximum number of SCTP packets received per second per host queue. The range is 1000 to 40000000 pps. 5000
esp-max Limit the maximum number of ESP packets received per second per host queue. The range is 1000 to 40000000 pps. 5000
ip-frag-max Limit the maximum number of fragmented IP packets received per second per host queue. The range is 1000 to 40000000 pps. 5000
ip-others-max Limit the maximum number of other types of IP packets received per second per host queue. Other packet types are IP packets that cannot be set with other HPE options. The range is 1000 to 40000000 pps. 5000
arp-max Limit the maximum number of ARP packets received per second per host queue. The range is 1000 to 40000000 pps. 5000
l2-others-max Limit the maximum number of other layer-2 packets that are not ARP packets received per second per host queue. The range is 1000 to 40000000 pps. This option limits HA heartbeat, HA session sync, LACP/802.3ad, FortiSwitch heartbeat, and wireless-controller CAPWAP packets. 5000

high-priority

The NP7 HPE option allows you to set a maximum overflow limit for high-priority traffic. The range is 1000 to 40000000 packets per second per host queue.

40000

enable-shaper

Enable or disable the NP7 HPE.

disable

config hpe

The NP7 host protection engine (HPE) uses NP7 processors to protect the FortiGate CPU from excessive amounts of ingress traffic, which typically occurs during DDoS attacks or network problems (for example an ARP flood due to a network loop). You can use the HPE to prevent ingress traffic received on data interfaces connected to NP7 processors from overloading the FortiGate CPU.

For more information about the NP7 HPE, see NP7 Host Protection Engine (HPE).

You can use the following command to configure the HPE.

config system npu

config hpe

set all-protocol <packets-per-second>

set tcpsyn-max <packets-per-second>

set tcpsyn-ack-max <packets-per-second>

set tcpfin-rst-max <packets-per-second>

set tcp-max <packets-per-second>

set udp-max <packets-per-second>

set icmp-max <packets-per-second>

set sctp-max <packets-per-second>

set esp-max <packets-per-second>

set ip-frag-max <packets-per-second>

set ip-others-max <packets-per-second>

set arp-max <packets-per-second>

set l2-others-max <packets-per-second>

set high-priority <packets-per-second>

set enable-shaper {disable | enable}

end

Option Description Default

all-protocol

The optimal way to set up the NP7 HPE is to set the all-protocol option to a maximum packet rate threshold that protects the FortiGate CPU from excessive traffic. If all-protocolis set to a value other than 0, the number of host packets received for all traffic of all packet types that the HPE shapes is controlled by the all-protocol threshold. By default all-protocol is set to 400000. This default threshold is designed to work well for most FortiGates and most networks.

If you want to set different maximum packet rates for different packet types, you can disable all-protocol by setting it 0. When you do this, the NP7 HPE supports setting individual limits for the following traffic types.

400000

tcpsyn-max Limit the maximum number of TCP SYN packets received per second per host queue. The range is 1000 to 40000000 pps. 40000

tcpsyn-ack-max

Prevent SYN_ACK reflection attacks by limiting the number of TCP SYN_ACK packets received per second per host queue. The range is 1000 to 40000000 pps. TCP SYN_ACK reflection attacks consist of an attacker sending large amounts of SYN_ACK packets without first sending SYN packets. These attacks can cause high CPU usage because the firewall assumes that these SYN_ACK packets are the first packets in a session, so the packets are processed by the CPU instead of the NP7 processors. The range is 1000 to 40000000 pps.

40000

tcpfin-rst-max

Limit the maximum number of TCP FIN and RST packets received per second per host queue. The range is 1000 to 40000000 pps.

40000

tcp-max Limit the maximum number of TCP packets received per second per host queue that are not filtered by tcpsyn-max, tcpsyn-ack-max, or tcpfin-rst-max. The range is 1000 to 40000000 pps. 40000
udp-max Limit the maximum number of UDP packets received per second per host queue. The range is 1000 to 40000000 pps. 40000
icmp-max Limit the maximum number of ICMP packets received per second per host queue. The range is 1000 to 40000000 pps. 5000
sctp-max Limit the maximum number of SCTP packets received per second per host queue. The range is 1000 to 40000000 pps. 5000
esp-max Limit the maximum number of ESP packets received per second per host queue. The range is 1000 to 40000000 pps. 5000
ip-frag-max Limit the maximum number of fragmented IP packets received per second per host queue. The range is 1000 to 40000000 pps. 5000
ip-others-max Limit the maximum number of other types of IP packets received per second per host queue. Other packet types are IP packets that cannot be set with other HPE options. The range is 1000 to 40000000 pps. 5000
arp-max Limit the maximum number of ARP packets received per second per host queue. The range is 1000 to 40000000 pps. 5000
l2-others-max Limit the maximum number of other layer-2 packets that are not ARP packets received per second per host queue. The range is 1000 to 40000000 pps. This option limits HA heartbeat, HA session sync, LACP/802.3ad, FortiSwitch heartbeat, and wireless-controller CAPWAP packets. 5000

high-priority

The NP7 HPE option allows you to set a maximum overflow limit for high-priority traffic. The range is 1000 to 40000000 packets per second per host queue.

40000

enable-shaper

Enable or disable the NP7 HPE.

disable