Network security

What Is SNMP? How the Simple Network Management Protocol Works

SNMP lets one monitoring system ask almost any network device how it is doing. Here is how it works, which version to run, and how to lock it down.

Cysoro Security TeamPublished · 8 min read
Router CPU 42%1.3.6.1.2.1.1.3.0 Switch UP 99.9%UDP 161 • GET TRAP: link downUDP 162 NETWORK SECURITY What isSNMP? Monitor every device, safely.
Quick answer

SNMP (Simple Network Management Protocol) is an application-layer protocol that lets a central manager monitor and manage network devices such as routers, switches, servers, printers and UPS units. Each device runs an agent that exposes health data in a structured database called a MIB, addressed by OIDs. The manager polls agents on UDP port 161 and receives alerts on UDP port 162. Only SNMPv3 adds authentication and encryption.

Key takeaways

  • SNMP lets a manager poll devices for CPU, memory, traffic and uptime, and receive traps when something goes wrong.
  • SNMPv1 and SNMPv2c send community strings in plain text, so only SNMPv3 with authPriv is safe on a production network.
  • Never expose UDP ports 161 and 162 to the internet, and never leave the default community strings public and private in place.

Your router, switch, printer and UPS all have something to tell you: how busy they are, whether a link is down, and how long they have been running. SNMP is the shared language they use to say it, and it has been the standard way to monitor network hardware for decades.

What is SNMP?

SNMP, the Simple Network Management Protocol, is an application-layer protocol that lets a central monitoring system collect health and performance data from network devices and, in some cases, change their configuration.

It is an Internet Standard defined by the IETF. RFC 3411 describes the SNMP management framework: SNMP entities containing manager and agent applications exchange management information over the protocol. Devices that typically support SNMP include routers, switches, servers, workstations, printers, cable modems and UPS units.

The name is a little misleading. SNMP is not always simple to use, and in most real deployments teams use it for monitoring rather than active management. Its value is breadth: almost every piece of network hardware ships with an SNMP agent built in, so one monitoring system can watch a mixed fleet without installing software on each device.

How does SNMP work?

SNMP works by polling and by alerts. A manager asks an agent for the value of a specific data point, the agent looks it up in its MIB and replies, and the agent can also push an alert when something happens.

Communication is mostly pull: the manager sends a request and the agent responds. That gives a regular picture of device health at whatever interval you choose. Traps work the other way: the agent sends an unsolicited message the moment an event occurs, so you learn at once that a link went down.

SNMP normally runs over UDP, which keeps it lightweight. The trade-off is that UDP delivery is not guaranteed, which is why SNMPv2c and SNMPv3 added informs — traps that the manager must acknowledge, so the agent knows the alert arrived.

How SNMP works: poll and trap SNMP managerNetwork managementstation (NMS)sends GET requests SNMP agentsoftware on the devicereads its MIB and repliessends traps on events GET on UDP 161 Response with value Trap: agent pushes an alert to UDP 162 when a link fails, a device reboots or a threshold is crossedInforms (v2c and v3) work like traps but require the manager to acknowledge receipt.
SNMP polling on UDP 161 and traps on UDP 162. Illustration by Cysoro.

What are the main components of SNMP?

An SNMP-managed network has four core components: the manager, the agent, the MIB and the OID. Each one has a distinct job, and understanding them makes the rest of SNMP much easier.

The manager (network management station)

The manager is the monitoring system that sends queries and receives alerts. It is usually a network monitoring platform, and it keeps the history, draws the graphs and raises alarms when a value crosses a threshold.

The agent

The agent is software that runs on the managed device. It has local knowledge of the device's management information, answers the manager's queries, and can send traps when configured events occur. Because the agent ships in the device firmware, there is usually nothing to install.

The MIB (Management Information Base)

The MIB is a structured database, defined in plain-text files, that describes every piece of data a device can report. It is organized as a tree, and vendors extend it with their own branches for device-specific values such as fan speed or temperature.

The OID (Object Identifier)

An OID is the dotted numeric address of one value inside the MIB tree, for example 1.3.6.1.2.1.1.3.0 for system uptime. The manager asks for an OID, and the agent returns the value stored there. Tools such as snmpwalk let you walk the whole tree without knowing every OID in advance.

SNMPv1 vs SNMPv2c vs SNMPv3: what is the difference?

The three versions differ mainly in security and efficiency. SNMPv1 is the original, SNMPv2c adds bulk retrieval and 64-bit counters, and SNMPv3 adds authentication, message integrity and encryption.

