# ping -f 127.0.0.1



## pbd (Aug 26, 2010)

Hi,

why is there 30% pacet loss when pinging 127.0.0.1?


```
# 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
```


----------



## SirDice (Aug 26, 2010)

Firewall? High system load?


----------



## pbd (Aug 26, 2010)

No firewall, system idle. Try it yourself.


----------



## SirDice (Aug 26, 2010)

> -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)


----------



## DutchDaemon (Aug 26, 2010)

Flood pings are never good news. Try a -c 100 or even -c 1000 for more balanced results.


----------



## pbd (Aug 26, 2010)

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.


----------



## DutchDaemon (Aug 26, 2010)

Clue:


```
# sysctl net.inet.icmp.icmplim=0
net.inet.icmp.icmplim: 200 -> 0
```


----------



## gordon@ (Aug 30, 2010)

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:

```
Limiting icmp ping response from 249 to 200 packets/sec
```


----------

