Skip to main content
dns

TTL (Time to Live)

TTL has two meanings in networking: in DNS, it is the number of seconds a record is cached before resolvers must re-query. In IP packets, it is a hop counter that prevents packets from circulating forever. DNS TTL controls cache freshness. IP TTL prevents routing loops.

Definition

DNS TTL is set on individual records and tells recursive resolvers how long to cache the answer. A TTL of 300 means resolvers cache for 5 minutes. Low TTL (60-300s) allows quick DNS failover but increases resolver load. High TTL (86400s = 1 day) reduces DNS load but makes changes propagate slowly. For planned migrations, reduce TTL to 300 seconds 24+ hours before the change, then change the record, then restore TTL. IP TTL starts at 64 or 128 per packet and is decremented by each router. When TTL reaches 0, the router drops the packet and sends an ICMP Time Exceeded message – this is how traceroute works.

Examples

  • Low TTL (60s) – fast failover, higher DNS load
  • High TTL (86400s) – slower propagation, lower DNS load
  • IP TTL 64 – max 64 router hops before packet is dropped

Related Protocols

Related Terms