FeatureSNMPv1SNMPv2cSNMPv3
AuthenticationCommunity string, plain textCommunity string, plain textPer-user, User-based Security Model
EncryptionNoneNoneOptional, AES with authPriv
Message integrityNoneNoneYes, with authentication
Bulk retrievalNoYes, GetBulkYes
64-bit countersNoYesYes
InformsNoYesYes
Use todayRetire itOnly where v3 is impossibleDefault choice

SNMPv3 has three security levels. The noAuthNoPriv level has no authentication and no encryption, and is effectively as weak as v2c. The authNoPriv level authenticates the user but sends data in clear text. The authPriv level provides both authentication and encryption, and it is the only level that belongs on a production network.

CISA's router-hygiene guidance is direct: use SNMPv3 with authPriv configured to the most modern encryption standard the device supports, instead of SNMPv1 or SNMPv2, and disable SNMPv1 and SNMPv2 because they are legacy protocols that should no longer be needed on current devices.

What SNMP commands and operations are there?

SNMP is built from a small set of operations. The manager uses them to read and write values, and the agent uses notifications to report events.

  • GET — requests the value of one OID, such as device uptime or a port's status.
  • GETNEXT — returns the next OID in the MIB tree, which lets a manager walk a table without knowing every OID in advance.
  • GETBULK — retrieves many values at once, which is far more efficient than one GET per value (v2c and v3).
  • SET — changes the value of an OID, which is how SNMP can alter configuration. This is why read-write access is dangerous.
  • TRAP — an unsolicited alert from the agent to the manager.
  • INFORM — a trap that the manager must acknowledge (v2c and v3).
  • RESPONSE — the agent's reply to a manager request.

For monitoring, you almost never need SET. Read-only access is enough to collect CPU, memory, traffic and uptime, and it removes the risk that a stolen credential can reconfigure a device.

What is SNMP used for?

SNMP is used to monitor device health, track network traffic, detect faults early and plan capacity. It is the standard way to watch hardware that cannot run a monitoring agent of its own.

Typical data includes interface traffic and errors, CPU and memory use, temperature and fan status, UPS battery runtime, disk health on a storage array, and the uptime of a switch or router. A monitoring system polls these values on a schedule, graphs them over time, and alerts when a threshold is crossed.

SNMP is also used for fault detection. A trap can tell you the moment a link goes down or a device reboots, rather than waiting for the next poll. Combined with polling, that gives you both a trend and an immediate alarm.

It is less suited to modern application monitoring. SNMP tells you what a device is doing, not what an application is doing, and it has no built-in way to monitor cloud services or software-as-a-service. Teams usually pair it with flow data, logs and application monitoring for a fuller picture.

Why is SNMP a security risk?

SNMP is a security risk because older versions have no real authentication, and because many devices ship with SNMP enabled and default credentials. An attacker who can reach UDP 161 can often read detailed information about your network for free.

The classic weakness is the community string. SNMPv1 and SNMPv2c send it in plain text, so anyone who can capture traffic can read it. The defaults — "public" for read-only and "private" for read-write — are widely known, and CISA notes that attackers scan for SNMP agents that accept common or default community strings.

A read-only string is enough to do damage. It reveals device models, software versions, interface addresses and network topology, which is exactly the reconnaissance an attacker wants before choosing a target. A read-write string is worse: it can change device configuration.

SNMP has also been abused for reflection attacks, where spoofed queries trick agents into sending large responses to a victim. That is another reason SNMP must never be reachable from the internet.

Securing SNMP: six controls that matter most 1. Use SNMPv3 authPrivAuthentication plus AES encryption, SHA or stronger 2. Change every defaultNever leave public or private in place 3. Read-only unless you must writeMonitoring needs read-only access only 4. Restrict by ACLOnly your monitoring servers may query port 161 5. Block SNMP at the perimeterUDP 161 and 162 must never face the internet 6. Limit views and audit regularlyExpose only the MIB branches monitoring needs
Six SNMP hardening controls, based on CISA and Cisco guidance. Illustration by Cysoro.

How do you secure SNMP?

Secure SNMP by moving to SNMPv3 with authPriv, removing default community strings, restricting access to your monitoring servers, and blocking SNMP at the network edge.

Start with an inventory: find every device with SNMP enabled and note which version it runs. Disable SNMP entirely on devices you do not monitor. On the rest, disable SNMPv1 and SNMPv2c. If an old device genuinely cannot run v3, change its community strings to long, random values, keep them read-only, and restrict them with an ACL.

