snmp-server community

Sets the community string and associates it with the user-defined group name to restrict the access of MIB for SNMPv1 and SNMPv2c requests.

Syntax

snmp-server community string [ group group-name ]
no snmp-server community string [ group group-name ]

Command Default

None

Parameters

string
Specifies the community name string. Enter an alphanumeric string with 2 to 16 characters.
group group-name
Specifies the group name associated with the community name.

Modes

Global configuration mode

Usage Guidelines

Use a no form of this command to remove an community string or the group from the community.

The maximum number of SNMP communities supported is 256.

Examples

The following example adds the community string named public and associates the group name named user with it.

device(config)# snmp-server community public groupname user