ping -f 127.0.0.1

Hi,

why is there 30% pacet loss when pinging 127.0.0.1?

Code:
# ping -f 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
............................................................................................................
..........................................................^C
--- 127.0.0.1 ping statistics ---
1991 packets transmitted, 1393 packets received, 30.0% packet loss
round-trip min/avg/max/stddev = 0.011/0.018/0.131/0.007 ms

:)
 
-f Flood ping.
Outputs packets as fast as they come back or one hundred times per second, whichever is more. For every ECHO_REQUEST sent a period ``.'' is printed, while for every ECHO_REPLY received a backspace is printed. This provides a rapid display of how many packets are being dropped. Only the super-user may use this option. This can be very hard on a network and should be used with caution.
ping(1)
 
Flood pings are never good news. Try a -c 100 or even -c 1000 for more balanced results.
 
I know what it does, I'm not suprised that there is packet loss over network and I'm not even saying that it's wrong, I mean no offense, I only don't understand how there can be some packet loss when (flood) pinging localhost.

There is no problem, I noticed this behavior incidentally.
 
To clarify DD's point, FreeBSD rate limits ICMP responses to 200 packets/sec by default. In fact, if you look at the output from dmesg(8) you will likely see something like:
Code:
Limiting icmp ping response from 249 to 200 packets/sec
 
Back
Top