ICMP: network errors, ping and diagnostics
A ping that gets no reply does not always mean a dead host. ICMP is the protocol IP networks use to report errors and control information, and ping, built on ICMP Echo messages, is only its best-known use. Other ICMP messages report an unreachable destination, an oversized packet or an expired hop limit.
What ICMP reports besides ping replies
When a router or host cannot deliver a packet, it can send an ICMP message back to the sender saying why. Destination Unreachable means the packet could not be delivered, and its code says why. Time Exceeded means the packet used up its hop limit, which is the message traceroute relies on. Packet Too Big, or a “fragmentation needed” code in IPv4, means the packet was larger than a link on the path could carry.
How to read a failed ping
Look at the exact result and do not treat every failure as the same problem. A timeout means that nothing came back, which can be filtering or loss. Destination Unreachable and Packet Too Big are active reports and carry specific diagnostic information. To repeat the check from an external point, use 2ip ping and traceroute.
When a failed ping does not mean the host is down
Many hosts and firewalls drop Echo requests on purpose while the website or mail service behind them keeps working. Test the service itself on its own port before you decide that the host is down. The reverse also holds: a ping reply shows that the address answers, not that the application is healthy. ICMP for IPv4 is defined in RFC 792 and ICMPv6 in RFC 4443.