pathpingPathping Command Guide - Trace Route with Packet Loss Statistics in Windows
Learn how to use pathping to trace network routes and compute packet loss statistics. Combines ping and tracert for advanced network diagnostics and latency analysis.
The pathping command is a Windows Command Prompt utility that combines the functionality of ping and tracert to trace the route to a destination while computing packet loss and latency statistics at each hop. It sends packets to each router along the path and analyzes responses to identify where latency or packet loss occurs—essential for diagnosing intermittent connectivity and performance issues.
Whether you're troubleshooting slow internet, identifying which hop is dropping packets, comparing path quality across different routes, or performing network health audits, pathping provides the detailed hop-by-hop statistics that ping and tracert alone cannot. Network administrators and IT professionals use pathping when standard connectivity tests pass but performance remains poor, or when they need to pinpoint exactly where problems occur.
This comprehensive guide covers pathping syntax, all major switches (-n, -h, -w, -q, -p), practical examples, troubleshooting tips, related commands, and frequently asked questions. By the end, you'll confidently use pathping for advanced network diagnostics.
What Is the Pathping Command?
The pathping command was introduced in Windows NT and has been part of Windows networking ever since. It performs a two-phase operation: first, it traces the route to the destination (like tracert) by sending ICMP Echo Request messages with incrementing TTL values. Second, it sends multiple packets to each router along the path and computes statistics—round-trip time (RTT), packet loss percentage, and latency—for each hop.
This two-phase approach makes pathping uniquely valuable. Tracert shows the path but not quality; ping shows quality to the destination but not per-hop. Pathping shows both: the route and the quality at each hop. The trade-off is time—pathping can take 75 seconds or more per run because it gathers statistics at each hop.
Pathping runs in Command Prompt (CMD), PowerShell, and Windows Terminal on Windows 10, Windows 11, and Windows Server editions. It requires no special privileges. The target can be a hostname or IP address.
Pathping Command Syntax
pathping [-g host-list] [-h maximum_hops] [-i address] [-n] [-p period] [-q num_queries] [-w timeout] target_name
Parameters and Switches
| Parameter | Description |
|---|---|
target_name | Required. Hostname or IP address of destination |
-n | Do not resolve addresses to hostnames (faster; shows IPs only) |
-h maximum_hops | Maximum number of hops to search (default 30) |
-g host-list | Loose source route along host-list (rarely used) |
-i address | Use specified source address |
-p period | Wait period (ms) between pings (default 250) |
-q num_queries | Number of queries per hop (default 100) |
-w timeout | Wait timeout in milliseconds for each reply (default 3000) |
Parameters and Options Explained
Target (Required)
The destination hostname or IP address. Pathping will trace the route and compute statistics for the path to this target.
Example:
pathping google.com
pathping 8.8.8.8
Do Not Resolve Names (-n)
The -n switch prevents DNS resolution of IP addresses to hostnames. Output shows only IP addresses, which is faster and avoids DNS-related delays or failures during the trace.
Example:
pathping -n 8.8.8.8
Maximum Hops (-h)
Limits how many hops pathping will trace. Default is 30. Use a lower value for local network traces to speed up the command.
Example:
pathping -h 15 google.com
Timeout (-w)
Sets the wait time in milliseconds for each reply. Increase for slow or congested networks; decrease for faster failure detection.
Example:
pathping -w 5000 google.com
Queries Per Hop (-q)
Controls how many packets are sent to each hop for statistics. Default is 100. Fewer queries = faster but less accurate; more = slower but more reliable statistics.
Example:
pathping -q 50 google.com
Examples
Example 1: Basic Pathping to Website
Scenario: You want to trace the route to a website and see packet loss/latency at each hop.
Command:
pathping google.com
Explanation: Traces route to google.com, then sends 100 packets to each hop and computes RTT and loss. Takes about 75+ seconds. Output shows hop list followed by statistics table.
Example 2: Pathping Without DNS Resolution (Faster)
Scenario: You want faster results and don't need hostnames—IPs are sufficient.
Command:
pathping -n 8.8.8.8
Explanation: -n skips DNS lookups for each hop. Faster and avoids DNS timeouts. Use when you know the target IP or when DNS is slow.
Example 3: Limit Hops for Local Network
Scenario: You're tracing to a device on your local network (e.g., 192.168.1.1); no need to search 30 hops.
Command:
pathping -h 5 192.168.1.1
Explanation: Stops after 5 hops. For local gateways, the trace usually completes in 1–2 hops, so this speeds up the command.
Example 4: Pathping with Longer Timeout
Scenario: Some hops are slow to respond; pathping times out before gathering stats.
Command:
pathping -w 5000 google.com
Explanation: Waits 5 seconds per reply instead of default 3. Useful for congested or high-latency paths.
Example 5: Fewer Queries for Quick Check
Scenario: You want a quicker result and can accept slightly less accurate statistics.
Command:
pathping -q 25 google.com
Explanation: Sends 25 packets per hop instead of 100. Reduces total time but statistics may be less reliable.
Example 6: Combine Switches for Fast Local Trace
Scenario: Quick trace to your router with minimal wait.
Command:
pathping -n -h 5 -q 25 192.168.1.1
Explanation: No DNS, max 5 hops, 25 queries per hop. Faster execution for local targets.
Example 7: Save Output for Analysis
Scenario: You need to share pathping results with support or document for later analysis.
Command:
pathping google.com > pathping-results.txt
Explanation: Redirects output to file. Pathping has no progress indicator when redirected; wait for completion.
Example 8: Compare Two Paths
Scenario: You have two internet connections and want to compare path quality.
Command:
pathping -n 8.8.8.8
Run once on each connection and compare the "Lost/Sent" and RTT columns for each hop.
Example 9: Identify Problematic Hop
Scenario: Internet is slow; you want to find which hop has high latency or packet loss.
Command:
pathping google.com
Explanation: Look at the statistics table. Hops with high "Lost/Sent" percentage or high RTT indicate problems. The first hop with significant loss is often the culprit.
Example 10: Pathping to Internal Server
Scenario: Trace and analyze path to an internal server (e.g., 10.0.0.50).
Command:
pathping -n -h 10 10.0.0.50
Explanation: Internal paths are usually short. -n and -h 10 keep it fast. Verify firewall allows ICMP if you see timeouts.
Common Use Cases
-
Identify Packet Loss Location – When connectivity is intermittent, pathping shows which hop is dropping packets. Look for the first hop with non-zero loss.
-
Latency Analysis – Compare RTT at each hop to find where latency increases. Sudden jumps indicate congested or distant links.
-
ISP Troubleshooting – Run pathping to an external target; if loss starts at the first hop outside your network, the issue may be with your ISP or their upstream.
-
VPN Performance – Pathping through VPN to compare latency and loss vs. direct path. Helps diagnose VPN-related slowdowns.
-
Multi-Path Comparison – Run pathping over different routes (e.g., Wi-Fi vs. Ethernet, different ISPs) to compare path quality.
-
Network Health Audits – Periodically run pathping to critical destinations and log results for trend analysis.
-
Support Ticket Evidence – Capture pathping output to show support exactly where problems occur. More actionable than "internet is slow."
-
Data Center Connectivity – Verify path quality to cloud providers or colocation facilities before and after changes.
-
Wireless vs. Wired – Compare pathping results on Wi-Fi vs. Ethernet to quantify wireless impact.
-
Before/After Changes – Run pathping before and after network changes (router config, new circuit) to verify impact.
Tips and Best Practices
-
Be Patient – Pathping takes 75+ seconds by default. It sends 100 packets to each hop. Don't interrupt; let it complete for accurate statistics.
-
Use -n for Speed – Skipping DNS resolution saves time, especially when many hops don't have reverse DNS. Use
-nwhen hostnames aren't critical. -
Reduce -q for Quick Checks –
-q 25or-q 50gives faster results. Use full 100 for formal diagnostics or support tickets. -
Interpret the Table – "Source to Here" shows cumulative loss/RTT from your machine to that hop. "This Node/Link" shows loss on the link to that hop specifically. High "This Node/Link" = problem at that hop.
-
First Hop with Loss – Often the first hop showing significant loss is the problem. Upstream hops may show loss because they can't reply if the path is broken earlier.
-
Asterisks (*) – Hops that don't respond show * in the trace. They may still appear in the stats table if some packets got through.
-
Run Multiple Times – Single run can be affected by transient congestion. Run 2–3 times and compare for consistency.
Troubleshooting Common Issues
Pathping Takes Too Long
Problem: Pathping runs for several minutes and feels stuck.
Solution: This is normal. Pathping sends 100 packets to each hop. Use -q 25 to reduce queries, or -h 10 to limit hops. Use -n to avoid DNS delays.
Prevention: For quick checks, use tracert. Use pathping when you need statistics.
All Hops Show 100% Loss
Problem: Statistics show 100% packet loss at every hop.
Solution: Firewall or router may be blocking ICMP. Some networks drop ICMP for security. Try a different target. Ensure your firewall allows ICMP outbound.
Prevention: Know that pathping relies on ICMP; not all networks allow it.
Request Timed Out on First Hop
Problem: First hop (your gateway) shows "Request timed out."
Solution: Gateway may block ICMP or rate-limit. Verify you can ping the gateway: ping 192.168.1.1. Check gateway firewall. Try pathping to a different target.
Prevention: Ensure local network allows ICMP for diagnostics.
Inconsistent Results Between Runs
Problem: Packet loss and RTT vary significantly between runs.
Solution: Network congestion or wireless interference can cause variance. Run multiple times and look for patterns. Use -q 100 for more stable statistics.
Prevention: Run during typical usage; avoid comparing idle vs. busy periods without context.
Pathping Hangs or Freezes
Problem: Pathping stops responding partway through.
Solution: A hop may be dropping all packets, causing long timeouts. Use -w 2000 to reduce timeout, or -h to limit hops. Press Ctrl+C to abort.
Prevention: For problematic paths, use tracert first to see if the path completes.
Related Commands
tracert – Trace Route Only
Tracert shows the path to a destination but not packet loss or per-hop statistics. Use tracert for quick path discovery; use pathping when you need quality metrics.
ping – Test Connectivity
Ping tests connectivity to a single destination and shows RTT and loss for the entire path. Pathping breaks that down per hop. Use ping for quick "can I reach it?" checks.
netstat – Active Connections
Netstat shows active connections. Pathping diagnoses the path to a destination. Use together: netstat for what's connected, pathping for how the path performs.
nslookup – DNS Resolution
Pathping can resolve hostnames for each hop (unless you use -n). If resolution fails, pathping may be slow. Use nslookup to verify DNS separately.
Frequently Asked Questions
What is the difference between pathping and tracert?
Tracert only traces the route and shows each hop's RTT. Pathping traces the route and then sends many packets to each hop to compute packet loss and latency statistics. Pathping is slower but provides quality metrics; tracert is faster but shows path only.
How long does pathping take?
Typically 75 seconds or more. Pathping sends 100 packets to each hop (default). With 10 hops, that's 1000+ packets and associated wait times. Use -q 25 to reduce time.
What does "This Node/Link" mean in pathping output?
"This Node/Link" shows the packet loss and RTT specifically for the link to that hop. "Source to Here" is cumulative from your computer to that hop. High "This Node/Link" loss indicates a problem at that specific hop.
Can I use pathping with a hostname?
Yes. Use pathping google.com or any hostname. Pathping will resolve it. Use -n to skip resolution and use IPs only for faster execution.
Why does pathping show 100% loss?
Hops may block or drop ICMP. Firewalls, routers, or security policies often block ping/pathping. The destination or intermediate device may not respond to ICMP. Try a different target or accept that some networks don't support pathping.
Do I need administrator rights for pathping?
No. Pathping works with standard user privileges. It only sends ICMP packets; it doesn't modify system configuration.
How do I make pathping faster?
Use -n (no DNS), -h 10 (fewer hops), and -q 25 (fewer queries per hop). Trade-off: less accurate statistics.
What is a good pathping result?
Ideal: 0% loss at all hops, low and consistent RTT. Acceptable: 0–1% loss, RTT increasing gradually per hop. Problematic: >5% loss at any hop, or sudden RTT jumps.
Can pathping work through VPN?
Yes. Pathping will trace the path through the VPN tunnel. Useful for comparing VPN path quality vs. direct path. Some VPNs may block or alter ICMP.
Why do some hops show asterisks (*)?
Asterisks mean no response was received. The device may not respond to ICMP, may have firewall rules blocking it, or may be configured to not reply. The trace continues to the next hop.
How do I interpret "Source to Here" vs "This Node/Link"?
"Source to Here" = cumulative from your PC to that hop. "This Node/Link" = just the link to that hop. If "Source to Here" shows 10% loss but "This Node/Link" shows 0%, the loss happened at an earlier hop.
Is pathping available on Linux?
Linux has mtr (My Trace Route), which provides similar functionality—trace plus per-hop statistics. Pathping is Windows-specific.
Quick Reference Card
| Command | Purpose | Example |
|---|---|---|
pathping google.com | Full trace with statistics | Standard diagnostics |
pathping -n 8.8.8.8 | No DNS resolution (faster) | Quick trace by IP |
pathping -h 10 target | Limit to 10 hops | Local/short paths |
pathping -q 25 target | 25 queries per hop | Faster, less accurate |
pathping -w 5000 target | 5 second timeout | Slow networks |
pathping target > file.txt | Save output | Documentation |
Try Pathping Yourself
Practice pathping in our interactive Windows Command Simulator to trace routes and view statistics safely. Explore our Commands Reference for tracert, ping, and other network tools. For related guides, see tracert, ping, and ipconfig.
Summary
The pathping command combines route tracing with per-hop packet loss and latency statistics. It sends multiple packets to each router along the path and computes RTT and loss, helping you identify exactly where network problems occur. Use it when ping and tracert aren't enough—when you need to know not just the path but the quality at each hop.
Key switches: -n for speed (no DNS), -h to limit hops, -q to reduce queries for faster runs, and -w for timeout. Pathping takes 75+ seconds by default; plan accordingly. Interpret "This Node/Link" for hop-specific issues and "Source to Here" for cumulative metrics. The pathping command complements tracert and ping for comprehensive network diagnostics.