The smaller the value of Ping TTL, the better? No- Website operation_card card network
Technology Channel Navigation
HTML/CSS
. NET Technology
IIS technology
PHP technology
Js/JQuery
Photoshop
Fireworks
Server technology
operating system
Website operation

sponsor

Classified catalogue

sponsor

Latest articles

search

The smaller the value of Ping TTL, the better? incorrect!

Author: admin Time: 2017-6-15 9:48:52 Browse:

We are using Ping When you command, you usually focus on the value of "time" and ignore the value of "TTL". But careful people will find that the TTL value is not the same every time you ping, nor is it the same for every domain name. What is the reason? What does "TTL" mean? Many people may think that the smaller the value of "TTL", the better, just like the value of "time". I used to think the same way. I only generally knew that "TTL" means "Time To Live", and thought that the smaller the value, the better. What is it actually like? This article will solve your doubts.

"TTL" means Time To Live

First, let's understand the meaning of "TTL". "TTL" is the abbreviation of Time To Live. This field specifies the maximum number of network segments that IP packets are allowed to pass before being discarded by the router. This may be more abstract. Let's take a look at the data of the Ping command, as shown in the figure:

 Ping Baidu server

Ping Baidu server

In the figure above, I pinged Baidu's server (4 times by default under Windows).

Bytes represent the size of the packet. Time, as the name implies, is the return time. "TTL" means the lifetime of the packet. Of course, what you get is the remaining lifetime. TTL is used to calculate the consumption time of data packets in routers. Because most routers now consume less than 1s, and the time less than 1s is counted as 1s, the TTL of data packets is reduced by one without passing through a router node.

What is the value of TTL at first? TTL is different by default for different operating systems. By default, the TTL value is 64 or 255 for Linux, 128 for Windows NT/2000/XP, 32 for Windows 98, and 255 for UNIX hosts.

As shown in the figure above, the TTL value of the packet returned by Ping Baidu server is 56 (usually the value that is 2 ^ n and the nearest to the returned value), and 64-56=9 routers are passed on the way.

For another example, if I ping my own IP address, the result is as follows:

 Ping local calculator

Ping local calculator

It can be seen that the TTL is 128 when I get it, and then 128-128=0 routers are passed on the way, that is, I do not need to pass through any router to send data packets to myself, so the TTL value is 128, that is, the lifetime of my data packets is 128.

The smaller the Ping TTL, the better? incorrect!

Through the analysis of the above examples, it is obviously wrong to say that the smaller the value of "TTL" is, the better. On the contrary, it should be said that the larger the value of "TTL" is, the better. Because the higher the value of "TTL" is, the less data packets sent through the router, and the less they pass through the router, the faster they reach the destination, and of course, the faster they will reach the destination.

What is a router? Learn from the Tracert command

How many routers do you need to pass through to send data packets? What does a router mean? It is necessary to mention the Tracert command.

Tracert is written as follows:

Tracert [target]

It means to get the IP address of the router from your host to the target host.

As shown in the figure:

  Tracert Baidu server

Tracert Baidu server

Here we can see that we have passed through 9 routers (not including the destination) to reach the goal, which is related to the "TTL" value (56) returned by Ping Baidu server, 64-56=9.

Note that some values are "request timeout", because some routers prohibit pinging (so no information is returned).

label: host   
x
  • Recommended by webmaster
/*The article content directory is displayed on the left*/