From owner-freebsd-wireless@freebsd.org Wed Jan 3 15:33:17 2018 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1C52E829B3 for ; Wed, 3 Jan 2018 15:33:17 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id D57787844E for ; Wed, 3 Jan 2018 15:33:17 +0000 (UTC) (envelope-from david@catwhisker.org) Received: by mailman.ysv.freebsd.org (Postfix) id CE851E829B2; Wed, 3 Jan 2018 15:33:17 +0000 (UTC) Delivered-To: wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD326E829B1 for ; Wed, 3 Jan 2018 15:33:17 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mx.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F8147844D for ; Wed, 3 Jan 2018 15:33:13 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.15.2/8.15.2) with ESMTP id w03FXC1i042484 for ; Wed, 3 Jan 2018 15:33:12 GMT (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.15.2/8.15.2/Submit) id w03FXCpm042483 for wireless@freebsd.org; Wed, 3 Jan 2018 07:33:12 -0800 (PST) (envelope-from david) Date: Wed, 3 Jan 2018 07:33:12 -0800 From: David Wolfskill To: wireless@freebsd.org Subject: Something seems "off" counting outbound traffic (wlan? iwn?) Message-ID: <20180103153312.GJ1258@albert.catwhisker.org> Reply-To: wireless@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="StsxD1CZcGPGLZBA" Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 15:33:18 -0000 --StsxD1CZcGPGLZBA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I recently configured my "perimeter device" (a 4-homed FreeBSD box named "bats"; see for a diagram) to make use of FQ-CoDel for outbound traffic on the Internet-facing NIC (em2, in this case). I failed to find a way to monitor the traffic rates in a way that I found suitably convenient, so I cobbled up a Perl script to grab the output of "netstat -nibdf link" at intervals (timed via Time::HiRes), do the arithmetic, and display the results. For the perimeter device, it seems to work as expected. For my laptop, using the wlan0 (iwn0) NIC, the report of input traffic looks reasonable, but output ... makes no sense at all to me. As illustration, I'll show the reported results for both bats and my laptop while I run a "speed" test from ; note that my Internet connection is (residential) ADSL. Here's what my ISP stated about it (from a conversation some time back): | The line is at 6M/768K with good synch readings and I don't see | any reason you wouldn't be able to get 5.1Mbps/640Kbps out of | it which is about the yield after overhead. Note that I start the test just after the script has reported fro the first interval (which I have specified as 5 seconds for this): bats(11.1-S)[18] net_mon -e -w 5 -c 15 em{1,2} em1: 172.17.0.1/16 Ethernet autoselect (1000baseT ) em2: 198.144.209.73/24 Ethernet autoselect (10baseT/UTP ) em1 = em2 Time In Out = In Out Rate/sec Bits Errs Drops Bits Errs Drops Coll Bits E= rrs Drops Bits Errs Drops Coll 1514993320.453 3.5K 0.0 0.0 3.3K 0.0 0.0 0.0 403.0K = 0.0 0.0 173.2K 0.0 0.0 1.8=20 1514993325.454 24.1K 0.0 0.0 16.4K 0.0 0.0 0.0 31.0K = 0.0 0.0 27.9K 0.0 0.0 0.0=20 1514993330.454 22.4K 0.0 0.0 525.3K 0.0 0.0 0.0 1.5M = 0.0 0.0 142.2K 0.0 0.0 1.4=20 1514993335.455 143.9K 0.0 0.0 5.1M 0.0 0.0 0.0 5.3M = 0.0 0.0 340.5K 0.0 0.0 34.2=20 1514993340.455 135.4K 0.0 0.0 5.0M 0.0 0.0 0.0 5.4M = 0.0 0.0 227.8K 0.0 0.0 8.8=20 1514993345.454 104.1K 0.0 0.0 4.2M 0.0 0.0 0.0 5.4M = 0.0 0.0 249.2K 0.0 0.0 25.6=20 1514993350.453 544.1K 0.0 0.0 544.4K 0.0 0.0 0.0 858.5K = 0.0 0.0 644.5K 0.0 0.0 5.4=20 1514993355.454 585.0K 0.0 0.0 34.1K 0.0 0.0 0.0 868.0K = 0.0 0.0 658.0K 0.0 0.0 17.2=20 1514993360.454 483.4K 0.0 0.0 31.8K 0.0 0.0 0.0 1.4M = 0.0 0.0 635.2K 0.0 0.0 22.2=20 1514993365.454 254.9K 0.0 0.0 25.1K 0.0 0.0 0.0 115.6K = 0.0 0.0 317.2K 0.0 0.0 2.8=20 1514993370.454 822.4 0.0 0.0 1.6K 0.0 0.0 0.0 9.6K = 0.0 0.0 14.8K 0.0 0.0 0.2=20 1514993375.454 2.3K 0.0 0.0 2.3K 0.0 0.0 0.0 720.5K = 0.0 0.0 108.0K 0.0 0.0 0.2=20 1514993380.455 3.2K 0.0 0.0 2.8K 0.0 0.0 0.0 358.9K = 0.0 0.0 210.6K 0.0 0.0 0.6=20 1514993385.454 1.0K 0.0 0.0 1.9K 0.0 0.0 0.0 1.1M = 0.0 0.0 97.2K 0.0 0.0 2.8=20 1514993390.455 566.3 0.0 0.0 1.2K 0.0 0.0 0.0 433.5K = 0.0 0.0 219.9K 0.0 0.0 1.0=20 bats(11.1-S)[19]=20 g1-252(11.1-S)[22] net_mon -e -w 5 -c 15 wlan0: 172.17.1.252/16 IEEE 802.11 Wireless Ethernet MCS mode 11ng wlan0 Time In Out Rate/sec Bits Errs Drops Bits Errs Drops Coll 1514993320.941 4.2K 0.0 0.0 0.0 5.8 0.0 0.0=20 1514993325.924 14.3K 0.0 0.0 0.0 12.0 0.0 0.0=20 1514993330.906 985.3K 0.0 0.0 160.6 55.6 0.0 0.0=20 1514993335.911 5.1M 0.0 0.0 0.0 246.9 0.0 0.0=20 1514993340.938 5.0M 0.0 0.0 0.0 241.9 0.0 0.0=20 1514993345.903 4.0M 0.0 0.0 0.0 184.3 0.0 0.0=20 1514993350.903 235.2K 0.0 0.0 0.0 62.6 0.0 0.0=20 1514993355.919 35.5K 0.0 0.0 0.0 51.2 0.0 0.0=20 1514993360.904 29.1K 0.0 0.0 0.0 45.3 0.0 0.0=20 1514993365.975 19.9K 0.0 0.0 0.0 21.5 0.0 0.0=20 1514993370.922 1.6K 0.0 0.0 0.0 1.6 0.0 0.0=20 1514993375.905 2.8K 0.0 0.0 0.0 2.8 0.0 0.0=20 1514993380.968 897.5 0.0 0.0 0.0 1.0 0.0 0.0=20 1514993386.035 1.7K 0.0 0.0 0.0 1.4 0.0 0.0=20 1514993390.957 1.6K 0.0 0.0 0.0 1.2 0.0 0.0=20 g1-252(11.1-S)[23]=20 Note that even for the "upload" phase of the test, the laptop is showing negligible outbound *traffic* -- but a *lot* of outbound "errors." Can someone make sense of this? Thanks! Peace, david --=20 David H. Wolfskill david@catwhisker.org If you want the best Fake News, go to the best source of it: Donald J. Trum= p. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --StsxD1CZcGPGLZBA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJaTPe4XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDQ0I3Q0VGOTE3QTgwMUY0MzA2NEQ3N0Ix NTM5Q0M0MEEwNDlFRTE3AAoJEBU5zECgSe4X2EQIAKQ7KtE6eVTXSlRYJh3T4Ogk 8oiFRRE1h3aLKbQo5LJboNFEG2MWHRmaCpQLOsB5UKvo7riqYHo3YrB4aXGPSAtk 4loh69Vf3MFf2de9C++88nXc1BA8n9FF+bz38a4wNJdi5F2ZTecrGqLLeec+sEaD +ORZtmrLZ4mIAz4//ICLQvR08TniQvqrmZ2jwRjaVZFhSNkrp5ipaD1JOET/PwAq Ia0vQT6Anrooo9yvovufgxbzCheuB/WyrZu8RTLu3Zg5P9nFvr4QNH8Y0sejTVK/ r6/UlYVTgqreCX4kkrJCkRpPAM9L6bMV/hXSORMdWrh4Z0d2VUPzbqrYA9u95og= =wPt7 -----END PGP SIGNATURE----- --StsxD1CZcGPGLZBA--