For SNMPv3, create a dedicated user with separate passphrases for authentication and privacy, use SHA or stronger for authentication and AES for encryption, and set the security level to authPriv. Cisco's SNMP security guide adds the same advice: prefer v3 with authPriv and restrict access with views and ACLs.

Use SNMP views to limit which MIB branches each user can read, so a compromised credential exposes as little as possible.

Put SNMP traffic on a separate management network or VLAN where you can, and block UDP 161 and 162 at the firewall so they are never reachable from the internet. Finally, audit regularly: check for devices that reverted to defaults after a firmware reset, and watch for unexpected SNMP queries in your logs.

Our guide to securing your Wi-Fi covers the same principle for home networks: management interfaces belong on a trusted network, not exposed to everyone.

SNMP vs other monitoring protocols

SNMP is not the only way to monitor a network. It is the oldest and most widely supported, but newer approaches fill gaps it leaves, especially for cloud and application monitoring.

  • SNMP — best for hardware: routers, switches, printers, UPS units. Lightweight, universal, but limited to device data.
  • NetFlow / sFlow / IPFIX — best for traffic analysis: who talked to whom, on which port, and how much. Complements SNMP rather than replacing it.
  • Syslog — best for event logs: device messages and errors, useful alongside SNMP traps.
  • API and agent-based monitoring — best for servers, containers and cloud services, where SNMP has little to report.
  • ICMP ping — best for a simple up-or-down check, but tells you nothing about why a device is slow.

Most teams use SNMP for hardware health, flow data for traffic, and agents or APIs for everything else. The combination gives a fuller picture than any one protocol alone. For a wider starting point, our small business cybersecurity checklist covers monitoring alongside backups, updates and device security.

You can also look up any device's DNS records with our free DNS lookup tool.

The bottom line

SNMP is the quiet workhorse of network monitoring: a standard protocol that lets one system ask almost any device how it is doing. Its weakness was never the idea, it was the security of the first two versions.

Run SNMPv3 with authPriv, use read-only access, restrict queries to your monitoring servers, and keep UDP 161 and 162 off the internet. Do that, and SNMP gives you early warning of failures without handing attackers a map of your network. You can check what your own network exposes from the outside with our free IP and network tools.

Frequently asked questions

What is SNMP in simple terms?

SNMP is a standard way for a monitoring system to ask network devices how they are doing. A central manager queries each device's agent for values such as CPU load, interface traffic and uptime, and the device can also send alerts when something changes.

What port does SNMP use?

SNMP uses UDP port 161 for manager-to-agent queries and responses, and UDP port 162 for traps, the unsolicited alerts agents send to the manager. Both ports should be blocked at the network perimeter.

What is the difference between SNMPv1, SNMPv2c and SNMPv3?

SNMPv1 is the original version with 32-bit counters. SNMPv2c adds bulk retrieval and 64-bit counters. SNMPv3 adds per-user authentication, message integrity and optional encryption. Only SNMPv3 can protect management traffic.

What is a MIB in SNMP?

A MIB, or Management Information Base, is a structured database that defines the data a device can report, organized as a tree. Each value in the tree has an OID, a dotted numeric address such as 1.3.6.1.2.1.1.3.0 for system uptime.

What is an SNMP community string?

A community string is the shared password-like text SNMPv1 and SNMPv2c use for access control. The defaults are public for read-only access and private for read-write access. Community strings travel in plain text, so anyone who can capture traffic can read them.

Is SNMP secure?

SNMPv1 and SNMPv2c are not secure, because they have no real authentication or encryption. SNMPv3 at the authPriv level, with authentication and AES encryption, is the secure option. Even then, restrict access with ACLs and a management network.

What is an SNMP trap?

A trap is an unsolicited alert an agent sends to the manager when a configured event happens, such as a link going down or a device rebooting. SNMPv2c and SNMPv3 also support informs, which are traps the manager must acknowledge.

Should I disable SNMP?

Disable SNMP on devices you do not monitor, and disable SNMPv1 and SNMPv2c wherever SNMPv3 is supported. If you need monitoring, run SNMPv3 with authPriv, read-only views, strong unique credentials and ACLs that allow only your monitoring servers.

Sources

  1. IETF — RFC 3411, An Architecture for Describing SNMP Management Frameworks
  2. CISA — Improve Router Hygiene to Protect Against Russian State-Sponsored Targeting
  3. Cisco — Secure Simple Network Management Protocol
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against RFC 3411, CISA router-hygiene guidance and Cisco's SNMP security documentation.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free