Note that there are some explanatory texts on larger screens.

plurals
  1. POsnmpset Object not writable. Why?
    text
    copied!<p>I have been trying to understand how to create a MIB : here what I did so far : </p> <p>I created a MIB, and tried to allocate values to new OID => fail</p> <p>Here is the MIB : </p> <pre><code>TEST-MIB DEFINITIONS ::= BEGIN IMPORTS MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF OBJECT-TYPE, Integer32,MODULE-IDENTITY FROM SNMPv2-SMI; test MODULE-IDENTITY LAST-UPDATED "201112190200Z" ORGANIZATION "blah" CONTACT-INFO "please" DESCRIPTION "I am stuck" REVISION "201112190200Z" DESCRIPTION "initial Draft" ::= { iso org(3) dod(6) internet(1) private(4) enterprises(1) 39106 } testResearch OBJECT IDENTIFIER ::= { test 2 } testVar OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-write STATUS current DESCRIPTION "just for testing" ::= { testResearch 1} -- conformance information testMIBConformance OBJECT IDENTIFIER ::= { test 999 } testMIBCompliances OBJECT IDENTIFIER ::= { testMIBConformance 1 } testMIBGroups OBJECT IDENTIFIER ::= { testMIBConformance 2 } -- compliance statements testMIBCompliance MODULE-COMPLIANCE STATUS current DESCRIPTION "blah." MODULE -- this module MANDATORY-GROUPS { testGroup } ::= { testMIBCompliances 1 } -- units of conformance testGroup OBJECT-GROUP OBJECTS { testVar } STATUS current DESCRIPTION "The draft" ::= { testMIBGroups 1 } END </code></pre> <p>I then </p> <ul> <li>validated this MIB against smilint , </li> <li>put it in ~/.snmp/mibs/</li> <li>have the rwcommunity string for all host, with no OID restriction</li> <li>restarted the snmpd daemon (On Debian)</li> </ul> <p>So far, all good.</p> <p>I then tried to see if the daemon knows about this new enterprise, and I did : </p> <pre><code>snmpwalk -v2c -m +ALL localhost .1.3.6.1.4.1.39106 </code></pre> <p>which outputs : TEST-MIB::test= No Such Object available on this agent at this OID</p> <p>So I guess That snmpd is telling me he can't find anything under this tree, because nothing has been set yet. </p> <p>So I try to set this test variable with snmpset on a shell : </p> <pre><code>snmpset -v2c -m +ALL localhost .1.3.6.1.4.1.39106.2.1 i 111 </code></pre> <p>outputs :</p> <pre><code>Error in packet. Reason: notWritable (That object does not support modification) Failed object: TEST-MIB::testVar </code></pre> <p>I tried as well with : snmpset -v2c -m +ALL localhost .1.3.6.1.4.1.39106.2.1.0 i 111</p> <p>and as root, but with no success</p> <p>But when I do a snmptranslate, I can see that the MIB is parsed correctly : </p> <pre><code> snmptranslate -Td 1.3.6.1.4.1.39106.2.1 TEST-MIB::testVar testVar OBJECT-TYPE -- FROM TEST-MIB SYNTAX Integer32 MAX-ACCESS read-write STATUS current DESCRIPTION "just for testing" ::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) test(39106) testResearch(2) 1 } </code></pre> <p>is it a bug? A known issue?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload