Sunday, June 26, 2011

TTL (Time to Live)

TTL(Time to Live)... nice term it means “jinda rehna h kabtak”….kidding, actually when a host on an internet send data to a destination it sends it in the form of IP datagram. The datagram has two parts header and the payload, the header contains addressing and control field and the payload contains actual data.

At minimum the header is of 20 bytes long, there are number of fields inside this header, one of them is “jinda rehana h kab tak” field..it is of 8 bit i.e 1 byte field. Time to live is set by the sender of the datagram and it specifies how long the datagram is allowed to “live” on the network, in terms of router hops. Each router decrements the value of the TTL field (reduces it by one) prior to transmitting it.
In theory, time to live is measured in seconds, although every host that passes the datagram must reduce the TTL by at least one unit. In practice, the TTL field is reduced by one on every hop. To reflect this practice, the field is renamed hop limit in IPv6.

If the TTL field drops to zero, the datagram is assumed to have taken too long a route and is discarded. Typically, an ICMP message (specifically the time exceeded) is sent back to the sender to inform it that the packet has been discarded

No comments:

Post a Comment