Port status data incorrect or do i have a swtich issue?

I have something strange since I installed 23.05.0 on my ASUS RT-AC68U and R7800 APs. On the RT-AC68U i get now the following overview:

I use the device just as managed switch (no wifi). However, on port "lan2" I see that there is 1.2 GiB down. But where is the data going?!? Lan 2 is my networks backbone which goes to one of the two R7800.

Is this a mistake on the R7800 and it is sending data down the link which ends up nowhere?

How can I check?

everything seems correct...

everything works ?

For your case the numbers add up more or less, but I see a lot of data arriving at the switch that ends up going nowhere...

everything works ?

do you have some kind of malfunction?


test connection pc --> internet (ping -c 5

test connection pc --> router (ping -c 5 gateway)

test connection pc --> switch (if possible ping -c 5 192.168.1.x switch)

1 Like

See here:

and I add: since it's a switch, the traffic doesn't pass the kernel by design. I don't know where the numbers come from, some switches provide per-port statistics that can be fetched. The old swconfig tool showed per-port packet counters, the DSA implementation might or might not be able to fetch it.

On my ipq40xx device, I also have a mismatch of a few GiB that I can't explain with pure wireless traffic. On my realtek-switches, only the traffic to the switch seems to be counted, i.e. I only see a few kB per port.

That said: Your port lan2 seems to be part of four different zones (four different colors), what happens with this traffic on the device?


The data is available via ethtool -S, but it is named differently depending on the switch driver:

  • rtl83xx: ifInOctets / ifOutOctets
  • qca8k: RxGoodByte / TxByte
  • mt7530: RxBytes / TxBytes

I checked flow offloading is off.

Ok to explain the topology. I have a NanaPi R4S router. That is connected to a "dumb" R7800 AP. That AP is connected to the ASUS RT-AC68U (used as managed switch) and to another "dumb" R7800 AP. the connections between the router, APs and switch all carry the 4 VLANs. Currently on the switch I just use 2 of them, the green one and the management VLAN (to have access to the settings). The other two are unused on the switch (they are used on the APs). So having those two VLANs on the switch is kinda useless, but I may use them later on if i decide to connect something else on the device.
Regardless, that should not lead to extra traffic as the switch on the R7800 should only forward traffic which has the destination on the switch. Right?

This is the output from the RT-AC68U.

root@OpenWrt5:~#  ethtool -S lan2
NIC statistics:
     tx_packets: 284727
     tx_bytes: 33420063
     rx_packets: 2992481
     rx_bytes: 1913003844
     TxOctets: 143042572
     TxDropPkts: 0
     TxBroadcastPkts: 61913
     TxMulticastPkts: 321501
     TxUnicastPkts: 449051
     TxCollisions: 0
     TxSingleCollision: 0
     TxMultipleCollision: 0
     TxDeferredTransmit: 0
     TxLateCollision: 0
     TxExcessiveCollision: 0
     TxPausePkts: 0
     RxOctets: 2265378756
     RxUndersizePkts: 0
     RxPausePkts: 0
     Pkts64Octets: 1896933
     Pkts65to127Octets: 751137
     Pkts128to255Octets: 423472
     Pkts256to511Octets: 403474
     Pkts512to1023Octets: 212770
     Pkts1024to1522Octets: 1147218
     RxOversizePkts: 0
     RxJabbers: 0
     RxAlignmentErrors: 0
     RxFCSErrors: 0
     RxGoodOctets: 2265378756
     RxDropPkts: 0
     RxUnicastPkts: 316957
     RxMulticastPkts: 2968056
     RxBroadcastPkts: 1549991
     RxSAChanges: 1759751
     RxFragments: 0
     RxJumboPkts: 0
     RxSymbolErrors: 0
     RxDiscarded: 1419545

It seems it is still happening...

I dont know how i can do the same for the R7800. ifconfig -a does not list the individual ports on the switch.

Thanks for the clarification! Do you happen to know what counters the LuCI overview shows? On my realtek-switch, the numbers in LuCI match the numbers shown in ifconfig, but ifInOctets / ifOutOctets don't match (but tx_bytes and rx_bytes).

So the followup-question is actually: What's the difference between tx_bytes / rx_bytes and ifInOctets / ifOutOctets?

Then the R8700 is probably not yet converted to DSA? Does swconfig produce some output?

Thank you for the reply. This is the output of swconfig:

root@OpenWrt:~# swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
        ar8xxx_mib_poll_interval: 0
        ar8xxx_mib_type: 0
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        mirror_monitor_port: 0
        mirror_source_port: 0
        arl_age_time: 300
        arl_table: address resolution table
Port 1: MAC xxxxxxx
Port 1: MAC 0xxxxxxx
Port 1: MAC xxxxxxx
Port 3: MAC xxxxxxx
Port 3: MAC xxxxxxx
Port 3: MAC xxxxxxx
Port 4: MAC dxxxxxxx
Port 6: MAC xxxxxxx
Port 6: MAC xxxxxxx
Port 6: MAC xxxxxxx
Port 6: MAC xxxxxxx
Port 6: MAC xxxxxxxx
Port 6: MAC xxxxxxxxxx
Port 6: MAC xxxxxxxxxxxx
Port 6: MAC 0c:xxxxxxx
Port 6: MAC 48:xxxxxxx
Port 6: MAC 20:xxxxxxxx
Port 6: MAC 88:xxxxxxx

        igmp_snooping: 0
        igmp_v3: 0
Port 0:
        mib: ???
        enable_eee: ???
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:0 link:up speed:1000baseT full-duplex
Port 1:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:1 link:up speed:1000baseT full-duplex txflow rxflow auto
Port 2:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 5
        link: port:2 link:down
Port 3:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:3 link:up speed:1000baseT full-duplex txflow rxflow auto
Port 4:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:4 link:up speed:1000baseT full-duplex auto
Port 5:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:5 link:down
Port 6:
        mib: ???
        enable_eee: ???
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:6 link:up speed:1000baseT full-duplex
        vid: 1
        ports: 1t 3t 4t 6t
        vid: 3
        ports: 1t 3t 4t 6t
        vid: 4
        ports: 1t 3t 4t 6t
        vid: 5
        ports: 1t 2 3t 4t 6t

I was thinking, maybe they are multicast packets, but 600 MB a day seems a bit excessive....