OpenWrt Forum Archive

Topic: snmpd and WallWatcher (Bandwith Reporting)

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Has anyone had any luck getting WallWatcher to querry OpenWRT via snmp (for bandwith reporting)? I have snmpd installed and configured, but when I go into WallWatcher's bandwith setup screen and select "Test snmp" I get this error:

Your router did not respond to this test, or didn't provide the expected information. Some possible reasons:

WW has the wrong LAN address for the router (I know this is not the issue as I am receiving router messages)

The low-order digit of the OID's for 'RECEIVED' and 'SENT' may be wrong (most likely the problem)

Your software firewall may be blocking this type of communication between WW and the router (turned it off, but the problem persisted)

The router may not support SNMP, or the bandwith usage portion of SNMP (possible the bandwith usage portion)

The router's SNMP option has not been enabled (verified snmpd was loaded with ps)

One thing I did try is that I noticed that WallWatcher defaults to port 514 for Linksys routers. A little resarch showed that snmpd defaults to port 161 so I went back and loaded snmpd with a 514 port option, but no luck. WW uses the following default OID's:

Up Time: 1.3.6.1.2.1.1.3.0
Received: 1.3.6.1.2.2.1.10.8
Sent: 1.3.6.1.2.1.2.2.1.16.8

Does anyone happen to know what theses OID's are for the snmpd implementation for OpenWRT, or is there a MIB walker available for OpenWRT so I can look them up myself?

TIA,
Jon

Well,
I guess I have a config issue with snmpd. The reason I say this is that I found a MIB Walker, but it can not connect to OpenWRT at all. I tried setting it for SNMP versions 1,2, and 3 and it barfed on all of them. Does anyone know of some good documentation for configuring snmpd?

TIA,
Jon

Ah Ha,
I finally got the MIB Browser working with snmpd and OpenWRT. My problem with snmpd and WallWatcher is with the OID's. While
Up Time: 1.3.6.1.2.1.1.3.0 is correct, both Received: 1.3.6.1.2.2.1.10.8 and Sent: 1.3.6.1.2.1.2.2.1.16.8 are not (at least not for snmpd). With the MIB browser Iwas able to determine that Received should be: 1.3.6.1.2.2.1.10.2 and Sent should be: 1.3.6.1.2.1.2.2.1.16.2. After making these changes, WallWatcher is polling bandwith usage perfectly.

Jon

It really depends on what you want to watch. For instance if I walk .1.3.6.1.2.1.2.2.1.2 to get the list of interfaces on my WRT54G v2.0 running WR2 I get:

ifDesc:

$ snmpwalk -v 1 -c public 172.16.214.1 .1.3.6.1.2.1.2.2.1.2
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: eth1
IF-MIB::ifDescr.4 = STRING: br0
IF-MIB::ifDescr.5 = STRING: vlan0
IF-MIB::ifDescr.6 = STRING: vlan1
IF-MIB::ifDescr.7 = STRING: vlan2

And their corresponding counters:

InOctects:

$ snmpwalk -v 1 -c public 172.16.214.1 .1.3.6.1.2.1.2.2.1.10
IF-MIB::ifInOctets.1 = Counter32: 34919
IF-MIB::ifInOctets.2 = Counter32: 3418733486
IF-MIB::ifInOctets.3 = Counter32: 272806605
IF-MIB::ifInOctets.4 = Counter32: 292981951
IF-MIB::ifInOctets.5 = Counter32: 353848870
IF-MIB::ifInOctets.6 = Counter32: 2539403973
IF-MIB::ifInOctets.7 = Counter32: 4094636584

OutOctets:

$ snmpwalk -v 1 -c public 172.16.214.1 .1.3.6.1.2.1.2.2.1.16
IF-MIB::ifOutOctets.1 = Counter32: 34919
IF-MIB::ifOutOctets.2 = Counter32: 837082960
IF-MIB::ifOutOctets.3 = Counter32: 490178364
IF-MIB::ifOutOctets.4 = Counter32: 47115862
IF-MIB::ifOutOctets.5 = Counter32: 4225467920
IF-MIB::ifOutOctets.6 = Counter32: 485563962
IF-MIB::ifOutOctets.7 = Counter32: 421019200

Which means if I wanted to watch my external public interface (vlan1) the OIDs would be:

InOctets for vlan1:
.1.3.6.1.2.1.2.2.1.10.6
OutOctets for vlan1:
.1.3.6.1.2.1.2.2.1.16.6

http://voidmain.is-a-geek.org/cacti/graph_image.php?local_graph_id=16&rra_id=1

The discussion might have continued from here.