Reputation: 71
Can you please tell me the maximum length allowed for SNMPv2c read and write community .I didn't find any relevant doc which can provide description about the same .
Thanks -Ravi
Upvotes: 2
Views: 4603
Reputation: 1
SNMP version 2c maximum community length on Cisco routers is 128 characters.
Upvotes: 0
Reputation: 682
The community based model also refers to the entries in the USM tables. Following the SNMP USM MIBs defined in RFC3414 the definition of usmUserName and usmSecurityName is as below which limits the user name to 32 characters. The textual convention SnmpAdminString itself is 255 Octet long
usmUserName OBJECT-TYPE
SYNTAX SnmpAdminString (SIZE(1..32))
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "A human readable string representing the name of
the user.
This is the (User-based Security) Model dependent
security ID.
"
::= { usmUserEntry 2 }
usmUserSecurityName OBJECT-TYPE
SYNTAX SnmpAdminString
MAX-ACCESS read-only
STATUS current
DESCRIPTION "A human readable string representing the user in
Security Model independent format.
The default transformation of the User-based Security
Model dependent security ID to the securityName and
vice versa is the identity function so that the
securityName is the same as the userName.
"
::= { usmUserEntry 3 }
The Textual Convention usmUserSecurityName is defined in RFC3411
SnmpAdminString ::= TEXTUAL-CONVENTION
DISPLAY-HINT "255t"
STATUS current
DESCRIPTION "An octet string containing administrative
information, preferably in human-readable form.
..
Note that when this TC is used for an object that
is used or envisioned to be used as an index, then
a SIZE restriction MUST be specified so that the
number of sub-identifiers for any object instance
does not exceed the limit of 128, as defined by
[RFC3416].
Note that the size of an SnmpAdminString object is
measured in octets, not characters.
"
SYNTAX OCTET STRING (SIZE (0..255))
On a Cisco switch/ router that also appears to be enforced when you are setting this via CLI.
Upvotes: 2
Reputation: 1463
There is no explicit limit on the length according to RFC 3584. The limits are going to be practical (message size, etc).
Upvotes: 1