Cyberithub

9 Best tracert command examples in Windows

Advertisements

In this article, we will see 9 Best tracert command examples in Windows. tracert is a windows command line utility used for tracing the path of an Internet Protocol(IP) packet to its destination. It is a very simple yet very powerful tool to troubleshoot the TCP/IP networking problems. It is largely used by network engineers to determine the connection problems between source and destination path.

tracert diagnostic tools works by sending Internet Control Message Protocol (ICMP) echo packets to the destination. Then it relies on the response to identify the number of hops encountered during the traversal to the destination. Here we will see some of the best examples of tracert utility which can be used to troubleshoot the TCP/IP Problems. More on official website.

 

9 Best tracert command examples in Windows

9 Best tracert command examples in Windows

Also Read: Solved "Oh no! Something has gone wrong" error in VirtualBox

Example 1: How to use tracert command

You can trace the default route of the target from the source system by using tracert <target_ip> command. For example, here we are checking the route to reach the target IP 142.250.77.110 using tracert 142.250.77.110 command as shown below.

C:\>tracert 142.250.77.110

Tracing route to maa05s15-in-f14.1e100.net [142.250.77.110]
over a maximum of 30 hops:

1    4 ms    2 ms    2 ms    192.168.0.1
2    *       *       *       Request timed out.
3    6 ms    5 ms    3 ms    249.205.72.57.newbrod.us [249.205.72.57]
4    *       *       *       Request timed out.
5    *       *       *       Request timed out.
6    7 ms    9 ms   11 ms    10.248.5.23
7   10 ms    9 ms   13 ms    249.205.72.39.newbrod.us [249.205.72.39]
8   14 ms   12 ms   14 ms    72.14.243.242
9    9 ms    8 ms   10 ms    72.14.232.71
10  16 ms   10 ms   10 ms    142.251.55.229
11   9 ms   10 ms    9 ms    maa05s15-in-f14.1e100.net [142.250.77.110]

Trace complete.

 

Example 2: How to avoid resolving addresses to hostnames

If you do not want to resolve IP address to hostname while searching for the target then you can use -d option. For example, here we are avoiding resolving IP address to hostname while searching for target IP 142.250.77.110 as you can see below.

C:\>tracert -d 142.250.77.110

Tracing route to 142.250.77.110 over a maximum of 30 hops

1    2 ms    2 ms    2 ms   192.168.0.1
2    *       *       *      Request timed out.
3    7 ms    6 ms    3 ms   249.205.72.57
4    *       *       *      Request timed out.
5    *       *       *      Request timed out.
6    3 ms    *       5 ms   10.248.5.23
7   10 ms    7 ms    8 ms   49.205.72.39
8    9 ms    8 ms    8 ms   72.14.243.242
9    8 ms    8 ms   13 ms   72.14.232.71
10   9 ms    9 ms    8 ms   142.251.55.229
11  23 ms   19 ms    9 ms   142.250.77.110

Trace complete.

 

Example 3: How to Limit the Number of Hops

If you want to limit the number of hops while searching for a target then you need to use -h option. For example, here we are limiting the number of hops to 5 to search for the target google.com.

C:\>tracert -h 5 google.com

Tracing route to google.com [142.250.77.110]
over a maximum of 5 hops:

1    2 ms   2 ms  2 ms   192.168.0.1
2    *      *     *      Request timed out.
3   29 ms  15 ms  9 ms   249.205.72.57.newbrod.us [249.205.72.57]
4    *      *     *      Request timed out.
5    *      *     *      Request timed out.

Trace complete.

 

Example 4: How to wait timeout milliseconds for each reply

You can set the time period in milliseconds to wait for ICMP echo reply for a given echo request sent. After the timeout period, it will show as asterisk(*) on the output as you can see below. By default, the timeout period is 4000(4 secs).

C:\>tracert -w 3 google.com

Tracing route to google.com [142.250.77.110]
over a maximum of 30 hops:

1    2 ms    2 ms    1 ms   192.168.0.1
2    *       *       *      Request timed out.
3    5 ms    5 ms    3 ms   249.205.72.57.newbrod.us [249.205.72.57]
4    *       *       *      Request timed out.
5    *       *       *      Request timed out.
6    *       8 ms    *      10.248.5.23
7    9 ms   16 ms    9 ms   249.205.72.39.newbrod.us [249.205.72.39]
8   17 ms   15 ms    8 ms   72.14.243.242
9    9 ms   10 ms    8 ms   72.14.232.71
10  10 ms    8 ms   10 ms   142.251.55.229
11  11 ms    9 ms   12 ms   maa05s15-in-f14.1e100.net [142.250.77.110]

Trace complete.

 

Example 5: How to force tracert to follow a Specific Route

If you want to force tracert to follow a specific path to reach to the destination then you can do that by using -j option. This can be understood through an example given below where we need to reach destination IP 216.239.43.131 from source 142.251.55.69 by passing the packets through IP 100.21.53.76.

This example is also applicable to a scenario where you would like to test the delay between source IP 142.251.55.69 and destination IP 216.239.43.131 and the packet has to pass through IP 100.21.53.76.

C:\>tracert -j 142.251.55.69 216.239.43.131 100.21.53.76

 

Example 6: How to force tracert to use IPv4 Address

If you want tracert to force using IPv4 only then you need to use -4 option as shown below. This option is specifically used to check IPv4 network connectivity between source and destination.

C:\>tracert -4 google.com

 

Example 7: How to force tracert to use IPv6 Address

If you want to force tracert to use IPv6 address only then you need to use -6 option as shown below. This option is specifically used for IPv6 network connectivity between source and destination.

C:\>tracert -6 2a00:1450:4009:819::2004

 

Example 8: How to increase the number of hops

You can choose to increase the number of hops from default 30 to increase the number of attempts to reach the target. In the below example, we are increasing the number of hops to 50 to increase our attempt to reach the destination address google.com.

C:\>tracert -4 -h 50 www.google.com

Tracing route to www.google.com [142.250.193.100]
over a maximum of 50 hops:

1 3 ms 2 ms 2 ms 192.168.0.1
2 2 ms 3 ms 2 ms 10.248.0.1
........................

 

Example 9: How to Check all the available Options

You can check all the options available with tracert using tracert /? command as shown below.

C:\>tracert /?

Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]
[-R] [-S srcaddr] [-4] [-6] target_name

Options:
    -d Do not resolve addresses to hostnames.
    -h maximum_hops Maximum number of hops to search for target.
    -j host-list Loose source route along host-list (IPv4-only).
    -w timeout Wait timeout milliseconds for each reply.
    -R Trace round-trip path (IPv6-only).
    -S srcaddr Source address to use (IPv6-only).
    -4 Force using IPv4.
    -6 Force using IPv6.

Leave a Comment