The Internet Control Message Protocol (ICMP) is a supporting network-layer protocol, defined in RFC 792, that is primarily used for sending control, error, and informational messages in Internet Protocol (IP) networks. ICMP operates as an integral part of the IP protocol suite, enabling routers, hosts, and other network devices to communicate issues such as unreachable destinations, packet forwarding errors, and diagnostic information. Unlike transport protocols, ICMP does not provide end-to-end communication but instead facilitates reliable delivery of IP packets by reporting network conditions and errors.
In the Internet Control Message Protocol (ICMP), query messages (also called informational messages) are a class of control messages used to request and obtain specific information about network conditions or host status, rather than reporting errors. Defined in RFC 792, these messages are exchanged between hosts and routers to perform diagnostic or management functions, such as testing reachability or determining network characteristics. Examples include Echo Request/Echo Reply, Timestamp Request/Timestamp Reply, and Address Mask Request/Reply.
In the Internet Control Message Protocol (ICMP), a Destination Unreachable message is an error-reporting message defined in RFC 792 that indicates an IP packet cannot be delivered to its intended destination. When a router or host is unable to forward or deliver a datagram due to reasons such as an unavailable network, unreachable host, protocol mismatch, or port inaccessibility, it generates and sends a Destination Unreachable message back to the source. This message helps the sender identify delivery problems and take corrective actions.
In the Internet Control Message Protocol (ICMP), a Time Exceeded message, defined in RFC 792, is an error-reporting message generated by a router or host when an IP packet’s Time-to-Live (TTL) field has decremented to zero before reaching its destination, or when a fragment of a datagram fails to arrive within the allowed time for reassembly. The message is sent back to the source host to indicate that the packet has been discarded due to excessive transit time, commonly used in network diagnostics (e.g., the traceroute utility).
In the Internet Control Message Protocol (ICMP), a Parameter Problem message, defined in RFC 792, is an error-reporting message generated when a router or host detects an invalid or ambiguous value in the header of an IP packet that prevents proper processing. This message is sent back to the source to indicate which part of the header caused the issue, enabling the sender to correct the problem. It ensures reliability in IP communication by notifying the sender of malformed or incorrect packet headers.
In the Internet Control Message Protocol (ICMP), a Redirect message, defined in RFC 792, is a control message sent by a router to inform a host that a more efficient route is available for sending packets to a particular destination. When a router receives a packet from a host and forwards it to another router on the same network, it may generate a Redirect message to instruct the host to update its routing table and send future packets directly to the better next-hop router. This mechanism optimizes routing paths and reduces unnecessary traffic through intermediate routers.