Network or system administrators are responsible for ensuring that a network or system provides uninterrupted service, and they must ensure that the network is properly maintained. They must execute many network tests to continuously monitor network operation; several diagnostic tools, such as ping, allow network administrators to evaluate network connectivity. For network diagnostics, however, another command called “traceroute” is used in Linux and macOS, whereas the identical program is called “tracert” in Windows. The traceroute command is used to map the data from the source to the destination of a route. It can also be used to track the paths that data packets take from their origin to their destination.
In this comprehensive article, we’ll look at how to use the traceroute command in Ubuntu with various examples.
If you haven’t installed the traceroute, it will give you an error when you try to use it. As a result, you must first install it before running the command to use it. Run the following mentioned command to install it:
$ sudo apt install traceroute |
You will be able to use traceroute in Ubuntu once it’s been installed. Before we dive into the specifics, let’s have a look at how to utilize traceroute in its most simple form:
To acquire the full scope of the traceroute’s capabilities, run the following command:
$ traceroute |
Furthermore, the command below is used to display the tracerouting for youtube.com.
$ traceroute www.youtube.com |
or
$ traceroute youtube.com |
There are a few key ideas we can glean from the output; the details of the few values that appear on the first line of the output are described below:
By default, 16 probes are passed at once; you can change this number of probes by using the “-N” option: Run the following command to reset the number of probes:
$ traceroute –N 12 youtube.com |
By default, there are 30 hops; however, by using the “-m” option, you can specify a different value: for example, the command below would scan the website for only 6 hops to reach the target. You can see that the tracerouting is only carried out until 6 hops.
$ traceroute –m 6 youtube.com |
The “-q” parameter in traceroute allows you to specify several probes; by default, three probes are presented at each hop: When you need speedy responses, choose this option:
Run the following mentioned command to reduce the number of probes to “2”:
$ traceroute –q 2 youtube.com |
The default size of packets sent by each hop is 60 bytes; using the following command, packets will be resized to 30 bytes.
$ traceroute youtube.com 30 |
The traceroute command “-f” option prints the result starting at the hop number you indicate; you can specify the number of hops from which the result will be printed; for example, the example below will start publishing the result at the 12th hop.
$ traceroute -f 12 youtube.com |
In Ubuntu, network diagnostics tools such as traceroute, and ping are available. Network administrators are responsible for maintaining the network and traceroute is one of the most important tools for system or network administrators. This article provides a brief description of the traceroute command, which can be used to determine the delays in network path responses and look for routing loops (if any exist) in the network.
Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.
One of the most critical gaps in traditional Large Language Models (LLMs) is that they…
Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…
What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…
Wouldn’t it be wonderful to wake up one day with a desire to explore AI…
Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…
Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…