1. SNMP basic principle
SNMP uses a special form of a Client / Server model: agency / management station model. Management and maintenance of the network is done by the management of the interaction between the workstation and the SNMP agent. Each SNMP is responsible for answering the SNMP Management Workstation (main agent) for the various queries of the MIB definition information. Figure 10 is a model of the SNMP protocol in NMS network products.
Figure 10
The SNMP proxy and management station communicate through standard messages in the SNMP protocol, each message is a separate datagram. SNMP uses UDP (User Data News Protocol) as a fourth layer protocol (transport protocol), performs no connection operation. The SNMP message packet contains two parts: SNMP header and protocol data unit PDU. The data report structure is shown in Figure 11.
Figure 11
Version Identifier: Make sure the SNMP agent uses the same protocol, each SNMP agent directly abandoned Dativance with its own protocol version.
Community name: Used for SNMP to authenticate from the agent; if the network is configured to be verified, SNMP will authenticate the IP address of the community name and management station if the network is configured to verify. If it fails, the SNMP will be The management station sends an authentication failed Trap message (see);
Protocol Data Unit (PDU): where the PDU indicates the message type of SNMP and its related parameters.
2. Management Information Library MIB
The management information library MIB specified by IETF (which is defined in the accessible network device and its properties, the only specified by the object identifier (OID: Object Identifier). MIB is a tree structure, the SNMP protocol message is traversed by the MIB tree directory The node is to access the device in the network.
The figure below gives the SNMP to access the object identification tree (OID: Object Identifier) of the network device in the NMS system.
Figure 12
The following Figure 13 shows an OID setting example of a query of a DS1 line state.
Figure 13
The left figure in Figure 14 gives the RFC 2495 MIB information tree diagram of the DS1 / E1 trunking, and the right picture is the NMS system management MIB convention for the frame Chassis.
Click to view Figure 14
3. Five messages of SNMP
Five messages are defined in SNMP: get-request, get-response, get-next-request, set-request, trap.
Get-request, get-next-request with get-response
The SNMP Management Station retrieves information from the Get-Request message from the network device with the SNMP agent, while the SNMP agent responds with a GET-RESPONSE message. Get-next-request is used to combine the column elements in a specific table object with Get-Request. Such as:
First, the number of interfaces of the device you want to query is obtained by the following primitives:
{Iso Org (3) DOD (6) Internet (1) mgmt (2) MIB (1) Interfaces (2) ifnumber (2)}
Then use the primitive below to query (where the first time to use Get-Request, after which get-next-request):
{Iso org (3) DOD (6) Internet (1) mgmt (2) MIB (1) Interfaces (2) ifeable (2)}
Set-request
The SNMP Management Station uses set-request to remote configuration for network devices (including device names, device properties, delete devices, or valid / invalidation of a device properties, etc.).
TRAP