Oidview

Network monitoring, SNMP and network management guides from Oidview

SNMP Explained: Simple Network Management Protocol

Written by

Published

Filed under

SNMP

Wondering what SNMP actually does on your network? It is a standard protocol that lets a management station read status from devices such as switches, routers and printers, and change some settings.

Item Value
Architecture standard RFC 3411, also STD 62, dated December 2002
Basic components in the framework Four
Traditional name for the device-side entity Agent
Traditional name for the management-side entity Manager
Only authentication in the SNMPv1 framework A trivial scheme based on community strings
Version recommended by RFC 3410 SNMPv3 rather than SNMPv1 or SNMPv2

These figures come from RFC 3411 and RFC 3410. Standards get updated and replaced, so check the sources before you rely on them.

What SNMP is and why it exists

The Simple Network Management Protocol is the common language that network gear uses to report on itself. A switch can tell a management system how busy its interfaces are, a printer can report that its toner is low, and a server can describe its uptime. All of this happens through one shared model, so a single tool can talk to equipment from many makers.

Before a protocol like this existed, every vendor shipped its own console and its own way of reading counters. That works for a handful of devices. It does not work once your devices are spread across many sites.

The protocol is defined in public standards documents rather than by one company. The architecture is written up in RFC 3411, which is labelled STD 62 and dated December 2002, according to the RFC Editor’s copy. That document describes it as an architecture for “describing Simple Network Management Protocol (SNMP) Management Frameworks”.

In daily practice SNMP is used for three jobs:

  • Polling: a monitoring system asks devices for values at regular intervals, such as interface traffic or CPU load.
  • Notification: a device sends an unrequested message when something happens, such as a link going down.
  • Configuration: a management system writes a value to a device, where the device allows it.

Many teams only ever use the first two. Writing settings over SNMP is possible, but plenty of administrators keep it switched off and use other tools for changes.

The building blocks: agents, managers and managed objects

RFC 3410 explains that an enterprise using the framework contains four basic components. In its words, there are “several (typically many) managed nodes, each with an SNMP entity which provides remote access to management instrumentation (traditionally called an agent)”. It adds at least one SNMP entity with management applications, “typically called a manager”, plus a management protocol and management information. You can read the wording in the RFC 3410 text.

Put simply, the four parts are these:

  1. Managed nodes, which are the devices you want to watch.
  2. An agent on each node, which answers questions about the device.
  3. A manager, which asks the questions and collects the answers.
  4. The protocol and the data definitions both sides agree on.

The agent

The agent is software inside the device. It knows how to look up a value such as the device name or the number of bytes that passed through a port, and it hands that value back when asked. The agent does not decide anything about your network; it only reports and, if permitted, accepts changes.

The manager

The manager is the application on the monitoring side. RFC 3411 says entities running command generator and notification receiver applications monitor and control managed elements. A command generator is the part that sends requests, and a notification receiver is the part that listens for messages the devices send on their own.

Managed objects

Every value an agent can report is a managed object. Each one has a name, a data type and a place in a tree. That tree is what makes it possible to ask for exactly one counter on exactly one interface. The naming scheme is covered in the guide to the SNMP OID, and the files that describe the objects are explained in the guide to the SNMP MIB.

SNMP equipment racks
Green indicator lights glow on hardware inside a dark cabinet.

How a conversation between manager and agent works

The exchange is simple in outline. The manager sends a request that names one or more objects. The agent looks up the current values and sends a reply. The manager then stores, graphs or alerts on what came back.

The common operations are easy to remember:

  • Get: read the value of a named object.
  • Get-next: read the object that follows a given name, which lets a tool step through the tree.
  • Set: write a value to an object.
  • Notification: an unrequested message from the agent to the manager.

Stepping through the tree is how discovery tools learn what a device offers. The snmpwalk command is the best-known example, because it repeats the get-next idea until the branch you chose has been read in full.

Polling versus notifications

Polling gives you steady data, which is what you need for graphs and capacity planning. Its weakness is timing: if you poll every few minutes, a short problem between two polls can pass unseen.

