$linuxjunkies
>

TTL

also: Time To Live, hop limit

TTL (Time To Live) is a numeric value in network packets that decreases by one at each router hop; when it reaches zero, the packet is discarded to prevent infinite routing loops.

TTL is a field in the IP header of network packets that acts as a counter limiting how long a packet can travel through a network. Each router that forwards the packet decrements the TTL by 1, and if it reaches 0, the router discards the packet and sends back an error message.

This mechanism prevents packets from circulating endlessly due to routing misconfigurations or loops. A typical default TTL value is 64 on Linux systems, allowing packets to traverse many hops across the internet before being dropped.

The ping and traceroute commands rely heavily on TTL: traceroute systematically increases TTL to discover each hop along the path to a destination, while ping uses TTL to confirm reachability. You can also set custom TTL values with tools like ping -t or ip route.

Related terms