Ping & Traceroute Command Builder

Generate correct ping, traceroute and MTU-discovery commands for Linux, Windows, macOS, Cisco IOS, Junos and RouterOS - with the flags that differ between them.

Config generator Network Diagnostics Runs in your browser
1472 + 28 bytes of headers = 1500 MTU.
Try:

Result

ICMP payload
1472 bytes
Total IPv4 packet
1500 bytes
20 B IP header + 8 B ICMP header
Fragmentation
blocked (DF set)
Tests path MTU of
1500 bytes
Linux (iputils)
ping -c 5 -s 1472 -M do 8.8.8.8
traceroute -n 8.8.8.8
mtr -rwbzc 5 8.8.8.8
Windows (cmd / PowerShell)
ping -n 5 -l 1472 -f 8.8.8.8
tracert -d 8.8.8.8
Test-NetConnection -ComputerName 8.8.8.8 -TraceRoute
macOS / BSD
ping -c 5 -s 1472 -D 8.8.8.8
traceroute -n 8.8.8.8
Cisco IOS / IOS-XE
ping 8.8.8.8 repeat 5 size 1500 df-bit
traceroute 8.8.8.8 numeric
Juniper Junos
ping 8.8.8.8 count 5 size 1472 do-not-fragment
traceroute 8.8.8.8 no-resolve
MikroTik RouterOS
/ping address=8.8.8.8 count=5 size=1500 do-not-fragment=yes
/tool traceroute address=8.8.8.8
The size trap
Cisco and RouterOS size the whole IP packet; Linux, Windows and Junos size the payload only. That 28-byte difference is why the same "1472" test passes on one platform and fails on another - the commands above already account for it.

About Ping & Traceroute Command Builder

Every platform spells ping differently, and the differences are exactly the ones that matter during an MTU investigation: whether the size argument means payload or whole packet, and how you set the do-not-fragment bit. This builds all six variants from one set of inputs.

Path MTU discovery by hand

Set DF and send progressively larger packets until they stop returning. On Linux, ping -M do -s 1472 tests a 1500-byte path (1472 payload + 8 ICMP + 20 IP). If that fails but 1464 succeeds, your path MTU is 1492 - the classic PPPoE signature. A path that silently drops oversized packets instead of returning "fragmentation needed" is an ICMP black hole, and it breaks TCP in ways that look like an application bug.

Reading a traceroute honestly

Middle hops that show stars or high latency are usually deprioritising ICMP generation, not dropping traffic. Only the final hop and the trend across hops carry real signal. Asymmetric return paths mean a traceroute shows you one direction only - a fact worth stating before anyone blames a transit provider.

Common use cases

  • Finding the real path MTU on a tunnelled or PPPoE link.
  • Sourcing a ping from a specific interface or loopback to test a routing policy.
  • Handing a correct command to a customer or field engineer on an unfamiliar platform.

Edge cases and gotchas

  • IPv6 headers are 40 bytes, not 20 - subtract 20 more from the payload when testing an IPv6 path.
  • Some networks rate-limit or block ICMP entirely; no response does not always mean no reachability.

Frequently asked questions

Why does 1472 fail but 1464 work?
Your path MTU is 1492, almost always PPPoE, which consumes 8 bytes for its header. It can also indicate a tunnel (GRE, IPsec or WireGuard) in the path.
Does Windows ping -l include headers?
No, -l sets the payload size like Linux -s. Cisco and RouterOS are the outliers that count the entire packet.