PATHPING - CMD


Overview

PATHPING is a network utility command used in Windows that combines features from both the ping and tracert commands. It is designed to provide more detailed information about the network path and latency between the user’s computer and a specified destination node. It is particularly useful for diagnosing network issues and identifying bottlenecks in network traffic over multiple hops.

Syntax

The basic syntax for using the PATHPING command is as follows:

PATHPING [options] target_name
  • target_name: The hostname or IP address of the destination to trace the path to.

Options/Flags

  • -g host-list : Use a loose source route along the host-list (IPv4-only).
  • -h maximum_hops : Maximum number of hops to search for the target (default is 30 hops).
  • -i address : Use the specified source address (IPv4-only).
  • -n : Do not resolve addresses to host names.
  • -p period : Wait period milliseconds between pings (default is 250 milliseconds).
  • -q num_queries : Number of queries per hop (default is 100).
  • -w timeout : Timeout in milliseconds to wait for each reply (default is 3000 milliseconds).
  • -P : Test for RSVP PATH connectivity.
  • -R : Test if each hop is RSVP aware.
  • -T : Test connectivity to each hop with Layer-2 priority tags.

Examples

  1. Basic Usage:

    Trace the path to example.com and display detailed statistics:

    PATHPING example.com
    
  2. Specifying Maximum Hops:

    To trace the path to a host with a maximum of 20 hops:

    PATHPING -h 20 example.com
    
  3. Avoid Hostname Resolution:

    Perform the path trace without resolving IP addresses to hostnames:

    PATHPING -n example.com
    

Common Issues

  • Long Delays: PathPing initially waits for a significant amount of time (default is 25 seconds) to gather responses from all nodes. This behavior can create the impression that the command has stalled.

  • Firewall Blocks: Some hops may not respond due to firewall settings, thus appearing as timeouts in the PathPing output.

Workaround: Ensure appropriate firewall settings are configured to allow ICMP responses.

Integration

Combine PATHPING with other commands to script advanced diagnostic tools. For example, output the path ping result into a text file for later review:

PATHPING example.com > pathping_result.txt
  • PING: Send ICMP “echo request” packets to network hosts.
  • TRACERT: Trace the path that packets take to a network host.

For more information and in-depth reading, consider official Microsoft documentation or resources that specialize in Windows networking commands.