pathping
pathping is tracert plus ping: it first discovers every router on the path, then pings every hop many times and reports the round-trip time and packet loss of every router and every link. It is the Windows tool for finding exactly where packet loss happens.
40.1 Why is it used?
- tracert shows the path but only 3 probes per hop; pathping measures loss per router and per link.
- Built into Windows; runs in Command Prompt and PowerShell. It changes no settings, so it is safe on an office PC.
- Not on Linux or macOS: use mtr there (apt install mtr / brew install mtr).
- Its report is exactly what an ISP support team needs to see the bad hop.
40.2 How it works
- Step 1
1.pathping -n 8.8.8.8 starts
- Step 2
2.Probe with TTL 1: home router replies TTL expired -> hop 1
- Step 3
3.Probe with TTL 2: ISP router replies -> hop 2
- Step 4
4.TTL keeps growing past the edge router
- Step 5
5.8.8.8.8 replies: the full hop list is known
- Step 1
1.100 echo requests per hop by default, 250 ms apart
- Step 2
2.Home router: all 100 replies come back
- Step 3
3.ISP router: 20 replies missing
- Step 4
4.8.8.8.8: 12 replies lost
- Step 5
5.About 25 s per hop: 5 hops take about 2 minutes
Total time = hops x queries x period
40.3 Router loss vs link loss
- ISP router shows 20% but the edge router after it shows 0%: traffic is not being dropped; the busy router only rate-limits its own ICMP replies. Ignore it.
- The link between the edge router and 8.8.8.8 shows 12% that stays all the way to the destination: that is the really bad link to report to the ISP.
- Rule: real loss continues on every later hop; loss that disappears at the next hop is ICMP rate limiting.
40.4 Reading the output
| Column | Meaning |
|---|---|
| RTT | Average response time of the hop |
| Source to Here | Total loss from your PC up to this hop |
| This Node/Link (router line) | That router's own loss |
| This Node/Link (| line) | Loss on the link between two hops |
pathping -n 8.8.8.8$ pathping -n 8.8.8.8 Source to Here This Node/LinkHop RTT Lost/Sent = Pct Lost/Sent = Pct Address 0 192.168.1.10 0/ 100 = 0% | 1 1ms 0/ 100 = 0% 0/ 100 = 0% 192.168.1.1 0/ 100 = 0% | 2 9ms 20/ 100 = 20% 20/ 100 = 20% 10.20.0.1 0/ 100 = 0% | 3 11ms 0/ 100 = 0% 0/ 100 = 0% 72.14.209.1 12/ 100 = 12% | 4 14ms 12/ 100 = 12% 0/ 100 = 0% 8.8.8.8This is the documented example (public hops are not visible from the office network): hop 2's 20% vanishes at hop 3, while link 3 -> 4 shows 12% that is visible till the end.
40.5 Options
| Option | Meaning | Default |
|---|---|---|
| -n | No name lookup (fast) | Names resolved |
| -h 15 | Max hops | 30 |
| -q 20 | Queries per hop | 100 |
| -p 500 | Gap between pings (ms) | 250 |
| -w 1000 | Wait per reply (ms) | 3000 |
| -g h1 h2 | Loose source route (max 9) | - |
| -i address | Source address (IPv6 only) | - |
| -4 / -6 | Force IPv4 / IPv6 | - |
| /? | Help (same as running pathping alone) | - |
- Options are case-sensitive: -N is rejected.
- For routers that rate-limit ICMP a gentle run like -p 1000 -q 50 works better.
pathping /?pathping -N -q 5 127.0.0.1$ pathping /?Usage: pathping [-g host-list] [-h maximum_hops] [-i address] [-n] [-p period] [-q num_queries] [-w timeout] [-4] [-6] target_nameOptions: -g host-list Loose source route along host-list. -h maximum_hops Maximum number of hops to search for target. -i address Use the specified source address. -n Do not resolve addresses to hostnames. -p period Wait period milliseconds between pings. -q num_queries Number of queries per hop. -w timeout Wait timeout milliseconds for each reply. -4 Force using IPv4. -6 Force using IPv6.$ pathping -N -q 5 127.0.0.1-N is not a valid command option.Usage: pathping [-g host-list] [-h maximum_hops] [-i address] [-n]40.6 Practical: fast run to 8.8.8.8 from the office
- -n -q 10 -h 15 -w 1000: no names, 10 queries per hop, 15 hops max, 1 s wait.
- Hop 3 shows * * * and pathping stops there: the office firewall blocks replies from routers beyond it.
- A normal ping reaches 8.8.8.8 in ~20 ms, so the internet is fine; pathping simply stops at the first silent hop.
pathping -n -q 10 -h 15 -w 1000 8.8.8.8ping -n 4 8.8.8.8$ pathping -n -q 10 -h 15 -w 1000 8.8.8.8Tracing route to 8.8.8.8 over a maximum of 15 hops 0 <office IP hidden> 1 <office IP hidden> 2 <office IP hidden> 3 * * *Computing statistics for 5 seconds...Hop RTT Lost/Sent = Pct Lost/Sent = Pct Address 1 3ms 0/ 10 = 0% 0/ 10 = 0% <office IP hidden> 2 17ms 0/ 10 = 0% 0/ 10 = 0% <office IP hidden>Trace complete.$ ping -n 4 8.8.8.8Reply from 8.8.8.8: bytes=32 time=20ms TTL=117Reply from 8.8.8.8: bytes=32 time=20ms TTL=117Reply from 8.8.8.8: bytes=32 time=27ms TTL=117Reply from 8.8.8.8: bytes=32 time=23ms TTL=117 Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),40.7 Practical: run time with -q and -p
pathping -n 127.0.0.1pathping -n -q 20 127.0.0.1pathping -n -q 20 -p 500 127.0.0.1$ pathping -n 127.0.0.1Tracing route to 127.0.0.1 over a maximum of 30 hops 0 127.0.0.1 1 127.0.0.1Computing statistics for 25 seconds... 1 0ms 0/ 100 = 0% 0/ 100 = 0% 127.0.0.1$ pathping -n -q 20 127.0.0.1Computing statistics for 5 seconds... 1 0ms 0/ 20 = 0% 0/ 20 = 0% 127.0.0.1$ pathping -n -q 20 -p 500 127.0.0.1Computing statistics for 10 seconds... 1 0ms 0/ 20 = 0% 0/ 20 = 0% 127.0.0.1| Command | Queries x period | Time per hop |
|---|---|---|
| pathping -n 127.0.0.1 | 100 x 250 ms | 25 s |
| -q 20 | 20 x 250 ms | 5 s |
| -q 20 -p 500 | 20 x 500 ms | 10 s |
40.8 Practical: -4, -6, -i, -g and saving the report
- localhost has both addresses: -4 goes to 127.0.0.1, -6 goes to ::1.
- -i with an IPv4 source fails: -i is only supported for IPv6.
- -g (loose source route) shows * at hop 1: most systems drop source-routed packets.
- Redirect to a file and send it to your ISP's support team.
pathping -n -4 -q 5 localhostpathping -n -6 -q 5 localhostpathping -n -i 127.0.0.1 -q 5 127.0.0.1pathping -n -g 127.0.0.1 -q 5 127.0.0.1pathping -n -q 5 127.0.0.1 > pathping.txttype pathping.txt$ pathping -n -4 -q 5 localhost 0 127.0.0.1 1 127.0.0.1 1 0ms 0/ 5 = 0% 0/ 5 = 0% 127.0.0.1$ pathping -n -6 -q 5 localhost 0 ::1 1 ::1 1 0ms 0/ 5 = 0% 0/ 5 = 0% ::1$ pathping -n -i 127.0.0.1 -q 5 127.0.0.1Tracing route to 127.0.0.1 over a maximum of 30 hopsThe option -i is only supported for IPv6.$ pathping -n -g 127.0.0.1 -q 5 127.0.0.1Tracing route to 127.0.0.1 over a maximum of 30 hops 0 127.0.0.1 1 * * *Computing statistics for 0 seconds...Trace complete.$ pathping -n -q 5 127.0.0.1 > pathping.txt$ type pathping.txtTracing route to 127.0.0.1 over a maximum of 30 hops 0 127.0.0.1 1 127.0.0.1Computing statistics for 1 seconds...Hop RTT Lost/Sent = Pct Lost/Sent = Pct Address 1 0ms 0/ 5 = 0% 0/ 5 = 0% 127.0.0.1Trace complete.40.9 Comparison: tracert vs pathping vs mtr
| Point | tracert | pathping | mtr |
|---|---|---|---|
| OS | Windows | Windows | Linux / macOS |
| Probes | 3 per hop | Path + 100 pings per hop | Continuous pings per hop |
| Shows | Path + latency | Router and link loss + RTT | Live loss + latency per hop |
| Speed | Fast | Slow (25 s per hop default) | Live, runs until stopped |
40.10 Common mistakes
- Calling a router faulty because it alone shows loss (e.g. hop 3 30%, hops 4-5 0%): that is ICMP rate limiting.
- Expecting instant results: 15 hops at default settings take about 6 minutes; people press Ctrl+C thinking it hung.
- Using a short sample for intermittent loss: use a long one like -q 300; use -q 20 for a quick check.
- Typing options in capitals (-N): they are case-sensitive.
40.11 Interview tips
- tracert: 3 probes per hop, path + latency, fast. pathping: path + 100 pings per hop, router and link loss, takes minutes.
- Real loss continues to the destination; loss at one hop only is ICMP rate limiting.
- Run time = hops x queries x period (default 100 x 250 ms = 25 s per hop).
- On Linux/macOS the equivalent is mtr.