Using the ping command to check for domain or IP connection.
how to use the ping command to check for domain or IP connection?
In this article we are going to show you how to use the ping command in order to check for domain or IP connection. We will cover the whole procedure from starting the cmd to reading the output from the ping command. We will use Windows OS in this particular case.
- Click on the “Start” button on the bottom left of your screen. When a text box appears, simply type “cmd” in it.
- Now simply click on the “cmd.exe” that appears on the “Start menu”. There will appear a black window like this one:
- For your convenience, you can maximize it to fit your whole screen. Using this “black window” you type and execute commands in your Windows OS. Almost every command in Windows has additional options. In this article we will use the “ping” command so we will demonstrate to you the most common additional options to it. For the following example we will use the command in its basic form to check for connetion with the domain icn.bg:
You can read the following rows:
Reply from 22.214.171.124: bytes=1024 time=11ms TTL=59
There is a reply from 126.96.36.199 (the IP of the icn.bg domain),
with a data package with size 1024 bytes,
that took 11ms to be delivered to you.
The TTL value is the number of hops the packet takes along the path until destination. (don’t bother remembering this).
If there was no reply from the domain/IP, you would receive this row:
Request timed out.
- You can add additional information to the “ping” output by simply adding the following “extensions” to the command: -n (to specify the number of sent packages) and -l (to specify the size of the package).
After the extension -n we specify the number of the packages that we want to send to the domain/IP (in our case 5).
After the extension -l we specify the size of the packages in bytes (in this case 1024 bytes that is equal to 1K).
On the bottom you can see the summarized information. This information show if there is or there is not a connection. It also shows parameters for the quality of the connection:
0% loss. (which means that all the 5 packages are sent and received respectively).
Average – 7ms.
Which means: no lost packages, the average time for package delivery is 7ms (which is good).
Also you can add the extension -t so the ping will continue until interrupted. It’s very useful when you want to check if your international internet connection is stable.
Now you know how to use the “ping”. Simple, isn’t it ?
For other useful posts, please visit our Library.