Ping Computer By Serial Number

0 views
Skip to first unread message

Clidia Panahon

unread,
Aug 3, 2024, 5:33:03 PM8/3/24
to dysfeikillbe

So, I discovered a strange quirk of the Windows 10 ping utility. If you ping a whole number instead of an IP address, it will "convert" that number to an IPv4 address. The conversion is such that the first octet is your 256^3 spot, second octet is 256^2, third is 256^1, and the last octet being the "ones" place or 256^0.

Other address representations were in common use when classful networking was practiced. For example, the loopback address 127.0.0.1 is commonly written as 127.1, given that it belongs to a class-A network with eight bits for the network mask and 24 bits for the host number. When fewer than four numbers are specified in the address in dotted notation, the last value is treated as an integer of as many bytes as are required to fill out the address to four octets. Thus, the address 127.65530 is equivalent to 127.0.255.250.

Remember that the dot notation of an IPv4 address is merely a way to represent the four-byte (i.e 32 bit) integer that is an IPv4 address (and that goes in the 32-bit destination field in an IP packet). Different utilities will accept different formats for this integer.

You often use the "ping 127.0.0.1" command to do a loop test on the machine to verify whether the TCP/IP protocol suite of the machine is correctly installed. But did you find it? The same test result can be obtained by using the command "ping 127.1". In fact, the two commands "ping 127.1" and "ping 127.0.0.1" are the same, both of which are performing loop tests.

Why is this so? This is the skill of using IP address in Ping command application. Everyone knows that the IP address is composed of 32 binary digits. In order to make it easier for everyone to remember, every 8 binary digits are converted into decimal digits. Therefore, an easy-to-remember IP address consisting of four-part decimal digits (such as 127.0.0.1 ). Since the Windows operating system has the function of automatically filling ".0", I can change "127.0.0.1" to "127.1".

However, the omission of this ".0" is conditionally restricted and cannot be omitted arbitrarily. In the application of the Ping command, you can only omit one or more ".0"s that appear before the last decimal number of the IP address, such as rewriting the "ping 127.0.0.1" command to "ping 127.1".

If the one or more ".0" is not next to the last part of the decimal number, but in other positions, then this ".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 response message of "202.96.0.1" instead of the response message of "202.0.96.1".

Tip: In some LAN environments, using the "Ping+number string" command may fail, and the prompt message "Unknown host number string" appears. This is because the number string is resolved into a host name instead of an IP address.

IPv4 addresses are unsigned 32-bit integers. In a misguided attempt to make them more human-readable, they are traditionally displayed in the UI in "dotted decimal" notation, where each octet (8-bit byte), starting with the most significant, is represented as a decimal number, separated from the next octet by a dot.

Verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) echo Request messages. The receipt of the corresponding echo Reply messages is displayed, along with round-trip times. ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution. Used without parameters, this command displays Help content.

You can also use this command to test both the computer name and the IP address of the computer. If pinging the IP address is successful, but pinging the computer name isn't, you might have a name resolution problem. In this case, make sure the computer name you're specifying can be resolved through the local Hosts file, by using Domain Name System (DNS) queries, or through NetBIOS name resolution techniques.

I'm sure you recognize that ping is a common and relatively simple command. And, like many basic commands, there are some great options and techniques that make the tool even better. This article explores various tricks and tips to level up your ping knowledge.

By default, Linux sends continuous pings. Windows, by default, only sends four. One of my favorite uses of ping is to inform me when a remote server or network device has restarted. For example, imagine I'm remotely connected to a Windows server from my Linux laptop. The server needs to be rebooted before I can continue with its configurations. I can issue the reboot command and then set up a continuous ping from my laptop to the server. When the ping results show success, I know the reboot process on the remote machine has been completed. In the meantime, I can work on other projects.

I've already uncovered some good uses for ping with the above options. I particularly like the ability do a quick name resolution query. I've used the continuous ping during reboots trick more than any other, however.

