skip to content

Protocol Versions

v1 and v2c authenticate with a cleartext community string, which is why v3 exists; v2c also brought GetBulk, 64-bit counters and Informs. Choosing a version is mostly a security call.

on this pageshow

questions

5

Why are SNMPv1 and SNMPv2c community strings considered insecure, and what does SNMPv3 put in their place?

level: juniorimportance: must knowfreq 58%

answer

  1. the only credential in the message
  2. readable in every request
  3. no integrity, no freshness check
  4. RFC 3410: trivial authentication
  5. per-user digests, optional encryption

basics

~20 s

An SNMPv1 or SNMPv2c community string is a shared password sent unencrypted in every message, so one captured packet lets anyone reuse it, and nothing protects integrity or freshness. SNMPv3 replaces it with per-user authentication, optional encryption and view-based access control.

solid answer

~50 s

In SNMPv1 (RFC 1157) and community-based SNMPv2c (RFC 1901) a message is just a `version` field, a `community` octet string and the PDU, all in the clear. The community is the only credential: if the string matches one the agent knows, the request is accepted with that community's access. RFC 3410 calls this "trivial authentication based on plain-text community strings" and says it makes both versions "fundamentally insecure". Anyone who captures one request can read the string and send requests of their own; with a read-write community that includes `SetRequest`. Nothing protects the message against modification or replay. SNMPv3 (RFC 3411-3418, Internet Standard STD 62) keeps the same PDUs but adds a security model: the User-based Security Model authenticates each message with a keyed digest, checks it is timely and can encrypt it, and view-based access control limits what each user may read or write. Both older versions were later declared Historic for this weakness.

go deeper

for a junior

Recall that v1 and v2c messages carry the community string in plain text in every request, that it is the only credential, and that SNMPv3 replaces it with authenticated, optionally encrypted users.

for a middle

Explain what each property is missing: confidentiality, integrity, freshness and proof of sender. Contrast read-only and read-write communities, and say what the three SNMPv3 security levels change.

for a senior

Show the operational consequence: a source-address filter narrows exposure but authenticates nobody, a forged Set needs no reply, and noAuthNoPriv buys nothing. Tie the risk to what is in the exposed MIB view.

for a principal

Frame version choice as a security policy: the IETF declared v1 and v2c Historic and RFC 3584 marks pre-v3 deployment NOT RECOMMENDED, so any remaining community needs an owner, a containment plan and a retirement trigger.

