In the first version of the protocol, SNMP protocol data sets forth in section 5, as well as its message format and some management processes. Then we will elaborate on this part in detail. First, let's take a look at the five units.
SNMP 1.0 specifies five SNMP protocol data units PDU (that is, SNMP Packets) for exchange between management processes and proxies 。
Get-request: extract one or more parameter values from the Agent process
Get-next-request: extract the next parameter value that follows the current parameter value from the Agent process.
Set-request operation: sets one or more parameter values of the proxy process.
Get-response operation: return one or more parameter values. This operation is sent by the Agent process, which is the response operation of the first three operations 。
Trap Operation: the message sent by the Agent process to notify the management process of some events 。
The preceding three operations are sent by the management process to the Agent process, and the following two operations are sent to the Agent process to simplify the process, the first three operations will be called get, get-next, and set operations in the future. Figure 1 describes the five SNMP types. Figure 2 SNMP packet format message operations, on the Agent process side, get or set packets are received using the well-known port 161, while on the management process side, the well-known port 162 is used to receive trap packets 。
Header of common SNMP protocol data
◆ Version
The version number written to the version field is reduced by 1, and 0 should be written to SNMP (that is, SNMPV1 ).
◆ Community)
The Community is a string used as the plaintext password between the management process and the proxy process. It is commonly used with 6 characters "public ".
PDU type
Table 1
Enter 0 ~ A number in 4. The corresponding relationship is shown in table 1 。