< Home

icmp receive

Function

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.

Format

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

Parameters

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:

  • echo

  • echo-reply

  • fragmentneed-dfset

  • host-redirect

  • host-tos-redirect

  • host-unreachable

  • information-reply

  • information-request

  • net-redirect

  • net-tos-redirect

  • net-unreachable

  • parameter-problem

  • port-unreachable

  • protocol-unreachable

  • reassembly-timeout

  • source-quench

  • source-route-failed

  • timestamp-reply

  • timestamp-request

  • ttl-exceeded

all

Specifies all ICMP packets.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

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.

Example

# Disable the switch from receiving ICMP packets with the local IP address as the destination IP address whose type number is 3 and code number is 1.

<HUAWEI> system-view
[HUAWEI] undo icmp type 3 code 1 receive
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >