The internet is a massive interlinked network of personal computers and servers. This is where the name World Wide Web (www) comes from, with many individual systems interconnected in a web-like structure. In some cases, however, these connections can fail and cause network outages.
To combat this, network troubleshooting is commonly used by both consumers and IT administrators. Identifying the root cause of the connection problem is the first step towards remediation. On Windows, macOS, and Linux, there is a built-in connection troubleshooting tool in the command-line interface (CLI) called Traceroute.
Aptly named, this tool allows you to trace the route data packets take across the internet or your local area network (LAN). By understanding where your data packets are going, you can identify common connection problems and take action to fix them.
Accessing and using Traceroute
Please note, we are using Windows 10 v2004 for this guide.
To access Traceroute, you need to open a Command Prompt window. You can do this by following these steps:
Method 1 – Press the Start button -> type ‘cmd’ -> open Command Prompt
Method 2 – Press the Windows key + R at the same time to open run -> type 'cmd' -> press Enter on the keyboard
Now you should have a Command Prompt window open. To use Traceroute, start by typing the following:
tracert
You should see the following text appear in your Command Prompt window:
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]
[-R] [-S srcaddr] [-4] [-6] target_name
Options:
-d Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target.
-j host-list Loose source route along host-list (IPv4-only).
-w timeout Wait timeout milliseconds for each reply.
-R Trace round-trip path (IPv6-only).
-S srcaddr Source address to use (IPv6-only).
-4 Force using IPv4.
-6 Force using IPv6.
Under the Usage: section, you can see a few examples of how to format the command. By changing the command using the Options: listed above, you can do different things with Traceroute. The target_name is the IP address or web URL that you are looking to test.
Let us attempt our first Traceroute. We are going to ping the www.google.com website, using the most basic Traceroute command to get started.
Type the following into your Command Prompt window:
tracert www.google.com
You should then see:
Tracing route to www.google.com [2a00:1450:4009:819::2004]
over a maximum of 30 hops:
This means that the Traceroute command has started. As you can see, the web URL is automatically resolved using your ISP's default domain name server (DNS) resolver service.
In this case, the www.google.com server IP address is 2a00:1450:4009:819::2004. This is an IPv6 address, which is an upgraded version of the more widely used IPv4 address type.
To get an IPv4 address from Google, you would type the following command:
tracert -4 www.google.com
This will force Traceroute to use IPv4.
Now you should see the following in your Command Prompt window:
Tracing route to www.google.com [172.217.169.68]
over a maximum of 30 hops:
Next to the URL, you can see the server IP address. If you go to your web browser and copy this IP address, you will notice that you go straight to the Fasthosts website.
INFO – Rather than remembering individual IP addresses for websites, a DNS service automatically retrieves the IP address from a database for the corresponding domain name. This helps to simplify internet usage for people who are less technically able.
Now we can modify the parameters of the Traceroute command to utilise more functionality. As shown above, the default number of hops with Traceroute is 30. This means that 30 connection attempts will be made before stopping the Traceroute command.
You can increase the number of hops by using the following Options:
tracert -4 -h 50 www.google.com
Now Traceroute will force the usage of IPv4. It will also run through to a maximum of 50 hops thanks to the -h 50 attribute. This isn't always needed, but some connections may require more hops, making this important to remember.
Interpreting Traceroute results
Your Traceroute command should return something along the lines of:
Tracing route to www.google.com [172.217.169.68]
over a maximum of 30 hops:
1 1ms 3ms 1ms 212.38.169.105
2 1ms 2ms 1ms be51.1717.asr01.dc5.as20860.net 87.117.210.25
3 1ms 1ms 3ms be256.asr01.thn.as20860.net 130.180.202.44
4 * * *
5 4ms 4ms 4ms 216.239.48.217
6 3ms 2ms 3ms 172.253.66.101
7 2ms 2ms 2ms lhr48s09-in-f4.1e100.net 172.217.169.68
In this case, 212.38.169.68 is the originating IP address (e.g. your router).
Lines 1 to 3 are hops between your router and ISP.
Line 4 took too long to respond, so Traceroute reports a timeout as indicated by * * *.
Lines 5 to 6 are internal IP hops on Google's LAN (unable to connect to these externally).
Line 7 shows a successful connection with the DNS name and actual IP address.
There are three results in ms as Traceroute sends three packets of data at each hop. This can be used to generate an average ping result by adding the numbers together and dividing by three (e.g. 3+2+3 = 8 then 8/3 = 2.66ms ping average).
Traceroute 'Request timed out'
When running Traceroute, you may have noticed the following:
Tracing route to www.google.com [172.217.169.68]
over a maximum of 30 hops:
1 1 ms 1 ms 1 ms 192.168.42.129
2 * * * Request timed out.
In this case, 192.168.42.129 is the router IP address. This means that Traceroute was able to ping your router, but the router did not forward the packets afterwards. To fix this, you would need to edit your firewall rule settings on your device or router.
Traceroute uses a specific type of data packet called Internet Control Message Protocol (ICMP). This ICMP traffic is commonly throttled on broadband and mobile networks by ISPs, as the traffic is classed as low-priority. The destination server may also block these packets due to the low-priority nature of Traceroute, or to avoid distributed-denial-of-service (DDoS) attacks via ICMP.
Build your network with Fasthosts
Network connectivity is the basis for all internet communication. For that reason, you need a reliable host for your web-based hosting services. Fasthosts offers a range of server hosting, domain name registration, and website building services to help you build your online presence.
Get started in the cloud by contacting our friendly sales team at Fasthosts on 0808 1686 777, or visit the Fasthosts website to find out more about our services today.