Anticipates: Full list of errors xx1Q
Brief notes about fieldsEdit
In standardPDU(protocol data unit) header, there are four field which are request-id, error-status, error-index and variable-bindings. PDU is the unit for data transferring in peer levels. In OSI(open system interconnection) model, in physical layer, PDU is bit, in data link layer, PDU is frame, in network layer, PDU is packet, in transport layer, PDU is segment, in other higher layer, PDU is data.
1.Request-id: It is an integer type set by manager process, which is used to distinguish among outstanding requests by providing each request with a unique ID. It allows manager to match responses to requests. Agent sends “get-response” and sends back its identifier at the same time. Manager can send “get” to multiple agents in UDP. The “response” matches “request” with the request identifier when the “response” returns. Additionally, request-id can check the repeating message introduced by unreliable transport service.
2.Error-status: It is used to indicate that an exception occurred while processing a request and it is integer type as well. There are five main values which are noError(0), tooBig(1), noSuchName(2), badValue(3), readOnly(4) and genErr(5). noError(0) means everything goes right.
tooBig(1) means the size of response message is too big to transport.
noSuchName(2) indicates that a request does not exist.
badValue(3) indicates that an invalid value or syntax is used in “set”.
readOnly(4) demonstrates that manager tries to modify a read-only value.
genErr(5) shows other types of errors. Refer to(Xx1Q).
3.Error-index: It is also an integer type and when error-status is not zero, it may provide additional information by indicating which variable in a list caused the exception. And a variable is an example of a managed object.
4.Variable-bindings: It is a list of variable names of “get” and “set” and their corresponding values. And both of them are encoded in BER(type of variable = OID, type of value = INTEGER). In some cases like GetRequest-PDU, the values are null.
5.Versions: SNMPv1 has five PDUs which are GetRequest, GetNextRequest, SetRequest, GetResponse and Trap. SNMPv2 has seven PDUs which are GetRequest, GetNextRequest, InformRequest, Trap, Response and GetBulkRequest. And three structures: PDU type – request-id – 0 – 0 – variable-bindings, PDU type – request-id – error-status – error-index – variable-bindings, PDU type – request-id – N – N – variable-bindings.