SNMP – Simple Network Management Protocol Overview
1. What Is SNMP and Why Does It Matter?
SNMP (Simple Network Management Protocol) is the industry-standard protocol for monitoring and managing network devices. It enables a central Network Management Station (NMS) to collect performance data, receive alerts, and modify configuration parameters on routers, switches, firewalls, servers, printers, and any other SNMP-capable device — all from a single management platform.
Without SNMP, an administrator would need to log into each device individually to check interface statistics, CPU utilisation, memory usage, and error counters. In a network with hundreds or thousands of devices, this is impractical. SNMP automates monitoring by allowing devices to report their status proactively and allowing the NMS to poll devices on a schedule.
| SNMP Capability | Example Use Case |
|---|---|
| Performance monitoring | NMS polls every router every 5 minutes for interface utilisation — generates bandwidth trending graphs and capacity planning reports |
| Fault detection | When a router interface goes down, the device immediately sends a TRAP to the NMS — alerting the NOC without waiting for the next poll cycle |
| Configuration changes | NMS sends a SET operation to update an interface description or enable/disable an interface remotely |
| Inventory management | NMS queries all devices for model number, IOS version, serial number, and installed modules — builds an asset database automatically |
| Threshold alerting | NMS alerts when CPU exceeds 80%, memory drops below 20%, or error rate on an interface exceeds a threshold |
Related pages: NetFlow Overview | show logging (Syslog/SNMP) | Syslog Configuration Lab | show running-config | ACL Overview | NTP Synchronisation | SNMP v2c & v3 Configuration Lab
2. SNMP Architecture — Manager and Agent
SNMP uses a manager–agent model. The manager (NMS) is the central system that requests information and issues commands. The agent is software running on each managed device that responds to manager requests and generates unsolicited alerts.
2.1 SNMP Manager (NMS)
The SNMP Manager — also called the NMS (Network Management System) — is a software application running on a management server or workstation. It is the active party: it sends requests to agents, receives responses, processes TRAP/INFORM messages, and presents network status to administrators through dashboards and alerts.
2.2 SNMP Agent
The SNMP Agent is software built into virtually every network device — routers, switches, firewalls, APs, servers, and printers. It passively listens for manager requests, responds with the requested data, and proactively sends TRAP or INFORM messages when significant events occur (interface down, high CPU, config change).
Manager–Agent Communication Flow
SNMP communication model: ┌─────────────────────────────────────────────────────────────────────────┐ │ NMS (Manager) Agent (device) │ │ │ │ 1. GET request ────────────── UDP port 161 ──────────────────────────► │ │ "What is the value of OID 1.3.6.1.2.1.2.2.1.10.1?" │ │ (inOctets on interface GigabitEthernet0/0) │ │ │ │ 2. GET-RESPONSE ◄──────────── UDP port 161 ────────────────────────── │ │ "Value = 45,231,894,012 bytes" │ │ │ │ 3. TRAP ◄─────────────────── UDP port 162 ────────────────────────── │ │ "linkDown — GigabitEthernet0/0 is down" (unsolicited) │ │ │ │ NMS sends from a high port; Agent listens on UDP 161 │ │ Agent sends TRAPs to NMS on UDP 162 │ └─────────────────────────────────────────────────────────────────────────┘ Key UDP ports: UDP 161 → SNMP requests (GET, GETNEXT, GETBULK, SET) — agent listens here UDP 162 → SNMP notifications (TRAP, INFORM) — NMS listens here
3. MIB — Management Information Base
The MIB (Management Information Base) is a hierarchical database of all variables that can be monitored or configured on a device via SNMP. Each variable in the MIB is called an OID (Object Identifier). The MIB is not stored on the NMS — it is a standardised description of what variables exist and how they are structured. Both the manager and the agent understand the same MIB definitions.
MIB Tree Structure
OID — Object Identifier
Every variable in the MIB has a unique OID — a sequence of numbers separated by dots, corresponding to the path through the MIB tree from the root to that specific object.
4. SNMP Operations — GET, SET, TRAP, INFORM
SNMP defines a small set of operations for communication between the manager and agent. Each operation uses a specific message type.
4.1 GET — Retrieve a Single Variable
4.2 GETNEXT — Walk the MIB Table
4.3 GETBULK — Efficiently Retrieve Large Tables (SNMPv2c/v3)
4.4 SET — Modify a Variable
4.5 TRAP — Unsolicited Alert from Agent
4.6 INFORM — Acknowledged Trap (SNMPv2c/v3)
SNMP Message Type Summary
| Operation | Direction | UDP Port | Purpose | Version |
|---|---|---|---|---|
| GET | NMS → Agent | 161 | Retrieve specific OID value(s) | v1, v2c, v3 |
| GETNEXT | NMS → Agent | 161 | Get next OID in MIB tree (walk) | v1, v2c, v3 |
| GETBULK | NMS → Agent | 161 | Retrieve multiple OID rows efficiently | v2c, v3 |
| SET | NMS → Agent | 161 | Modify OID value — remote configuration | v1, v2c, v3 |
| GET-RESPONSE | Agent → NMS | 161 | Return requested OID values to manager | v1, v2c, v3 |
| TRAP | Agent → NMS | 162 | Unsolicited alert — no acknowledgement | v1, v2c, v3 |
| INFORM | Agent → NMS | 162 | Acknowledged alert — reliable notification | v2c, v3 |
5. SNMP Versions — v1, v2c, v3
SNMP has evolved through three major versions. Each version improves on the security and capabilities of the previous one. SNMPv3 is the only version with strong security and is required in modern production environments.
5.1 SNMPv1
5.2 SNMPv2c
5.3 SNMPv3
SNMP Version Comparison
| Feature | SNMPv1 | SNMPv2c | SNMPv3 |
|---|---|---|---|
| Authentication | Community string (plaintext) | Community string (plaintext) | Username + HMAC-MD5/SHA |
| Encryption | None | None | DES, 3DES, AES-128, AES-256 |
| Message integrity | None | None | HMAC ensures integrity |
| Counter size | 32-bit | 32-bit + 64-bit (Counter64) | 32-bit + 64-bit (Counter64) |
| GETBULK | No | Yes | Yes |
| INFORM | No | Yes | Yes |
| Production recommended | No — legacy only | Read-only only (no SET) | Yes — use authPriv |
6. Community Strings (SNMPv1 / SNMPv2c)
A community string is the SNMPv1/v2c equivalent of a password. It is a plaintext string included in every SNMP message. The agent checks the community string against its configured values before processing any request. There are two types:
| Community String Type | Access Granted | Typical Value |
|---|---|---|
| Read-only (RO) | GET and GETNEXT operations only — cannot modify any values | "public" (default — should always be changed) |
| Read-write (RW) | GET and SET operations — full read and write access to MIB | "private" (default — must be changed immediately) |
Configuring SNMP Community Strings on Cisco IOS
! Read-only community string (polling/monitoring only): Router(config)# snmp-server community Str0ngR0String ro ! Read-write community string (allows SET operations): Router(config)# snmp-server community Str0ngRWStr1ng rw ! Restrict SNMP access to NMS IP only using an ACL: Router(config)# ip access-list standard SNMP_ALLOWED Router(config-std-nacl)# permit host 10.99.1.10 ! NMS IP address Router(config-std-nacl)# deny any log Router(config-std-nacl)# exit Router(config)# snmp-server community Str0ngR0String ro SNMP_ALLOWED ! ACL is applied as the 4th argument — only NMS can use this community ! Verify: Router# show snmp community
See: show running-config
7. SNMPv3 Configuration
SNMPv3 replaces community strings with a user-based security model. Each user is associated with a group, and each group has a defined security level. Configuration requires defining views, groups, and users.
SNMPv3 Configuration Components
| Component | Purpose | Command |
|---|---|---|
| View | Defines which portion of the MIB tree is accessible — restricts what OIDs can be read or written | snmp-server view |
| Group | Associates a security level (noAuthNoPriv, authNoPriv, authPriv) with a view — defines what security and access level the group members have | snmp-server group |
| User | Individual SNMP user with credentials — assigned to a group; authentication and privacy passwords set here | snmp-server user |
Full SNMPv3 configuration — authPriv (most secure): ! ── Step 1: Define a view (which MIB objects are accessible) ──────────── Router(config)# snmp-server view FULL_MIB iso included ! "iso included" = allow access to the entire MIB tree under iso ! ── Step 2: Define a group with authPriv security level ───────────────── Router(config)# snmp-server group SNMP_ADMINS v3 priv ! ↑ ↑ ! version security level (priv = authPriv) ! ── Step 3: Define a user with authentication and privacy passwords ────── Router(config)# snmp-server user nmsuser SNMP_ADMINS v3 auth sha AuthP@ssw0rd priv aes 256 Priv@ssw0rd ! ↑ ↑ ↑ ↑ ↑ ↑ ↑ ! username group version hash auth-key encrypt priv-key ! ── Step 4: Configure SNMP TRAP destination (send alerts to NMS) ───────── Router(config)# snmp-server host 10.99.1.10 version 3 priv nmsuser ! NMS IP version security-level username ! ── Step 5: Enable SNMP traps (which events to send) ───────────────────── Router(config)# snmp-server enable traps snmp authentication linkdown linkup Router(config)# snmp-server enable traps config ! config change traps Router(config)# snmp-server enable traps cpu threshold ! CPU threshold ! ── Verify ──────────────────────────────────────────────────────────────── Router# show snmp Router# show snmp user Router# show snmp group
snmp-server user
command stores authentication and privacy passwords as hashes —
they are not visible in the running-config in plaintext.
However, show snmp user shows the user's group
membership and authentication/privacy protocols but not the
passwords themselves.
8. SNMP Trap Configuration
TRAPs (and INFORMs) are the proactive alerting mechanism of SNMP. Without traps, the NMS would only learn about problems at its next poll cycle — which might be 5 minutes away. Traps deliver alerts immediately when a significant event occurs.
Configuring SNMP TRAPs on Cisco IOS (SNMPv2c): ! Define the NMS that will receive traps: Router(config)# snmp-server host 10.99.1.10 version 2c Str0ngR0String ! Enable specific trap types (or use "all" for everything): Router(config)# snmp-server enable traps snmp authentication linkdown linkup coldstart Router(config)# snmp-server enable traps ospf state-change ! OSPF events Router(config)# snmp-server enable traps bgp ! BGP events Router(config)# snmp-server enable traps config ! config changes Router(config)# snmp-server enable traps envmon temperature ! temp alerts Router(config)# snmp-server enable traps cpu threshold ! CPU overload ! Using INFORM instead of TRAP (SNMPv2c — more reliable): Router(config)# snmp-server host 10.99.1.10 informs version 2c Str0ngR0String ! Set the device's contact and location info (good practice for NMS inventory): Router(config)# snmp-server contact "NOC Team - [email protected]" Router(config)# snmp-server location "Main DC - Rack A3 - Slot 4" ! Verify traps are enabled and NMS host is configured: Router# show snmp host Router# show snmp trap
9. SNMP Polling vs SNMP Traps — When to Use Each
A complete SNMP monitoring strategy uses both polling and traps — they complement each other's weaknesses.
| Feature | SNMP Polling (GET) | SNMP Traps / INFORMs |
|---|---|---|
| Initiated by | NMS (manager) — on a schedule | Agent (device) — immediately on event |
| Alert speed | Delayed — only detects issues at next poll cycle (typically 1–5 minutes) | Immediate — device alerts NMS the moment the event occurs |
| Bandwidth impact | Continuous — regular polling traffic; scales with number of devices and poll frequency | Minimal — only generates traffic when events occur |
| Reliability | High — NMS controls the poll; missing data is detected as a gap in the timeseries | Medium (TRAP) / High (INFORM) — TRAPs can be lost; INFORMs are acknowledged |
| Primary use | Performance trending, capacity planning, baseline monitoring, SLA reporting | Fault management — real-time alerts for interface down, high CPU, authentication failures |
10. Verification Commands
Sample Output — show snmp
Common SNMP Troubleshooting Issues
| Symptom | Likely Cause | Fix |
|---|---|---|
| NMS cannot poll device | Wrong community string, UDP 161 blocked by ACL, or SNMP not configured on device | Verify with show snmp community; check ACL
with show ip access-lists; confirm
snmp-server community is configured |
| Traps not arriving at NMS | Wrong NMS IP in snmp-server host, UDP 162
blocked by firewall, or traps not enabled |
Verify with show snmp host; check firewall
rules; confirm snmp-server enable traps |
| SNMPv3 authentication errors | User not configured on device, wrong auth/priv password, or security level mismatch between NMS and agent | Verify with show snmp user and
show snmp group; confirm NMS uses same user,
protocol, and passwords |
| Counter wrap — incorrect utilisation graphs | Using SNMPv1 or polling 32-bit counters on high-speed interfaces — counter wraps before next poll | Upgrade to SNMPv2c or v3 to use 64-bit (Counter64) OIDs for interface statistics |
11. SNMP Summary — Key Facts
| Topic | Key Fact |
|---|---|
| SNMP manager port | UDP 162 — receives TRAPs and INFORMs from agents |
| SNMP agent port | UDP 161 — listens for GET, GETNEXT, GETBULK, SET from NMS |
| MIB | Hierarchical database of all manageable variables; structured as a tree; each variable has a unique OID |
| OID | Dot-separated number sequence identifying a specific MIB variable (e.g., 1.3.6.1.2.1.1.5.0 = sysName) |
| GET | NMS retrieves specific OID value from agent — request/response |
| SET | NMS modifies OID value on agent — requires write access |
| TRAP | Agent sends unsolicited alert to NMS — UDP, no acknowledgement, can be lost |
| INFORM | Like TRAP but acknowledged — agent retransmits until NMS confirms receipt; v2c/v3 only |
| SNMPv1/v2c security | Community strings — plaintext; easily captured; no encryption |
| SNMPv3 security levels | noAuthNoPriv (none), authNoPriv (auth only), authPriv (auth + encryption) — use authPriv in production |
| SNMPv2c advantage | GETBULK, INFORM, and 64-bit counters (Counter64) added over v1 |
| Default community strings | "public" (read-only) and "private" (read-write) — must be changed immediately on all devices |
12. SNMP Concepts Quiz
Related Topics & Step-by-Step Tutorials
Continue your network management studies:
- SNMP – Simple Network Management Protocol Overview — SNMP fundamentals — MIB, OIDs, agents, managers
- SNMP Versions (v1, v2c, v3) – Detailed Guide — SNMPv1, v2c, v3 — security and feature comparison
- SNMP Community Strings – Complete Guide — community strings — read-only and read-write
- SNMP Traps – Complete Guide — traps and informs — proactive SNMP notifications
- Syslog – Logging Overview — syslog — complementary logging alongside SNMP
- NetFlow – Traffic Monitoring Overview — NetFlow — traffic flow analysis
- SNMP v2c and v3 Configuration on Cisco IOS (Step-by-Step)