## What a community-based message carries The **Simple Network Management Protocol (SNMP)** lets a manager read and change objects on an agent. Its first two message formats use a **community string**, a shared octet string that names an administrative relationship between the agent and the managers allowed to talk to it. | Field | SNMPv1 (RFC 1157) | SNMPv2c (RFC 1901) | |---|---|---| | `version` | `version-1(0)` | `version(1)`, "modified from RFC 1157" | | `community` | octet string, sent as is | octet string, sent as is | | `data` | the PDU | the PDU (SNMPv2 operations) | The whole message is BER-encoded on a UDP datagram, and BER is an encoding, not a cipher. Whoever sees the packet sees the community string. ## Why a cleartext shared string is the whole problem RFC 1157 always intended a real **authentication service** to sit behind the community, but defined only a trivial one. RFC 3410 Section 8.2 is blunt: SNMPv1 and SNMPv2c message wrappers "support only trivial authentication based on plain-text community strings and, as a result, are fundamentally insecure". In practice that means: - **Disclosure.** The string is in every request, and in every notification sent with it. One capture on any link between manager and agent reveals it. - **No integrity.** Nothing in the message lets the agent detect that the PDU was altered in transit. - **No freshness.** Nothing marks a message as recent, so a captured request can be sent again later. - **No proof of sender.** The agent knows only that the sender knew the string. A source-address check helps, but UDP source addresses can be forged, and a `SetRequest` does not need its response to arrive in order to take effect. - **No confidentiality.** Responses carry the data in the clear: interface tables, addresses, routing state. - **Shared and guessable.** One string is typically shared by every manager and many devices. Implementations commonly ship a well-known default; RFC 3584 refers to "the usual 'public' community string". That default comes from implementations, not from any RFC. ## Read-only and read-write communities RFC 1157 pairs each community with an **access mode**, `READ-ONLY` or `READ-WRITE`, and a **MIB view** (the set of objects that community may see). A leaked read-only community exposes everything in its view to whoever holds the string. A leaked read-write community is worse: the holder can issue `SetRequest`s against every writable object in the view, from administratively shutting an interface to changing configuration. Even read access is worth protecting. MIB-II (RFC 1213) alone describes every interface (`ifDescr`), every address the device owns (`ipAddrTable`), its routing table (`ipRouteTable`) and its address-to-MAC mappings (`ipNetToMediaTable`): a map of the network for whoever reads it. The one built-in detection lever is weak: RFC 1157 lets an agent send an `authenticationFailure` trap when a message fails authentication, which catches a wrong guess but never a correct, captured string. ## What SNMPv3 puts in place SNMPv3 does not invent new operations; it wraps the SNMPv2 PDUs in a new message with a security model and an access-control model: 1. **Users instead of communities.** Each message names a user and a security level: `noAuthNoPriv`, `authNoPriv` or `authPriv`. 2. **Authentication.** At `authNoPriv` and above, the User-based Security Model (USM, RFC 3414) adds a keyed digest over the message, which proves it came from a holder of that user's key and was not modified, and a timeliness check against replay. 3. **Privacy.** At `authPriv` the PDU is also encrypted. 4. **View-based access control** (VACM, RFC 3415) decides, per group of users, which objects can be read, written or sent in notifications. How the keys are derived, how engines discover each other and how views are built belong to the SNMPv3 security model; the point here is that the cleartext community disappears from the wire. One caveat matters: RFC 3410 says SNMPv3 at `noAuthNoPriv` is "roughly equivalent" to SNMPv1 and SNMPv2c from a security point of view, so SNMPv3 is only an improvement when authentication is actually used. ## Status of the versions - **SNMPv1** was full Standard STD 15 and was declared Historic (RFC 3410 Section 8.2). - **SNMPv2c** (RFC 1901) was only ever **Experimental**, and RFC 3410 records it as declared Historic too. - **SNMPv3** (RFC 3411-3418) is the Internet Standard, STD 62. RFC 3584, the coexistence Best Current Practice, states that deployment of SNMP versions prior to SNMPv3 is NOT RECOMMENDED and recommends SNMPv3 with cryptographic security enabled. Every device still speaking v1 or v2c is therefore running a protocol the IETF retired for exactly this weakness.

  • If an agent accepts a community only from the management station's address, what risk remains?
    The string is still readable in every packet, so anyone on the path learns it. UDP source addresses can be forged, and a forged `SetRequest` does its damage even though the response goes to the real station. Responses still travel unencrypted, and nothing detects modification or replay. A source filter narrows who can use a leaked string; it does not authenticate anyone.
  • Is SNMPv3 at noAuthNoPriv any safer than SNMPv2c?
    Not meaningfully. RFC 3410 calls SNMPv3 without authentication or privacy roughly equivalent, from a security point of view, to SNMPv1 and SNMPv2c: the user name travels in the clear like a community, with no digest and no encryption. It even warns against giving v1 or v2c more access than unauthenticated v3 users. The gain only arrives at `authNoPriv` and `authPriv`.

saying these in an interview costs you the question

  • The community string is hashed before sending, so a capture does not reveal it.
  • SNMPv2c fixed SNMPv1's security problems; the 'c' means a secured community.
  • A leaked read-only community is harmless because nothing can be changed with it.
  • Any SNMPv3 configuration is secure, including noAuthNoPriv.
  • Limiting a community to one source address makes SNMPv2c as safe as SNMPv3.
open as a page

An audit finds the SNMP community 'public' answering on 400 devices; how do you plan the move from SNMPv1 and SNMPv2c communities to SNMPv3?

level: seniorimportance: must knowfreq 30%

basics

~20 s

Contain first: remove read-write communities, replace and source-restrict the read ones. Then add SNMPv3 users at authPriv beside the communities, move pollers and notification receivers device group by group, watch for leftover community traffic, and finally delete the communities.

open as a page

What did community-based SNMPv2c add over SNMPv1, and what did it leave unchanged?

level: middleimportance: should knowfreq 38%

basics

~10 s

SNMPv2c added GetBulkRequest, InformRequest, the SNMPv2-Trap format, Counter64 and per-variable exceptions with richer error codes. It kept SNMPv1's message wrapper and cleartext community string, changing only the version field from 0 to 1.

open as a page

Is SNMPv3 a new protocol or SNMPv2 with security added, and what actually changes in an SNMPv3 message?

level: middleimportance: should knowfreq 24%

basics

~20 s

SNMPv3 keeps SNMPv2's PDUs and operations from RFC 3416 and replaces the message around them: msgVersion 3, a header with message ID, maximum size, flags and security model, security-model parameters, and a scoped PDU naming a context, optionally encrypted.

open as a page

A poller using SNMPv1 against a multilingual SNMP agent never receives the 64-bit interface counters, and its walks skip them; what explains this?

level: seniorimportance: should knowfreq 18%

basics

~20 s

Counter64 cannot be encoded in an SNMPv1 message, so RFC 3584 makes a multilingual agent treat Counter64 instances as out of view for v1 requests: a Get returns noSuchName and a GetNext skips them. Polling with SNMPv2c or, better, SNMPv3 fixes it.

open as a page