Time to live (TTL) is an 8-bit IPv4 header field that limits how long a packet can travel. A host assigns an initial value, commonly 64, and each forwarding router decreases it by 1. section 7.1.6
When TTL reaches 0, the router discards the packet. This prevents a routing loop from carrying the packet around the network indefinitely, even when configuration mistakes create a loop. section 7.1.6 section 7.4
A packet caught in a loop
With an initial TTL of 5, a packet travels R1 → R2 → R3 → R1 → R2. The values become 4, 3, 2, and 1; R3 drops it rather than forwarding it with TTL 0. section 7.1.6
Figure 7.3 A looped packet is dropped due to the TTL mechanism. (1) R1 forwards the packet to R2 with a TTL of 5. (2) R2 forwards the packet to R3 with a TTL of 4. (3) R3 forwards the packet to R1 with a TTL of 3. (4) R1 forwards the packet to R2 with a TTL of 2. (5) R2 forwards the packet to R3 with a TTL of 1. (6) R3 wants to forward the packet to R1 but drops the packet because it must decrement the TTL to 0.
Follow the six-step router sequence showing TTL decrement and the final discard. section 7.1.6