Notifications fix that gap. RFC 3410 notes that event notifications are “called traps in the SNMPv1 protocol”, and the same document says the SNMP protocol defines a few standardized event notifications, known as generic traps. The page on the SNMP trap covers how they are sent and received.

Most well-run setups use both. Polling builds the long-term picture, and notifications tell you quickly when something changes.

Transport and ports

SNMP messages travel over the network between the manager and the agent, so firewalls need to allow them. Which ports are used, and for which direction, is a frequent source of confusion when a device seems silent. The SNMP port guide lays out what to open.

Versions and what changed between them

There are three versions in common discussion: SNMPv1, SNMPv2 and SNMPv3. RFC 3410 states that SNMPv3 is “derived from and builds upon” the earlier frameworks, and it explains that “using SNMPv3 instead of SNMPv1 or SNMPv2 is strongly recommended” in its own phrasing. The RFC 3410 text is where both statements appear.

The key difference between the generations is security. RFC 3410 says the SNMPv1 framework “did not define any such schemes other than a trivial authentication scheme based on community strings”. In other words, the early versions relied on a shared text value that travels with each request.

SNMPv3 adds proper protection. RFC 3410 says it defines an additional security capability referred to as privacy, alongside authentication. That means messages can be authenticated and, if you choose, encrypted.

A comparison of the generations at a glance:

  • SNMPv1: community string only, mostly found on very old equipment.
  • SNMPv2: community string in the common form, used for basic monitoring on trusted networks.
  • SNMPv3: user-based authentication and optional privacy, suited to anywhere security matters.

The practical advice follows from that list. Treat the older versions as a compatibility option, not as a design choice. If a device offers only the older versions, keep it on a protected management network and limit who can query it.

Mixed environments are normal. A typical estate has some modern switches that support the newest version and a few legacy devices that do not. Good tools let you set the version per device, so you can raise the security level where it is possible without losing sight of older equipment.

The details of every release are in the breakdown of SNMP versions. If you are building something new, start with SNMPv3 where your devices support it.

Security: community strings and why they matter

A community string works a little like a shared password, but it is sent along with every request and is not a real login. Anyone who can capture that traffic, or who can guess a common value, can read what the device is willing to share. Setting write access with a weak string is worse, since it lets outsiders change settings.

Practical habits that reduce the risk:

  • Change any default community string before a device goes into service.
  • Give read-only access wherever you do not need to write.
  • Restrict which addresses may query the device.
  • Keep SNMP traffic on a management network rather than the open internet.
  • Move to SNMPv3 where devices support it.

A longer explanation of how these values work, and how to pick them, is in the guide to the SNMP community string.

SNMP server racks
Rows of rack-mounted servers fill the frame, with a person’s hand visible at the right.

Where SNMP fits in a monitoring setup

SNMP is a data source, not a complete product. The protocol moves values between devices and a tool, and the tool does the storing, graphing and alerting. That tool category is covered in the overview of network monitoring, and broader suites are discussed under network management software.

When you evaluate a tool, these questions are worth asking:

  • Does it support the SNMP versions your devices speak?
  • Can it load extra object definition files for unusual hardware?
  • Does it receive notifications as well as poll?
  • How does it store history, and for how long?

The list is short on purpose. Most disappointment with a monitoring tool comes from a mismatch on one of these four points rather than from a missing feature.

A sensible first test

Before you build dashboards, confirm that one device answers. Pick a switch or server, enable SNMP on it with a read-only setting, and query a simple object such as the device description. If that works, widen the test to interface counters.

If the device does not answer, check three things in order: whether SNMP is enabled, whether the credentials match on both sides, and whether a firewall is blocking the traffic. These three account for most failed first attempts.

SNMP server aisle
Rows of dark server cabinets line an empty aisle beneath overhead lights.

Everyday uses of SNMP

Knowing the theory helps, but most people meet SNMP through a specific task. The following cases cover the bulk of real-world use, and each one maps back to the building blocks above.

Capacity and traffic trends

