I have Xiaomi Router 4A Gigabit configured with 21.02.1 as a Dumb AP (wan
port is attached to br-lan
)
And I want to monitor traffic usage (e.g. wireless and cable).
With wlan0
and wlan1
no issues, I can see this as expected with ifconfig -a
.
But as for cable traffic, looks like it does not count to any interface.
For example, I have a RaspberryPi connected with a cable to this Dumb AP, and the traffic used by it does not reflect anywhere. I suppose this is happening due to DSA, because on Archer C7 all the traffic is being reflected in some interface stats.
Also, when I open Status - Realtime Graphs in LuCI, I can't see this traffic flow on any graph.
I used eth0 to monitor the traffic, but this is a CPU interface. Thus, it only counts the traffic going through the CPU. Obviously, only wireless traffic goes through there and LAN traffic is just forwarded as is over the switch.
My ifconfig -a
output:
br-lan Link encap:Ethernet HWaddr ********
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::5e02:14ff:fe06:c25e/64 Scope:Link
inet6 addr: fd4b:7340:46a9::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1909595 errors:0 dropped:0 overruns:0 frame:0
TX packets:1523133 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:155567983 (148.3 MiB) TX bytes:141061594 (134.5 MiB)
eth0 Link encap:Ethernet HWaddr ********
inet6 addr: fe80::5e02:14ff:fe06:c25e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1504 Metric:1
RX packets:12338031 errors:3 dropped:0 overruns:0 frame:0
TX packets:45948042 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14784291450 (13.7 GiB) TX bytes:35977940037 (33.5 GiB)
Interrupt:21
lan1 Link encap:Ethernet HWaddr ********
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7373298 errors:0 dropped:68 overruns:0 frame:0
TX packets:17478688 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9313178251 (8.6 GiB) TX bytes:12311958673 (11.4 GiB)
lan2 Link encap:Ethernet HWaddr ********
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1335673 errors:0 dropped:0 overruns:0 frame:0
TX packets:27002139 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:434382033 (414.2 MiB) TX bytes:23152475834 (21.5 GiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:146 errors:0 dropped:0 overruns:0 frame:0
TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12812 (12.5 KiB) TX bytes:12812 (12.5 KiB)
wan Link encap:Ethernet HWaddr ********
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3629060 errors:0 dropped:42 overruns:0 frame:0
TX packets:1464203 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4814646608 (4.4 GiB) TX bytes:145275724 (138.5 MiB)
wlan0 Link encap:Ethernet HWaddr ********
inet6 addr: fe80::5e02:14ff:fe06:c260/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43701969 errors:0 dropped:0 overruns:0 frame:0
TX packets:9933329 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:34824147514 (32.4 GiB) TX bytes:14003284806 (13.0 GiB)
wlan1 Link encap:Ethernet HWaddr ********
inet6 addr: fe80::5e02:14ff:fe06:c261/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:596720 errors:0 dropped:0 overruns:0 frame:0
TX packets:730715 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:621498666 (592.7 MiB) TX bytes:884254349 (843.2 MiB)
Is there any way to see cable traffic usage in this case?
Also, what means the numbers for lan1
, lan2
, wan
interfaces if they do not reflect the actual traffic flow over these ports?