Describe what the TTL in ping means

Source: Internet
Author: User

Ping is an application of ICMP packets. Used to test the connectivity of each device in the network. I used this very common command in the lab class these days, but this time I found something that I hadn't noticed before, which is that the TTL value I return when I ping a different address is different. As follows:

C:\Documents and Settings\administrator>ping 192.168.12.254

Pinging 192.168.12.254 with + bytes of data:

Reply from 192.168.12.254:bytes=32 time=245ms ttl=64
Reply from 192.168.12.254:bytes=32 time=214ms ttl=64
Reply from 192.168.12.254:bytes=32 time=251ms ttl=64
Reply from 192.168.12.254:bytes=32 time=236ms ttl=64

Ping statistics for 192.168.12.254:
Packets:sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in Milli-seconds:
Minimum = 214ms, Maximum = 251ms, Average = 236ms

. C:\Documents and Settings\administrator>ping 202.99.160.68

Pinging 202.99.160.68 with + bytes of data:

Reply from 202.99.160.68:bytes=32 time=242ms ttl=250
Reply from 202.99.160.68:bytes=32 time=250ms ttl=250
Reply from 202.99.160.68:bytes=32 time=247ms ttl=250
Reply from 202.99.160.68:bytes=32 time=237ms ttl=250

Ping statistics for 202.99.160.68:
Packets:sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in Milli-seconds:
Minimum = 237ms, Maximum = 250ms, Average = 244ms

C:\Documents and Settings\administrator>ping www.baidu.com

Pinging www.a.shifen.com [202.108.22.5] with + bytes of data:

Reply from 202.108.22.5:bytes=32 time=277ms ttl=52

Reply from 202.108.22.5:bytes=32 time=294ms ttl=52

Reply from 202.108.22.5:bytes=32 time=268ms ttl=52

Reply from 202.108.22.5:bytes=32 time=260ms ttl=52

Ping statistics for 202.108.22.5:

Packets:sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in Milli-seconds:

Minimum = 260ms, Maximum = 294ms, Average = 274ms

The first address in the above ping address (192.168.12.254) is the gateway address of the local area network where my computer resides, and the second address (202.99.160.68) is the address of the DNS server for my computer. The last one is very familiar with, is the address of Baidu website

Here I would like to explain the origin of different TTL values in different rpely messages. TTL is the maximum number of times a packet is configured to be transmitted over a network in order to prevent the packet from being throttled in the network. Because each time the router is forwarded, it will turn to the next hop, so it is often referred to as the maximum hop count. The concrete meaning is this. Our local machine will send out a packet, the packet passes a certain number of routers to the destination host, but for a lot of reasons, some packets can not be transferred to the destination host, if they do not give these packets a time to live, these packets will always be transmitted over the network, resulting in increased network overhead. When the packet is delivered to a router, the TTL is automatically reduced by 1, and if it is reduced to 0 or not delivered to the destination host, it is automatically lost. For example: You define a packet with a TTL of 64. Then your data packet is forwarded 64 times, that is, after 63 intermediate routers have not reached the destination network, then your computer will show Requet time out (Request timed out). For example: You define a packet with a TTL of 64. Then your data packet is forwarded 64 times, that is, after 63 intermediate routers have not reached the destination network, then your computer will show Requet time out (Request timed out). That's what the TTL means.

In addition, as the TTL defined by different operating systems is different, there are generally the following rules: By default, the TTL value of a Linux system is 64 or 255,windows NT/2000/XP system has a TTL value of 128,windows 98 system with a TTL value of 32 , the UNIX host has a TTL value of 255.

Describe what the TTL in ping means

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.