I'm seeing some weird behavior with the built in ping command that I don't understand. (this is on a windows 2012 r2 box - I haven't verified if this behavior is seen on other windows versions)
If I set the timeout (in ms) to a value like 120, I consistently see intermittent timeouts when pinging a remote host (about 10 hops away)
ping -t -w 120 myhost.domain.local
Reply from (removed): bytes=32 time=21ms TTL=246
Reply from (removed): bytes=32 time=23ms TTL=246
Request timed out.
Reply from (removed): bytes=32 time=25ms TTL=246
Reply from (removed): bytes=32 time=22ms TTL=246
which is fine, EXCEPT, if I leave the ping timeout at its default value (which is I believe 5000ms) I don't see any timeouts, AND never see a time reported greater than 30ms.
In fact, I can run 2 instances of ping at the same time, one with -w 120 and one with default timeout, and the instance with -w 120 will consistently have intermittent timeouts while the other instance will have none, and both instances won't show any responses greater than 30ms.
Does anyone have an explanation why it appears that ping is timing out in a much shorter interval than the one I'm specifying?
EDIT:
I'm beginning to think the -w parameter doesn't work at all, it certainly isn't doing what it says it should do. The description from the ping command is:
-w timeout Timeout in milliseconds to wait for each reply.
so why the heck doesn't this timeout?
C:\Windows\System32>ping -w 10 google.com
Pinging google.com [66.58.255.29] with 32 bytes of data:
Reply from 66.58.255.29: bytes=32 time=46ms TTL=58
???
per MS documentation
"When specifying very small numbers for timeout, the Ping reply can be received even if timeout milliseconds have elapsed."
I can only conclude based on my testing and the above statement that the timeout value in Ping is simply not very accurate and when set to 120ms you will simply get unpredictable results.