I am trying to simulate an intermittent ping timeout by adding the -w switch but it seems to be ignoring that switch.

The host* I'm pinging typically replies around 108 ms so if I set /w to anything lower than that I would have thought I'd see timeouts, but no matter what I set it to, I get no timeouts.

C:\Windows\System32>ping www.google.com -w 5

Pinging www.google.com [] with 32 bytes of data:
Reply from bytes=32 time=10ms TTL=54
Reply from bytes=32 time=10ms TTL=54
Reply from bytes=32 time=10ms TTL=54
Reply from bytes=32 time=10ms TTL=54

Ping statistics for
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 10ms, Maximum = 10ms, Average = 10ms

Am I doing something wrong, or misunderstanding the situation? Or does this switch simply not work?

*Replaced with www.google.com in the example, to avoid including the actual ip address and hostname that I'm using

  • 1
    I can confirm this bug. What is interesting, the timeout setting is obeyed if you ping a non-answering host (try – masgo Dec 8 '16 at 12:53

The following documentation states:

When specifying very small numbers for timeout, the Ping reply can be received even if timeout milliseconds have elapsed.

After some testing, this seems to explain your issue. I have tested pinging example.com, wich replies between 70-85ms for me. When setting timeout to 80ms, some pings fail, and some don't. So, somewhere below 80ms starts to be "very small".

  • Pinging a host with a consistent 200ms+ latency and setting timeout to 100ms does nothing, the flag is ignored and nothing is timed out. This appears to be a bug in Windows 10 as it doesn't follow specifications. – misantroop Nov 14 '18 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.