written 6.7 years ago by |
• Simple Network Management Protocol i.e. SNMP is a simple request/response protocol in which SNMP manager communicates with SNMP agents/managed devices using SNMP PDU’s (Packet Data Unit).
• These PDUs are encapsulated in SNMP Messages.
• An snmp message consists of a sequence that contains SNMP version, Community String, and SNMP PDU and an SNMP PDU forms the body of the message
• SNMP Message is different from SNMP PDU
- SNMPv1 PDU Format
• For SNMPv1, there are two PDU formats, one for Trap and other for rest of the PDU types.
• Below PDU format is applicable for Get, GetNext, Set and Response PDUs:
• PDU Type – Specifies the type of PDU
• Request ID – Associates SNMP requests with responses.
• Error status – Indicates one of a number of errors and error types. It is set only in Response PDU, for rest it is set as 0.
• Error index – Associates an error with a particular object instance. It is set only in Response PDU, for rest it is set as 0.
• Variable bindings – Each variable binding associates a particular object instance with its current value. For Get and GetNext requests, the value is ignored.
Below PDU format is applicable for Trap PDU:
• PDU Type – Specifies the type of PDU as Trap
• Enterprise – Identifies the management enterprise under whose registration authority the trap was defined.
• Agent address – IP address of the agent
• Generic trap type – Used to identiy the generic trap. There are six types of generic traps.
• Specific trap type – Used to identify a specific trap.
• Time Stamp – Value of the sysUpTime mib object
- SNMPv2 PDU Format
• For SNMPv2, there are two PDU formats, one for GetBulk and other for rest of the PDU types.
• Below PDU format is applicable for Get, GetNext, Set, Response, Trap and Inform PDUs:
• PDU Type- Specifies the type of PDU
• Request ID- Associates SNMP requests with responses.
• Error Status- Indicates one of a number of errors and error types. It is set only in Response PDU, for rest it is set as 0.
• Error Index- Associates an error with a particular object instance. It is set only in Response PDU, for rest it is set as 0.
• Variable Bindings- Each variable binding associates a particular object instance with its current value. For Get and GetNext requests, the value is ignored.
• Below PDU format is applicable for GetBulk PDU:
• PDU Type – Specifies the type of PDU as GetBulk
• Request ID- Associates SNMP requests with responses.
• Non repeaters- Specifies the number of object instances in the variable bindings field that should be retrieved no more than once from the beginning of the request.
• Max repetitions- Defines the maximum number of times that other variables beyond those specified by the Non repeaters field should be retrieved.
• Variable Bindings- Each variable binding associates a particular object instance with its current value.
- SNMPv3 PDU Format
• The PDU types for SNMPv3 are the same as the SNMPv2.