From owner-freebsd-net Tue Dec 24 9:54:56 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D17EC37B401 for ; Tue, 24 Dec 2002 09:54:53 -0800 (PST) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 904E243EC5 for ; Tue, 24 Dec 2002 09:54:49 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (root@localhost) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Sunbay) with SMTP id gBOHsdeD098849 for ; Tue, 24 Dec 2002 19:54:39 +0200 (EET) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Sunbay) with ESMTP id gBOHsdeY098812 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 24 Dec 2002 19:54:39 +0200 (EET) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Submit) id gBOHsWBw098801; Tue, 24 Dec 2002 19:54:32 +0200 (EET) Date: Tue, 24 Dec 2002 19:54:32 +0200 From: Ruslan Ermilov To: Matthew Dillon Cc: "matthew c. mead" , Robert Watson , freebsd-net@freebsd.org Subject: ping -i 0 (was: Re: TCP interactions) Message-ID: <20021224175432.GA92573@sunbay.com> References: <20021221165745.A67089@goof.com> <20021222151259.A21189@goof.com> <200212222106.gBML6INI032302@apollo.backplane.com> <20021222230527.A30324@goof.com> <200212230652.gBN6qZmI035236@apollo.backplane.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline In-Reply-To: <200212230652.gBN6qZmI035236@apollo.backplane.com> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 22, 2002 at 10:52:35PM -0800, Matthew Dillon wrote: >=20 > : > :Hmm, same cables, same switch, different card, now it all works. > : > :I did do some ICMP ping testing with ping -f and only lost 3 > :packets after letting it run for a good 10s. > : > : > :-matt >=20 > If it is working properly you should not lose *ANY* packets on an > otherwise idle connection, except possibly the last one that the > ping was sending when you ^C'd it (and sometimes ping doesn't wait > long enough on the last packet when you give it a specific count).=20 > So at most it should report one lost packet over any period of time. > Certainly not 3. >=20 > e.g. > workstation# ping -c 1000 -i 0.05 apollo > ... > 1000 packets transmitted, 1000 packets received, 0% packet loss > round-trip min/avg/max/stddev =3D 0.148/0.159/0.248/0.009 ms >=20 Then how could you explain that ``ping -c 1000 -i 0 localhost'' sometimes exhibits the loss? I've bitten my head today trying to figure out what's going on here (5.0-CURRENT), to no avail. This is with net.inet.icmp.icmplim and net.inet.icmp.icmplim_output both set to zero, and with only lo0 interface ``up''. (Yes I know that -i should not allow 0, even for root.) The sendto(2) call in ping.c:pinger() always succeeds, yet ``netstat -s -p icmp'' shows the same delta as ping(8)? allmouth# netstat -z -s -p icmp > /dev/null allmouth# netstat -s -p icmp > 1 allmouth# ping -i0 -c1000 localhost | tail -3 --- localhost ping statistics --- 1000 packets transmitted, 217 packets received, 78% packet loss round-trip min/avg/max/stddev =3D 0.063/6.769/30.353/12.241 ms allmouth# netstat -s -p icmp > 2 allmouth# diff 1 2 3a4,5 > Output histogram: > echo reply: 217 10c12,15 < 0 message responses generated --- > Input histogram: > echo reply: 217 > echo: 217 > 217 message responses generated Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --17pEHd4RhPHOinZp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+CJ9YUkv4P6juNwoRAu8iAJ0VtKCP5nMsBGI5srtbIHyjTw5H4gCfWVlO s1mh+kZbfPDH9+/yv2pm4lo= =9h/Y -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message