You can use the ping command to test name resolution services, too. If you ping a destination by IP address, and the ping succeeds, you know you have basic connectivity. If you ping the same destination by hostname, and it fails, you know name resolution is not working. This is because ping could not resolve the given hostname to an IP address in the second test.

The timeout message indicates that your machine believes it successfully sent ping queries to the destination. However, it did not receive replies within a specified time, so it "timed out." The misconfiguration is likely on the destination end or on the network between your machine and the destination. Your machine sent the queries, but the destination failed to reply. Start by checking that the destination device is on, physically connected to the network, and has a valid IP address. Verify router and firewall configurations after that.

The opposite is true with the unknown host output. This indicates a likely issue on your end of the connection. Your computer was unable to send the query out to the desired destination. This could mean an IP address misconfiguration on your end, a problem with the default gateway value, or that you're attempting to connect to a destination address that doesn't exist.

I find it's more efficient to use the outward in approach because if step 1 succeeds, I can move on to other tests without wasting time. The chances of loopback and localhost tests failing are very low compared to other network configuration problems.

For example, what if you don't have Nmap installed but need to see what hosts are up? Add the -b option to run a ping broadcast to an entire subnet. This displays the hosts that are currently up, thought it's not as effective as a simple Nmap scan.

You can also change the size of the ping packet payload. The header is always 28 bytes, so add on the amount you want plus 28 bytes to get the total size. The default is 64 bytes. To send a ping with 128 bytes, type the following:

There is a GUI for ping - gping. Using a GUI could be handy for tasks like monitoring rebooting servers, as mentioned above. From across the room, you could view the status of a continuous ping result. Sometimes a graphical view is just easier to work with or useful for demonstrations. You can find gping at its official Git page. It's available for various Linux distributions, macOS, and Windows. There are several different package types available for several other installers.

Finally, a reminder: Many routers are set to drop ICMP-based packets, such as those used by ping (and traceroute). ICMP, in general, can be used for various attacks, and so routers may be configured neither pass nor respond to ping requests. This is something to keep in mind while troubleshooting network connectivity.

Sure, ping is a simple tool that you've all worked with a lot, but there are some great options to modify its behavior and some good techniques to use when troubleshooting. Did you discover at least one useful thing you didn't know from the above list? And how about gping? Can you think of any good uses for a graphical version of ping?

Damon Garn owns Cogspinner Coaction, LLC, a technical writing, editing, and IT project company based in Colorado Springs, CO. Damon authored many CompTIA Official Instructor and Student Guides (Linux+, Cloud+, Cloud Essentials+, Server+) and developed a broad library of interactive, scored labs. He regularly contributes to Enable Sysadmin, SearchNetworking, and CompTIA article repositories. Damon has 20 years of experience as a technical trainer covering Linux, Windows Server, and security content. He is a former sysadmin for US Figure Skating. He lives in Colorado Springs with his family and is a writer, musician, and amateur genealogist. More about me

The opinions expressed on this website are those of each author, not of the author's employer or of Red Hat. The content published on this site are community contributions and are for informational purpose only AND ARE NOT, AND ARE NOT INTENDED TO BE, RED HAT DOCUMENTATION, SUPPORT, OR ADVICE.

A ping (Packet Internet or Inter-Network Groper) is a basic Internet program that allows a user to test and verify if a particular destination IP address exists and can accept requests in computer network administration. The acronym was contrived to match the submariners' term for the sound of a returned sonar pulse.

Ping is also used diagnostically to ensure that a host computer the user is trying to reach is operating. Any operating system (OS) with networking capability, including most embedded network administration software, can use ping.

The term is also used to test and determine how fast a data signal travels from one place, like a computer, to another, like a website. Ping is also used to troubleshoot and test connectivity and determine response time.

Ping works by sending an Internet Control Message Protocol (ICMP) Echo Request to a specified interface on the network and waiting for a reply. When a ping command is issued, a ping signal is sent to a specified address. When the target host receives the echo request, it responds by sending an echo reply packet.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages