Using Pathping in Windows

Pathping is an extremely useful, built-in Windows network utility that lets you control packet loss on a journey to a remote network node.


PathPing

With Pathping you can get information about the latency in a network and also understand at what stages of packet transmission, there are losses or delays. The pathping.exe utility has been included in Windows since the Windows NT / 2000 era, and is listed in the System32 directory. It is now available on all modern operating systems, such as Windows 10 and Widows Server 2019.

The Pathping utility combines the capabilities of the other two standard Windows network utilities: ping and tracert, and also works according to the protocol ICMP.

The program first performs a path detection to a remote node that you specify (such as tracert) and then explores the destination node and all transit nodes using ICMP echo requests such as ping. This way, you can receive loss information at each stage of the network packet transmission between your computer and the remote server.

Note that only network devices such as routers, L3 switches, firewalls, and servers support the ICMP protocol. You cannot verify packet loss on simple network equipment (such as a hub or L2 switch) using the route command.

The program reports the packet loss rate for each router, so that you can identify the routers that are causing the problem and that are interfering with the normal operation of the network. Let's look at it in more detail:

Open a command prompt as an administrator and run the command: PathPing without parameters. You will see the help of this command appear.

It is written as follows:

pathping [-g host-list] [-h maximum_hops] [-i address] [-n] [-p period] [-q num_queries] [-w timeout [-4] [-6]

The required parameter is only the target_name, ie the name of the target. This is the IP address or DNS name of the remote host for which you want to estimate data transfer losses. The other parameters are optional:

  • g host-list - Specifies that Echo request messages use the option Loose Source Route in the IP header with all the intermediate destinations specified in HostList. HostList is a series of IP addresses separated by spaces.
  • h maximum_hops - Maximum number sections of routes (hops) to target search.
  • i address - Use the specified source address.
  • n - Do not resolve addresses in hostnames.
  • p period - Waiting period in milliseconds, between pings.
  • q num_queries - Number of questions per hop (route sections).
  • w timeout - Waiting time in milliseconds for each answer.
  • 4 - Use only IPv4.
  • 6 - Use only IPv6.

Execute the command for a specific server:

pathging iguru.gr

After pressing the Enter key, the command will specify the path to the remote node (as tracert) and display it. It will then start sending ICMP requests (such as ping) to each transit node and to the destination host.

ICMP applications are sent for a period of time. 100 packages are sent to each node. The pathping program shows you the approximate execution time of all requests. The more nodes in the route, the longer the route command. In our case, for 6 hops, the running time of the route was 150 seconds (250 ms per ICMP request).

After surveying all routers, the service calculates the average response time, the number of requests sent, the number of responses not received and the percentage of losses. These measurements are calculated for each router.

  • 0% - means no packages were lost. That is, zero losses
  • 100% means that the ability to respond to ICMP requests is disabled on the router (or a firewall is used).
  • Losses of 1% or higher may indicate poor or malfunctioning network or transit routers. In this case, it is recommended that you contact your ISP or network administrators.

Consider some useful examples of using the pathping command:
To send 10 echo requests to each router (the command executes 10 times faster than if you write it without parameters):

pathping -q 10 -n iguru.gr

To send ICMP requests faster (every 120 ms):
pathping -p 120 iguru.gr

To do so see only the top 5 routers:
pathping -h 5 iguru.gr

Finally, for each command you give, you can redirect the results to a text file for further analysis by typing at the end of this command:
>> C: \ resoults_path.txt


Read them Technology News from all over the world, with the validity of iGuRu.gr

Follow us on Google News iGuRu.gr at Google news