Use it when a monitoring system cannot read a device: the response, error or silence tells whether the cause is credentials, access restrictions or the network.
SNMP PDU Evidence
An SNMP message is a wrapper — version, and a community string or SNMPv3 user and security data — around a PDU: a request, response or notification carrying object identifiers and values.
1. show snmp while the monitoring system polls — do input counters rise?
2. Not at all → the requests do not arrive: path, access list, firewall, VRF.
3. "Unknown community name" rising → wrong community.
4. SNMPv3: a Report in the capture → read the reason: user, digest or time window.
5. Answers with "no such object" → the view excludes it, or the device does not support it.
request reaches UDP 161 on the device → community or SNMPv3 user accepted → object within the permitted view → Response with error status 0 and a value → reply reaches the monitoring system
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show snmpVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification workflow Verify boundary
show snmp
show snmp user
show snmp group
show snmp view
show snmp engineID
debug snmp packets
show snmp counts packets received and, separately, the failures: unknown community names, illegal operations for the community, encoding errors — along with requests processed and traps sent. The user, group and view commands show which version 3 users exist, which group and security level each has, and which part of the object tree the group may read. The debug prints each request and response; use it briefly.
In a capture, filter on snmp. Note the version, the community or user name, the PDU type and, in responses, the error status and the values returned.
Known-good: each request is followed by a Response with error status 0 and real values, and the device's failure counters do not increase.
Step 2 Failure isolation workflow Narrow the fault
- Requests are sent, nothing comes back. With v2c: a wrong community, the device's access list, or the traffic is blocked on the way. The "unknown community name" counter on the device tells which.
- A Report PDU with "unknown user name". The version 3 user does not exist on the device, or is spelled differently.
- A Report PDU with "wrong digest". The authentication password or algorithm does not match.
- A Report PDU with "not in time window". The device rebooted or its engine values changed; the manager must rediscover it.
- A response with noSuchObject or noSuchInstance. The object is not supported on the device, or the user's view excludes it.
- A walk stops early with endOfMibView. The view ends there.
- A response with tooBig. The answer does not fit in one packet; ask for fewer objects at a time.
- A write is refused with noAccess or notWritable. The community or group is read-only.
- Traps are sent but not received. UDP 162 is blocked, or the manager does not know the sending address or the version 3 user.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
A wrong v2c community gets no answer at all — only a counter on the device. SNMPv3 problems come back as a Report naming the cause: unknown user, wrong digest, not in time window. Right credentials with a restricted view give "no such object". Polls use UDP 161, notifications UDP 162.
show snmp— packets received, unknown community names, requests processed, traps sent.show snmp user/show snmp group/show snmp view— SNMPv3 users, their security level and what they may read.show snmp engineID— the device's engine ID.debug snmp packets— requests and responses; use briefly.- Capture filter
snmp.
ReferenceWhat it is1 section · depth on demand
Mental model
An SNMP message consists of a wrapper that says which version is in use and proves who is asking, and inside it a PDU — the actual request or response — containing a list of object identifiers and their values.
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
When monitoring cannot read a device, the cause is usually not the network but something in the message: a wrong community or user, a restricted view, a clock difference in version 3. How the device responds — with an error, a report, or silence — distinguishes these, and a capture or the device's SNMP counters show which it is.
ReferenceHow it works1 section · depth on demand
How it works
Requests go to UDP port 161 on the device; notifications go from the device to UDP port 162 on the monitoring system.
The wrapper.
- Version 1 and 2c: a version number and a community string, in clear text. Anyone who can capture the traffic can read the community.
- Version 3: message identifiers and flags, then security parameters — the device's engine ID, its boot count and time, the user name and authentication data — and the PDU, encrypted if privacy is used.
PDU types.
| PDU | Direction | Purpose |
|---|---|---|
| GetRequest | Manager → device | Read specific objects |
| GetNextRequest | Manager → device | Read the object after the one named; used to walk a table |
| GetBulkRequest | Manager → device | Read many objects in one go (version 2c and 3) |
| SetRequest | Manager → device | Change a value |
| Response | Device → manager | The answer to any of the above |
| Trap | Device → manager | A notification, not acknowledged |
| InformRequest | Device → manager | A notification that is acknowledged with a Response |
| Report | Device → manager | Version 3 only: a problem with the message itself |
Inside a request or response.
| Field | Meaning |
|---|---|
| Request ID | Matches a response to its request |
| Error status | 0 = no error; otherwise a code such as noAccess, notWritable, genErr, tooBig |
| Error index | Which variable in the list the error refers to |
| Variable bindings | Pairs of object identifier (OID) and value |
In version 2c and 3, a variable that does not exist is not an error for the whole message; its value is returned as noSuchObject, noSuchInstance or — at the end of a walk — endOfMibView.
What a failure looks like.
- Wrong community (v1/v2c): the device does not answer at all. It counts the attempt and may send an authentication-failure trap.
- Version 3: the manager first learns the device's engine ID through a discovery exchange. Problems are then reported back in a Report PDU naming the cause: unknown user name, wrong digest (the authentication key does not match), or not in time window (the manager's idea of the device's boot count and time is off).
- Right credentials, restricted view: the device answers, but the object is reported as not existing or not accessible.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
SNMP PDU evidence
Inside every SNMP message is a PDU, the operation. RFC 3416 defines the types:
- GetRequest (0), GetNextRequest (1) and GetBulkRequest (5): read values.
- Response (2): the answer, carrying error-status and error-index.
- SetRequest (3): changes values.
- InformRequest (6): a confirmed notification.
- SNMPv2-Trap (7): an unconfirmed notification.
- Report (8): used by the security framework.
Responses carry an error-status (for example 1 tooBig, 2 noSuchName, 6 noAccess, 16 authorizationError) and an error-index pointing at the failing variable. Individual variable bindings can also hold the exceptions noSuchObject, noSuchInstance and endOfMibView.
PDU fields
| Field | Meaning |
|---|---|
| request-id | Matches a response to its request |
| error-status | 0 = noError; non-zero = the failure reason |
| error-index | Which variable binding failed (1-based) |
| non-repeaters / max-repetitions | GetBulk only: how many rows to return |
| variable-bindings | OID and value pairs |
What the evidence means
| Observation | Meaning |
|---|---|
| No response at all | Wrong community or user, ACL, view, or the agent isn't reachable (SNMP is silent on auth failures in v1/v2c) |
| Report PDU with usmStatsUnknownUserNames | SNMPv3 user doesn't exist on the agent |
| Report with usmStatsWrongDigests | Wrong authentication password |
| Response with noSuchObject | The MIB isn't implemented or isn't in the view |
| Response with tooBig | max-repetitions too large; use smaller GetBulk requests |
| endOfMibView | The walk finished normally |
Notification format (RFC 3416)
Every trap and inform begins with the variable bindings sysUpTime.0 and snmpTrapOID.0. The OID in the second binding identifies the event, for example linkDown.
nms$ snmpget -v3 -l authPriv -u nms-poller -a SHA -A '<auth-pass>' -x AES -X '<priv-pass>' 10.255.0.1 IF-MIB::ifOperStatus.12
IF-MIB::ifOperStatus.12 = INTEGER: up(1)
nms$ snmpget -v3 -l authPriv -u wronguser -a SHA -A '<auth-pass>' -x AES -X '<priv-pass>' 10.255.0.1 sysUpTime.0
snmpget: Unknown user name
nms$ sudo tcpdump -ni eth0 -v -c 4 udp port 161 or udp port 162
nms$ tshark -r snmp.pcap -Y snmp -T fields -e snmp.request_id -e snmp.error_status -e snmp.name | head
R1# show snmp | include Unknown|Bad|errors
"Unknown user name" comes from a Report PDU. With SNMPv3 the agent explains authentication failures, unlike v1 and v2c, which simply stay silent.
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → SNMP PDU Evidence. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc3411.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.