Difference between revisions of "Template:FAQ:Applications 12"

From Net-SNMP Wiki
Jump to: navigation, search
(5.4 release synchronisation)
Line 1: Line 1:
 +
<!-- NB:
 +
  There is a mismatch between the template numbering
 +
  for this entry, and the FAQ entries that refer to it.
 +
  This follows a re-ordering of the entries in the
 +
  Applications section.
 +
-->
 
This is actually the same as the previous question - it just isn't
 
This is actually the same as the previous question - it just isn't
 
particularly obvious, particularly when using SNMPv1.  A typical
 
particularly obvious, particularly when using SNMPv1.  A typical
Line 6: Line 12:
 
         system.sysLocation.0 = somewhere nearby
 
         system.sysLocation.0 = somewhere nearby
 
         <BR>
 
         <BR>
         $ snmpset -v1 -c public localhost system.sysLocation.0 s "right here"
+
         $ snmpset -v1 -c public localhost
 +
                system.sysLocation.0 s "right here"
 
         Error in packet.
 
         Error in packet.
 
         Reason: (noSuchName) There is no such variable name in this MIB.
 
         Reason: (noSuchName) There is no such variable name in this MIB.
Line 13: Line 20:
 
Trying the same request using SNMPv2 or above is somewhat more informative:
 
Trying the same request using SNMPv2 or above is somewhat more informative:
  
         $ snmpset -v 2c -c public localhost system.sysLocation.0 s "right here"
+
         $ snmpset -v 2c -c public localhost
 +
                system.sysLocation.0 s "right here"
 
         Error in packet.
 
         Error in packet.
 
         Reason: notWritable
 
         Reason: notWritable
  
The SNMPv1 error <CODE>'noSuchName'</CODE> actually means:  "You can't do that to this variable"
+
The SNMPv1 error <CODE>'noSuchName'</CODE> actually means:  "You can't do that to this variable" rather than "this variable doesn't exist".  It may be the case that it doesn't exist at all.  It may exist but you don't have access to it (although someone else with different administrative credentials might do). Or it may exist, but you simply can't perform that particular operation (e.g. changing it).
  
This might be because the variable doesn't exist, it does exist but
 
you don't have access to it (but someone else may do), or it exists
 
but you can't perform that particular operation (i.e. changing it).
 
 
Similarly, the SNMPv2 error <CODE>'notWritable'</CODE> means "not writable in
 
Similarly, the SNMPv2 error <CODE>'notWritable'</CODE> means "not writable in
 
this particular case" rather than "not writable under any circumstances".
 
this particular case" rather than "not writable under any circumstances".
Line 27: Line 32:
 
If you are sure that the object is writable (and has been implemented
 
If you are sure that the object is writable (and has been implemented
 
as such), then you probably need to look at the agent access control.
 
as such), then you probably need to look at the agent access control.
See the AGENT section for more details.
+
See the [[FAQ:Agent|AGENT]] section for more details.

Revision as of 16:04, 28 December 2006

This is actually the same as the previous question - it just isn't particularly obvious, particularly when using SNMPv1. A typical example of this effect would be

       $ snmpget -v1 -c public localhost system.sysLocation.0
       system.sysLocation.0 = somewhere nearby
       
$ snmpset -v1 -c public localhost system.sysLocation.0 s "right here" Error in packet. Reason: (noSuchName) There is no such variable name in this MIB. This name doesn't exist: system.sysLocation.0

Trying the same request using SNMPv2 or above is somewhat more informative:

       $ snmpset -v 2c -c public localhost
               system.sysLocation.0 s "right here"
       Error in packet.
       Reason: notWritable

The SNMPv1 error 'noSuchName' actually means: "You can't do that to this variable" rather than "this variable doesn't exist". It may be the case that it doesn't exist at all. It may exist but you don't have access to it (although someone else with different administrative credentials might do). Or it may exist, but you simply can't perform that particular operation (e.g. changing it).

Similarly, the SNMPv2 error 'notWritable' means "not writable in this particular case" rather than "not writable under any circumstances".

If you are sure that the object is writable (and has been implemented as such), then you probably need to look at the agent access control. See the AGENT section for more details.