Main Page | See live article | Alphabetical index

Time to live

Time to live (TTL) is an 8 bit field in the Internet Protocol header which indicates how many more hops this packet should be allowed to make before being discarded or returned. It is the 9th octet of 20 in the ip header.

TTL's also occur in the Domain Name System where they are set by an authoratitive nameserver for a particular Resource Record. When a Caching (recursive) nameserver queries the authoratitive nameserver for a Resource Record it will cache that record for the time specified by the TTL. If a stub resolver queries the caching nameserver for the same record before the TTL has expired the caching server will simply reply with the already cached resource record rather than retrieve it from the authoratitive nameserver again. Nameservers also have negative TTL's for negative replies (NXDOMAIN) they are generally short in duration (3 hours max).

Shorter TTL's can cause heavier loads on an authorative nameserver, but can be useful when changing the address of critical services like web servers or MX records, and therefore are often lowered by the dns admin prior to a service being moved in order to minimise disruption.

See also: traceroute, ping