Checking Connectivity with the PING Command
As you might know, a submarine can detect a nearby object by using sonar to send out a sound wave and then seeing whether the wave is reflected. This is called pinging an object.
Windows Vista has a PING command that performs a similar function. PING sends out a special type of IP packet-called an Internet Control Message Protocol (ICMP) echo packet-to a remote location. This packet requests that the remote location send back a response packet. PING then tells you whether the response was received. In this way, you can check your network configuration to see whether your computer can connect with a remote host.
How to use Ping
This article explains how to use the Ping command for troubleshooting on Windows and Mac OS X.1/08/2017•Support KnowledgeArticle Content
How to use Ping
Using the ping command, or ‘pinging’ is a handy, quick diagnostic tool.
It’s particularly useful for finding out whether there is a connection problem between your device and an IP address or web address, inside or outside your school’s network.
Using Ping on a Windows device
- Open a Command Prompt
- Click on the Start Menu and in the search bar, type ‘cmd’, and press Enter.
- OR press Windows Key + R to open the Run Prompt. Type ‘cmd’, then click OK (or press Enter)
- In the Command Prompt window, type ‘ping’ followed by the destination, either an IP Address or a Domain Name, and press Enter.
- e.g. ping 122.56.77.17
- OR ping google.co.nz
- The command will begin printing the results of the ping into the Command Prompt.
Using Ping on a Mac OS X device (via Network Utility)
- Open the Network Utility
- Open Spotlight (Left Cmd + Spacebar or Click the Magnifying Glass on the right of the Menu Bar). Type Network Utility and press Enter.
Figure 1: Searching for Network Utility in Spotlight
- In OS X Mavericks and later, Network Utility is in /System/Library/CoreServices/Applications.[1]
- In OS X Mountain Lion, Lion, and Snow Leopard, Network Utility is in the Utilities folder of your Applications folder.[1]
Figure 2: The Ping tool in Network Utility (Mac OS X Sierra)
- In Network Utility, choose Ping. Enter a destination into the box, either an IP Address or a Domain Name, and click Ping.
- e.g. ping 122.56.77.17
- OR ping google.co.nz
Interpreting the Results
Figure 3: The results of a ping command
A normal reply looks like:
Reply from 122.56.77.17: bytes=32 time=15ms TTL=247
The ping command has received a response from the IP address, which took 15 milliseconds.
If the connection is down or the device you are pinging does not accept the ping, the ping command prints:
Request timed out.
Figure 4: The results of a ping command to an address that cannot be reached
Pinging a Domain Name
You can also ping Domain Names (web site addresses) e.g. google.com to see if the web site is up or to see if you have access to it from the school network.
Following the above instructions, enter into the Command Prompt:
Also to use PING, in XP first open a command-line session by selecting Start, All Programs, Accessories, Command Prompt. Here’s a simplified version of the PING syntax:
To test connectivity with a host on a network or internetwork, use the PING utility.
- Open a command prompt
- For Windows XP: Click Start, select Run, type cmd and press Enter or select OK button
- For Windows Vista and Windows 7: type cmd into the Start menu search box and select it from the Programs list that appears OR if you have the Run option enabled on your Start Menu, then click Start, select Run, type cmd and press Enter or select OK button.
- From the command prompt, type
PING servername
or
PING serverIP
where servername is the name of the server or serverIP is the IP address of the server with which you want to communicate.
- A response of four lines, each with a time (TTL=) response indicates the server is reachable.
- A response of Bad IP address indicates the name or IP address is incorrect or unknown.
- A response of Request timed out indicates the server is known but is not able to respond within a reasonable time.
A second connectivity test is TRACERT which traces the route to the target computer and returns a list of routers through which your request travels to reach the destination.
To use TRACERT:
- Open a command prompt
- For Windows XP: Click Start, select Run, type cmd and press Enter or select OK button
- For Windows Vista and Windows 7: type cmd into the Start menu search box and select it from the Programs list that appears OR if you have the Run option enabled on your Start Menu, then click Start, select Run, type cmd and press Enter or select OK button.
- From the command prompt, type
TRACERT servername
or
TRACERT serverIP
where servername is the name of the server or serverIP is the IP address of the server with which you want to communicate.
- The default settings for TRACERT will test over a maximum of 30 hops.
- If your TRACERT uses all 30 hops and receives many responses of * rather than a time in ms (milliseconds) at each hop, you can expect communication with the target computer to be inefficient.
To pipe the TraceRT to a log file, from the command prompt, type
TRACERT servername > C:\log.txt
or
TRACERT serverIP
where servername is the name of the server or serverIP is the IP address of the server with which you want to communicate.
You should wait until the command prompt reappears at the bottom of the screen before closing the screen. This indicates the entire log has been written.
ADVANTAGES OF PING COMMAND
The ping utility is a basic but integral feature in network management—it monitors device availability, network latency, and packet loss within a network. Most network administrators are more than familiar with the ping utility. A hallmark function in almost all PCs, ping helps ensure all devices with an IP address on the network are online—in other words, “pinging” certifies all devices are live, available, and performing networking operations at speed. An admin can send a single ping to verify the status of an IP address, or they can execute a ping sweep, contacting a breadth of addresses (perhaps even all the addresses within a network) to get a holistic view of network device availability.
Drop your comment