The icmp receive command enables a switch to receive ICMP packets with the local IP address as the destination IP address.
The undo icmp receive command disables a switch from receiving ICMP packets with the local IP address as the destination IP address.
By default, switches are enabled to receive ICMP packets with the local IP address as the destination IP address.
icmp { type icmp-type code icmp-code | name icmp-name | all } receive
undo icmp { type icmp-type code icmp-code | name icmp-name | all } receive
Parameter | Description | Value |
---|---|---|
type icmp-type |
Specifies the type number of an ICMP packet. |
The value is an integer ranging from 0 to 255. |
code icmp-code |
Specifies the code of an ICMP packet. |
The value is an integer ranging from 0 to 255. |
name icmp-name |
Specifies the name of an ICMP packet. |
The value is a string of case-insensitive characters, with spaces not supported. The value can be any of the following:
|
all |
Specifies all ICMP packets. |
- |
Usage Scenario
On secure networks, the device can normally receive ICMP packets. In the case of heavy traffic on the network, if hosts or ports are frequently unreachable, the device will receive a large number of ICMP packets, which causes heavier traffic burdens over the network and degrades the performance of the device.
On insecure networks, network attackers often use ICMP error packets to probe on the internal structure of the network.
To improve network performance or enhance security, run the undo icmp receive command to disable switches from receiving ICMP packets with the local IP address as the destination IP address.
After network performance improves, you can run the icmp receive command to enable switches to receive ICMP packets with the local IP address as the destination IP address.
Precautions
After the undo icmp receive command is run, the device no longer process ICMP packets of a certain type, causing the host to fail to ping the device.