If you have not installed the traceroute, it will report an error upon execution. So, you must have to install it before applying the command: to install traceroute; execute the following command:
The syntax of the traceroute command is mentioned below:
Once it is installed, you can use it in Ubuntu; before getting into details; let’s look at the basic use of traceroute:
You can use the following command to get the complete usage of traceroute:
Moreover, the following command will show the tracerouting for youtube.com
Or
There are few important notions that we can get from the output; there are few values on the first line of the output that is described below in bullets:
These all values can be set according to your requirement:
The traceroute command supports a list of options that can be inserted for various purposes; have a look at them:
You can set the number of Probes that are being passed: by default, 16 probes are passed simultaneously; you can adjust them using the “-N” option: the command given below will set the number to 10:
By default, there are 30 Hops; but you can set your own value by using the “-m” option: for instance, the command below will check the website for only 4Hops to reach the destination. You can observe the tracerouting is executed only until 4Hops.
You can set a number of probes using the “-q” flag with traceroute, by default, three probes are displayed at every Hop: this option can be adopted when you want quick responses:
The command below will limit the number of probes to 2:
With the help of the “-w” option, you can increase the number of seconds that each Hop must wait to show the result. It gets only float values, so you have to pass a floating number (6.0, 6.5); and it is foreseen that increasing the number of Hop times will show a better response: the command given below will set the wait time of 5.5ms for each Hop:
You can adjust the size of packets being sent per Hop; the default size is 60byte; the following command will resize packets to 50bytes.
The “-f” option of the traceroute command will print the result from the Hop number that you specify; you can choose the number of Hops from where the result will be displayed: for instance, the example shown below will start printing the result from the 10th Hop.
You can set pause time between probes; the default time is 0ms, but you can change it using the (-z) traceroute switch; the command given below will print Hops one by one with the time gap of 1ms:
Various network diagnostics tools are available such as traceroute and ping in Ubuntu. In networking, it is the duty of network admins to take care of the network; traceroute is one of the key tools for system or network admins. This guide provides a brief explanation of the traceroute command; with the help of the traceroute command, one can determine the delays in responses of network paths and look for routing loops (if present) in the network.
The Linux terminal is a powerful tool allowing users to control their system precisely and…
Welcome to the Ubuntu Weekly Newsletter, Issue 876 for the week of January 19 –…
Canonical Ceph with IntelⓇ Quick Assist Technology (QAT) Photo by v2osk on Unsplash When storing…
Introduction Using Kafka for Remote Procedure Calls (RPC) might raise eyebrows among seasoned developers. At…
This article provides a guide for how to install PalWorld on Ubuntu VPS server. How…
Using APT to manage software on Ubuntu (or similar Linux systems) is generally simple. It…