Traffic from ports in bridge via snmp

Hello!
How to get some info from lan interfaces included in bridge?
For example, in Mikrotik, I can take channel load from any interface, but in owrt there is only the logical interface of the bridge itself, and there are simply no physical ones to choose from.

In version 22, I see SNMP for each port as well.

screen103

not all, there is lan3 and and lan4?
or your router have only 2 lan ports?

It has 3, I didn't picture them all for space reasons. It's just an example to show it works.

(Just because it has more, doesn't mean one monitors them all anyway.)

1 Like

i have 2 different routers with OpenWrt 22.03.2 on it, and the same behavior here

2

no physical interfaces included in the bridge are shown

dietpi@RockPi:[~]$ snmpwalk -v2c -c trendy 10.0.2.1 | grep eth
iso.3.6.1.2.1.2.2.1.2.18 = STRING: "eth0.4"
iso.3.6.1.2.1.2.2.1.2.19 = STRING: "eth0.2"
iso.3.6.1.2.1.2.2.1.2.20 = STRING: "eth0.3"
iso.3.6.1.2.1.25.3.2.1.3.262150 = STRING: "network interface eth0"
iso.3.6.1.2.1.25.3.2.1.3.262151 = STRING: "network interface eth1"
iso.3.6.1.2.1.25.3.2.1.3.262152 = STRING: "network interface eth2"
iso.3.6.1.2.1.25.3.2.1.3.262153 = STRING: "network interface eth3"
iso.3.6.1.2.1.25.3.2.1.3.262154 = STRING: "network interface eth4"
iso.3.6.1.2.1.25.3.2.1.3.262162 = STRING: "network interface eth0.4"
iso.3.6.1.2.1.25.3.2.1.3.262163 = STRING: "network interface eth0.2"
iso.3.6.1.2.1.25.3.2.1.3.262164 = STRING: "network interface eth0.3"
iso.3.6.1.2.1.31.1.1.1.1.6 = STRING: "eth0"
iso.3.6.1.2.1.31.1.1.1.1.7 = STRING: "eth1"
iso.3.6.1.2.1.31.1.1.1.1.8 = STRING: "eth2"
iso.3.6.1.2.1.31.1.1.1.1.9 = STRING: "eth3"
iso.3.6.1.2.1.31.1.1.1.1.10 = STRING: "eth4"
iso.3.6.1.2.1.31.1.1.1.1.18 = STRING: "eth0.4"
iso.3.6.1.2.1.31.1.1.1.1.19 = STRING: "eth0.2"
iso.3.6.1.2.1.31.1.1.1.1.20 = STRING: "eth0.3"

Seems to identify them fine. eth0 and eth2-4 belong to br-lan bridge.

1 Like

thanks for answer.
it looks like owrt thinks that all ports in the bridge group are one device, because I don't see lan2-4 in the output

root@OpenWrt:~# ifconfig | grep eth
eth0      Link encap:Ethernet  HWaddr 4C:60:DE:D1:5B:35  
eth1      Link encap:Ethernet  HWaddr 4C:60:DE:D1:5B:34  
eth1.1    Link encap:Ethernet  HWaddr 4C:60:DE:D1:5B:34

is it possible to somehow change this behavior or are these features of the operating system operation with specific switch chips ?

If the interfaces are labeled lan why do you grep for eth?

1 Like

They're not listed as in a bridge in SNMP, they're PHYs.

As noted, they're lan - not eth.

ok ok.

root@OpenWrt:~# ifconfig | grep lan
br-lan    Link encap:Ethernet  HWaddr 4C:60:DE:D1:5B:34  
wlan0     Link encap:Ethernet  HWaddr 4C:60:DE:D1:5B:36

no separate lan ports only logical entity of bridge

  • How is this related to SNMP?
  • What device do you have?
  • What version of OpenWrt are you running?

as I wrote in the first message, I don't understand why snmp doesn't give me values from lan ports included in the bridge, although it is possible in other operating systems

  • What you're doing isn't related to SNMP - perform an SNMP lookup with e.g. snmpwalk
  • Please answer other questions

2 netgear routers
wndr 2200
wnr3700 v1
owrt 22.03.2 on both

┌─[✗]─[igor@pc]─[~]
└──╼ $snmpwalk -v2c -c public 192.168.209.150 | grep eth
iso.3.6.1.2.1.2.2.1.2.2 = STRING: "eth0"
iso.3.6.1.2.1.2.2.1.2.3 = STRING: "eth1"
iso.3.6.1.2.1.2.2.1.2.10 = STRING: "eth1.1"
iso.3.6.1.2.1.25.3.2.1.3.262146 = STRING: "network interface eth0"
iso.3.6.1.2.1.25.3.2.1.3.262147 = STRING: "network interface eth1"
iso.3.6.1.2.1.25.3.2.1.3.262154 = STRING: "network interface eth1.1"
iso.3.6.1.2.1.31.1.1.1.1.2 = STRING: "eth0"
iso.3.6.1.2.1.31.1.1.1.1.3 = STRING: "eth1"
iso.3.6.1.2.1.31.1.1.1.1.10 = STRING: "eth1.1"
┌─[igor@pc]─[~]
└──╼ $snmpwalk -v2c -c public 192.168.209.150 | grep lan
iso.3.6.1.2.1.2.2.1.2.9 = STRING: "br-lan"
iso.3.6.1.2.1.2.2.1.2.11 = STRING: "wlan0"
iso.3.6.1.2.1.25.3.2.1.3.262153 = STRING: "network interface br-lan"
iso.3.6.1.2.1.25.3.2.1.3.262155 = STRING: "network interface wlan0"
iso.3.6.1.2.1.31.1.1.1.1.9 = STRING: "br-lan"
iso.3.6.1.2.1.31.1.1.1.1.11 = STRING: "wlan0"

I assume that owrt simply cannot work with individual ports included in this kind of switch chips.
if there are owners of these routers out where, they can confirm / refute this statement.

From: https://openwrt.org/toh/netgear/wnr2200

Atheros AR7241

From: https://openwrt.org/toh/netgear/wndr3700

SoC: Atheros AR7161

I have a MediaTek-based chip. I don't think all Atheros devices were migrated to DSA, I have a few that still use swconfig (WD MyNet N750 for example - using an AR9344 SoC).

2 Likes

yes, looks like Atheros AR7241 and Atheros AR7161 doesnt have DSA support (thats why a dont have lan 2-4 interfaces in my system)

thank you!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.