To identify the slow part of a network packet’s trip and diagnose sluggish network connections, use the traceroute command in Linux. We’ll demonstrate how!
An essential tool for network troubleshooting is a traceroute. Traceroute in Linux helps you find the route that packets take from source to destination in conjunction with other Linux programs like ping, Ip, and netstat. All versions of Linux, Windows, and MacOS can use the tool.
How Does Traceroute Work?
To map the route packets through the network, use the traceroute route command in Linux when troubleshooting a network. Finding viable information routes from source to destination is made easier with the help of the tool. The command also assists in determining how long it takes to travel between locations.
A network debugging tool called Traceroute identifies the points where communication between the source and destination slows down.
How Traceroute Operates?
- The Use of the traceroute command is considerably simpler once you have a basic understanding of how traceroute operates. It is more difficult to identify potential slowdown locations the more convoluted the path a network packet must travel to reach its destination.
- A small business’s local area network (LAN) could be relatively It will probably have one or more servers and routers. A wide area network (WAN) that connects several places or uses the internet becomes more complicated. Then, routers and gateways come into contact with your network packet.
- Data packets’ headers contain metadata on the length, origin, destination, protocol, and other factors. The protocol standard defines the header. You can determine the beginning and end of each field in the header and read the metadata if you can identify the protocol.
- User Datagram Protocol packets are sent via the traceroute protocol, which is part of the TCP/IP family. The Time to Live (TTL) field in the header holds an eight-bit integer value. Contrary to what the name might imply, it represents a count rather than a duration.
How to Run a Traceroute Command in Linux, Windows, and Mac OS?
Using Traceroute, you can view the route taken to connect you to the IP address or hostname.
Open Terminal and run “traceroute domain.com” to perform a traceroute in Linux. You might need to install a traceroute if it isn’t already. For instance, “Sudo apt-get install traceroute” will install the traceroute in Ubuntu.
When using Windows Vista, Windows 7, or a later version, you can find the search box by entering the “Start” menu. Input “CMD” and hit Enter. The command “tracert domain.com” should appear in a black box on the command prompt. Substitute your domain name or IP address for domain.com.
Open Terminal on your Mac to run a traceroute. By selecting “Applications,” “Utilities,” and then “Terminal” with a double click on Finder, you may launch Terminal. Open a new window and type “traceroute domain.com,” substituting domain.com with your IP address or domain name.
Setting up Traceroute
Most contemporary machines support Traceroute explained. The program is a command-line utility with several syntaxes and operating system-dependent parameters.
- Fedora 31 already had traceroute installed. However, Manjaro 18.1 and Ubuntu 18.04 require that it be done. Use this command to install traceroute on Manjaro:
Sudo Pacman -Sy traceroute
- Use this command to install traceroute on Ubuntu:
Sudo apt-get install traceroute
Use traceroute to explore network routing, test connection speeds, or locate bottlenecks. A similar command called tracert is also available. However, you should be cautious about incorporating traceroute in scripts or unattended processes because you don’t want to pelt unfamiliar devices with torrents of UDP packets.
The burden that traceroute command in Linux can put on a network might have a negative effect on how well it performs. You should use it after regular business hours unless you’re in an urgent circumstance.
Also Read: An Ideal List of 5 Top Indian IT Companies in 2023