ICMP (Internet Control Message Protocol) is a network layer protocol that reports errors and provides information related to IP packet processing. Network devices use this protocol for certain purposes. This helps in sending error messages. For example, an indication for a requested service that is not available or that a host isn’t reachable.
Host A wants to test whether it can reach Server over the network. Host A will start the ping utility that will send ICMP Echo Request packets to Server. If Server is reachable, it will respond with ICMP Echo Reply packets. If Host A receives no response from Server, there might be a problem on the network.
Host A sends a packet to Host B. Because the Host B is down, the router will send an ICMP Destination host unreachable message to Host A, informing it that the destination host is unreachable, e.g.: