Time to Live (TTL)

Time to Live (TTL)



Time-to-Live (TTL) is a value in an Internet Protocol (IP) packet that tells a network router whether or not the packet has been in the network too long and should be discarded.

In other words, it specifies the number of router hops the packet is yet allowed to travel before it must be discarded or returned.

Time-to-Live is a field in the IP header of a packet and is defined to be a timer limiting the lifetime of a datagram. It is an 8-bit field and the units are seconds.

How Time to Live TTL works

For a number of reasons, packets may not get delivered to their destination in a reasonable length of time. For example, a combination of incorrect routing information at routers could cause a packet to loop endlessly. Time-to-Live is a solution to this.

The initial Time-to-Live value is usually set by a system default, for example to 128.

Each router that the packet travels through is required to subtract at least one count from the TTL field.

If the Time-to-Live is reduced to zero (or less), the packet MUST be discarded, and if the destination is not a multicast address, the router MUST send an ICMP Time Exceeded message to the source.

This mechanism ensures that a packet traveling through the network is discarded after a certain time and does not loop endlesly.

Default Time to Live TTL values

The default Windows 95/98 TTL value is 32 hops.

It is recommend to change this to 128 if you have difficulty reaching certain sites.

Where Time to Live TTL is used

The ping, traceroute, and the pathping network utilities both make use of the TTL value to attempt to reach a given host computer or to trace a route to that host.

The traceroute utility intentionally sends a packet to the target destination. It sends a packet with a low TTL value so that the packet is discarded by each successive router in the destination path.

The time between sending the packet and receiving back the ICMP message that it was discarded is used to calculate each successive hop travel time.

Time-to-Live: Does it measure time or hops?

The Time-to-Live is sometimes used as a hop count limit and other times as a time limit. The hop count function is critical to network functionality. It ensures that network's do not melt down packets looping infinitely in the network. The time limit function is used by transport protocols such as TCP to ensure reliable data transfer.

Each router that handles a packet MUST decrement the TTL by at least one, even if the elapsed time was much less than a second. Time-to-Live functions as a hop count in this perspective. Since this is the case most of the time, TTL is effectively a hop count limit on how far a datagram can propagate through the Internet.

When a router forwards a packet, it MUST reduce the TTL by at least one. If it holds a packet for more than one second, it MAY decrement the TTL by one for each second. This way, Time-to-Live is used as a time count.

Time-to-Live in IPv6

Time-to-Live (TTL) has been renamed renamed in IP version 6. The field is called the hop limit and has the same function as the TTL field in IPv4.

What networking utilities are built around Time to Live?

Traceroute and the pathping are commonly used network utilities that are based on the concept of Time-to-Live.

.

Discuss this article or this topic in our discussion forum:
(The table bellow shows a list of 8 most recent topics posted in our discussion forum. Visit our discussion forum to see more. It is possible the links below are not related to this page, but you can be certain you will find related posts in the discussion forum. You can post one yourself too.)
Email this article to a friend:
TO: 
FROM: 
2 + 6 - 3 = 
.
How can I link to this web page?

It is easy, just include the code provided below into your HTML code.

<a href="http://www.maxi-pedia.com/time+to+live" title="www.Maxi-Pedia.com: Time to Live (TTL)" target="_blank">Time to Live (TTL)</a>
.