What Is Time-To-Live (TTL)?

Time-to-live (TTL) specifies the number of routers a packet can go through before it is discarded. The TTL value is decremented by one at each router that the packet passes through. If the TTL reaches zero before the packet reaches its destination, the packet is discarded. The sender of the packet typically sets TTL, but it can also be set by routers along the way. The default TTL value is 64, but it can be changed. The commands ping and traceroute both use TTL.

TTL helps prevent packets from looping endlessly through the network and also helps to prevent denial-of-service attacks.

However, it is not to be used to control or restrict the traffic flow in a network, as it leads to censoring or blocking of content.