{"id":16680,"date":"2022-04-20T09:06:03","date_gmt":"2022-04-20T09:06:03","guid":{"rendered":"https:\/\/linuxways.net\/?p=16680"},"modified":"2022-04-20T09:06:03","modified_gmt":"2022-04-20T09:06:03","slug":"how-to-install-the-traceroute-on-ubuntu","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-the-traceroute-on-ubuntu\/","title":{"rendered":"How to Install the Traceroute on Ubuntu"},"content":{"rendered":"<p>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 &#8220;traceroute&#8221; is used in Linux and macOS, whereas the identical program is called &#8220;tracert&#8221; 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.<\/p>\n<p>In this comprehensive article, we&#8217;ll look at how to use the traceroute command in Ubuntu with various examples.<\/p>\n<h2>How to Install Traceroute<\/h2>\n<p>If you haven&#8217;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:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ sudo apt install traceroute<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"718\" height=\"529\" class=\"wp-image-16681\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-21.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-21.png 718w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-21-300x221.png 300w\" sizes=\"auto, (max-width: 718px) 100vw, 718px\" \/><\/p>\n<h2><strong>Uses of Traceroute in Ubuntu<\/strong><\/h2>\n<p>You will be able to use traceroute in Ubuntu once it&#8217;s been installed. Before we dive into the specifics, let&#8217;s have a look at how to utilize traceroute in its most simple form:<\/p>\n<p>To acquire the full scope of the traceroute&#8217;s capabilities, run the following command:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ traceroute<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"530\" class=\"wp-image-16682\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-22.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-22.png 720w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-22-300x221.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/p>\n<p>Furthermore, the command below is used to display the tracerouting for youtube.com.<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ traceroute www.youtube.com<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>or<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ traceroute youtube.com<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"281\" class=\"wp-image-16683\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-23.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-23.png 710w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-23-300x119.png 300w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/p>\n<p>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:<\/p>\n<ul>\n<li>173.194.76.198 represents the destination&#8217;s IP address.<\/li>\n<li>The number of hops is a numerical value that indicates how long the traceroute will attempt to reach the destination (the default value is 30).<\/li>\n<li>You can send a certain number of probes per hop or a certain number of packets each hop (the default value is 3)<\/li>\n<li>The final key item to consider is the size of the packets you&#8217;re transmitting. (60 bytes is the default value).<\/li>\n<\/ul>\n<h2><strong>How to Set the Number of Probes<\/strong><\/h2>\n<p>By default, 16 probes are passed at once; you can change this number of probes by using the &#8220;-N&#8221; option: Run the following command to reset the number of probes:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ traceroute \u2013N 12 youtube.com<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"664\" height=\"259\" class=\"wp-image-16684\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-24.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-24.png 664w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-24-300x117.png 300w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><\/p>\n<h2>How to use Traceroute to Limit the Number of Hops<\/h2>\n<p>By default, there are 30 hops; however, by using the &#8220;-m&#8221; 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.<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ traceroute \u2013m 6 youtube.com<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"667\" height=\"195\" class=\"wp-image-16685\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-25.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-25.png 667w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-25-300x88.png 300w\" sizes=\"auto, (max-width: 667px) 100vw, 667px\" \/><\/p>\n<h2>How to Limit the Probes<\/h2>\n<p>The &#8220;-q&#8221; 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:<\/p>\n<p>Run the following mentioned command to reduce the number of probes to \u201c2\u201d:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ traceroute \u2013q 2 youtube.com<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"696\" height=\"300\" class=\"wp-image-16686\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-26.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-26.png 696w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-26-300x129.png 300w\" sizes=\"auto, (max-width: 696px) 100vw, 696px\" \/><\/p>\n<h2>How to Change the Packet Size<\/h2>\n<p>The default size of packets sent by each hop is 60 bytes; using the following command, packets will be resized to 30 bytes.<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ traceroute youtube.com 30<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"223\" class=\"wp-image-16687\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-27.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-27.png 675w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-27-300x99.png 300w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/p>\n<h2>How to Use the &#8220;-f&#8221; Option to Change the Number of Hops<\/h2>\n<p>The traceroute command &#8220;-f&#8221; 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.<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ traceroute -f 12 youtube.com <\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"663\" height=\"131\" class=\"wp-image-16688\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-28.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-28.png 663w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-28-300x59.png 300w\" sizes=\"auto, (max-width: 663px) 100vw, 663px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>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.<\/p>","protected":false},"excerpt":{"rendered":"<p>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&hellip;<\/p>","protected":false},"author":1,"featured_media":16706,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[974,31],"class_list":["post-16680","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-traceroute","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/16680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=16680"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/16680\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/16706"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=16680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=16680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=16680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}