Query the operating system type of the server by IP Address

Source: Internet
Author: User
Tags hp ux

TTL

TTL is a value in the IP protocol package. It tells the network whether the packet is discarded because the time in the network is too long. There are many reasons that the package cannot be delivered to the destination within a certain period of time. The solution is to discard the packet after a period of time and then send the packet to the sender, which determines whether to resend the packet. The initial value of TTL is usually the default value of the system, which is the 8-bit domain in the header. The original assumption of TTL is to determine a time range and discard the package after this time. Since each vro must at least reduce the TTL domain by one, TTL usually indicates the maximum number of vrouters that can pass the packet before it is discarded. When the Count reaches 0, the router decides to discard the packet and send an ICMP packet to the original sender.

======================================

For example, I ping Netease.

Pinging www.163.com [113.106.194.220] with 32 bytes of data:Reply from 113.106.194.220: bytes=32 time=3ms TTL=60Reply from 113.106.194.220: bytes=32 time=19ms TTL=60Reply from 113.106.194.220: bytes=32 time=3ms TTL=60Reply from 113.106.194.220: bytes=32 time=6ms TTL=60Ping statistics for 113.106.194.220:    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:    Minimum = 3ms, Maximum = 19ms, Average = 7ms

Here, the TTL value is 60, which can be estimated to be a Linux operating system. 64-60 + 1 = 5, you can know that it has passed through five routes to me. (Add 1 because 64 refers to 0 ~ 64)
Why not use Windows? 128-60 + 1 = 69, after 69 routes. In fact, this situation is unlikely. After 69 route nodes, the network is basically paralyzed. Generally, it is similar to the value of TTL which is the closest to the value of TTL. The number of nodes that pass through the route will not exceed 30.
If you really don't know what it is, you can use the tracert tool, which is called traceroute in Linux. In Linux, Apt-Get can be installed, and in windows, tracert IP is used.
The following is the result of my traceroute Netease In ubuntu.

Tracing route to www.163.com [113.106.194.220]over a maximum of 30 hops:  1     1 ms     2 ms     4 ms  10.0.59.254   2     3 ms     3 ms     3 ms  10.0.59.254   3     7 ms     8 ms     2 ms  113.106.194.225   4     4 ms     3 ms     8 ms  220.243.136.2   5     5 ms     2 ms     3 ms  113.106.194.220 Trace complete.

It indicates that the route is 5. It is consistent with the calculation above. This is the Linux system.

The TTL field values of various systems found on the Internet are as follows:
The TTL field value of Linux kernel 2.2.x & 2.4.x ICMP echo response is 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 response is 255

Windows 95/98/98SE

Windows ME

The TTL field value of the ICMP echo response is 32.

Windows NT4 wrks

Windows NT4 Server

Windows 2000

Windows XP

The TTL field value of the ICMP echo response is 128

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.