Windows Tracert Command Tutorial


Windows operating system provides some basic tools to troubleshoot the network. tracert is one of the most used tools. tracertcommand simply traceroute to the given IP address or remote host. tracert mainly provides the route to the remote IP address.

tracert Command Syntax

Syntax of tracert command is like below.

tracert OPTIONS HOSTNAME

Traceroute with tracert Command

In this example, we will simply trace the path to the remote host. We do not provide any option. Before command, the hostname will be resolved as expected. In this example, we will traceroute to the google.com

> tracert google.com
Traceroute
Traceroute

Do Not Resolve Hostname

tracert will resolve the DNS of all intermediate hops. This will cause the slowness of the operation. We can prevent tracert to resolve the DNS of intermediate hosts with -d .

> tracert -d google.com
Do Not Resolve Hostname
Do Not Resolve Hostname

Force IPv4 Resolution

Some times if IPv6 is available it may be preferred automatically. We can prevent to trace the path with traceroute using IPv6. We will use -4 option to force IPv4 address usage.

> tracert -4 google.com

Force IPv6 Resolution

if IPv4 is available it may be preferred automatically. We can prevent to trace the path with traceroute using IPv4. We will use -6 option to force IPv6 address usage.

> tracert -6 google.com

Set Maximum Hop Count

As we know IP networks or the internet consist of mesh-like systems and stations that connect each other. The tracer will send packets to hop by hop. We can set maximum hop count with option -h . After the specified number of hops tracert will stop.

> tracert -h 4 google.com
Set Maximum Hop Count
Set Maximum Hop Count

LEARN MORE  How To Get Host Name and Domain Name Of Linux?

Leave a Comment