The icmp port-unreachable send command enables the device to send ICMP Port Unreachable packets.
The undo icmp port-unreachable send command disables the device from sending ICMP Port Unreachable packets.
By default, the device sends ICMP Port Unreachable packets.
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 icmp port-unreachable send command, the device does not send ICMP Port Unreachable packets externally. This prevents the peer device from processing a large number of ICMP packets.
Precautions
If the function of sending ICMP Port Unreachable packets is disabled, the switch does not send ICMP Port Unreachable packets in any situations.
# Enable the device to send ICMP Port Unreachable packets.
<HUAWEI> system-view [HUAWEI] icmp port-unreachable send
<HUAWEI> system-view [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] icmp port-unreachable send
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] icmp port-unreachable send