Strange results from snmpwalk and snmpget

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
cousinscuzzy
Posts: 11
Joined: Tue Jan 30, 2007 3:32 pm

Strange results from snmpwalk and snmpget

Post by cousinscuzzy »

I came across this problem while trying to debug my cacti graphs. Very basic stuff here... When I query a remote system for its interfaces' in/out octets with snmpwalk I get the same value for the first three interfaces:

Code: Select all

me@cacti:~> snmpwalk -v2c -c mycomm myhost.mydomain.com interfaces.ifTable.ifEntry.ifDescr
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: eth1
IF-MIB::ifDescr.4 = STRING: sit0
me@cacti:~> snmpwalk -v2c -c mycomm myhost.mydomain.com interfaces.ifTable.ifEntry.ifInOctets
IF-MIB::ifInOctets.1 = Counter32: 125628666
IF-MIB::ifInOctets.2 = Counter32: 125628666
IF-MIB::ifInOctets.3 = Counter32: 125628666
IF-MIB::ifInOctets.4 = Counter32: 0
snmpget seems to indicate that this is the counter for the loopback interface, as eth0 returns zero:

Code: Select all

me@cacti:~> snmpget -v2c -c mycomm myhost.mydomain.com interfaces.ifTable.ifEntry.ifInOctets.1
IF-MIB::ifInOctets.1 = Counter32: 125654554
me@cacti:~> snmpget -v2c -c mycomm myhost.mydomain.com interfaces.ifTable.ifEntry.ifInOctets.2
IF-MIB::ifInOctets.2 = Counter32: 0
Yet a java MIB browser returns the correct results:

Image

I'm new to SNMP so I'm sure I'm doing something wrong, but I'm stumped on this...
cousinscuzzy
Posts: 11
Joined: Tue Jan 30, 2007 3:32 pm

More info - buggy snmpwalk?

Post by cousinscuzzy »

I captured the network traffic during an snmpwalk attempt that was returning bad results and found that the traffic over the wire was correct. Apparently snmpwalk is just displaying the results incorrectly. This is really odd because I've tried it from two different hosts using two different versions of net-snmp and they behaved identically.

On the other hand, snmpwalk on the system being queried returns (and displays) the correct results.

The network capture was done on the host being queried though... Maybe UDP traffic is being interfered with on the network somehow? I'll try a capture on the other end and see what I get.
cousinscuzzy
Posts: 11
Joined: Tue Jan 30, 2007 3:32 pm

Same results on other end

Post by cousinscuzzy »

I see the same result when I capture the network traffic on the querying host. I'm baffled. :-?
cousinscuzzy
Posts: 11
Joined: Tue Jan 30, 2007 3:32 pm

Same with TCP

Post by cousinscuzzy »

Just for kicks I tried with TCP instead of UDP and got the same result.
cousinscuzzy
Posts: 11
Joined: Tue Jan 30, 2007 3:32 pm

Finally figured it out

Post by cousinscuzzy »

The version of net-snmp I was using on the monitored host was buggy. It's running SuSE 10.0 x86_64 and had net-snmp-5.2.1-10 installed. I upgraded this to 5.3.0.1-42.3 and it's working now. I had to uninstall the hplip rpm which had a dependency on libnetsmp.so.5 before I could do the upgrade.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest