All the Ethernet switches and access points on my network provide snmp access to the bridge learn table except for my linux-based bridge.

Does net-snmp support exporting the bridge forwarding database via snmp? This is BRIDGE-MIB defined in RFC 1493 (or even better, Q-BRIDGE-MIB defined in RFC2674). What snmpd configuration options are needed to make this work? Do I need to build and deploy some of the optional agents?

Is there a better way to remotely gather the information displayed by brctl showmacs br0 (specifically, the list of learned MAC addresses and the port number via which each is reachable)?

  • I really don't know how to do this and have been interesting in how to extend SNMPD for some time, just haven't put effort into it yet. This link seems promising, let me know how you make out. net-snmp.org/wiki/index.php/TUT:Using_and_loading_MIBS – SpacemanSpiff Jan 29 '11 at 16:54
  • @SpacemanSpiff: I've seen that link, but it seems only to describe how to use MIBs with the client tools to format output. The server tools don't seem to use the MIB files at all (and that makes sense, since they need per-OID logic to supply the data, not just the formatting data provided from the MIB). – Ben Voigt Jan 29 '11 at 16:59
  • That makes sense to me, mibs are for making sense of output, not creating it. Keep us posted. – SpacemanSpiff Jan 29 '11 at 18:31

I also found this man page: http://linux.die.net/man/1/snmp-bridge-mib

It might be another implementation that might even work.

It seems OpenVSwitch does better in that aspect.

  • snmp-bridge-mib is provided with net-snmp, still strugling with how to start it properly tho – NiKiZe Jun 18 '19 at 20:39

I found one agent. https://sourceforge.net/projects/q-bridge-mib/

It has to be compiled with scons, "agentx master" mode has to be enabled in snmpd.conf, and then the q-bridge-mib executable can be launched. It daemonizes itself and happily runs in the background supplying the dot1d subtree.

Then it works.... sort of. The port column of the forwarding table is definitely not being populated correctly. But it's still under development and source code is available, so maybe I can figure out what's going wrong.

I'd still be interested in a more mature implementation if anyone knows of one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.