Re: Flood ping

Kurt Garloff (garloff@kg1.ping.de)
Thu, 24 Sep 1998 21:59:45 +0200


On Thu, Sep 24, 1998 at 12:54:28AM -0400, George wrote:
>
> Anyone tried flood pinging localhost lately?
>
> With Linux 2.1.122 SMP (2xPentium 133) I get:
>
> --- localhost ping statistics ---
> 38831 packets transmitted, 781 packets received, 97% packet loss
> round-trip min/avg/max = 0.6/103.7/331.4 ms

Same here with 2.1.122 UP (K6-2 @ 4x75):

--- localhost ping statistics ---
500202 packets transmitted, 766 packets received, 99% packet loss
round-trip min/avg/max = 0.2/34.6/67.5 ms
--- localhost ping statistics ---
21361 packets transmitted, 766 packets received, 96% packet loss
round-trip min/avg/max = 0.2/33.3/65.1 ms
--- localhost ping statistics ---
39847 packets transmitted, 766 packets received, 98% packet loss
round-trip min/avg/max = 0.2/33.0/64.8 ms
--- localhost ping statistics ---
1985 packets transmitted, 766 packets received, 61% packet loss
round-trip min/avg/max = 0.2/35.7/71.5 ms

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:1124106 errors:0 dropped:0 overruns:0 frame:0
TX packets:1124106 errors:0 dropped:0 overruns:0 carrier:0
Collisions:0

You see something strange, here?
Why do I always have 766 packets received regardless how many I send ?

If I do ping -l 2000 localhost, the first 383 (0 thru 382) packets are
answered, the rest is dropped and the next is 2001.

766/2 = 383.

What is the math behind that?

-- 
Kurt Garloff, Dortmund 
<K.Garloff@ping.de>
PGP key on http://student.physik.uni-dortmund.de/homepages/garloff
----------------------------------------------------------------------------
The following is a Python RSA implementation. According to the US Government
posting these four lines makes me an international arms trafficker!  Join me
in civil disobedience; add these lines of code to your .sig block to help get
this stupid and unconstitutional law changed.
============================================================================
from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d
while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1)))

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/