Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jan 2018 07:33:12 -0800
From:      David Wolfskill <david@catwhisker.org>
To:        wireless@freebsd.org
Subject:   Something seems "off" counting outbound traffic (wlan? iwn?)
Message-ID:  <20180103153312.GJ1258@albert.catwhisker.org>

next in thread | raw e-mail | index | archive | help

--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 <http://www.catwhisker.org/~david/FreeBSD/upgrade.html>;
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 <http://beta.speedtest.net/run?r=3Df=
>;
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 <full-duplex>)
em2:    198.144.209.73/24   Ethernet autoselect (10baseT/UTP <half-duplex>)

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180103153312.GJ1258>