snmp-server community

Syntax

snmp-server community  community-name 
no snmp-server community  community-name 

Description

Configures a new community name.

  • If you do not also specify operator or manager, the switch automatically assigns the community to the operator MIB view.

  • If you do not specify restricted or unrestricted, the switch automatically assigns the community to restricted (read-only) access. The no form of the command uses only the community-name variable and deletes the named community from the switch.

Parameters

operator|manager
Optionally assigns an access level.
  • At the operator level, the community can access all MIB objects except the CONFIG MIB.

  • At the manager level, the community can access all MIB objects.

restricted|unrestricted
Optionally assigns MIB access type.
  • Assigning the restricted type allows the community to read MIB variables, but not to set them.

  • Assigning the unrestricted type allows the community to read and set MIB variables.

snmp-server community

This example adds the following communities and access level/types:

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# snmp-server community red-team
  manager unrestricted
switch# snmp-server community blue-team
  operator restricted

no snmp-server community

Eliminates a previously configured community named "gold-team."

switch(config) # no snmp-server community gold-team