ping - Network Connectivity Check

Maintained on

The ping command is one of the commonly used commands for diagnosing computer networks.

It is used to check whether other computers or servers connected to a specific network are running.

This page introduces how to use the ping command and provides concrete examples.

What is the ping command?

As mentioned earlier, the ping command is one of the commonly used commands for diagnosing computer networks.

It is a command that exists in almost all operating systems, not just the Windows command prompt.

“Ping” is short for “Packet Internet Groper,” and basically asks another computer, “Can you respond?”

If the computer is running, it responds with “Here I am!”

The response also includes information such as the time it took to respond and whether the response was returned.

In other words, the ping command is a command that can be used to check the network connection status and performance.

How to use the ping command

The basic usage of the ping command is as follows:

ping <destination IP address or hostname>

The following are more detailed commands, but basically, you can use the ping command mentioned above by specifying the destination IP address or hostname.

ping [/t] [/a] [/n <count>] [/l <size>] [/f] [/I <TTL>] [/v <TOS>] [/r <count>] [/s <count>] [{/j <hostlist> | /k <hostlist>}] [/w <timeout>] [/R] [/S <Srcaddr>] [/4] [/6] <destination_IP_address_or_hostname>

As an example, let’s run the ping command on Google’s server.

×
Command Prompt Icon
Command Prompt
Microsoft Windows [Version xx.x.xxxxx.xxx]
(c) 2024 Ribbit App Development All rights reserved.
 
C:\users\user>ping www.google.com

When you run the above command, the following results will be displayed.

×
Command Prompt Icon
Command Prompt
Microsoft Windows [Version xx.x.xxxxx.xxx]
(c) 2024 Ribbit App Development All rights reserved.
 
C:\users\user>ping www.google.com
Sending ping to www.google.com [142.250.206.228] with 32 bytes of data:
Reply from 142.250.206.228: bytes=32 time=16ms TTL=119
Reply from 142.250.206.228: bytes=32 time=16ms TTL=119
Reply from 142.250.206.228: bytes=32 time=16ms TTL=119
Reply from 142.250.206.228: bytes=32 time=15ms TTL=119
Ping statistics for 142.250.206.228:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 15ms, Maximum = 16ms, Average = 15ms
C:\users\user>

The 142.250.206.228 displayed here is the IP address of Google’s server.

What is an IP address?

It is a unique identification number that each device connected to the Internet has.

For example, it is represented in the form of “192.168.0.1”.

This result shows that Google’s server is running.

When the ping command fails

With the ping command, as mentioned earlier, you can check whether a computer is running by specifying the destination IP address or hostname.

If the ping command fails, the destination IP address or hostname may be incorrect or the destination server may be down.

Practice Questions

Practice Problem

Select the unverifiable thing by the ping command from the following options.

回答がサーバーに送信されることはありません
Practice Problem

When you ran the ping command, “timeout” was displayed. What do you think happened?

回答がサーバーに送信されることはありません
#Command Prompt #Batch File #Argument #Command Line #Command