Tracert or traceroute is one of the essential network diagnostic tools. So, how does it work, and how do you run it?

Tracert or Traceroute is one of the key tools for packet transfer on a network and a specific internet connection. This command allows experts to understand the integrity and the speed at which it operates.

Tracert Command Prompt

However, to appreciate the Tracert command, you need to understand its roots and exact origin. So, let's delve into the traceroute command, what it is, how it works, and how to run it.

What is Tracert?

Tracert (also referred to as traceroute) is a series of computer commands used for network troubleshooting and reporting. It shows the path that network packets take from one endpoint to another. In other words, it's a tracing command that lets you check the route that data transmission might take.

This process involves a computer sending data to another and waiting for an acknowledgement of receipt. Once it receives this, it measures the speed and capacity of the network for transmitting such data. It is, thus, a command for diagnosing computer networks in Windows systems.

In Microsoft's syntax, this program allows users to time the ping they receive from another computer. The emphasis in Tracert on the round trip produces a clearer result.

However, in Windows NT-based computers, this operation is called PathPing, as it allows you to inspect a specific ping path and evaluate its speed by measuring the packets sent and received. Still, Tracert remains the preferred method.

What is traceroute?

Traceroute is the same command as Tracert, only this variant is used in Unix-like operating systems, such as macOS and Linux (e.g., Ubuntu). Unlike on Windows, macOS provides a graphical Traceroute utility, which you can find in the “Network Utility” suite.

But on Linux, it remains a command-line tool that requires you to type commands to trace a network route and send packets along it. Thus, it is the Unix version of Tracert, for thorough network diagnostics.

On a Mac or Linux, the command line works quite differently, as it requires you to interpret the diagnostic information, which we'll discuss shortly. It's important to understand, though, that the basic principle of Traceroute and Tracert is the same.

As such, they are designed to allow users to scan their entire local network for problems, and to isolate issues down to specific packets or network links.

How do I use Tracert/Traceroute?

Using Tracert or Traceroute, or knowing how to use it on each operating system, requires us to delve into each aspect. Hence, we need to break down the Tracert command based on the operating system, viz:

    • Windows
    • Mac
    • Linux

Because Linux is the most complex, we recommend attempting it only if you're very familiar with the operating system. The diagnostics may be easiest to run on a Mac. Windows users will need some command prompt knowledge to use Tracert.

So let's get started.

How to Run the Tracert Command in Windows

The first method we'll explore is running the Tracert command on a Windows operating system. This works for all OS versions after Windows 7 and should allow you to carry out the diagnosis accordingly. Here's what you need to do:

Step 1: Go to the Start menu or press the Windows key on your keyboard

Step 2: Type CMD, and run it as an administrator.

Open the Command Prompt on Windows

Step 3: Have it open a Command Prompt window

Step 4: Type tracert hostname (replace "hostname" with the address of the server you're diagnosing)

Trace to a hostname

Step 5: Run the test, which takes about a minute or two.

Step 6: Wait for the Trace Complete message to display

Trace complete

Now that you have the data, you would scroll through it to read it. But if you already know how to read it, you know what each MS is.

This reading is in milliseconds, or how long it took for the data packet to travel to its destination and back. Be sure to interpret the readings from each Tracert command according to your operating system.

How to Run Traceroute on a Mac

Running Traceroute is simplest on a Mac. All you need is a Mac and knowledge of how to use the “Utilities” section of your device. While the former is obvious, here are the steps for running Traceroute on a Mac:

Step 1: Open Finder on your Mac device.

Step 2: Click on Go in the top menu bar of Finder.

Step 3: Find and tap on Utilities, towards the bottom.

Utilities

Step 4: Go to the Terminal.

Terminal

Step 5: Type traceroute in your terminal

traceroute

Step 6: Wait for it to finish

As you may already know, you can access Utilities in the Finder app several different ways. But no matter how you get there, you'll need to launch Terminal, which is the Mac version of a command prompt. So make sure to open that first by issuing these commands.

How do I run traceroute on a Linux machine?

Linux users might already know how to run Traceroute, as they tend to memorize many commands when using Linux as their daily driver. But if you're new and looking for ways, you can do it like this:

Step 1: Open the Command Line on your Linux operating system

Terminal

Step 2: Type traceroute hostname at the command line (replace "hostname" with the actual hostname).

Step 3: Wait for the test to complete.

Step 4: Perform the final ping test

Traceroute in Linux

You'll need to determine the hostname on your own, but for testing your local network, you can use any website like you did with Google in the previous step. If you want to check a specific IP address, however, you'll need to be more precise.

Regardless, you need the command-line, the Traceroute command, and the server IP/website to trace the route in a Linux network.

How do I read the output of Tracert/Traceroute?

Reading or making sense of the output from Tracert or Traceroute isn't rocket science. Assuming you've made it this far, you know that the numbers generated by your terminal, command prompt, or command line aren't random.

They're reading all sorts of things, so just remember that for simplicity.

    • The presence of one or more asterisks (*)
    • RTT or Round Trip Time displays the latency, which is the time it takes for a data packet to be transmitted. In CMD or Linux command lines, this is displayed in MS or milliseconds.
    • Name, which refers to the name of the system you're using, i.e., the computer's name
    • IP Address, which is the address corresponding to the specified hostname
    • RTO or Request Time Out indicates an interrupted ping response from the server, suggesting an unstable connection.

While some connections may show response times in MS, a value of 1000+ MS indicates a very slow and unstable connection. A "Request Timeout" means that the connection didn't return any information, so it can be considered disconnected.

Bottom line, conclusion

This article aims to help you understand and use the Tracert and Traceroute command. We've not only delved into its two types but also walked through how to run them on three major operating systems. So, make sure to follow the steps correctly.