Ping and traceroute can be extremely useful in diagnosing and troubleshooting suspected connectivity issues with your servers. We can use these tools to determine if there is a network issue somewhere between your computer and the server, or within the server network itself. 


Ping

Ping can be used to quickly determine whether or not a specific IP address is accessible. It works by sending a packet to the specified address and waiting for a reply. It is primarily used to troubleshoot connectivity issues and it is built-in to many popular operating systems such as Windows and Mac.


Windows


On Windows you can run ping from the command prompt. To do this:


Press CTRL + R, this will open the Run dialog box. Once open, type cmd to open the command prompt.


Picture1.png


On the command prompt, type ping <IP address/hostname>. Here I entered 192.168.1.1. It should produce an output similar to the one below.


 Picture1.png

Mac


Open the Terminal application and type ping <IP address/hostname>. Here I entered 192.168.1.1. It should produce an output similar to the one below.


 Picture1.png


Notes:

There are a few things to look out for in the ping output.


Time – the lower, the better. If it is too high then there is a probable network issue somewhere along the path the packet is travelling. It can cause slow connectivity.


Under ping statistics – Packet loss should be 0 at best.


The ping command may not work at all if the IP address you are pinging to is behind a firewall and that firewall is blocking ICMP requests. In which case, you may get a request time out or a host unreachable message.

 


Traceroute

Traceroute is a tool that as the name implies, traces the path or route a packet travels from your computer to a host on the Internet.  If you’re visiting a web site or accessing a server remotely and it loads slower than usual then you can use traceroute to figure out where the longest delays are occurring. It can also be used to check if there is a network issue on the route your data is travelling on (e.g unable to connect to a host)


Windows


Press CTRL + R, this will open the Run dialog box. Once open, type cmd to open the command prompt.


Picture1.png



On the command prompt, type tracert <IP address/hostname>. Here I entered one of the servers used by google.com. It should produce an output similar to the one below.



Picture1.png



Mac

Open the Terminal application, type traceroute <IP address/hostname>. Here I entered one of the servers used by google.com. It should produce an output similar to the one below.



Picture1.png 



Notes:

There are a few things to look out for in the trace route output.


Time (in ms) – the lower, the better. If it is too high then there is a probable network issue somewhere along the path the packet is travelling. It can cause slow connectivity.


NOTE: If a request time out or *  or !H occurred and the trace route continues on to another IP, it may have been caused by a firewall blocking trace route from resolving the IP or domain name of that router. If a request time out keeps repeating, it is possible that a firewall is blocking the trace route or it is a network issue on that part of the route.


 

MTR

There is also an advanced tool that combines the functions of traceroute and ping into one network diagnostic tool. 


Windows

On Windows we’ll use WinMTR. We must install it first before we can use it.


Open up a browser and go to http://winmtr.net/download-winmtr/

 Picture1.png

Choose the version that matches the platform of your Windows OS (32-bit or 64-bit) but regardless of whatever you choose you’ll be downloading a zip file. Inside the file you should see two folders.



Picture1.png

Choose the one that matches the platform of your OS. Open that folder and you should see a WinMTR.exe file. Extract that file to a folder on your computer.


Once extracted, you can open WinMTR directly. You should be greeted with the following screen:


 Picture1.png



Type the IP address you would like to check and click “Start”. In my case, I entered an IP address of one of google.com’s servers. You should see the following output.



Picture1.png



Mac

On a Mac, we need to install mtr via Homebrew.


If you have Homebrew installed already, open a Terminal window and type the following command:


brew install mtr


Once done, the path to MTR needs to be added to the $PATH variable in Mac OS. MTR is located in the /usr/local/sbin folder.


Open the paths file with root privileges using nano by entering the following command:


sudo nano /etc/paths


Once the paths file is open in nano, add /usr/local/sbin on the bottom.


Once done, save the file. Close all open Terminal windows and open a new Terminal window. In the new window, type sudo mtr <IP address/hostname>. In this case, I’ll use google.com. You should be presented with the following screen:


Notes:


As with ping and trace route, the lower the better. And if there is a “No response from host” or ??? but it is in-between IP addresses, then a firewall must be blocking the ping/traceroute coming from WinMTR. Otherwise, there is a network problem on somewhere on the route to the host you are checking.


If you are unsure of the results you receive, please forward a screenshot of the results to Intergrid's support team for investigation.