What is TTL or Time To Live?, Understand Time To Live

Time To Live (TTL) in PING Command

TTL or Time to Live refers to how many Routers your packet can go through before it expires. Usually a packet finds its home in less than 32 hops, but 64-128 is a good default.

Every time a packet passes through a Router the TTL number is one less than before. If this counter didn’t exist the internet as we know it could be at 100% bandwidth bouncing these packets back and forth that would never find a home if the destination is unreachable. That would make the internet unusable.

Every computer has its own setting for its packets when it comes to TTL. All that matters is the setting is high enough to allow the packet to reach its destination.

You can issue a ping command with  default TTL in Windows, Find  below ping response to the  destinations google.com and yahoo.com by default without any TTL modification.

C:\Windows\System32>ping google.com

Pinging google.com [173.194.38.164] with 32 bytes of data:

Reply from 173.194.38.164: bytes=32 time=145ms TTL=55
Reply from 173.194.38.164: bytes=32 time=132ms TTL=55
Reply from 173.194.38.164: bytes=32 time=160ms TTL=55
Reply from 173.194.38.164: bytes=32 time=149ms TTL=55

Ping statistics for 173.194.38.164:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 132ms, Maximum = 160ms, Average = 146ms

C:\Windows\System32>ping yahoo.com

Pinging yahoo.com [72.30.38.140] with 32 bytes of data:
Reply from 72.30.38.140: bytes=32 time=304ms TTL=47
Reply from 72.30.38.140: bytes=32 time=353ms TTL=47
Reply from 72.30.38.140: bytes=32 time=449ms TTL=47
Reply from 72.30.38.140: bytes=32 time=333ms TTL=47
Ping statistics for 72.30.38.140:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 304ms, Maximum = 449ms, Average = 359ms

You can modify the TTL for packet while ping from command prompt using the -i command,  you set TTL parameter  is higher or lower than the defined maximum.. If TTL is very less than the number of hops to reach particular destination, packet will not reach to the destination and you will get TLL expired in transit in ping response.

C:\Windows\System32>tracert yahoo.com

Tracing route to yahoo.com [98.139.183.24]

over a maximum of 30 hops:

1    85 ms    65 ms    63 ms  172.23.130.4
2    74 ms    64 ms    65 ms  172.23.130.82
3    72 ms    66 ms    65 ms  172.29.244.241
4    60 ms    67 ms    65 ms  115.113.207.165
5    81 ms    80 ms    78 ms  172.31.16.197
6    85 ms    77 ms    80 ms  180.87.38.5
7   339 ms   340 ms   338 ms  if-9-5.tcore1.WYN-Marseille.as6453.net [80.231.217.17]
8   355 ms   372 ms   352 ms  if-2-2.tcore2.WYN-Marseille.as6453.net [80.231.217.2]
9   346 ms   345 ms   350 ms  if-5-2.tcore1.WV6-Madrid.as6453.net [80.231.200.6]
10   354 ms   345 ms   345 ms  if-8-2.tcore2.SV8-Highbridge.as6453.net [80.231.91.26]
11   361 ms   354 ms   344 ms  if-2-2.tcore1.SV8-Highbridge.as6453.net [80.231.139.2]
12   354 ms   347 ms   365 ms  if-6-2.tcore1.NJY-Newark.as6453.net [80.231.138.18]
13   356 ms   334 ms   342 ms  if-2-2.tcore2.NJY-Newark.as6453.net [66.198.70.2]
14   376 ms   345 ms   344 ms  if-3-2.tcore2.AEQ-Ashburn.as6453.net [216.6.87.9]
15   351 ms   374 ms   351 ms  209.58.27.54
16   357 ms   352 ms   350 ms  ae-6.pat2.dcp.yahoo.com [216.115.102.178]
17   388 ms   357 ms   359 ms  ae-2-d181.pat2.da3.yahoo.com [216.115.104.115]
18   382 ms   379 ms   383 ms  UNKNOWN-216-115-96-X.yahoo.com [216.115.96.117]
19   376 ms   382 ms   360 ms  ae-3.pat1.bfz.yahoo.com [216.115.97.199]
20   392 ms   380 ms   360 ms  xe-3-0-0.clr1-a-gdc.bf1.yahoo.com [98.139.232.95]
21   379 ms   362 ms   367 ms  xe-5-0-0.clr2-a-gdc.bf1.yahoo.com [98.139.128.11]
22   378 ms   383 ms   372 ms  et-17-1.fab4-1-gdc.bf1.yahoo.com [98.139.128.43]
23   387 ms   378 ms   423 ms  ir2.fp.vip.bf1.yahoo.com [98.139.183.24]
Trace complete.

C:\Windows\System32>ping yahoo.com -i 20

Pinging yahoo.com [98.139.183.24] with 32 bytes of data:

Reply from 216.115.100.29: TTL expired in transit.
Reply from 216.115.100.25: TTL expired in transit.
Reply from 216.115.100.25: TTL expired in transit.
Reply from 216.115.100.25: TTL expired in transit.

Ping statistics for 98.139.183.24:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

C:\Windows\System32>ping yahoo.com -i 23

Pinging yahoo.com [98.139.183.24] with 32 bytes of data:

Reply from 98.139.183.24: bytes=32 time=446ms TTL=40
Reply from 98.139.129.241:bytes=32 time=446ms TTL=40
Reply from 98.139.183.24: bytes=32 time=429ms TTL=40
Reply from 98.139.129.195bytes=32 time=446ms TTL=40.

Ping statistics for 98.139.183.24:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 429ms, Maximum = 446ms, Average = 437ms

C:\Windows\System32>ping yahoo.com -i 22

Pinging yahoo.com [98.139.183.24] with 32 bytes of data:
Reply from 98.139.129.195: TTL expired in transit.
Reply from 98.139.128.65: TTL expired in transit.
Reply from 98.139.129.195: TTL expired in transit.
Reply from 98.139.128.65: TTL expired in transit.

Ping statistics for 98.139.183.24:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

I hope you observed that when we are  pinging with TTL  less than 23,  we are getting TTL expired in transit and with TTL 23 , we are getting PING response fine. It means minimum TTL is required to reach a destination yahoo.com is 23 and find the number hops taken to reach yahoo.com in traceroute report also 23.

Time To Live (TTL) in DNS Records

TTL (Time To Live) is refers to the capability of the DNS servers to cache DNS records. It represents the amount of time that a DNS record for a certain host remains in the cache memory of a DNS server after the latter has located the host’s matching IP address.

By specifying TTL settings for a particular domain’s DNS records, webmasters define the frequency of website content updates. The longer the TTL value is, the faster the domain resolution time periods will be. The TTL value can be set from one to several hours, if you are not planning any changes to your domain’s DNS records in the meantime. If you need to make such changes, you will have to decrease the TTL value entry to several minutes to avoid any outdated data on your website.

Filed Under: Networking

Tags:

About the Author:

RSSComments (0)

Trackback URL

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.