The TCP/IP Guide - Version 3.0 (Contents) ` 629 _ © 2001-2005 Charles M. Kozierok. All Rights Reserved.
Key Concept: ICMPv4 Time Exceeded messages are sent in two different “time-
related” circumstances. The first is if a datagram’s Time To Live (TTL) field is
reduced to zero, causing it to expire and the datagram to be dropped. The second is
when all the pieces of a fragmented message are not received before the expiration of the
recipient’s reassembly timer.
The TCP/IP traceroute (or tracert) utility is used to show the sequence of devices over
which a datagram is passed on a particular route between a source and destination, as well
as the amount of time it takes for a datagram to reach each hop in that route. This utility was
originally implemented using Time Exceeded messages by sending datagrams with
successively higher TTL values. First, a “dummy” datagram is sent with a TTL value of 1,
causing the first hop in the route to discard the datagram and send back an ICMP Time
Exceeded; the time elapsed for this could be measured. Then, a second datagram is sent
with a TTL value of 2, causing the second device in the route to report back a Time
Exceeded, and so on. By continuing to increase the TTL value we can get reports back
from each hop in the route. See the topic describing traceroute for more details on its
operation.
ICMPv4 Redirect Messages
Every device on an internetwork needs to be able to send to every other device. If hosts
were responsible for determining the routes to each possible destination, each host would
need to maintain an extensive set of routing information. Since there are so many hosts on
an internetwork, this would be a very time-consuming and maintenance-intensive situation.
Instead, IP internetworks are designed around a fundamental design decision: routers are
responsible for determining routes and maintaining routing information. Hosts only
determine when they need a datagram routed, and then hand the datagram off to a local
router to be sent where it needs to go. I discuss this in more detail in my overview of IP
routing concepts.
Since most hosts do not maintain routing information, they must rely on routers to know
about routes and where to send datagrams intended for different destinations. Typically, a
host on an IP network will start out with a routing table that basically tells it to send every-
thing not on the local network to a single default router, which will then figure out what to do
with it. Obviously if there is only one router on the network, the host will use that as the
default router for all non-local traffic. However, if there are two or more routers, sending all
datagrams to just one router may not make sense. It is possible that a host could be
manually configured to know which router to use for which destinations, but another
mechanism in IP can allow a host to learn this automatically.
Consider a network N1 that contains a number of hosts (H1, H2, etc…) and two routers, R1
and R2. Host H1 has been configured to send all datagrams to R1, as its default router.
Suppose it wants to send a datagram to a device on a different network (N2). However, N2
is most directly connected to N1 using R2 and not R1. The datagram will first be sent to R1.