SNMP PDU Operation


SNMP PDUs and Operations

The SNMP PDU in this application, the SNMP commands that receive or set variables are getid, getmany, getnext, getone, setany and snmpstat. All of these commands include one community name for authentication and one or more OIDs to refer to the variables they are interested in retrieving or modifying. When a network administrator issues one of these commands, an SNMP Protocol Data Unit (PDU) is created and passed to the authentication mechanism. The authentication mechanism also returns a byte array, which is usually further converted by UDP, before being sent through the transport service.

After you receive this UDP message, the agent first converts the byte string in the message to a form that it can understand, and then performs authentication checks using the community name field it contains. After authentication has passed, the agent performs the necessary actions to get or set the variable and responds to the success or failure of the process; this is then interpreted by the management station.

There are Five Different Types of PDUs Used in SNMP :

GetRequest PDU
This PDU is sent from the management station to the agent and its OIDs are used to retrieve the values ​​of the object instances that are contained in the PDU. The import operation uses this PDU.

GetNextRequest PDU
This PDU is sent from the management station to the agent and is used to retrieve the values ​​of object instances that are next to the OIDs that are logically located in the PDU. The Getnext process uses this PDU.

GetResponse PDU
This PDU is sent from the agent to the management station in response to a GetRequest PDU, a GetNextRequest PDU, or a SetRequest PDU, and contains the values ​​of object instances. Get, getnext, and set operations use this PDU.

SetRequest PDU
This PDU is sent from the administration station to the agent and is used to set the OIDs and values ​​of the object instances that are contained in the PDU. The previously described setting operation uses this PDU.

Trap PDU
This PDU is sent to the management stations selected from the agency to report an extraordinary event. The trap operation uses this PDU. The getid and getone commands use the get operation, and the setany command uses the set operation. Getnext, getmany, and snmpstat commands use the getnext process. The `` flowchart of the get / getnext process '' and '' flow chart of the set operation '' show the stream arrays during the get and set operations.

Flow Chart of the Set Operation

The Getnext process deserves special mention because it works differently than the others. As a result of this process, the OID contained in a PDU is received by the agent and an instance of an OID is received alongside this dictionary. For example, if the OID in a getnext request is 1.3.6.1.2.1.2.2.1.7.2, if it is AdminStatus.2, the agent searches lexicographically for the next variable; Make the ifAdminStatus.3 and return the value. 

Similarly, if the requesting OID is 1.3.6.1.2.1.2.2.1.7.3 (if AdminStatus.3), the next variable selected by the agent may be the next variable 1.3.6.1.2.1.2.2.1.8.1 (ifOperStatus). . .one). Therefore, it can be seen that the getnext process may be useful in retrieving the values ​​of the object instances, even if the administrative station is not aware of instances of an object as done by getnext. 

It can also be useful to retrieve the values ​​of all object instances under a sub-tree of the MIB, starting with the OID of the root tree, as done by getmany. Sır The flow chart of the trap operation Tuz indicates the sequence of flow in the trap operation in SNMP PDU.

Discussion: