0

I observe a problem with net-snmp while retrieving a subtree with snmpwalk locally:

On the Target Host itself I got a Unknown Object Identifier Error Message.

snmpwalk -v3 -m ALL -M /usr/share/snmp/mibs -n "" -u admin -a SH
A -A "12345678" -x AES -X "12345678" -l authPriv localhost TAINY-MIB::tainyMIBObjects
TAINY-MIB::tainyMIBObjects: Unknown Object Identifier (TAINY-MIB::tainyMIBObjects)

The same snmpwalk from a remote Host to the Target is just working fine:

snmpwalk -v3 -m ALL -M /home/graute/snmp/mibs/ -n "" -u admin -a SHA -A "12345678" -x AES -X "12345678" -l authPriv 192.168.1.8:161 TAINY-MIB::tainyMIBObj
ects                                                                                                                                                                                      
TAINY-MIB::tainyCSQ = INTEGER: 99
TAINY-MIB::tainyLACCID = ""
TAINY-MIB::tainyWirelessWANIP = ""
TAINY-MIB::tainyAccessTechnology = INTEGER: 0

I double checked that the MIB files exists on the target machine in /usr/share/snmp/mibs. I copied these files directly form the remote hosts. I also using the -M option

Somebody a clue whats going wrong here?

k1eran
  • 4,492
  • 8
  • 50
  • 73
Oliver G.
  • 227
  • 5
  • 17

2 Answers2

0

On the first version snmpwalk can't find the symbol in the MIBs you are providing, before trying to contact the SNMP agent.

Try snmptranslate -m ALL -M /usr/share/snmp/mibs -On TAINY-MIB::tainyMIBObjects and I expect that you won't get a lookup in the MIB, whereas it will work on the other host.

If so, check the -M path for the local MIBs lookup and ensure the MIB files identical in both environments (e.g. both files contain the symbol you are looking for)

k1eran
  • 4,492
  • 8
  • 50
  • 73
  • I checked that both files are identical and both files contain the tainyMIBObjects but its still not working on the Target – Oliver G. Jun 24 '15 at 09:48
  • Does snmptranslate work on both (that does not involve contacting the agent )? – k1eran Jun 24 '15 at 09:57
  • On the target the snmptranslate don´t work with same error , but it work from the host side – Oliver G. Jun 24 '15 at 11:06
  • Is every file in the two directories identical? What happens if you do 'grep tainyMIBObjects *' in each ? – k1eran Jun 24 '15 at 13:29
  • I got on the host and the target the same output grep tainyMIBObjects * TAINY-MIB.txt:tainyMIBObjects OBJECT IDENTIFIER ::= { tainyMIB 1 } TAINY-MIB.txt: ::= { tainyMIBObjects 1 } ... TAINY-MIB.txt: ::= { tainyMIBObjects 52 } – Oliver G. Jun 24 '15 at 13:57
0

The reason for the problem above was the wrong compile option

--disable-mib-loading

instead of

--enable-mib-loading

changing this fixed my problem.

Oliver G.
  • 227
  • 5
  • 17