Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Time to live
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Time limit of messages in network engineering}} {{for|the film|Time to Live (film){{!}}''Time to Live'' (film)}} {{Use American English|date = February 2019}} '''Time to live''' ('''TTL''') or '''hop limit''' is a mechanism which limits the lifespan or lifetime of data in a computer or network. TTL may be implemented as a [[counter (digital)|counter]] or [[timestamp]] attached to or embedded in the data. Once the prescribed event count or timespan has elapsed, data is discarded or revalidated. In [[computer networking]], TTL prevents a data packet from circulating indefinitely. In [[computing]] applications, TTL is commonly used to improve the performance and manage the [[cache (computing)|caching]] of data. == Description == The original [[DARPA]] Internet Protocol's [[Request for Comment|RFC]] describes{{Ref RFC|791|rsection=1.4}} TTL as: {{Quote|text=The Time to Live is an indication of an upper bound on the lifetime of an internet [[datagram]]. It is set by the sender of the datagram and reduced at the points along the route where it is processed. If the time to live reaches zero before the internet datagram reaches its destination, the internet datagram is destroyed. The time to live can be thought of as a self destruct time limit.|source=|style=}} ==IP packets== Under the [[Internet Protocol]], TTL is an 8-bit field. In the [[IPv4 header]], TTL is the 9th [[octet (computing)|octet]] of 20. In the [[IPv6 header]], it is the 8th octet of 40. The maximum TTL value is 255, the maximum value of a single octet. A recommended initial value is 64.<ref>{{cite web |url=http://www.map.meteoswiss.ch/map-doc/ftp-probleme.htm |title=Default TTL Values in TCP/IP |access-date=2013-02-19 |archive-date=2013-02-12 |archive-url=https://web.archive.org/web/20130212114759/http://www.map.meteoswiss.ch/map-doc/ftp-probleme.htm |url-status=dead }}</ref><ref>{{cite web |url=https://www.iana.org/assignments/ip-parameters/ip-parameters.xml |quote=The current recommended default time to live (TTL) for the Internet Protocol (IP) is 64 [RFC791], [RFC1122]. |title=IP OPTION NUMBERS |date=2012-11-30 |access-date=2013-02-19}}</ref> The time-to-live value can be thought of as an upper bound on the time that an IP [[datagram]] can exist in an Internet system. The TTL field is set by the sender of the datagram, and reduced by every [[router (computing)|router]] on the route to its destination. If the TTL field reaches zero before the datagram arrives at its destination, then the datagram is discarded and an [[Internet Control Message Protocol]] (ICMP) error datagram ([[ICMP Time Exceeded|11 - Time Exceeded]]) is sent back to the sender. The purpose of the TTL field is to avoid a situation in which an undeliverable datagram keeps circulating on an Internet system, and such a system eventually becoming swamped by such "immortals". In theory, under [[IPv4]], time to live is measured in seconds, although every host that passes the datagram must reduce the TTL by at least one unit. In practice, the TTL field is reduced by one on every [[Hop (networking)|hop]]. To reflect this practice, the field is renamed ''hop limit'' in [[IPv6]]. ==DNS records== [[File:TTL of a DNS answer resolving google.com, seen in Ubuntu Linux Wireshark.png|thumb|TTL of a DNS answer resolving google.com, seen in [[Wireshark]]]] TTLs also occur in the [[Domain Name System]] (DNS), where they are set by an [[Domain Name System#Authoritative name server|authoritative name server]] for a particular resource record. When a caching (recursive) [[name server|nameserver]] queries the authoritative nameserver for a resource record, it will cache that record for the time (in seconds) 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 authoritative nameserver again. TTL for NXDOMAIN (non-existent domain) responses is set from the minimum of the MINIMUM field of the [[List of DNS record types#SOA|SOA]] record and the TTL of the SOA itself, and indicates how long a resolver may cache the negative answer.{{ref RFC|2308}}{{Technical statement|date=November 2014}} Shorter TTLs can cause heavier loads on an authoritative name server, but can be useful when changing the address of critical services like [[web servers]] or [[MX record]]s, and therefore are often lowered by the DNS administrator prior to a service being moved, in order to reduce possible disruptions. The units used are seconds. An older common TTL value for DNS was 86400 seconds, which is 24 hours. A TTL value of 86400 would mean that, if a DNS record was changed on the authoritative nameserver, DNS servers around the world could still be showing the old value from their cache for up to 24 hours after the last update by client. Newer DNS methods that are part of a [[IT disaster recovery|disaster recovery]] (DR) system may have some records deliberately set extremely low on TTL. For example, a 300-second TTL would help key records expire in 5 minutes to help ensure these records are flushed quickly worldwide. This gives administrators the ability to edit and update records in a timely manner. TTL values are "per record" and setting this value on specific records is sometimes honored automatically by all standard DNS systems worldwide. However, a problem persists in that some caching DNS nameservers set their own TTLs regardless of the authoritative records, thus it cannot be guaranteed that all downstream DNS servers have the new records after the TTL has expired. ==HTTP== Time to live may also be expressed as the date and time on which a record expires. The [[List of HTTP header fields#Responses|<code>Expires:</code> header in HTTP responses]], the <code>Cache-Control: max-age</code> header field in both requests and responses and the [[HTTP cookie#Expires and Max-Age|<code>expires</code> field in HTTP cookies]] express time-to-live in this way. ==See also== * [[Hop (telecommunications)]] * [[Ping (networking utility)]] * [[traceroute]] == References == {{reflist}} ==External links== * [https://web.archive.org/web/20150206054041/http://www.binbert.com/blog/2009/12/default-time-to-live-ttl-values/ Default '''IP packets''' Time To Live (TTL) values] * [http://rfc-gnutella.sourceforge.net/developer/testing/messageArchitecture.html Gnutella TTL and Hops header values used for preventing loops and monitoring of network topology] [[Category:Internet architecture]] [[Category:Internet protocols]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:For
(
edit
)
Template:Quote
(
edit
)
Template:Ref RFC
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Technical statement
(
edit
)
Template:Use American English
(
edit
)