ICMP
The Internet Control Message Protocol (ICMP) is used for network diagnostics and error reporting. Tools like ping and traceroute rely on ICMP messages to test connectivity.
Host A
Host B
Common message types include Echo Request/Reply and Destination Unreachable notifications.
ICMP operates alongside IP but is considered part of the network layer. When a packet cannot reach its destination or when routers need to share information, ICMP generates short control messages. Each message has a type and code specifying the condition.
Key Uses
- Connectivity tests with Echo Request and Echo Reply (used by
ping
) - Path discovery using Time Exceeded messages (used by
traceroute
) - Error reporting such as Destination Unreachable or Redirect messages
Because ICMP packets can reveal network details, many administrators filter them at firewalls for security.