What is SNMP? How does SNMP work? Our complete guide to SNMP for device monitoring and management.
This article is all about how SNMP works. Domotz network monitoring software and Simple Network Management Protocol (SNMP) go hand-in-hand as it’s one of the top features available on Domotz. SNMP is also one of the most common ways to monitor network devices. It’s used for observing everything including routers, switches, servers, printers, UPS, NAS, and practically any device.
In short, Simple Network Management Protocol (SNMP) is an application layer protocol for monitoring the network, detecting network faults, and sometimes even configuring devices remotely.
- What is SNMP
- What is SNMP used for
- How SNMP works – 3 components
- Types of SNMP messages
- SNMP versions
- Security levels
- What is an SNMP port number?
- How SNMP works for Polling
- How to find your OIDs for SNMP monitoring
- SNMP walk and how to run one
- SNMP & Network Monitoring
- Pre-configured SNMP sensors
- What is SNMP tutorial video
What is SNMP?
Firstly, to start off SNMP stands for Simple Network Management Protocol (SNMP). Furthermore, SNMP is a set of protocols for network management and monitoring. To illustrate this, many network devices like routers, switches, servers, hubs, bridges, workstations, printers, modem racks, and other network components support these protocols.
Moreover, devices supporting the protocol need to meet specific criteria. Furthermore, the devices need to live on a network and have conditions for monitoring. As the main benefit, monitoring the requirements of these devices is essential for service providers and anyone administering a network.
SNMP standards include an application layer protocol, a set of data objects, and a methodology for storing, manipulating, and using data objects in a database schema.
The Internet Engineering Task Force (IETF) identifies the SNMP protocol as in the application layer of TCP/IP.
Imagine your organization has thousands of devices, and you need to check each of them, every day. This would easily occupy your time and be an incredibly tedious task. Luckily, SNMP makes things a whole lot easier!
What is SNMP used for?
Typically, SNMP uses one or several administrative computers (managers) to oversee groups of networked computers and associated devices. A constantly running software program called an agent feeds information to the managers through SNMP. The agents create variables out of the data and organize them into hierarchies. The hierarchies, along with other metadata, like types and descriptions of the variables, are in the MIB databases. MIBs are hierarchical virtual databases of network objects.
Let’s dive into how SNMP works.
3 critical components
A network managed by SNMP has 3 main components: devices you’re managing (routers, servers, switches, etc.), software agents, and a network management system. There may be more than one network monitoring and management system on a given managed network. Here is a bit more detail about the various components of SNMP:
SNMP Manager: A centralized system for monitoring the network. These systems are called an NMS, or network management station.
SNMP agent: This is installed on the device as the software management software module. Managed devices can be network devices like PC, routers, switches, servers, etc.
Management Information Base (MIB): The management information base mib manages the entities in a communication network. A management information base or MIB consists of information on the devices you want to manage. The data is hierarchal. A MIB is mainly used in SNMP but is used in generic contexts too, like the OSI/ISO network management models.
Managed Objects: The resources being monitored, for example, printer ink levels, NAS storage available, CPU temperature, and more.
Learn more about SNMP components: agent, manager, messages, and commands.
Types of messages
SNMP is very popular because it is simple to use. To start, SNMP uses 7 protocol data units in terms of how it works. The 7 different variables are:
SNMP Request messages
- GetRequest –
Request an agent to provide the current value of an OID.
SNMP manager sends this message to request data from the SNMP agent. It retrieves data from the SNMP agent. The SNMP agent responds with the requested value through a response message.
- GetNextRequest –
Request the next object in the MIB. This means you can traverse a tree without needing to specify OIDs.
This message discovers the data available on an SNMP agent. The SNMP manager can request data continuously until no more data is left. In this way, the SNMP manager can take knowledge of all the available data on the SNMP agent.
- GetBulkRequest –
Make multiple GetNext requests.
This message retrieves extensive data at once by the SNMP manager from the agent. It is introduced in SNMPv2c.
- SetRequest –
Tell an agent to change a value on a remote host, the only write operation in the entire SNMP protocol.
The SNMP manager uses this to set the value of an object instance on the SNMP agent.
A response, with the requested information.
The agent sends these when they get a request from the manager. When sent in response to Get messages, it will contain the data requested. When sent in response to the Set message, it will contain the newly set value as confirmation that the value has been set.
A “trap” message, not requested by the manager, provides information about device events. The agent sends these messages when a fault occurs. Furthermore, the SNMP manager doesn’t need to make any requests.
The manager can confirm the receipt of a trap message.
This message identifies whether the manager received the trap message. Additionally, SNMPv2c saw the introduction of these message types. The agent can be set to send traps continuously until it receives an Inform message. It is the same as a trap but adds an acknowledgment that the trap doesn’t provide.
What are the SNMP Versions of the protocol?
SNMP works with three different versions of the protocol. There are 3 different versions of the protocol:
This was the first implementation, operating within the structure management information specification, and described in RFC 1157. It uses community strings for authentication and UDP only.
As described in RFC 1901, this version improved support for efficiency and error handling. Furthermore, it’s more appropriately known as SNMP v2c. Moreover, it uses community strings for authentication, and leverages UDP but can also be configured to use TCP.
This version of the protocol improves security and privacy by introducing RFC 341. Furthermore, it uses Hash-based MAC with MD5 or SHA for authentication and DES-56 for privacy. Moreover, this version uses TCP. Therefore, the higher the version of SNMP, the more secure it will be. Learn all about what is SNMP v3 and how it works.
Learn more about the differences between SNMP v2 vs v3.
What are the SNMP Security Levels?
Firstly, security levels define the type of security algorithm performed on SNMP packets. Furthermore, SNMPv3 uses the following security levels:
- noAuthNoPriv –
This (no authentication, no privacy) security level uses a community string for authentication and no encryption for privacy.
- authNopriv – This security level (authentication, no privacy) uses no encryption for privacy and HMAC with Md5 for authentication.
- authPriv – This security level (authentication, privacy) uses HMAC with Md5 or SHA for authentication and encryption uses the DES-56 algorithm.
What is an SNMP port number?
The default SNMP ports for sending commands and messages are:
- UDP port 161
- UDP port 162 s
Learn more about SNMP port numbers.
How SNMP works for Polling
Networked devices, services, and hardware systems may need to check on their peers. To gather metrics and perform administrative tasks, SNMP polling is the way it’s done. Furthermore, this is because most network devices support SNMP polling.
Our network monitoring software uses SNMP polling in our network monitoring system. SNMP polling is not a functionality of SNMP per se. Moreover, SNMP polling is a way to monitor SNMP sensors on devices.
Learn more about SNMP polling.
How to find your OIDs for SNMP monitoring
OIDs, or Object Identifiers, identify a device and the status of specific variables. If you want to monitor a device’s variables using SNMP, you will most definitely need a device’s OIDs. Furthermore, you can either get them through your software’s OID resources or use a MIB Browser.
Learn more about finding your OIDS for SNMP monitoring.
What is an SNMP walk and how to run one?
Another term you might here frequently about SNMP is the SNMP walk. In short, the SNMP walk is used for stringing multiple GETNEXT requests together. In other words. this command allows us to get useful information without the need of typing in each OID or node.
Learn more about the SNMP walk and how to run one.
What is a Management Information Base?
Management Information Bases or MIBs are a virtual database whose records store information about the devices you’re monitoring on your network.
Learn more about a Management Information Base and how they work.
How SNMP Works with a monitoring tool
Now that we’ve covered the basics of how SNMP works, let’s look at how you can monitor values.
Firstly, with software like Domotz, you can remotely monitor and manage SNMPv2 devices and configure alerts based on the OID values. For instance, you could receive an alert if a device exceeds a certain temperature, or a printer’s toner cartridges drop below a certain level.
We’ve significantly improved the SNMP monitoring features on Domotz which now included pre-configured sensor templates. In other words, this means you can automatically start monitoring SNMP variables on your NAS, NAS Synology Printers, switches, and UPS devices with Domotz.
Furthermore, in terms of pre-configured SNMP sensors, we provide the following information, automatically in seconds.
How Pre-configured SNMP sensors work
Our network monitoring includes the following pre-configured SNMP sensors. Learn more about pre-configured SNMP sensors.
- UPS devices: Alarms Present, Battery Status, Battery Voltage, Battery Current, Battery Temperature, Estimated Remaining Minutes, and Estimated Remaining Charge.
- Printers: Supply Units (Toner Cartridge, Drum Unit) and Supply Level
- Network Attached Storage (NAS) devices:
- Hard disk table: Hard Disks, Description, Status, Capacity, Info, Temperature, and Model:
- Volumes tables: Volumes, Description, Free Size, Total Size, Filesystem, and Status.
- Basic information: CPU Usage, CPU Temperature, Total Available Memory, Free Memory, Uptime, System Temperature, Number of Hard disks, Volumes, and Last Error Message.
- Synology RAID Volumes: For each RAID configured on the Synology NAS, Domotz can monitor status, usage, and available free storage. For each sensor retrieved you also get a graphical representation of the historical values.
- Synology SMART Disks Status: For each disk and variable of the Disk, Domotz will monitor the status of the variable and the value (for instance Airflow Temperature, Command Timeout, Pending Sector, E2E Errors, Power Cycle Counts, etc).
- Switches: You can monitor the Interface name, Operational Status, Inbound (Traffic, Discards, Errors), Outbound (Traffic, Discards Errors), NIC Type, Admin status, Physical Address (MAC), MTU, Speed.
Fun Fact: You can use Domotz SNMP/TCP Sensors to monitor all sorts of things! Read how our customer support rep, Henrique, uses this feature to monitor his aquarium.
What is SNMP tutorial video
This video tutorial is all about what is SNMP.