Interface counters are the classic example. A manager reads a running total of bytes from a port, waits, reads it again, and works out the rate from the difference. Over weeks, those readings show which links are filling up and when an upgrade is justified.

Poll CPU load, memory use, disk space and temperature over time too, but calculate rates only for cumulative counters and read other values as the MIB defines them. Anything the agent exposes as a managed object can be tracked this way.

Health and availability checks

A tool that polls a device and gets no answer has learned something useful. It can mark the device as unreachable and raise an alert. Combined with notifications from the device itself, this gives you two independent signals about a fault.

Inventory and discovery

Descriptive objects, such as the device name, model and software description, let a tool build an inventory automatically. Walking a device, then reading what it reports, is a quick way to see what it supports before you design any monitoring around it.

Printers, power units and other odd devices

SNMP is not limited to switches and routers. Printers, uninterruptible power supplies, environmental sensors and storage arrays often include an agent. Their data usually lives in vendor-specific branches of the tree, which is why loading the right definition file matters.

Troubleshooting SNMP problems

When SNMP fails it usually fails quietly: the tool shows a blank graph or a timeout with no explanation. A short, ordered routine saves time.

  1. Confirm that the agent is enabled on the device and listening.
  2. Check that the version and credentials in the tool match the device exactly, including letter case in a community string.
  3. Look for a firewall or access list between the manager and the agent.
  4. Test from a command line tool before blaming the monitoring product.
  5. Check that the object you want exists on that device and is not in a branch the agent leaves out.

Step four is the most useful habit. If a plain command line query returns data, that request worked, so compare its source, credentials and OID with the failing request from the tool. If the command line also fails, the problem sits in the device, the credentials or the network path.

Reading what comes back

Replies come as pairs of a name and a value. The name identifies the object, and the value carries its type, such as text, a counter or a time measurement. Counters usually only go up and then wrap around, so a good tool handles the wrap instead of showing a sudden negative spike.

Text values can look odd at first. Some devices return descriptions padded with vendor detail, and others return numeric codes that stand for states. The object definition file explains what each code means, so keep it close when you read raw output.

Good habits for long-term use

  • Document which devices use which version and credentials.
  • Review who can query your devices on a regular schedule.
  • Remove unused devices from the monitoring list so alerts stay meaningful.
  • Tune alert thresholds so that people still read the messages a year from now.

These habits cost little. They keep a monitoring setup trustworthy as the network grows and as staff change.

Limits to keep in mind

SNMP is widely supported, but it is not perfect. Some vendors expose rich data and others expose very little. Naming of objects outside the standard sets can differ between makers, which is why object definition files matter.

Polling many devices at short intervals can also load both the network and the devices. Pick intervals that match what you will actually act on, rather than the fastest rate the tool allows.

Finally, remember that a standard describes the protocol and not your configuration. Whether SNMP is safe on your network depends on how you set it up.

Another limit is scope. SNMP tells you what a device reports about itself, which is not the same as what users experience. A link can look healthy in the counters while an application on it is slow, so pair SNMP data with other checks when user complaints and graphs disagree.

Treat the protocol as one reliable instrument in a larger toolkit. Used with care, and with sensible security, it remains a practical way to see what your network is doing.

Frequently asked questions

Is SNMP only for large networks?

Show answer

No. A small office can use it to watch a router or a printer. The value grows with the number of devices, but the setup is the same at any size.

What is the difference between an agent and a manager?

Show answer

The agent runs on the device and answers questions about it. The manager runs on the monitoring side and sends the requests. RFC 3411 calls these traditional names for entities built from command and notification applications.

Which SNMP version should you use?

Show answer

RFC 3410 strongly recommends SNMPv3 over SNMPv1 or SNMPv2. Use older versions only where a device cannot do better, and keep them on a protected network.

Can SNMP change settings on a device?

Show answer

Yes, through the set operation, if the device allows write access. Many administrators leave write access off and use read-only monitoring.

Does SNMP replace a monitoring tool?

Show answer

No. SNMP only carries data. A monitoring tool collects it, stores history and raises alerts.