Menu
Coddy logo textTech

IP and TTL

Lesson 12 of 32 in Coddy's The OSI Model course.

Layer 3 is where IP addresses live and where data can finally leave the local segment. Packets hop from router to router, each router deciding the next step toward the destination.

To stop lost packets from circling forever, every IP packet carries a TTL (Time To Live): a counter, commonly starting at 64, that every router decreases by one. At zero the packet is discarded and an error goes back to the sender.

TTL is also a diagnostic goldmine: tools like traceroute map entire paths just by sending packets with deliberately tiny TTLs.

challenge icon

Challenge

Beginner

A packet leaves your machine with TTL 64 and crosses 3 routers on the way to its destination. Print the TTL the destination sees.

Expected output:

61

Try it yourself

Terminal

All lessons in The OSI Model

Practice on your own: Terminal playground