The icmp host-unreachable send command enables the switch to send ICMP Host Unreachable packets.
The undo icmp host-unreachable send command disables the switch from sending ICMP Host Unreachable packets.
By default, the function of sending ICMP Host Unreachable packets is enabled.
Usage Scenario
ICMP error packets contain network information, such as network connectivity, host reachability, and route availability. ICMP error packets are ultimately returned to the sender because the sender is the logical receiver of the ICMP error packets. The sender learns about the error types from the ICMP error packets, and then determines how to retransmit the data.
After receiving an IP packet, if the device finds that the destination is unreachable, the device discards the packet, and returns a Destination Unreachable packet to the source.
After you run the undo icmp host-unreachable send command, the device does not send ICMP Host Unreachable packets externally. This prevents the peer device from processing a large number of ICMP packets.
Precautions
If the function of sending ICMP Host Unreachable packets is disabled, the switch does not send ICMP Host Unreachable packets in any situations.
This command needs to be configured on the inbound interface of ICMP packets in the interface view.
# Enable the switch to send ICMP Host Unreachable packets.
<HUAWEI> system-view [HUAWEI] icmp host-unreachable send
# Enable VLANIF100 to send ICMP Host Unreachable packets.
<HUAWEI> system-view [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] icmp host-unreachable send
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] icmp host-unreachable send