Traceroute

Traceroute utility (known as tracert in Windows OS) tracks and prints the route packets taken on their way to a specified host or to an IP address and measures their transit delays.


While the ping command can determine if there is a problem, traceroute helps to identify where the problem exists. It prints the route packets trace to the network host. 


This traceroute usually uses UDP echo packets to probe the route through the Internet from one device to another. It usually uses high UDP ports for tracing hosts. However, often the firewalls of the ISP providers block these UDP ports for security reasons.


We advise you to run the traceroute by including the ICMP echo flag when tracing a host or IP address: 


     -I, --icmp

Example:

tracert -I [hostname or IP address]


Usage 


Traceroute is run from the Windows command prompt, from the Linux distros command line, or from the macOS Terminal app. 


Windows 

To run the tracert command in Windows press Windows+R to open the “Run” box. Type “cmd” and then click “OK” to open the Command Prompt. Run the tracert command followed by the address of the host. Note that tracert by default is using ICMP packets to probe the route. 

tracert [hostname or IP address]


Linux 

To run a traceroute command in Linux press Ctrl+Alt+T to open the Terminal window. Run the traceroute command followed by the address of the host. 

traceroute -I [hostname or IP address]


macOS

To run a traceroute command in macOS press Control + Option + Shift + T to open a new Terminal window. Run the traceroute command followed by the address of the host. 

traceroute -I [hostname or IP address]


Example:

$ traceroute -I ucdn.com
traceroute to ucdn.com (188.72.220.195),  30 hops max, 60 byte packets
  1   184.170.253.126  113,215ms  113,273ms  113,035ms
  2   98.142.220.60  112,893ms  113,004ms  113,103ms
  3   38.122.14.121  113,584ms  113,652ms  113,304ms
  4   154.54.81.25  114,159ms  114,348ms  113,976ms
  5   154.54.30.186  180,025ms  180,160ms  180,159ms
  6   154.54.56.94  187,623ms  318,430ms  187,665ms
  7   154.54.56.166  193,894ms  193,503ms  193,418ms
  8   149.11.202.26  198,873ms  200,900ms  194,585ms
  9   78.140.169.239  194,010ms  193,363ms  195,771ms
 10   188.72.220.195  193,675ms  193,244ms  193,252ms


Understanding the Output


traceroute test, by default, measures 30 hops of 60-byte packets.

traceroute to ucdn.com (188.72.220.195), 30 hops max, 60 byte packets


The first line of the traceroute output report what the command is doing – listing the destination host (ucdn.com), destination IP address (188.72.220.195), and the maximum number of hops that will be taken in the traceroute test (30).


The rest of the output shows the information on each hop on the path between the sender and the final destination.

1   184.170.253.126  113,215ms  113,273ms  113,035ms
2   98.142.220.60  112,893ms  113,004ms  113,103ms
3   38.122.14.121  113,584ms  113,652ms  113,304ms
4   154.54.81.25  114,159ms  114,348ms  113,976ms
5   154.54.30.186  180,025ms  180,160ms  180,159ms
6   154.54.56.94  187,623ms  318,430ms  187,665ms
7   154.54.56.166  193,894ms  193,503ms  193,418ms
8   149.11.202.26  198,873ms  200,900ms  194,585ms
9   78.140.169.239  194,010ms  193,363ms  195,771ms
10  188.72.220.195  193,675ms  193,244ms  193,252ms

The first line presents your router (if you’re behind a router), the next lines represent your ISP, and each subsequent line represents a networking device that’s further away.


The format of each line is as follows:

hop [hostname/IP address] RTT1 RTT2 RTT3 


hop:

The first column of the traceroute test shows the number of hops. The journey of each route that a packet takes to reach the next intermediary network device is called a hop. For example, in the output above, it takes 10 hops to reach the specified host (ucdn.com) from the location it has been run.


[hostname/IP address]:

The [hostname] or [IP address], helps you see the location of a router/network device. 


RTT1, RTT2, RTT3:

This is the round-trip time that it takes for a packet to get to a hop and back to your device (shown in milliseconds). It is often referred to as latency. The traceroute sends three packets to each hop and displays each time.

The output of the traceroute may show asterisks [ * * * ] instead of the hostname and response times. The asterisks indicate that the target network device does not respond as the traceroute expected before the timeout occurred. This could be an indication of packet loss.



Basic Troubleshooting

Browser Dev Tools

Python-Swiftclient

cURL

Wget