Creating a community

Create a community to use in forming a relationship between an SNMP agent and one or more SNMP managers. You require SNMP community strings to access the system using an SNMP-based management software.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Create a community:

    snmp-server community WORD<1-32> [group WORD<1-32>] [index WORD<1-32>] [secname WORD<1-32>]

    Important

    Important

    • The group parameter is only required if you created a new user group using the procedure in Creating a new user group. If you use any of the default groups, the secname automatically links the community to its associated group so there is no need specify the group in this command.

    • If you do create a new group, use the snmp-server community command to create an SNMP community with a new security name and link it to the new group you created. There is no separate command to create a security name (secname). You use the snmp-server community command. The security name is the key to link the community name to a group.

    • You cannot use the @ character or the string :: when you create community strings.

Example

In the following example, the community name is anewcommunity, the index is third, and the secname is readview. There is no group specified because this is a default public/read only group.

Switch:1>enable

Switch:1#configure terminal

Switch:1(config)#snmp-server community anewcommunity index third secname readview

Variable Definitions

The following table defines parameters for the snmp-server community command.

Variable

Value

community WORD<1-32>

Specifies a community string. The range is 1–32 characters.

group WORD<1-32>

Specifies the group name. The range is 1–32 characters.

index WORD<1-32>

Specifies the unique index value of a row in this table. The range is 1–32 characters.

secname WORD<1-32>

Maps the community string to the security name in the VACM Group Member Table. The range is 1-32 characters.