3

I can ask to a snmp agent the query:

snmpwalk -v2c -c public 192.168.56.70 1.3.6.1.2.1.31.1.1.1.1.1

I recieve "lo" (loopback interface) as the answer. My question is: How I can access that OID through the names instead of using the OID numbers? That should be as follows:

snmpwalk -v2c -c public 192.168.56.70 iso.identified-organization.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName

If I send this last query to the snmp agent, i get "Unknown Object Identification". Which changes should I do in the snmp agent configuration to get the same answer as when I am asking through the OID?

Any help will be appreciated, thanks!

Jolta
  • 2,620
  • 1
  • 29
  • 42
Antoni
  • 2,071
  • 2
  • 24
  • 31

1 Answers1

3

Normally I'd use the simple symbolic name e.g.

snmptranslate -M+. -m +ALL   1.3.6.1.2.1.31.1.1.1.1.1     
IF-MIB::ifName.1

From the agent's perspective the next two are the same, i.e. the netsnmp snmpwalk utility handles the symbol translations.

snmpwalk -v2c -c public 192.168.56.70  1.3.6.1.2.1.31.1.1.1.1.1 
IF-MIB::ifName.1 = STRING: lo

Symbol version :

snmpwalk -v2c -c public 192.168.56.70   IF-MIB::ifName.1        
IF-MIB::ifName.1 = STRING: lo

Include the MIB files if they're not in your default path -M+. -m +ALL

snmpwalk -v2c   -c public vvx1   IF-MIB::ifName.1    
IF-MIB::ifName.1 = STRING: lo
k1eran
  • 4,492
  • 8
  • 50
  • 73