Utilities such as Windows ping.exe have an option to change default TTL value in the IP header for Echo Request messages. TTL shows maximal hops limit for packets. I know that each router decreases TTL value and it was made for "cleaning" network from looped packets. But what the point of changing TTL? Why just not to set it to its maximal value 255? And how can i know what value is better? I heard that TTL is somehow connected with notion of Domain Zones and its size. Can someone explain, please? Thank you.

link|improve this question

Please understand that TTL in the context of ICMP ping packages (or other low level packages) is a vastly different concept from the various TTL values in DNS, despite the same name. – Holger Just Mar 9 '11 at 19:19
feedback

1 Answer

up vote 1 down vote accepted

TTL is a fairly generic term and means 'Time To Live'. It is used in many situations where a finite lifetime is required.

In ping, as you rightly mention, it's used to set the maximum hop count a packet can travel. In DNS it's used as the length of time before an entry expires from the cache.

You ask why not just set it as 255 all the time? Well, in 99% of the situations you use ping that's fine. There are just a few (well, one that springs to mind) where you may want to specify an exact number of hops.

Imagine if you will a network with multiple routes between points A and B. Route 1 (R1) has 6 hops between A and B. Route 2 (R2) has 8 hops between A and B.

By setting ping to only allow 6 hops you can accurately determine how many packets take R1 and how many take R2.

link|improve this answer
Are there any official references with advices what to set for TTL? – kirmir Mar 9 '11 at 18:15
In what context? Ping? DNS? – Majenko Mar 9 '11 at 18:16
Setting TTL value for ping and why default, for example, is 128... – kirmir Mar 9 '11 at 18:17
1  
For ping the default TTL is down to the creator of the operating system: binbert.com/blog/2009/12/default-time-to-live-ttl-values For DNS it's depenant on what you're doing with the DNS at the time: dyndns.com/support/kb/dns_caching.html – Majenko Mar 9 '11 at 18:21
2  
Also, when there is random loops (due to broken routes), lowering TTL is good idea, because otherwise all packets are running between routers for 255 times, when maximum required TTL might be something like 10 or so. – Olli Mar 9 '11 at 18:40
feedback

Your Answer

 
or
required, but never shown

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