The Internet Control Message Protocol (ICMP) works at the Network layer and is used by IP for many different services. ICMP is a management protocol and messaging service provider for IP. Its messages are carried as IP datagrams.
Periodically, router advertisements are announced over the network,
reporting IP addresses for the router’s network interfaces. Hosts listen for
these network infomercials to acquire route information. A router solicitation is a request for immediate advertisements and may be sent by a host
when it starts up. The following are some common events and messages that
If a router can’t send an IP datagram any further,
it uses ICMP to send a message back to the sender, advising it of the
situation. For example, if a router receives a packet destined for a network
that the router doesn’t know about, it will send an ICMP Destination
Unreachable message back to the sending station.
If a router’s memory buffer for receiving incoming datagrams
is full, it will use ICMP to send out this message.
Each IP datagram is allotted a certain number of routers, called
Hops that it may go through. If it reaches its limit of hops before arriving
at its destination, the last router to receive that datagram deletes it.
The executioner router then uses ICMP to send an obituary message, informing
the sending machine of the demise of its datagram.
Packet Internet Groper uses ICMP echo messages to check the
physical connectivity of machines on an internetwork.
Using ICMP timeouts, traceroute is used to find a path a
Packet takes as it traverses an internetwork.
The following data is from a network analyzer catching an ICMP echo
Notice that even though ICMP works at the Network layer, it still uses IP to do the Ping request.