How to Install traceroute command on RHEL/CentOS 7/8 Using 5 Easy Steps

In this article, I will explain how to install traceroute command on RHEL/CentOS 7/8 Using 5 Easy Steps. traceroute command is a network diagnostic tool used in Linux based Systems to check and identify the network connectivity problems from source to destination. By default it will send the 60 byte packets for max 30 hops after that it will drop the packets. Using this tool, you will be able to see the number of hops it takes for a packets to reach the destination and also the av.time it takes on each hops. So this is a very useful tool to understand and use if you are planning to perform some network troubleshooting.

How to Install traceroute command on RHEL/CentOS 7/8 Using 5 Easy Steps 1

Install traceroute command on RHEL/CentOS 7/8 

Also Read: How to Install Let’s Encrypt(Certbot) on RHEL/CentOS 8 Using 10 Easy Steps

Step 1: Prerequisites

a) You should have a running RHEL/CentOS 7/8 System.

b) You should have yum utility installed in your System. Please Check Top 22 YUM Command Examples in RedHat/CentOS 7 to know more about yum utility.

c) You should have sudo access to run privilege commands. Please Check How to Add User to Sudoers to know more about providing sudo access to the User.

Step 2: Update Your Server

Before going through the steps to install traceroute command it is highly recommended to update your Server first with all the latest available updates using yum update -y command as shown below. This is specially requires if you have not updated your system from long time.

[root@localhost ~]# yum update -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* epel: download.nus.edu.sg
* extras: mirrors.piconets.webwerks.in
* updates: centos.hbcse.tifr.res.in
Resolving Dependencies
--> Running transaction check
---> Package ca-certificates.noarch 0:2019.2.32-76.el7_7 will be updated
---> Package ca-certificates.noarch 0:2020.2.41-70.0.el7_8 will be an update
---> Package curl.x86_64 0:7.29.0-57.el7 install traceroute will be updated
---> Package curl.x86_64 0:7.29.0-57.el7_8.1 will be an update
---> Package dbus.x86_64 1:1.10.24-13.el7_6 will be updated
---> Package dbus.x86_64 1:1.10.24-14.el7_8 install traceroute will be an update
---> Package dbus-libs.x86_64 1:1.10.24-13.el7_6 will be updated
---> Package dbus-libs.x86_64 1:1.10.24-14.el7_8 will be an update
---> Package grub2.x86_64 1:2.02-0.81.el7.centos will be updated
---> Package grub2.x86_64 1:2.02-0.86.el7.centos install traceroute will be an update
---> Package grub2-common.noarch 1:2.02-0.81.el7.centos will be updated
---> Package grub2-common.noarch 1:2.02-0.86.el7.centos will be an update
---> Package grub2-pc.x86_64 1:2.02-0.81.el7.centos install traceroute will be updated
---> Package grub2-pc.x86_64 1:2.02-0.86.el7.centos install traceroute will be an update
---> Package grub2-pc-modules.noarch 1:2.02-0.81.el7.centos will be updated
---> Package grub2-pc-modules.noarch 1:2.02-0.86.el7.centos will be an update
---> Package grub2-tools.x86_64 1:2.02-0.81.el7.centos will be updated
---> Package grub2-tools.x86_64 1:2.02-0.86.el7.centos will be an update
---> Package grub2-tools-extra.x86_64 1:2.02-0.81.el7.centos will be updated
---> Package grub2-tools-extra.x86_64 1:2.02-0.86.el7.centos will be an update
---> Package grub2-tools-minimal.x86_64 1:2.02-0.81.el7.centos will be updated
---> Package grub2-tools-minimal.x86_64 1:2.02-0.86.el7.centos will be an update
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.252.b09-2.el7_8 will be updated
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.262.b10-0.el7_8 will be an update
---> Package java-1.8.0-openjdk-accessibility.x86_64 1:1.8.0.252.b09-2.el7_8 will be updated
---> Package java-1.8.0-openjdk-accessibility.x86_64 1:1.8.0.262.b10-0.el7_8 will be an update
---> Package java-1.8.0-openjdk-demo.x86_64 1:1.8.0.252.b09-2.el7_8 will be updated

