Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the concept of ping and TTL

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today, I would like to share with you the relevant knowledge of what the concept of ping and TTL is. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

The TTL we know is more about the network. For example, we can see the TTL value when we are on ping ip or ping websites. In the network, it mainly refers to the TTL value in the ping network speed.

First, what is ping?

PING (Packet Internet Grope), an Internet packet explorer, is a program used to test the number of network connections. Ping sends an ICMP echo request message to the destination and reports whether it has received the desired ICMP echo reply. How does he work? look at the picture below.

Ping request description

Second, what is TTl?

TTL: time to Live

Specifies the number of network segments allowed before the packet is discarded by the router.

The TTL is set by the sending host to prevent packets from looping endlessly over the IP Internet. When forwarding IP packets, the router is required to reduce the TTL by at least 1. The type of ICMP message involved when using PING: one for ICMR request echo (ICMP Echo Request)

A value for the ICMP echo reply (ICMP Echo Reply) TTL field can help us identify the operating system type. The TTL field value of UNIX and similar UNIX operating system ICMP echo reply is 255,5.0,64 for Compaq Tru64 5.0ICMP echo reply, 128,128 for Microsoft Windows NT/2K operating system ICMP echo reply, and 32 for Microsoft Windows 95 operating system ICMP echo reply. Of course, the returned TTL value is the same. However, in some special cases, the TTL field values of LINUX Kernel 2.2.x & 2.4.x ICMP echo reply are 64 FreeBSD 4.1,4.0,3.4; Sun Solaris 2.5.1,2.6,2.7,2.8 OpenBSD 2.6,2.7, NetBSD HP UX 10.20, the TTL field value of the ICMP echo reply is 255,the TTL field value of the Windows 95/98/98SE Windows ME ICMP echo reply is 32 Windows NT4 WRKS Windows NT4 Server Windows 2000, and the TTL field value of the echo reply is 128. In this way, we can identify the operating system in this way.

three, For example, C:\ Documents and Settings > ping blog.51yip.comPinging blog.51yip.com [173.201.152.6] with 32 bytes of data:Reply from 173.201.152.6: bytes=32 time=257ms TTL=45Reply from 173.201.152.6: bytes=32 time=256ms TTL=45Reply from 173.201.152.6: bytes=32 time=262ms TTL=45Reply from 173.201.152.6: bytes=32 time=258ms TTL=45Ping statistics for 173.201.152.6:Packets: Sent = 4, Received = 4, Lost = 0 (0 loss), Approximate round trip times in milli-seconds:Minimum = 256ms, Maximum = 262ms Average = 258ms

From this, we can conclude that blog.51yip.com is a linux host. After 64-450019 transfers, it arrives at the local machine, time=257ms. This time is the time of a request. The smaller the time, the faster the speed, the greater the speed, the slower the speed.

C:\ Documents and Settings > ping 127.0.0.1Pinging 127.0.0.1 with 32 bytes of data:Reply from 127.0.0.1: bytes=32 timefor 127.0.0.1:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss) Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 0ms, Average = 0ms

The TTL=128 here means two things:

1. The requesting host is a computer with WINDOWS system.

2, and there is no routing, that is, the request is the local machine. The time of each request is less than one-millionth of a second.

These are all the contents of the article "what is the concept of ping and TTL". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report