I have a problem with an snmpwalk query returning snmp variables in a non-uniform way:
.1.3.6.1.2.1.10.127.1.3.3.1.2.215 -> Hex-STRING: 24 37 4C 0C 65 0E
.1.3.6.1.2.1.10.127.1.3.3.1.2.216 -> Hex-STRING: 24 37 4C 0B A2 DA
.1.3.6.1.2.1.10.127.1.3.3.1.2.217 -> STRING: "$7L
f:"
.1.3.6.1.2.1.10.127.1.3.3.1.2.218 -> STRING: "$7L
k2"
As you can see, some variables are of a STRING type, others are Hex-STRING. So, I'm trying to write a simple MIB to force them all come out as Hex-STRING. This is where I've gotten so far:
TEST-MIB DEFINITIONS ::= BEGIN
PhysAddress ::= TEXTUAL-CONVENTION
DISPLAY-HINT "1x:"
STATUS current
SYNTAX OCTET STRING
test OBJECT-TYPE
SYNTAX PhysAddresss
MAX-ACCESS read-only
STATUS current
::= { 1 3 6 1 2 1 10 127 1 3 3 1 2 }
END
However, snmpwalk doesn't seem to notice my textual convention (even though the "test" variable is being recognized). I still get a mixture of STIRNGs and Hex-STRINGs. Where is my mistake?
snmpwalk -v2c -cpublic 192.168.1.2 TEST-MIB::test
...
TEST-MIB::test.216 = Hex-STRING: 24 37 4C 0B A2 DA
TEST-MIB::test.217 = STRING: "$7L
f:"
0 Answers