Traceroute can help you identify the reason why a network is running slowly. A simple tool available on most major operating systems, it highlights faulty network nodes and inefficient routing paths. In this article, we explain what traceroute is, how it works, and why you might want to use it.
What is traceroute?
Traceroute is a diagnostic tool used to track the path of data between nodes on a network. By executing a command on one device, you can send a small IP packet to another device and track the route the packet takes.
You can use traceroute to identify network problems or inefficient routing practices. After executing a traceroute command and gathering information on the packet’s path, you can identify places in your network where data is traveling slowly or encountering unresponsive nodes.
Traceroute functionalities have been added to most operating systems, though in Windows this tool is referred to as the tracert command rather than traceroute command.
How does traceroute work?
Traceroute works by sending an internet control message protocol (ICMP) to a target node on a network. When a data packet moves between two points, it “hops” between numerous routers and switches, each one transmitting the packet closer to its destination.
Using traceroute, you can map all the hops made by the ICMP packet. You can also view information about the time data took to be transmitted and the name and IP addresses (internet protocol addresses) of the devices the packet passed through, from the first router it encountered all the way to the target host.
What does traceroute do?
Traceroute helps to identify the points on a network where problems might be occurring, which makes network troubleshooting easier. You might notice that the network in your office is slow, but with traceroute you can identify the exact point on the network from which the issue originates.
Imagine that you work in an environment with a large network of connected devices, like an office or a school. You run a simple ping test and see that data seems to be moving slowly across the network, but the problem could be anywhere. That’s when you run a traceroute command.
As the ICMP packet journeys across your network, it maps each step of the process, and you notice that data is being handled at a slower-than-expected rate by one particular router on your network. Armed with this information, you can focus on fixing or replacing the defective router, safe in the knowledge that the rest of the network is functioning properly.
How to run traceroute on different operating systems
Traceroute can be executed on most operating systems, including Windows, Linux, and MacOS.
Run traceroute on Windows
If you use Windows, you’re looking to execute the tracert command (which performs the same function as the traceroute command). Follow these steps to execute a tracert command.
- Press the “Windows” key + “R” to open the “Run dialog” box.
- Type “cmd” and press “Okay.”
- In Command Prompt, type “tracert,” followed by a space and then the IP address of the target node.
- Press “Enter.”
- Right-click on the Command Prompt window and select “Select all.”
- Press “Ctrl” + “C” to copy the Command Prompt window information.
- Open a blank document and paste the copied information.
Once you carry out these steps, you can review the traceroute data and assess the speed and efficiency of a specific network path.
Run traceroute on Linux
Traceroute may not be natively installed on your Linux OS, but you can download this function with a package manager. In Ubuntu, the command to install traceroute is “sudo apt-get install traceroute.”
Once installed, open your Linux terminal and type “traceroute” followed by the IP address of the target node.
Run traceroute on MacOS
To run traceroute on MacOS, follow these steps below.
- Open your “Applications” folder.
- Select the “Utilities” folder.
- Select the “Terminal” app.
- Type in “traceroute” followed by the IP address of the target node.
On older versions of MacOS, traceroute can be carried out via the Network Utility panel.