What Is TTL?
TTL — Time To Live — a counter in every IP packet that each router decreases by one; at zero the packet is discarded. It prevents packets looping forever.
How it works
A packet starts with a TTL (commonly 64 or 128). Every router hop decrements it; a router that decrements TTL to zero drops the packet and sends back an ICMP "time exceeded" message. Traceroute exploits exactly this: sending packets with TTL 1, 2, 3… makes each router along the path reveal itself.
Why it matters
TTL turns routing loops from meltdowns into self-cleaning events, and understanding it explains how traceroute works — a favourite interview question. In DNS, TTL means something different: how long a record may be cached.
Frequently asked questions
What happens when TTL reaches zero?
The router discards the packet and returns an ICMP Time Exceeded message to the sender.
How does traceroute use TTL?
It sends probes with increasing TTLs (1, 2, 3…); each router that expires a probe replies, revealing the path hop by hop.
Is DNS TTL the same thing?
No — DNS TTL is how long resolvers may cache a record, unrelated to the IP header's hop counter.
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.