Tutorials

▷ Tracert or traceroute command, what it is and what to use it for

Table of contents:

Anonim

Networks are a fundamental part of our life and our work, that's why it never hurts to know tools like the Tracert command or also called Traceroute, which will allow us to complement the Ping command utilities in an excellent way.

Index of contents

On many occasions, it is interesting to use the Ping command to check the availability of our Internet connection, as well as see if a computer on our network is correctly connected to it and shows us a signal. In addition to this, we can also check the latency of our connection, as we have seen in other of our tutorials. In summary, they are very useful commands to obtain different aspects of our network without having to have great knowledge about them.

Today we are going to go one step further to show another interesting command very related to ping, and that will give us interesting information about the jumps our data packet is taking until it reaches its destination.

What is the Tracert command

This command is available natively on the Windows system through the command console, both in Command Prompt and in Windows PowerShell. We also usually know it as Traceroute in the case of the command in Linux or simply trace.

Tracert is a tool that will give us information about the route a packet takes that will be sent from our computer to a destination host, either on a local network or on the Internet to a specific domain.

The procedure that this command follows, is to send a packet to a destination, but while it reaches its final destination, it will request each of the routers that is on the way a response to the passage of this packet. In this way we will obtain information about each node through which the packet passes, such as its IP address, domain name, if it has it, and latency or connection time between our equipment and each of the nodes on the way.

Detect connection problem with Tracert

As we can see, it is a utility similar to ping but it shows us more detailed information about the jumps the packet is making until it reaches its destination. This is especially interesting when we have problems with our connection, but we don't know exactly what is failing or how far network continuity goes.

When we send the packet, tracert will give us the IP address for the passing node. If we are inside a large intranet and we do not have a connection, it will be worth looking at with this command what these jumps are, for example, until we reach the final gateway that gives access to the Internet. In this way we will know the last IP up to where our packet has reached and it will be precisely there where our problem will be located.

How to use the Tracert command in Windows

To use this command on the Windows operating system, all we have to do is open a command terminal.

  • We can do it from the start menu by typing " CMD " and pressing Enter, pressing the key combination " Windows + R " and typing " CMD " Right-clicking on the start button and clicking on the option " Windows PowerShell "

In either case we will write:

tracert

We see that it will immediately show us the real IP address of the domain that we have placed, and it will tell us which nodes it has passed through, as well as its IP address and the latency for each of them.

The sum of the latency of all the nodes is not the latency of our connection, these values ​​are only applicable to each specific case through which it passes.

Let's see the difference between Tracert and ping:

Based on this information, we can see that approximately the ping of our domain shows the same latency as the final step of tracert until reaching it. Thanks to this, we will be able to demonstrate that our connection latency is not a summation of all the steps, but that it has been obtained independently for each specific case.

In addition, we see that ping only connects to the end node where the domain is located and shows its IP, the other steps are omitted so as not to show information about them.

We also see that some of the steps that the package has followed do not provide us with a response, " Timeout for this request ", this means that surely this node is not allowed to give an answer in its configuration, as a protection.

Tracert options

To see all the options available to this command, as well as its syntax or ways to use it, we will have to put the following:

tracert /?

or

tracert

We will be shown information about its use:

  • -d: option to not convert the IP addresses it passes through into domain names. -h: we will establish a certain number of hops, this is interesting if we are in an internal network and we know how many steps there are until we reach the final gateway. -j: to trace the route to multiple hosts at once. -w: we can establish a specific waiting time to give each jump in addition to the one that already exists between the host and the client. -R, -S, -6: for cases where we want to use the IPv6 protocol.

Tracert command in Linux

The use of this command in Linux is practically the same, only that it is effectively called Traceroute instead of tracert. But we will need to install a package through our command terminal, since this module does not come natively in Ubuntu, for example.

To install it, we will have to open the command terminal and place the following command:

sudo apt-get install inetutils-traceroute

Once installed, to see its different options we will have to put:

Traceroute --help

The options are more or less similar in terms of domain resolution, but it has some options for more advanced use of it. For example, if we want to do the same function as with Windows, we will need to put "-I" to do it in ICMP mode, and also the option "-resolve-hostname" if we want it to resolve domain names if it is possible

This is all about the tracert command and its utility for detecting connection problems.

We also recommend:

Did you know the usefulness of this command? If you want to know more about a particular command or topic, write us in the comments to help us create more content.

Tutorials

Editor's choice

Back to top button