Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:"
share|improve this question

1 Answer 1

Not an answer really, but have a look at MIB validator - it can help you verify your MIB.

share|improve this answer
    
You should post it as a comment to the question! –  Marko Oct 21 '12 at 17:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.