Computer Networking Basics

What is the role of the TTL (Time To Live) field in the IPv4 header?

  1. AIt records the time from sending a packet until a response returns, to decide when TCP retransmits
  2. BIt is decremented by 1 at each router, and packets that reach 0 are discarded, preventing packets from circulating forever in a routing loop
  3. CPackets with larger values are forwarded with higher priority by routers
Show answer and explanation

Answer: B. It is decremented by 1 at each router, and packets that reach 0 are discarded, preventing packets from circulating forever in a routing loop

Despite "time" in its name, TTL is in practice an upper limit on the number of routers (hops) a packet may pass, decremented by 1 at each router. When it reaches 0, the router discards the packet and sends an ICMP time exceeded message back to the source. So even if a misconfiguration creates a routing loop, packets do not circulate forever. A packet sent with a TTL of 64, for example, arrives with 61 after passing three routers. traceroute sends packets with TTL 1, 2, 3 and so on, and discovers the path from the time exceeded messages each router returns. In IPv6 the field with the same role is called the hop limit.

  • A. TCP measures the time until a response (RTT) itself; TTL is not involved.
  • B. Correct. As a hop limit, it removes looping packets.
  • C. Priority is expressed in a different field (such as DSCP).
Practice this topic Back to topic

Related calculators

Books on Computer Networking Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Computer Networking Basics questions

  1. Which correctly describes dynamic routing?
  2. Which correctly describes UDP?
  3. In the three-way handshake that establishes a TCP connection, what is the correct order of the packets exchanged?
  4. A client makes a new HTTPS connection (TLS 1.3 over TCP) to a web server with a round-trip time (RTT) of 100 ms. Roughly how long does it take until the response to the first request starts to arrive? Assume DNS resolution is already done, and ignore server processing time and data transfer time.
  5. Which correctly pairs protocols with the standard port numbers their servers use?