ip icmp unreachable

Enables sending ICMP unreachable messages.
Syntax
ip icmp unreachable { administration | fragmentation-needed | host | network | port | protocol | source-route-fail}
no ip icmp unreachable { administration | fragmentation-needed | host | network | port | protocol | source-route-fail}
Command Default

By default, when a device receives an IP packet that the device cannot deliver, the device sends an ICMP unreachable message back to the host that sent the packet.

Parameters
administration
Sends the ICMP unreachable message when the packet is dropped by the device due to a filter or ACL configured on the device.
fragmentation-needed
Sends the ICMP unreachable message when the packet has the Do not Fragment bit set in the IP Flag field, but the device cannot forward the packet without fragmenting it.
host
Sends the ICMP unreachable message when the destination network or subnet of the packet is directly connected to the device, but the host specified in the destination IP address of the packet is not on the network.
network
Sends the ICMP unreachable message when the destination network is
port
Sends the ICMP unreachable message when the destination host does not have the destination TCP or UDP port specified in the packet. In this case, the host sends the ICMP port unreachable message to the device, which in turn sends the message to the host that sent the packet.
protocol
Sends the ICMP unreachable message when TCP or UDP on the destination host is not running. This message is different from the port unreachable message, which indicates that the protocol is running on the host but the requested protocol port is unavailable.
source-route-fail
Sends the ICMP unreachable message when the device received a source-routed packet but cannot locate the next hop IP address indicated in the packet Source-Route option.
Modes

Global configuration mode

Usage Guidelines

You can disable the device from sending these types of ICMP messages on an individual basis.

Note: Disabling an ICMP unreachable message type does not change the device ability to forward packets. Disabling ICMP unreachable messages prevents the device from generating or forwarding the unreachable messages.

The no form of the command disables the ICMP unreachable messages.

Examples

The following example enables the ICMP unreachable message when the destination network or subnet of the packet is directly connected to the device, but the host specified in the destination IP address of the packet is not on the network.

device(config)# ip icmp unreachable host