Step 3: Install traceroute command on RHEL/CentOS 7/8

After updating your Server you need to use yum install traceroute -y command to install this tool on RHEL/CentOS 7/8 as shown below.

Advertisements
[root@localhost ~]# yum install traceroute -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* epel: download.nus.edu.sg
* extras: mirrors.piconets.webwerks.in
* updates: centos.hbcse.tifr.res.in
Resolving Dependencies
--> Running transaction check
---> Package traceroute.x86_64 3:2.0.22-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
traceroute x86_64 3:2.0.22-2.el7 base 59 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package

Total download size: 59 k
Installed size: 92 k
Downloading packages:
traceroute-2.0.22-2.el7.x86_64.rpm | 59 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 3:traceroute-2.0.22-2.el7.x86_64 1/1
Verifying : 3:traceroute-2.0.22-2.el7.x86_64 1/1

Installed:
traceroute.x86_64 3:2.0.22-2.el7

Complete!

Step 4: Check traceroute version

If you want to check current traceroute tool version then you need to use traceroute --version command as shown below. As shown in the below output. current traceroute version is 2.0.22.

[root@localhost ~]# traceroute --version
Modern traceroute for Linux, version 2.0.22
Copyright (c) 2008 Dmitry Butskoy, License: GPL v2 or any later

Step 5: Run traceroute command

If you want to test the traceroute command then you can simply run the traceroute for google.com to trace its path  as shown below. It will show you all the encountered hop between source and destination. Let’s say if you have some network issues(like cabling/routing/medium issues) between the source Server and the destination google.com server then it will start dropping the packets and you will probably see some error like "request timed out". This error will also be visible when router does not want to show you the hop information. Please check traceroute Man Page to Know more about all the available options.

[root@localhost ~]# traceroute google.com
traceroute to google.com (142.250.67.78), 30 hops max, 60 byte packets
1 gateway (192.168.0.1) 2.634 ms 3.696 ms 3.607 ms
2 10.234.8.1 (10.234.8.1) 4.049 ms 4.036 ms 4.014 ms
3 br.corp.us (202.13.20.43) 4.163 ms 4.109 ms 4.087 ms
4 14.141.145.5.static-city.corp.net.us (24.141.145.5) 4.674 ms 4.638 ms 4.540 ms
5 172.31.167.58 (172.31.167.58) 15.056 ms 10.642 ms 10.574 ms
6 14.140.100.6.static-city.corp.us (24.140.100.6) 13.184 ms 10.948 ms 10.855 ms
7 115.112.71.65.STDILL-texas.city.corp.us (15.112.71.65) 10.851 ms 12.587 ms 12.558 ms
8 121.240.1.50 (121.240.1.50) 11.767 ms 11.750 ms 14.332 ms
9 74.125.242.145 (74.125.242.145) 11.639 ms 10.655 ms 12.232 ms
10 142.250.228.223 (142.250.228.223) 30.950 ms 30.918 ms 30.800 ms
11 maa05s13-in-f14.1e100.net (142.250.67.78) 10.077 ms 11.364 ms 11.054 ms

 

 

 

 

 

 

Recommended Posts:-

15 Practical Bash For Loop Examples in Linux/Unix for Professionals

8 Easy Ways to check Ubuntu Version using Bash Command Line

5 Easy Steps to Install Openssh-Server on Ubuntu 20.04 to Enable SSH 

How to Install Rust Programming Language in Linux Using 6 Best Steps

10 Useful iproute2 tools examples to Manage Network Connections in Linux

How to Limit CPU Limit of a Process Using CPULimit in Linux (RHEL/CentOS 7/8)

6 Popular Methods to List All Running Services Under Systemd in Linux

Unix/Linux Find Files and Directories Owned By a Particular User(5 Useful Examples)

33 Practical Examples of ulimit command in Linux/Unix for Professionals

Advertisements

Leave a Reply