beautypg.com

6 message format for snmp operations, 1 format of command messages, 1 message header – Contemporary Control Systems Compact Managed Switches Software Manual for Web Browser User Manual

Page 76: 2 message protocol data unit (pdu), Message format for snmp operations, Format of command messages

background image

TD020851-0MG

76

5.2.6 Message Format for SNMP Operations

Five SNMP operations are used in SNMP version 1:

get, get-next, set, get-response, trap. The

first four commands are used to send and receive information for managed objects and use the

same message format. Trap uses a different format discussed in Section 5.2.6.2.

5.2.6.1 Format of Command Messages

Each command message contains a header and a protocol data unit (PDU).

5.2.6.1.1 Message Header

The fields in the message header contain:
Version — 0, indicating SNMP version 1
Community string — The community string, which authorizes NMS access to the switch

5.2.6.1.2 Message Protocol Data Unit (PDU)

SNMPv1 PDUs contain a specific command (get, set etc.) and operands that indicate the object

instances involved in the transaction.

The fields in the PDU contain:

PDU type — Indicates the command type: get(0xA0), get-next(0xA1), set(0xA3), get-response(0xA2)
Request ID A 4-octet integer used to match response to queries
Error Status
— A single octet integer containing a value of zero in a request and the following

error status in a response

noError (0): No problem

tooBig (1): The response to your request was too big to fit into one response.

noSuchName (2): An agent was asked to get or set an OID that it can’t find; i.e., the

OID doesn’t exist. It can be used for an unsupported object.

badValue (3): A read-write or write-only object was set to an inconsistent value.

readOnly (4): This error is generally not used.

genErr (5): None of the previous errors

Error Index — A single octet integer that associates an error with a particular object identifier

(OID). Only the response operation sets this field. Other operations set this field to zero.

Variable binding — contains a sequence of OIDs and values

Figure 49 — Format of the Command Message for SNMP Version 1