I have two laptops on my network: a Mid-2015 Macbook Pro Retina running 10.10.5 and an Early 2014 Macbook Air running 10.9.5.
When I ping one from the other over the same wifi network, I get very erratic ping times (here, from 12ms to more than half a second):
$ ping -c 10 192.168.1.242
PING 192.168.1.242 (192.168.1.242): 56 data bytes
64 bytes from 192.168.1.242: icmp_seq=0 ttl=64 time=178.376 ms
64 bytes from 192.168.1.242: icmp_seq=1 ttl=64 time=96.402 ms
64 bytes from 192.168.1.242: icmp_seq=2 ttl=64 time=12.666 ms
64 bytes from 192.168.1.242: icmp_seq=3 ttl=64 time=361.196 ms
64 bytes from 192.168.1.242: icmp_seq=4 ttl=64 time=152.410 ms
64 bytes from 192.168.1.242: icmp_seq=5 ttl=64 time=68.434 ms
64 bytes from 192.168.1.242: icmp_seq=6 ttl=64 time=190.384 ms
64 bytes from 192.168.1.242: icmp_seq=7 ttl=64 time=517.559 ms
64 bytes from 192.168.1.242: icmp_seq=8 ttl=64 time=124.860 ms
64 bytes from 192.168.1.242: icmp_seq=9 ttl=64 time=41.685 ms
--- 192.168.11.242 ping statistics ---
10 packets transmitted, 10 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 12.666/174.397/517.559/147.290 ms
There's no real difference between which MacBook does the pinging.
However, I get much more reasonable results if I ping a Windows desktop that's connected to the network via wired Ethernet from one of the wifi-connected Macs:
$ ping -c 10 192.168.1.10
PING 192.168.1.10 (192.168.1.10): 56 data bytes
64 bytes from 192.168.1.10: icmp_seq=0 ttl=128 time=3.774 ms
64 bytes from 192.168.1.10: icmp_seq=1 ttl=128 time=4.554 ms
64 bytes from 192.168.1.10: icmp_seq=2 ttl=128 time=4.093 ms
64 bytes from 192.168.1.10: icmp_seq=3 ttl=128 time=2.852 ms
64 bytes from 192.168.1.10: icmp_seq=4 ttl=128 time=4.095 ms
64 bytes from 192.168.1.10: icmp_seq=5 ttl=128 time=4.100 ms
64 bytes from 192.168.1.10: icmp_seq=6 ttl=128 time=4.099 ms
64 bytes from 192.168.1.10: icmp_seq=7 ttl=128 time=7.130 ms
64 bytes from 192.168.1.10: icmp_seq=8 ttl=128 time=3.147 ms
64 bytes from 192.168.1.10: icmp_seq=9 ttl=128 time=3.924 ms
--- 192.168.1.10 ping statistics ---
10 packets transmitted, 10 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 2.852/4.177/7.130/1.092 ms
What's going on here between the Macs and how can I fix it?
Update: here are the ping results from the Windows machine (wired ethernet) to one of the Macbooks (wifi). It shows that the problem is directional, the erratically high ping times only occur when the Mac on Wifi is the target of the pings, not when it's the source.
C:\>ping -n 10 192.168.1.248
Pinging 192.168.1.248 with 32 bytes of data:
Reply from 192.168.1.248: bytes=32 time=240ms TTL=64
Reply from 192.168.1.248: bytes=32 time=160ms TTL=64
Reply from 192.168.1.248: bytes=32 time=81ms TTL=64
Reply from 192.168.1.248: bytes=32 time=305ms TTL=64
Reply from 192.168.1.248: bytes=32 time=227ms TTL=64
Reply from 192.168.1.248: bytes=32 time=1ms TTL=64
Reply from 192.168.1.248: bytes=32 time=65ms TTL=64
Reply from 192.168.1.248: bytes=32 time=295ms TTL=64
Reply from 192.168.1.248: bytes=32 time=216ms TTL=64
Reply from 192.168.1.248: bytes=32 time=135ms TTL=64
Ping statistics for 192.168.1.248:
Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 305ms, Average = 172ms