# What is SNMP? Simple Network Management Protocol (SNMP) is an application–layer protocol defined by the Internet Architecture Board (IAB) in RFC1157 for exchanging management information between network devices. It is a part of the Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite. SNMP is one of the widely accepted [network protocols](https://www.manageengine.com/network-monitoring/network-protocols.html) that manages and monitors network elements. Most professional-grade network elements come with a bundled SNMP agent. These agents have to be enabled and configured to communicate with [network monitoring tools](https://www.manageengine.com/network-monitoring/network-monitoring-tools.html) or a network management system (NMS). ## SNMP tutorial This tutorial explains: - [What are the basic SNMP components and their functionalities?](#snmp-basic-components-and-their-functionalities) - [SNMP basic commands](#what-are-the-basic-commands-of-snmp) - [How a typical SNMP communication happens?](#typical-snmp-communication) - [SNMP versions (SNMP v1, v2 and v3)](#what-are-the-different-versions-of-snmp) ## SNMP basic components and their functionalities SNMP consists of: - [SNMP Manager](#snmp-manager) - [Managed devices](#managed-devices) - [SNMP agent](#snmp-agent) - [Management Information Database or Management Information Base (MIB)](#management-information-database-or-management-information-base-mib) ### SNMP Manager A manager or management system is a separate entity responsible for communicating with SNMP agents implemented on network devices. This is typically a computer that runs one or more network management systems. **SNMP Manager’s key functions:** - Queries agents - Gets responses from agents - Sets variables in agents - Acknowledges asynchronous events from agents ### Managed Devices A managed device, or network element, is a part of the network that requires monitoring and management, such as routers, switches, servers, workstations, printers, and UPSs. ### SNMP Agent The agent is a program packaged within the network element. Enabling the agent allows it to collect the management information database from the device locally and make it available to the SNMP manager when queried. These agents can be standard (e.g., Net-SNMP) or vendor-specific (e.g., HP Insight Agent). **SNMP agent’s key functions:** - Collects management information about its local environment - Stores and retrieves management information as defined in the MIB - Signals an event to the manager - Acts as a proxy for some non–SNMP manageable network node **Basic SNMP Communication Diagram** ![What is SNMP?: Basic SNMP communication diagram](https://cdn.manageengine.com/network-monitoring/images/snmp-components.gif) ### Management Information database or Management Information Base (MIB) Every SNMP agent maintains an information database describing managed device parameters. The SNMP manager uses this database to request specific information from the agent and translates it as needed for the Network Management System (NMS). This shared database between the agent and manager is called the Management Information Base (MIB). Typically, MIBs contain a standard set of statistical and control values defined for hardware nodes on a network. SNMP also allows the extension of these standard values with agent-specific values through private MIBs. In short, MIB files are the set of questions an SNMP manager can ask the agent. The agent collects this data locally and stores it as defined in the MIB. Therefore, the SNMP manager must be aware of both standard and private MIB definitions for each type of agent. ### SNMP MIB Browser and SNMP Walk Tool ManageEngine's Suite of Free Tools includes an [SNMP MIB Browser](https://www.manageengine.com/products/mibbrowser-free-tool/) that helps load and unload MIBs and fetch MIB data from SNMP (v1, v2c, v3) agents. It is a complete tool for monitoring SNMP-enabled devices and servers. You can load and view multiple MIB modules and perform GET, GETNEXT, and SET operations. This [SNMP monitoring software](https://www.manageengine.com/network-monitoring/snmp-monitoring.html) is easy to use and allows you to view, configure, and parse SNMP traps. You can also perform SNMP operations from Windows and Linux devices. ### MIB structure and Object Identifier (Object ID or OID) The Management Information Base (MIB) is a collection of information for managing network elements. MIBs comprise managed objects identified by Object Identifiers (OIDs). Each identifier is unique and denotes specific characteristics of a managed device. When queried, the return value of each identifier may vary, such as text, number, or counter. There are two types of managed objects or OIDs: - **Scalar**: Defines a single object instance. Example: Device vendor name (only one result). - **Tabular**: Defines multiple related object instances grouped in MIB tables. Example: CPU utilization of a quad processor (four results, one per CPU). Every OID is organized hierarchically in the MIB and can be represented as a tree structure with individual variable identifiers. A typical OID is a dotted list of integers. For example, the OID in RFC1213 for `sysDescr` is `.1.3.6.1.2.1.1.1`. **MIB Tree Diagram** ![What is SNMP?: SNMP Port in OpManager](https://cdn.manageengine.com/network-monitoring/images/mib-oid-tree.gif) ## What are the basic commands of SNMP? The simplicity of information exchange has made SNMP a widely accepted protocol. Its concise set of commands includes: - **GET**: A request sent by the manager to retrieve one or more values from the managed device. - **GET NEXT**: Similar to GET but retrieves the value of the next OID in the MIB tree. - **GET BULK**: Used to retrieve large volumes of data from extensive MIB tables. - **SET**: Used by managers to modify or assign values on the managed device. - **TRAPS**: Initiated by agents to signal the SNMP manager when an event occurs. - **INFORM**: Similar to TRAP but includes confirmation from the SNMP manager acknowledging receipt. - **RESPONSE**: Returns values or signals actions as directed by the SNMP manager. ### SNMP Traps SNMP traps enable an agent to notify the SNMP manager of significant events using unsolicited messages. Trap protocols include the current `sysUpTime` value, an OID identifying the trap type, and optional variable bindings. Destination addressing for the SNMP trap port is typically determined through trap configuration variables in the MIB. The trap message format changed in SNMPv2, and the protocol data unit was renamed SNMPv2-Trap. Learn more about SNMP trap monitoring [here](https://www.manageengine.com/network-monitoring/snmp-trap-monitor.html?what-is-snmp). ## Typical SNMP communication As part of the TCP/IP protocol suite, SNMP messages are wrapped in User Datagram Protocol (UDP) and transmitted via Internet Protocol (IP). The diagram below illustrates the four-layer model developed by the Department of Defense (DoD). ![What is SNMP?: SNMP Protocol in OpManager](https://cdn.manageengine.com/network-monitoring/images/snmp-layers.gif) ### GET / GET NEXT / GET BULK / SET ![What is SNMP?: SNMP Agent in OpManager](https://cdn.manageengine.com/network-monitoring/images/snmp-get-response.gif) ### TRAP ![What is SNMP?: SNMP Trap in OpManager](https://cdn.manageengine.com/network-monitoring/images/snmp-trap.gif) ### INFORM ![What is SNMP?: SNMP Tutorial in OpManager](https://cdn.manageengine.com/network-monitoring/images/snmp-inform-acknowledgment.gif) By default, SNMP uses port 161, while TRAP and INFORM use port 162. ## What are the different versions of SNMP? Since its inception, SNMP has undergone significant upgrades. SNMP v1 and v2c are the most widely implemented versions. Support for SNMP v3 is increasing due to its enhanced security features. ### SNMPv1 The first version of SNMP, defined in RFC 1155 and RFC 1157. ### SNMPv2c A revised protocol that enhances SNMPv1 in areas such as protocol packet types, transport mappings, and MIB structure elements, while retaining community-based security. Defined in RFC 1901, RFC 1905, RFC 1906, and RFC 2578. ### SNMPv3 Defines the secure version of SNMP and supports [remote network monitoring](https://www.manageengine.com/network-monitoring/remote-network-monitoring.html?what-is-snmp) configuration of SNMP entities. Defined in RFC 1905, RFC 1906, RFC 3411, RFC 3412, RFC 3414, and RFC 3415. Each version introduced richer functionality with increased emphasis on security. | Version | Security Type | |---|---| | SNMP v1 | Community–based security | | SNMP v2c | Community–based security | | SNMP v2u | User–based security | | SNMP v2 | Party–based security | | SNMP v3 | User–based security | ## Other useful links - [How to Install and configure Windows device for SNMP?](https://www.manageengine.com/network-monitoring/help/install-snmp-windows.html) - [How to Install and configure Linux device for SNMP?](https://www.manageengine.com/network-monitoring/help/install-snmp-linux.html) - [How to Install and configure Solaris device for SNMP?](https://www.manageengine.com/network-monitoring/help/install-snmp-solaris.html) - [How to configure SNMP Agents?](https://www.manageengine.com/network-monitoring/help/configuring-snmp-agents.html) - [How to process SNMP Traps?](https://www.manageengine.com/network-monitoring/help/processing-traps.html)