Why SNMP exists
Managing a network with hundreds of routers, switches, and servers individually would be impossible at scale. SNMP solves this by giving a central network management station (NMS) a standardised way to query any managed device for its current status and statistics — without logging into each device separately.
Think of it as a health-monitoring system for your entire network infrastructure. The NMS can poll every device every few minutes, collect data, graph trends, and send alerts when something goes wrong — all automatically.
How SNMP communication works
SNMP communication happens in two directions — the manager polling agents, and agents sending unsolicited traps. Both use UDP, which makes SNMP lightweight but also connectionless.
GetRequest Manager → Agent (UDP 161) Ask for the value of a specific OID e.g. "What is the current CPU utilisation?" GetNextRequest Manager → Agent (UDP 161) Walk through the MIB tree sequentially GetBulkRequest Manager → Agent (UDP 161) — SNMPv2c+ Retrieve large amounts of data efficiently SetRequest Manager → Agent (UDP 161) Change a value on the device e.g. "Change the interface description" GetResponse Agent → Manager (UDP 161) Reply to any Get or Set request Trap Agent → Manager (UDP 162) Unsolicited alert — sent when an event occurs e.g. link down, high temperature, auth failure Inform Agent → Manager (UDP 162) — SNMPv2c+ Like a trap but requires acknowledgement
UDP 161 — SNMP queries (manager polling agents). The agent listens on 161.
UDP 162 — SNMP traps (agents sending alerts to manager). The manager listens on 162.
Memory trick: the manager asks on 161, the device tells on 162. Both are UDP — SNMP is connectionless by design to reduce overhead on managed devices.
OIDs and MIBs
Every piece of information an SNMP agent can report is identified by an OID (Object Identifier) — a dotted numeric string that uniquely identifies a variable in the global SNMP namespace. The collection of all OIDs a device supports is defined in its MIB (Management Information Base).
1.3.6.1.2.1.1.1.0 → sysDescr — system description string 1.3.6.1.2.1.1.3.0 → sysUpTime — how long since last reboot 1.3.6.1.2.1.2.2.1.10.1 → ifInOctets — bytes received on interface 1 1.3.6.1.2.1.2.2.1.16.1 → ifOutOctets — bytes sent on interface 1 Structure: iso.org.dod.internet.mgmt.mib-2.interfaces... Each number represents a branch in the OID tree
You don't need to memorise OIDs for the exam — but you do need to understand that OIDs are the addressing system SNMP uses to identify specific data points, and that the MIB is the schema defining which OIDs a device supports and what they mean.
SNMPv1 vs SNMPv2c vs SNMPv3
The version of SNMP in use determines the security level of your network monitoring. This is one of the most heavily tested SNMP topics — the exam will ask you to identify which version to use and why the older versions are security risks.
| Version | Authentication | Encryption | Status | Key fact |
|---|---|---|---|---|
| SNMPv1 | Community string (plaintext) | None | Avoid | Original version. Community string sent in cleartext — trivial to intercept. No encryption whatsoever. |
| SNMPv2c | Community string (plaintext) | None | Legacy | Added GetBulk and Inform — more efficient. Still sends community strings in plaintext. No real security improvement over v1. |
| SNMPv3 | Username + MD5/SHA hashing | AES or 3DES | Recommended | Adds authentication, encryption, and message integrity. The only version that should be used in production environments. |
Community strings — the SNMPv1/v2c security problem
SNMPv1 and SNMPv2c use community strings as a basic form of authentication — essentially a shared password included in every SNMP message. There are two types:
Community strings are sent in plaintext. Anyone capturing network traffic with a packet analyser can read them directly — no decryption needed. With the read-write community string, an attacker can reconfigure network devices remotely.
Default community strings ("public" and "private") are well-known and are actively scanned for by attackers. Devices left with defaults are trivially exploitable.
Best practice: Use SNMPv3 exclusively. If you must use v1/v2c, change community strings from defaults, restrict SNMP access via ACLs to only the management station's IP, and consider placing SNMP traffic on a dedicated out-of-band management VLAN.
SNMPv3 security model
SNMPv3 replaces community strings with a proper security framework using three configurable security levels:
noAuthNoPriv No authentication, no encryption Username only — still weak, not recommended authNoPriv Authentication (MD5 or SHA), no encryption Verifies identity but traffic still readable authPriv Authentication + Encryption (AES or 3DES) Full security — use this in production Credentials verified, traffic encrypted end-to-end
USM (User-based Security Model) — handles authentication and encryption using named users and credentials rather than community strings.
VACM (View-based Access Control Model) — controls which OIDs a user can access, providing granular read/write permissions per user.
SNMP in network monitoring — real-world context
In practice, SNMP is what powers most enterprise network monitoring platforms. Tools like SolarWinds NPM, PRTG, Nagios, Zabbix, and LibreNMS all use SNMP to collect metrics from managed devices.
A typical deployment polls every managed device every 5 minutes, collects interface traffic counters, CPU and memory utilisation, and interface error rates, then graphs the data over time. SNMP traps provide near-real-time alerting — a switch sending a trap the moment a port goes down is far faster than waiting for the next polling cycle.
Port 161 UDP — SNMP queries (manager to agent). Port 162 UDP — SNMP traps (agent to manager).
SNMPv1/v2c — community strings in plaintext, security risk. SNMPv3 — username/password + AES encryption, the only secure version.
Trap = unsolicited alert from agent to manager. Poll/Get = manager asking agent for data. Set = manager changing a value on the device.
MIB = the schema of what data a device can report. OID = the unique identifier for each data point within the MIB.
Exam scenarios
Studying for Network+?
The N10-009 study guide, Dion Training practice exams, and Professor Messer's free course.