Knowing the path that an IP packet traverses between two points in a network throws in a lot of useful information for the trained eyes. One such popular and commonly used cross-platform tool that helps in network path-related analysis and troubleshooting is traceroute. In simple terms, traceroute tracks the path of an IP packet between source and destination by sending probe packets (likely ICMP ECHO or TCP SYN) and then listening to their ICMP “time exceeded” responses. TTL of these packets are intentionally kept as one and is increased by one until we get ICMP “port unreachable”, which means we got to the host or hit maximum value (by default as 30 hops). An example traceroute output looks something like: Default traceroute output, as shown above, shows TTL (Time To Live) or round-trip time of three packets, maximum hop number and packet size in bytes, and IP address and resolved domain name, when possible. Traceroute is very useful for determining response delays and routing between two nodes. Further, it helps determine failure points in a route to the destination. Many firewalls and routers block traceroute messages on Internet, so its output may not always be correct. There are workarounds possible to some extent by changing probe messages type, but it can only help up to an extent to circumvent this issue. So one must keep this in mind while using this utility. Some options in traceroute require elevated superuser privileges that enable modification to raw packets.

tracepath Command

Red Hat Enterprise Linux or RHEL 8 and its derived Linux distributions do not come with traceroute command installed by default. This can seem like a significant change to those who are used to traceroute utility on previous versions of Red Hat Linux or CentOS. But there’s an equally capable command available by default on RHEL8 called tracepath which has similar capabilities as its counterpart tracepath and is ready for use with OS installation. In addition tracepath supports MTU option, which allows detecting of MTU or Maximum Transmission Unit value, which is the largest packet that tracepath can send over the network. Sample tracepath output is shown below for reference: Default tracepath output, as shown above, shows TTL (Time To Live) or round-trip time of a packet, MTU (Maximum Transmission Unit) that can be sent over the network by tracepath and resolved domain name wherever possible.

tracepath Syntax

tracepath command general usage syntax follows: #1. With no flags, tracepath shows path to destination taken as shown below: #2. If you want to print the IP address only, you can use -n flag: #3. To print both hostnames as well as IP addresses, use -b flag: #4. To set a custom value of packet length instead of using tracepath‘s default value, i.e., 65535, specify the value with -l flag: #5. We can also set the initial destination port using -p flag as: #6. Maximum hops, which is by default set as 30 can be customized by using -m flag as shown below: Note that tracepath does not support elevated superuser privileges like traceroute as it does not support the advanced packet modification feature.

Summary

This article summarized the use of traceroute command, how it is used in network-related troubleshooting, and how we can do the same tasks in RHEL8 systems using tracepath command. To know more about these commands, use the respective man page of the tool.

Looking For Traceroute on RHEL 8  Try Tracepath - 3Looking For Traceroute on RHEL 8  Try Tracepath - 67Looking For Traceroute on RHEL 8  Try Tracepath - 99Looking For Traceroute on RHEL 8  Try Tracepath - 22Looking For Traceroute on RHEL 8  Try Tracepath - 80Looking For Traceroute on RHEL 8  Try Tracepath - 82