Re: snmpset gives different error reasons for v1 and v2c

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAKoMtGbQgKmiiZdFybR6cQt_0-8HyHKJ=hWnRKi77wx2LOe+zA@mail.gmail.com>
On 25 October 2011 13:17, ashok kumar <[email protected]> wrote:
> While I am trying snmpset with -v1 and -v2c, I am getting different
> reasons for errors.....
>
> Why am I getting noSuchName for -v1?

Because that is the defined behaviour for SNMPv1.
See RFC 1157, section 4.1.5, step (1)


>             I believe the error reason should be noAccess as
> in the -v2 case.

Except that 'noAccess' is not one of the SNMPv1 error reasons.

>From the definition of PDU in the same RFC (section 5):

          PDU ::=
                  SEQUENCE {
                     request-id
                          INTEGER,

                      error-status      -- sometimes ignored
                          INTEGER {
                              noError(0),
                              tooBig(1),
                              noSuchName(2),
                              badValue(3),
                              readOnly(4),
                              genErr(5)
                          },

Those are the only possible error responses.
'noAccess' is not one of them.

This was one of the changes introduced with SNMPv2

Dave

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.