The Simple Network Management Protocol (SNMP) is a set of network management protocols developed by the Internet Engineering Task Force (IETF). It evolved from the Simple Gateway Monitor Protocol (SGMP), and it enables remote management of network devices that support SNMP. With this protocol, a network management station can monitor device status, adjust configurations, and receive alerts about network events. Although SNMP was initially designed for IP-based networks, it has also been widely adopted as an industry standard for managing telephone networks.
A complete SNMP system consists of three main components: the Management Information Base (MIB), the Structure of Management Information (SMI), and the SNMP message protocol.
(1) **Management Information Base (MIB):**
Every managed resource in the network is represented as a "managed object" within the MIB. The MIB serves as a collection of these objects, defining their properties such as name, access rights, and data type. Each SNMP-enabled device (Agent) has its own MIB, which acts as a bridge between the Agent and the Network Management System (NMS). This relationship is illustrated in Figure 1.
The names used in MIB variables are drawn from the ISO and ITU-managed object identifier (OID) namespace, which follows a hierarchical tree structure. For example, the variable `ipInReceives` under the `ip` node has the OID `1.3.6.1.2.1.4.3`. When instances of variables are referenced, they include a suffix to indicate the specific instance, such as `1.3.6.1.2.1.4.3.0`.
Some OIDs, like those in the IP routing table, require dynamic identification. For instance, to refer to the next hop of the address `202.120.86.71`, the OID would be `1.3.6.1.2.1.4.21.1.7.202.120.86.71`. These dynamic OIDs may pose challenges in systems requiring pre-defined Readkeys, hence some implementations avoid them.
(2) **Structure of Management Information (SMI):**
SMI defines how information is structured, organized, and identified within the SNMP framework. It provides the foundation for describing MIB objects and the exchange of information between the NMS and the Agent.
The SMI defines several data types:
- **Simple Types:** Integer, Octet String, and OBJECT IDENTIFIER.
- **Simple Constructed Types:** SEQUENCE and SEQUENCE OF, similar to structures and arrays in programming languages.
- **Application-Wide Types:** Such as IpAddress (a 32-bit value), Counter (non-negative integer that wraps around), Gauge (non-negative integer that doesn’t wrap), and TimeTicks (measured in 0.01-second increments).
**SNMP Message Structure:**
An SNMP message typically includes a common header, a PDU (Protocol Data Unit), and variable bindings. There are five types of PDUs: GetRequest, GetNextRequest, SetRequest, GetResponse, and Trap. Each PDU corresponds to a specific operation performed by the NMS or the Agent.
**Five SNMP Protocol Data Units (PDUs):**
- **GetRequest:** Retrieves one or more values from the Agent.
- **GetNextRequest:** Retrieves the next value in the MIB tree.
- **SetRequest:** Modifies one or more values on the Agent.
- **GetResponse:** Returns the result of a GetRequest, GetNextRequest, or SetRequest.
- **Trap:** A notification sent by the Agent to the NMS when an event occurs.
Each PDU contains a version number, a community string (used for authentication), and a PDU type. Additionally, certain PDUs have fields like request ID, error status, and error index, which help in tracking and debugging.
**SNMP Running Process:**
When an Agent receives a message on UDP port 161, it decodes the packet, verifies the community string, and processes the PDU accordingly. If the request is valid, it retrieves the requested data and sends a response back to the NMS. If any errors occur during processing, appropriate error messages are returned.
For example, if a GetRequest is made for a non-existent variable, the Agent responds with an error indicating `noSuchName`. Similarly, if a SetRequest attempts to modify a read-only variable, the response will show `badValue`.
**Example of Table Traversal:**
SNMP supports traversing tables using GetNextRequest. For instance, a network management station might query the routing table to retrieve all entries. The Agent responds with the next available row, allowing the NMS to iterate through the entire table.
In conclusion, SNMP is a powerful tool for network management, enabling administrators to monitor and control network devices efficiently. While it has evolved over time, its core principles remain fundamental to modern network operations.
Using The Platform,Broadband Antenna,Three Wire Antenna
Mianyang Ouxun Information Industry Co., Ltd , https://www.ouxunantenna.com