Introduction to ICMP

When most people think about the Internet Control Message Protocol (ICMP), two network utilities come to mind — Ping and Traceroute. While Ping and Traceroute are two tools that use ICMP, they are not its only purpose. ICMP is also used by network devices to send error messages, which describe a problem encountered while attempting to deliver a datagram. Network administrators can use these messages to troubleshoot internet connectivity issues. For example, a gateway or destination host will send an ICMP message to the source host if an error or an event that requires warning has surfaced (e.g., destination is unreachable, packet loss, etc). Operating systems’ network stacks can read ICMP messages to generate error codes to applications so that they can display an informative error message to the user.

Historically there were 255 requests/responses that comprised ICMP. Many are deprecated or reserved for various reasons; ten types of ICMP messages relevant to modern networks are shown in Table 1. Within each message type, there are several codes to identify a specific condition or request.