0

I was trying to understand more about traceroute when I stumbled upon this site and I have a question about this diagram:

enter image description here

As you can see in the diagram, the destination host S1 receives a packet with a TTL of 1. However, it was not mentioned if S1 decremented the TTL.

Is it because in general, destination hosts never decrement the TTL?

And if yes, then does it mean that the destination IP address is always checked first before the TTL is decremented?

2 Answers 2

1

As of RFC 791 (emphasis mine):

The Time to Live is an indication of an upper bound on the lifetime of an internet datagram. It is set by the sender of the datagram and
reduced at the points along the route where it is processed. If the
time to live reaches zero before the internet datagram reaches its
destination, the internet datagram is destroyed. The time to live can be thought of as a self destruct time limit.

Basically, the host processes the datagram, but it is the destination, not along the route (strictly speaking). Whether it decrements the TTL before processing or not doesn't matter: the datagram hasn't reached TTL zero before reaching the destination, so it is processed normally.

The essential part is that a datagram received with TTL = 1 by a gateway cannot be forwarded any more and must be dropped.

1
  • Ok thank you...
    – Noob_Guy
    Commented Jan 23 at 10:18
1

A proper IPv4 implementation should also look at the intention of RFC 791:

The intention [of the TTL mechanism] is to cause undeliverable datagrams to be discarded, and to bound the maximum datagram lifetime.

If a packet reaches its destination, we can say that it is deliverable (ergo, the packet is not undeliverable). If the packet is deliverable, then the TTL mechanism is not meant to be the cause for discarding the datagram. Even though I cannot speak for every IPv4 implementation out there, I do not see the benefit of any end host to decrement the TTL of any datagram.

If I had to guess (or design it), the IPv4 processing software on S1 would:

  • Only check if the datagram's destination IP address is equal to an IPv4 address on the S1
    • If the datagram's IPv4 destination address is not present on S1, discard the datagram.
    • If the datagram's IPv4 destination address is present on S1, look at the Protocol field of the IPv4 header and forward the datagram's payload to the appropriate process on S1.
  • Not bother with the TTL. At all.

The above is only valid for a stub host that will never have to forward traffic. As soon as you enable routing on S1, you must perform very different IP processing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.