Internet Control Message Protocol (ICMP) is another of the maintenance protocols. It allows two systems on an IP network to share status and error information. This information can be used by higher-level protocols to recover from transmission problems or by network administrators to detect network trouble. Although ICMP packets are encapsulated within IP packets, they are not considered to be a higher-level protocol. (ICMP is required in every IP network implementation.)
The ping program uses the ICMP echo request and echo reply packets to determine whether a particular IP system on a network is functional. For this reason, the ping program is useful for diagnosing IP network or router failures.