Time-to-live Definition

The time-to-live (TTL) is the number of hops that a packet is permitted to travel before being discarded by a router.

A packet is the fundamental unit of information transport in all modern computer networks, and increasingly in other communications networks as well. A router is a network layer electronic device and/or software that connects at least two networks, such as two LANs (local area networks) or WANs (wide area networks), and forwards packets between them. A hop is the trip that a packet takes from one router to another as it traverses a network on the way to its destination.

The TTL is set in an eight binary digit field in the packet header by the sending host and is used to prevent packets from endlessly circulating on the Internet or other network. When forwarding an IP packet, routers are required to decrease the TTL by at least one. If a packet's TTL field reached zero, the router detecting it discards the packet and sends an ICMP (Internet control message protocol) message back to the originating host.

The ping and the traceroute utilities both make use of the TTL. The latter intentionally sends packets with low TTL values so that they will be discarded by each successive router in the destination path. The time between sending a packet and receiving the ICMP message that it was discarded is used to calculate the travel time for each successive hop.

A specific TTL number can indicate the maximum range for a packet. For example, zero restricts it to the same host, one to the same subnet, 32 to the same site, 64 to the same region and 128 to the same continent; 255 is unrestricted.

Created October 14, 2005.
Copyright © 2005 The Linux Information Project. All Rights Reserved.