Configuring community names and values (CLI)
The
snmp-server
command enables you to add SNMP communities with either default or specific access attributes, and to delete specific communities.
Syntax:
no snmp-server community <community-name>
Configures a new community name.
If you do not also specify
operator
ormanager
, the switch automatically assigns the community to theoperator
MIB view.If you do not specify
restricted
orunrestricted
, the switch automatically assigns the community torestricted
(read-only) access.
The
no
form uses only the
<community-name>
variable and deletes the named community from the switch.
[operator | manager]
|
Optionally assigns an access level.
|
[restricted | unrestricted]
|
Optionally assigns MIB access type.
|
Example:
To add the following communities:
Community |
Access Level |
Type of Access |
---|---|---|
red-team |
manager (Access to all MIB objects.) |
unrestricted (read/write) |
blue-team |
operator (Access to all MIB objects except the CONFIG MIB.) |
restricted (read-only) |
switch(config)# snmp-server community red-team manager unrestricted switch(config)# snmp-server community blue-team operator restricted
To eliminate a previously configured community named "gold-team":
switch(config) # no snmp-server community gold-team