How to Use Tracert (Trace Route) Utility?

Published by: Alex George on January 04, 2025

Welcome to the Network Engineers training tutorials by CoreNetworkZ Tech Solutions. Today, I will teach you a Command Line tool, Tracert, and its practical uses.

The Tracert command (Trace Route) helps determine the path from your computer to the destination host by sending ICMP Echo Request messages.

Once the command finds the path to the destination, it will print it on the command prompt. Now you understand why the Trace Route (Tracert) utility is popular.


Tracert prints the route to the destination IP.


This tutorial covers the application of the Tracert (Trace route) utility in troubleshooting a connection problem.



How Does Trace Route (Tracert) Help To Fix Network Problems?

I have read a few comments asking about the practical uses of this command line tool. Samuel Roukin is one of them. He wanted to know how the tracert command helps technicians fix connectivity issues.

ICMP command Tracert is very helpful to troubleshoot network-related issues. It helps determine the network location where the actual cause of the issue is present.

Let us check how it works.

It sends ICMP Echo messages to the destination host and decrements its TTL value by one when it passes on each hop. When the packets pass each hop, it displays the path in the DOS window. So you can identify the route.



This feature helps to identify the actual cause of any network issue. So, it is a handy tool for every network Engineer to analyze and troubleshoot network issues. Let us check how to use this tool.



How to Print the Path To a Remote Device On Command Prompt?

Xander asked me in the comment section about printing the route from his PC to a remote server. It is an easy task. Xander, you can print the route by executing the tracert command on the DOS window.

The primary application of the Tracert utility is to trace and print the path to a remote server. Let me explain the procedure.

  1. Open Command Prompt.

  2. Type the following command and press the enter key.


    tracert remote IP


    Remote IP is the IP address or the domain name. You will see the path to the remote IP address from your computer.



A Practical Example of Printing Route To a Website

If you want to know the route of the server of www.corenetworkz.com from your computer, you can check it by typing the following code on the DOS prompt.



Tracert www.corenetworkz.com


You can see the result in the screenshot.


track the route to a website


We use the Tracert command to find the path and deliver the packets to the destination host from the source. Now, let us check the general syntax of the tracert command.




The general syntax is :

tracert [-d] [-h MaximumHops] [-j HostList] [-w Timeout] [TargetName]



Ajith Thomas and Muhammed Rameez asked about setting a maximum hop count with the tracert tool. I suggest they read the general syntax I published and check how to use the -h parameter.


Example: tracert -h 30 google.com

After pressing the enter key, we will have a complete trace of the packet sent. By default, it will go up to 30 hopes. If there is a connection issue, it will show the request timed out when the packet reaches the hop (the one with the problem).


Reference

I suggest the following tutorials to learn more about the command line tool.

  1. https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/tracert
  2. https://www.cisco.com/c/en/us/support/docs/ip/ip-routed-protocols/22826-traceroute.html

10 comments:

  1. Ajith Thomas1:55 AM

    Hi Alex,

    I have question for you. How do I write a tracert code to send packets Instagram with maximum router number 10?

    ReplyDelete
    Replies
    1. Hello Ajith,


      You can set the syntax as: tracert -h 10 www.instagram.com

      Delete
  2. Muhammed Rameez1:58 AM

    Hello Alex,

    Is there any rule to set the maximum number of hops the packets can travel?

    ReplyDelete
    Replies
    1. Yes Muhammed, we can set the maximum hop count. I explained it in the article.

      Delete
  3. Samuel Roukin2:02 AM

    Thank you, Alex, for writing about this command. But I wonder how this command helps a network technician to solve a connectivity error.

    ReplyDelete
    Replies
    1. Hello Samuel,

      I have explained the process in the article.

      Delete
  4. Xander2:06 AM

    Does the tracert tool only find the route, or will it show us the route?

    ReplyDelete
  5. Amit Gupta2:58 AM

    Alex, can I print the route to Google server from my laptop with this tool?

    ReplyDelete

Newer Post Older Post Home