# ICMP # Internet Control Message Protocol. Unlike transport protocols like TCP an UDP, ICMP is a utility protocol that generally doesn't carry user data payloads. ICMP provides feedback about problems and changes on an IP network. Excerpted from RFC 792: > Occasionally a gateway or destination host will communicate with a source host, for example, to report an error in datagram processing. > For such purposes this protocol, the Internet Control Message Protocol (ICMP), is used. > > ICMP messages are sent in several situations: > for example, when a datagram cannot reach its destination, > when the gateway does not have the buffering capacity to forward a datagram, > and when the gateway can direct the host to send traffic on a shorter route. > > ICMP messages are sent using the basic IP header. > The first octet of the data portion of the datagram is a ICMP type field; > the value of this field determines the format of the remaining data. > > Time to live in seconds; as this field is decremented at each machine in which the datagram is processed, the value in this field should be at least as great as the number of gateways which this datagram will traverse. ICMP types: Type Name Reference 0 Echo Reply RFC 792 3 Destination Unreachable RFC 792 5 Redirect RFC 792 8 Echo RFC 792 9 Router Advertisement RFC 1256 10 Router Solicitation RFC 1256 11 Time Exceeded RFC 792 12 Parameter Problem RFC 792 13 Timestamp RFC 792 14 Timestamp Reply RFC 792 Codes associated with ICMP type 3 Destination Unreachable messages: 0 Net Unreachable RFC 792 1 Host Unreachable RFC 792 2 Protocol Unreachable RFC 792 3 Port Unreachable RFC 792 4 Fragmentation Needed and Don't Fragment was Set RFC 792 5 Source Route Failed RFC 792 6 Destination Network Unknown RFC 1122 7 Destination Host Unknown RFC 1122 8 Source Host Isolated RFC 1122 9 Communication with Destination Network is Administratively Prohibited RFC 1122 10 Communication with Destination Host is Administratively Prohibited RFC 1122 11 Destination Network Unreachable for Type of Service RFC 1122 12 Destination Host Unreachable for Type of Service RFC 1122 13 Communication Administratively Prohibited RFC 1812 14 Host Precedence Violation RFC 1812 15 Precedence cutoff in effect RFC 1812 It's generally good manners to allow at least these types for IPv4: - 0 Echo reply - 3 Destination unreachable - 8 Echo request - 11 Time exceeded For IPv6, ICMP is not just a good idea, it's critical. Links ---------------------------------------------------------------------------- - https://tools.ietf.org/html/rfc792 - https://tools.ietf.org/html/rfc1122 - https://tools.ietf.org/html/rfc4443