< Home

icmp rate-limit

Function

The icmp rate-limit command sets the rate threshold of ICMP packets.

The undo icmp rate-limit command restores the default rate threshold of ICMP packets.

By default, the rate limits of ICMP packets in the system and on an interface depend on the product model. The value is 128 on the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S, and 190 on the other models, in pps.

Format

icmp rate-limit { total | interface interface-type interface-number1 [ to interface-number2 ] } threshold threshold-value

undo icmp rate-limit { total | interface interface-type interface-number1 [ to interface-number2 ] }

Parameters

Parameter

Description

Value

total

Specifies the total rate threshold in the system.

-

interface interface-type interface-number1 to interface-number2

Specifies the type and number of an interface.
  • interface-type specifies the interface type.
  • interface-number1 specifies the number of the first interface.
  • to interface-number2 specifies the number of the last interface. The value of interface-number2 must be greater than the value of interface-number1. interface-number1 and interface-number2 specify the range of interfaces.

-

threshold threshold-value

Specifies the rate threshold of ICMP packets.

The value ranges from 0 to 1000, in pps.
NOTE:
The value 0 indicates that the rate of ICMP packets is not limited.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Guidelines

A network often undergoes ICMP packet attacks. If a switch receives a large number of broadcast ICMP request packets on user-side interfaces, these packets are sent to the switch CPU for processing. Then the CPU usage becomes high, affecting other services on the switch. You can use the icmp rate-limit command to prevent the switch from being attacked by ICMP packets.

After the rate limit function is configured for ICMP packets on an interface, the system automatically discards excess ICMP packets when the number of ICMP packets sent by an interface every second exceeds the rate threshold.

Precautions

Before setting the rate threshold of ICMP packets, use the icmp rate-limit enable command to enable the rate limit function for ICMP packets.

Example

# Set the rate threshold of ICMP packets on GE0/0/1 to GE0/0/5 to 20 pps.

<HUAWEI> system-view
[HUAWEI] icmp rate-limit interface gigabitethernet 0/0/1 to 0/0/5 threshold 20
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >