Question regarding SNMP GET Response PDU - SNMP

This is a discussion on Question regarding SNMP GET Response PDU - SNMP ; Hi All, I have one basic question regarding SNMPv2 GET response PDU. Suppose manager has queried for 3 attributes say v1, v2, v3, v4 Now suppose the response for the attributes are as follows. V1 success V2 error (No Such ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Question regarding SNMP GET Response PDU

  1. Question regarding SNMP GET Response PDU



    Hi All,



    I have one basic question regarding SNMPv2 GET response PDU.

    Suppose manager has queried for 3 attributes say v1, v2, v3, v4

    Now suppose the response for the attributes are as follows.



    V1 success

    V2 error (No Such instance)

    V3 error (No such instance)

    V4 success

    Now in response PDU error index will be set to 2. So how manager will
    come to know that v2 and v3 has error in response?

    For v2 the error index is set but how manger will come to know about
    v3 error?



    Please provide some inputs.





    Regards,

    Somenath

  2. Re: Question regarding SNMP GET Response PDU

    Hi somenath,

    This all depends on which version of the SNMP protocol you're using.
    If you are using SNMP v1, then in this case the error is global
    (noSuchName) and there will be a global errorStatus=noSuchName and
    a global errorIndex=2. In that case you can't know whether any other
    value is valid. You can only know that there was a noSuchName error
    for the varbind at position 2.

    If you are using an SNMP toolkit which has a smart manager API,
    the manager can then reemit the same GET request, omitting the variable
    for which there was an error: SNMP GET (v1, v3, v4).
    At this point it will get a new error response with
    errorStatus=noSuchName and errorIndex=2 (v3 is now at position 2).
    He can then reemit the request, with v3 omitted: SNMP GET (v1, v4) for
    which he will receive a succesful response containing these two values.

    Note that the algorithm above is not a standard, it simply describes how
    an application/toolkit can handle v1 errors.

    If you are using SNMPv2/v3 then the error in case of 'unknown' OIDs
    is not global - but is stored in the varbind for which the OID was not
    found. It can be either noSuchInstance or noSuchObject - refer to
    the RFCs for the distinction. These are special values (tagged
    Null values) which are placed in the varbind in place of the requested
    value.
    In that case there would be no global errorStatus: the Manager will
    receive an SNMP v2 PDU response with errorStatus=noError and
    errorIndex=0.
    The manager will then examine the list of varbinds returned and will
    find:
    v1 -> value of v1
    v2 -> noSuchInstance
    v3 -> noSuchInstance
    v4 -> value of v4.

    Hope this helps,

    -- daniel
    http://blogs.sun.com/jmxetc/tags/snmp

    somenath wrote:
    >
    > Hi All,
    >
    >
    >
    > I have one basic question regarding SNMPv2 GET response PDU.
    >
    > Suppose manager has queried for 3 attributes say v1, v2, v3, v4
    >
    > Now suppose the response for the attributes are as follows.
    >
    >
    >
    > V1 success
    >
    > V2 error (No Such instance)
    >
    > V3 error (No such instance)
    >
    > V4 success
    >
    > Now in response PDU error index will be set to 2. So how manager will
    > come to know that v2 and v3 has error in response?
    >
    > For v2 the error index is set but how manger will come to know about
    > v3 error?
    >
    >
    >
    > Please provide some inputs.
    >
    >
    >
    >
    >
    > Regards,
    >
    > Somenath


  3. Re: Question regarding SNMP GET Response PDU

    On Dec 4, 3:04 pm, Daniel FUCHS
    wrote:
    > Hi somenath,
    >
    > This all depends on which version of the SNMP protocol you're using.
    > If you are using SNMP v1, then in this case the error is global
    > (noSuchName) and there will be a global errorStatus=noSuchName and
    > a global errorIndex=2. In that case you can't know whether any other
    > value is valid. You can only know that there was a noSuchName error
    > for the varbind at position 2.
    >
    > If you are using an SNMP toolkit which has a smart manager API,
    > the manager can then reemit the same GET request, omitting the variable
    > for which there was an error: SNMP GET (v1, v3, v4).
    > At this point it will get a new error response with
    > errorStatus=noSuchName and errorIndex=2 (v3 is now at position 2).
    > He can then reemit the request, with v3 omitted: SNMP GET (v1, v4) for
    > which he will receive a succesful response containing these two values.
    >
    > Note that the algorithm above is not a standard, it simply describes how
    > an application/toolkit can handle v1 errors.
    >
    > If you are using SNMPv2/v3 then the error in case of 'unknown' OIDs
    > is not global - but is stored in the varbind for which the OID was not
    > found. It can be either noSuchInstance or noSuchObject - refer to
    > the RFCs for the distinction. These are special values (tagged
    > Null values) which are placed in the varbind in place of the requested
    > value.
    > In that case there would be no global errorStatus: the Manager will
    > receive an SNMP v2 PDU response with errorStatus=noError and
    > errorIndex=0.
    > The manager will then examine the list of varbinds returned and will
    > find:
    > v1 -> value of v1
    > v2 -> noSuchInstance
    > v3 -> noSuchInstance
    > v4 -> value of v4.
    >
    > Hope this helps,
    >
    > -- danielhttp://blogs.sun.com/jmxetc/tags/snmp
    >
    >
    >
    > somenath wrote:
    >
    > > Hi All,

    >
    > > I have one basic question regarding SNMPv2 GET response PDU.

    >
    > > Suppose manager has queried for 3 attributes say v1, v2, v3, v4

    >
    > > Now suppose the response for the attributes are as follows.

    >
    > > V1 success

    >
    > > V2 error (No Such instance)

    >
    > > V3 error (No such instance)

    >
    > > V4 success

    >
    > > Now in response PDU error index will be set to 2. So how manager will
    > > come to know that v2 and v3 has error in response?

    >
    > > For v2 the error index is set but how manger will come to know about
    > > v3 error?

    >

    Many Thanks for this information .

+ Reply to Thread