1. Basic principles of SNMP
SNMP adopts a special form of client/server model: Agent/management station model. The management and maintenance of the network is throughManagement workstationAndSNMP proxyInteraction between them. Each SNMP agent is responsible for answering various queries on the MIB definition information of the SNMP management workstation (master agent. 10 is the implementation model of SNMP protocol in NMS network products.
Figure 10
The SNMP Agent communicates with the management site through standard messages in the SNMP protocol. Each message is a separate datagram. SNMP uses UDP (User Datagram Protocol) as the layer-4 protocol (Transport Protocol) for connectionless operations. The SNMP message consists of two parts: the SNMP header and the Protocol Data Unit PDU. The datagram structure is like 11.
Figure 11
- Version identifier ):Make sure that the SNMP agent uses the same protocol, and each SNMP agent directly discards the datagram different from its own Protocol version.
- Group Name ):SNMP authenticates the SNMP Management site from the proxy. If the network is configured to require verification, the SNMP slave agent authenticates the group name and the IP address of the Management site. If the authentication fails, the SNMP proxy will send a trap message for authentication failure to the management site (see later );
- Protocol Data Unit (PDU ):PDU indicates the Message Type and related parameters of SNMP.
2. Manage the Information LibraryMiB
The Management Information Library MIB defined by IETF (which defines accessible network devices and their attributes, and is uniquely specified by the object identifier (OID: object identifier. MiB is a tree structure. SNMP messages access devices in the network by traversing nodes in the MIB Tree directory.
The structure of the object identification tree (OID: object identifier) that SNMP can access network devices in the NMS system is given.
Figure 12
13. An example of how to set the oId for a ds1 line status query is provided.
Figure 13
Figure 14 shows the MIB information tree of rfc2495 for the ds1/E1 trunk line. The picture on the right shows the management MIB convention for the rack chassis in the NMS system.
Click to view figure 14
3. Five message types of SNMP
Five message types are defined in SNMP:Get-Request,Get-Response,Get-next-Request,Set-request and trap.
- Get-request, get-next-request, and get-Response
SNMP Management siteGet-RequestThe message retrieves information from the network device with the SNMP proxy, while the SNMP proxy usesGet-ResponseMessage response.Get-next-RequestUsed for andGet-RequestCombine to query the column elements in a specific table object. For example:
First, use the following primitive to obtain the number of interfaces of the device to be queried:
{Iso org (3) DOD (6) Internet (1) MGMT (2) MIB (1) interfaces (2) ifnumber (2 )}
Then, query through the following primitive (the first time usingGet-Request, And then useGet-next-Request):
{Iso org (3) DOD (6) Internet (1) MGMT (2) MIB (1) interfaces (2) iftable (2 )}
SNMP Management siteSet-RequestRemote Configuration of network devices (includingDevice Name,Device Properties,Delete a deviceOr makeValid device property/Invalid).
Use SNMP proxyTrapSends non-request messages to the SNMP Management site, which is generally used to describe the occurrence of an event.