Interview Prep/Networking/IP Addressing, CIDR, Subnetting & Routing

What is TTL and how do traceroute and loops relate to it?

BeginnerConceptIP Addressing, CIDR, Subnetting & Routing
Answer

Every IP packet has a Time To Live (hop limit in IPv6) decremented by each router; at zero the router discards it and sends ICMP Time Exceeded. This stops routing loops from circulating forever. Traceroute sends probes with TTL 1, 2, 3… and records which router answers each time.

Typical initial TTLs are 64 (Linux), 128 (Windows) and 255 (network gear), which lets you guess the OS or number of hops from a received TTL.

All Networking questions Roadmap: Networking for DevOps

More on IP Addressing, CIDR, Subnetting & Routing