
Internet Control Message Protocol
(ICMP)
Chapter 23
ICMP
•Usually sent in RESPONSE to an IP Datagram.
–Such are usually reporting an error condition of some
kind.
•Some ICMP messages are not responses but are
originated as ICMP requests or advertisements.
–These are informational messages.
Examples of ICMP Error Messages
•Source Quench – Sent by a router to a host when
it has to discard datagrams from that host.
•Time Exceeded – Sent by a router when it
discards a packet whose time-to-live has expired.
•Destination Unreachable – Returned when router
determines it cannot deliver the packet. Tells
whether the network or host is down.
•Redirect – Tell host to send datagram to a
different router.
•Parameter Problem – Datagram contains a bad
parameter
Examples of Informational Messages
•Echo Request / Reply – ICMP software on any
computer is required to send a reply in response
to an echo request.
–Type 0, Code 0, Ping Reply
–Type 8, Code 0, Ping Request
•Address Mask Request / Reply – Upon boot a
host broadcasts a request for a mask. A nearby
router answers the request with the proper mask
for the network.
Traceroute
•Sends a series of ordinary datagrams to the
destination.
•Sets the TTL to 1, 2, 3....
• The Nth router discards the datagram because its TTL
has expired and returns an ICMP message Type 11,
code 0, to the source.
•ICMP message includes the IP address of the router
that sent the message.
•The procedure is repeated until the datagram actually
reaches the destination.
•The result is a list of routers along the way.