In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Editor to share with you how to use the ping command, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
".0" can be conditionally omitted
The "ping 127.0.0.1" command is commonly used to do a loop test on the local machine to verify that the local TCP/IP protocol suite is installed correctly. But did you find out? The same test results can be obtained by using the command "ping 127.1" (see figure). In fact, the commands "ping 127.1" and "ping 127.0.0.1" are the same, and both are doing loop testing.
What causes it? This is the skill of using IP address in the application of Ping command. As we all know, the IP address consists of 32-bit binary digits. In order to facilitate memory, every 8-bit binary number is converted into a decimal number, thus forming an easy-to-remember IP address composed of four-part decimal numbers (such as 127.0.0.1). Because the Windows operating system has the function of automatically populating ".0", I can change "127.0.0.1" to "127.1".
However, the omission of ".0" is conditional and cannot be omitted arbitrarily. In the application of the Ping command, one or more ".0" that appears before the last decimal number of the IP address can only be omitted, such as rewriting the "ping 127.0.0.1" command to "ping 127.1".
If this one or more ".0" is not the decimal number next to the last part, but is in another position, the ".0" cannot be omitted, such as "ping 202.0.96.1" cannot be written as "ping 202.96.1". This is because the result returned by "ping 202.96.1" is the reply message of "202.96.0.1", not that of "202.0.96.1".
Numeric string instead of IP address
In the Ping command, you can also use a string of numbers instead of an IP address. Can you believe it? Run the "ping 3658906394" command and you will see the return message from the IP address "218.22.123.26".
What causes it? In fact, "3658906394" is another representation of the IP address "218.22.123.26". Of course, you can Ping other IP addresses in the same way.
How are strings converted? In fact, it is not complicated. Take the IP address "218.22.123.26" as an example, the IP address is converted into a number string as follows: first, convert "218.22.123.26" to hexadecimal "DA.16.7B.1A", then remove the decimal point and change it to "DA167B1A". Finally, convert this hexadecimal number to decimal "3658906394", then "218.22.123.26" becomes "3658906394". Other IP addresses are converted to numeric strings in the same way.
Tip: in some LAN environments, using the "Ping+ numeric string" command may fail with the prompt "Unknown host numeric string" because the numeric string is resolved to a hostname rather than an IP address.
Therefore, after mastering the above skills, the network manager can skillfully use the "ellipsis" mode in network testing or maintenance to reduce the character input of Ping commands and improve work efficiency. At the same time, using numeric strings instead of IP addresses can also confuse curious ordinary users so that they don't set them up indiscriminately.
The above is all the contents of this article "how to use ping commands". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.