Kamran Mushtaq
Back to Networking
Networking

IPv4 Header – Time To Live (TTL) Field (8 bits)

Added: July 6, 2026

Definition

  • The Time To Live (TTL) field tells the network how many routers (hops) a packet is allowed to pass through before it is discarded.
  • Every router decreases the TTL by 1 before forwarding the packet.

What Problem It Solves

  • Routing errors or loops can cause a packet to circulate endlessly between routers.
  • TTL ensures that every packet has a maximum lifetime, preventing infinite loops and reducing unnecessary network traffic.

What Happens If Not Used

  • A packet caught in a routing loop could travel forever.
  • This would waste bandwidth, consume router resources, and eventually slow down the network.

Easy Wording

It gives every packet a limited number of chances to travel through routers before it expires.

Layman Example

Imagine a delivery package with 10 transfer tickets. Each warehouse removes one ticket before sending it to the next. When no tickets remain, the package is discarded instead of being passed around forever.

Technical Example

Request Flow:

  • Your browser sends a request to a cloud-hosted website.
  • The IPv4 packet is created with TTL = 64.
  • Router A changes it to 63, Router B to 62, and so on.
  • If the packet enters a routing loop, TTL eventually reaches 0.
  • The router drops the packet and sends an ICMP Time Exceeded message to your computer, helping tools like traceroute identify the path.

Limitation: TTL limits how long a packet can travel, but it doesn't identify which application or transport protocol should receive the payload. Protocol, provides that information.