L7 · management · draft
SNMP
Simple Network Management Protocol
A manager reads and changes typed MIB objects; agents send traps or informs. v3 adds USM authentication and privacy.
Presenter modeEmbed this figure
Why it exists
Operators need a common way to poll counters and receive device events across many vendors without scraping CLI. IntroductionRFC 3411 · INTERNET STANDARD · December 2002
SNMPv2c is still common and still weak: community strings are not encryption. Prefer SNMPv3 USM where the platform supports it. Security Requirements of this ArchitectureRFC 3411 · INTERNET STANDARD · December 2002
GETBULK walks a table efficiently
A manager uses GETBULK to retrieve repeated lexicographic successors. Oversized max-repetitions or mishandled exceptions abort a walk that GETNEXT would have finished slowly.
The manager sends GetBulkRequest with non-repeaters and max-repetitions. The agent returns successive variable bindings without a GETNEXT round trip per row. NMS. Agent · UDP 161.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| NMS | host | — |
| Agent · UDP 161 | router | — |
| NMS — Agent · UDP 161 | link | up |
The manager sends GetBulkRequest with non-repeaters and max-repetitions. The agent returns successive variable bindings without a GETNEXT round trip per row.
What changed
- GetBulkRequest: NMS → Agent · UDP 161
- max-repetitions set
How it works
Object identifiers name managed objects. GET retrieves instances; GETNEXT and GETBULK walk lexicographic order; SET writes when the view allows. Protocol SpecificationRFC 3416 · INTERNET STANDARD · December 2002
Notifications are separate: SNMPv2-Trap is one-way; InformRequest expects a Response. Both typically use UDP. The SNMPv2-Trap-PDURFC 3416 · INTERNET STANDARD · December 2002
The SNMP architecture (RFC 3411) separates applications, the message processing model, and security models such as USM (RFC 3411). Elements of the ArchitectureRFC 3411 · INTERNET STANDARD · December 2002
On the wire
Constructed examples, encoded from the field table below them — not captured traffic.
- IPv4 or IPv6
- Protocol number 17. The addresses are borrowed back for the checksum pseudo-header. RFC 768
- UDP header
- Source port, destination port, length, checksum. RFC 768
- Payload
- DNS, DHCP, a VXLAN-encapsulated frame, a QUIC packet — whatever the destination port implies. RFC 768
Configure it
snmp-server group RO v3 priv snmp-server user monitor RO v3 auth sha <configured out of band> priv aes 128 <configured out of band>USM user with authentication and privacy. Security level priv must match what the NMS sends or messages are discarded.
Common mistake: Configuring authPriv on the agent while the NMS still uses authNoPriv — silent timeouts.
RFC 3414 §1.1
access-list 10 permit 198.51.100.0 0.0.0.255 snmp-server community <temporary-lab-only> RO 10If v2c must remain briefly for migration, ACL it tightly and prefer removing it. Community strings are not encryption.
Common mistake: Leaving “public”/“private” communities enabled beside v3.
Cisco IOS XE — Configuring SNMP Support §Configuring SNMP Support
Verify
show snmp user- v3 user monitor present with auth and priv protocols.
show snmp group- Group security model v3 / level priv.
Caveats
- Marked draft: syntax has not been checked against Cisco documentation or a device.
- Placeholder secrets only — never commit real auth/priv passwords.
When it breaks
Symptom first, because that is what you have when it happens.
A table walk stops after the first few rows.
Narrow it down
- Read error-status and error-index on the Response.
- Reduce GETBULK max-repetitions and retry.
Cause
The response exceeds an agent or path size limit, or one binding exception aborts the manager’s walk.
Fix
Use bounded GETBULK and handle exception values per binding.
The GetBulkRequest-PDURFC 3416 · INTERNET STANDARD · December 2002Traffic graphs drop to zero or spike after a reboot.
Narrow it down
- Correlate counters with agent uptime and discontinuity markers.
- Confirm 32-bit versus 64-bit counter objects.
Cause
The collector treated a reset or wrap as ordinary monotonic growth.
Fix
Reset baselines when uptime or discontinuity time changes; prefer high-capacity counters.
Elements of the ArchitectureRFC 3411 · INTERNET STANDARD · December 2002Traps are missing but polling works.
Narrow it down
- Check notification destination and source address.
- Distinguish trap counters from inform counters.
Cause
Traps are unacknowledged and can be lost; source address mismatches also hide events.
Fix
Use informs where acknowledgement matters; configure a stable reachable source.
The InformRequest-PDURFC 3416 · INTERNET STANDARD · December 2002SNMPv3 queries time out with no Response.
Narrow it down
- Compare username, auth/priv protocols, and passwords.
- Confirm engineID discovery and security level (authPriv vs authNoPriv).
Cause
USM discards messages that fail authentication or do not meet the required security level.
Fix
Align USM credentials and level; rediscover engineID after device replacement.
Security Requirements of this ArchitectureRFC 3411 · INTERNET STANDARD · December 2002Unauthorized hosts can read interface counters.
Narrow it down
- List communities and views on the agent.
- Check whether SNMPv2c is still enabled beside v3.
Cause
A permissive community or overlapping v2c access remains enabled.
Fix
Disable unused communities; restrict views and source addresses; migrate to v3.
Security Requirements of this ArchitectureRFC 3411 · INTERNET STANDARD · December 2002
Design notes
Counter discontinuities after reboot or wrap invalidate baselines. Correlate with sysUpTime / discontinuity objects before graphing deltas.
Views and groups bound what a user or community may see. A working poll with empty interesting OIDs is often an ACL/view problem, not “SNMP down.” Cisco IOS XE — Configuring SNMP Support §Configuring SNMP Support
Misconceptions
- “An OID is just a counter name.”
- An OID names an object in a hierarchical schema; an instance may hold a counter, string, state, address, or writable control. Elements of the ArchitectureRFC 3411 · INTERNET STANDARD · December 2002
- “A trap proves the manager received the event.”
- A trap has no application acknowledgement. An inform is the notification that expects a Response. The SNMPv2-Trap-PDURFC 3416 · INTERNET STANDARD · December 2002
- “SNMPv3 authentication encrypts the MIB values.”
- Authentication and privacy are separate USM services. authNoPriv authenticates without encrypting the scopedPDU. Security Requirements of this ArchitectureRFC 3411 · INTERNET STANDARD · December 2002
More walkthroughs
USM authPriv versus community stringsdesign-choice
SNMPv2c community strings are shared secrets in the clear on the wire. SNMPv3 USM can authenticate and encrypt; mis-matched security level or engineID produces silent discard.
A community-based GetRequest authenticates only by a string the agent compares. Anyone who can sniff or guess the community can read or write within that view. NMS · USM user. Agent · v3.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| NMS · USM user | host | — |
| Agent · v3 | router | — |
| NMS · USM user — Agent · v3 | link | up |
A community-based GetRequest authenticates only by a string the agent compares. Anyone who can sniff or guess the community can read or write within that view.
What changed
- Community is not encryption
Trap lost; inform expects acknowledgementfailure
A trap is an unacknowledged notification. An inform expects a Response. UDP loss plus traps produces missing events while polling still looks healthy.
The agent sends a Trap-PDU toward the configured destination. There is no application acknowledgement — loss is invisible to the agent. Agent. UDP loss. NMS · 162: Event never seen.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| Agent | router | — |
| UDP loss | zone | — |
| NMS · 162 | cloud | Event: never seen |
| Agent — UDP loss | link | up |
| UDP loss — NMS · 162 | link | up |
The agent sends a Trap-PDU toward the configured destination. There is no application acknowledgement — loss is invisible to the agent.
What changed
- Trap: Agent → UDP loss
- Trap dropped
- NMS · 162: Event → never seen