Pathping: How to Traceroute in Windows using Pathping Command

This tutorial is a follow-up to our previous guide on the Tracert command. If you haven't read the tutorial yet, you can do so by clicking the following link.

How to Use Traceroute in Windows with the tracert Command

First, we'll explore how to perform a traceroute using pathping, and then we'll delve into the differences between the tracert and pathping commands.

Command Syntax

Pathping helps you visualize the detailed path your data packets take, complete with latency and packet loss information, making it a handy tool for fixing routing issues and analyzing internet traffic.

The pathping command syntax is simple: type pathping followed by the IP address or domain name of the remote device you want to trace.

pathping <IP/Domain_name>

Example

pathping example.local

In this example, the pathping command lists each hop between the Windows computer and the host example.local. A hop represents a point in a network, typically a router, gateway, or firewall, through which your packets travel.

How to Traceroute in Windows using Pathping Command
Traceroute in Windows using the pathping command.

It starts with the network interface of your local computer and concludes with the destination computer. At the end, it gives detailed statistics for each hop, including latency, round-trip time, and packet loss.

By default, pathping will attempt to resolve IP addresses to hostnames, which can make the command a bit slower. To disable name resolutions, use the -n option:

pathping -n example.local

Tracert vs. Pathping: What Is the Difference?

The pathping command in Windows is very similar to the popular tracert command but more powerful, as it adds additional information to the output.

The first hop in the pathping output represents your local network interface. This information is valuable when your local computer has more than one interface, as it indicates which interface the data is traveling from.

Let's take a look at two screenshots: The first shows what tracert returns, and the second reveals what pathping reveals.

tracert command
Tracert Command
pathping command
Pathping command

The first hop displayed in the tracert output is the default gateway; however, it doesn't indicate from which local interface data is flowing out.

This isn't an issue when the local computer has only one network interface. However, if the computer has multiple interfaces, it becomes useful to know which interface the packets are using.

This is precisely what the pathping command does—it reveals the local interface from which the traffic originates.

If you're not concerned about seeing the local interface in the output, use the tracert command. Tracert is significantly faster than pathping.

What Next?

You can proceed to the next tutorial, which is also about traceroute but using PowerShell. If you're interested, click on this link.