Snmpwalk working with OID but not with MIB name

snmp

I've an issue with SNMP walk. I'm using snmpsim (http://snmpsim.sourceforge.net/) to simulate a SNMP device for testing purposes. The simulated oids are working:

root@snmp-simulator:~# snmpwalk -v1 -c bras localhost:161 .1.3.6.1.2.1.2.2.1.6.8
iso.3.6.1.2.1.2.2.1.6.8 = STRING: "4:f9:38:81:db:20"

But if I try to use the MIB it does not work:

root@snmp-simulator:~# snmptranslate -On -IR IF-MIB::ifPhysAddress.8
.1.3.6.1.2.1.2.2.1.6.8

root@snmp-simulator:~# snmpwalk -v1 -c bras localhost:161 IF-MIB::ifPhysAddress.8 -d

Sending 43 bytes to UDP: [127.0.0.1]:161->[0.0.0.0]:0
0000: 30 29 02 01  00 04 04 62  72 61 73 A1  1E 02 04 5E    0).....bras....^
0016: 54 C7 4B 02  01 00 02 01  00 30 10 30  0E 06 0A 2B    T.K......0.0...+
0032: 06 01 02 01  02 02 01 06  08 05 00                    ...........


Received 59 byte packet from UDP: [127.0.0.1]:161->[0.0.0.0]:59367
0000: 30 39 02 01  00 04 04 62  72 61 73 A2  2E 02 04 5E    09.....bras....^
0016: 54 C7 4B 02  01 00 02 01  00 30 20 30  1E 06 0A 2B    T.K......0 0...+
0032: 06 01 02 01  02 02 01 06  09 04 10 34  3A 66 39 3A    ...........4:f9:
0048: 33 38 3A 38  31 3A 64 62  3A 35 32                    38:81:db:52


Sending 43 bytes to UDP: [127.0.0.1]:161->[0.0.0.0]:0
0000: 30 29 02 01  00 04 04 62  72 61 73 A0  1E 02 04 5E    0).....bras....^
0016: 54 C7 4C 02  01 00 02 01  00 30 10 30  0E 06 0A 2B    T.L......0.0...+
0032: 06 01 02 01  02 02 01 06  08 05 00                    ...........


Received 59 byte packet from UDP: [127.0.0.1]:161->[0.0.0.0]:59367
0000: 30 39 02 01  00 04 04 62  72 61 73 A2  2E 02 04 5E    09.....bras....^
0016: 54 C7 4C 02  01 00 02 01  00 30 20 30  1E 06 0A 2B    T.L......0 0...+
0032: 06 01 02 01  02 02 01 06  08 04 10 34  3A 66 39 3A    ...........4:f9:
0048: 33 38 3A 38  31 3A 64 62  3A 32 30                    38:81:db:20

IF-MIB::ifPhysAddress.8 = STRING: 34:3a:66:39:3a:33:38:3a:38:31:3a:64:62:3a:32:30

Any idea of why I get wrong format on the output? It looks like the format is not understood?

Thanks,
Ignacio.

Best Answer

I managed to solve it by changing the data type in the snmpsim configuration file. Instead of STRING is had to be HEX STRING (4x) and the MAC address has to be specified without ":" just plain text bytes.

Related Topic