Something seems "off" counting outbound traffic (wlan? iwn?)

David Wolfskill david at catwhisker.org
Wed Jan 3 15:33:18 UTC 2018


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=f>;
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   Errs  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 
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 
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 
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 
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 
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 
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 
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 
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 
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 
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 
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 
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 
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 
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 
bats(11.1-S)[19] 


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 
1514993325.924    14.3K   0.0    0.0    0.0   12.0    0.0   0.0 
1514993330.906   985.3K   0.0    0.0  160.6   55.6    0.0   0.0 
1514993335.911     5.1M   0.0    0.0    0.0  246.9    0.0   0.0 
1514993340.938     5.0M   0.0    0.0    0.0  241.9    0.0   0.0 
1514993345.903     4.0M   0.0    0.0    0.0  184.3    0.0   0.0 
1514993350.903   235.2K   0.0    0.0    0.0   62.6    0.0   0.0 
1514993355.919    35.5K   0.0    0.0    0.0   51.2    0.0   0.0 
1514993360.904    29.1K   0.0    0.0    0.0   45.3    0.0   0.0 
1514993365.975    19.9K   0.0    0.0    0.0   21.5    0.0   0.0 
1514993370.922     1.6K   0.0    0.0    0.0    1.6    0.0   0.0 
1514993375.905     2.8K   0.0    0.0    0.0    2.8    0.0   0.0 
1514993380.968   897.5    0.0    0.0    0.0    1.0    0.0   0.0 
1514993386.035     1.7K   0.0    0.0    0.0    1.4    0.0   0.0 
1514993390.957     1.6K   0.0    0.0    0.0    1.2    0.0   0.0 
g1-252(11.1-S)[23] 


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
-- 
David H. Wolfskill				david at catwhisker.org
If you want the best Fake News, go to the best source of it: Donald J. Trump.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-wireless/attachments/20180103/fe8e1e50/attachment.sig>


More information about the freebsd-wireless mailing list