Date: Tue, 24 Dec 2002 19:54:32 +0200 From: Ruslan Ermilov <ru@freebsd.org> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: "matthew c. mead" <mmead@goof.com>, Robert Watson <rwatson@freebsd.org>, freebsd-net@freebsd.org Subject: ping -i 0 (was: Re: TCP interactions) Message-ID: <20021224175432.GA92573@sunbay.com> In-Reply-To: <200212230652.gBN6qZmI035236@apollo.backplane.com> References: <20021221165745.A67089@goof.com> <Pine.NEB.3.96L.1021222105809.91887B-100000@fledge.watson.org> <20021222151259.A21189@goof.com> <200212222106.gBML6INI032302@apollo.backplane.com> <20021222230527.A30324@goof.com> <200212230652.gBN6qZmI035236@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021224175432.GA92573>