7.2.4. snmp community

Syntax

snmp community community-name [view view-name] (ro|rw)

snmp community community-name group group-name

no snmp community community-name

Parameter

community-name

The SNMP community name. Its maximum length is 20 characters.

viewview-name

Specify the SNMP view configured by the commandsnmp viewto define the object available to the community.

ro

Read only access (default)

rw

Writable access

groupgroup-name

Specify the SNMP group configured by the commandsnmp groupto define the object available to the community.

Default

No SNMP community is configured

Mode

Global Configuration

Usage

To define the SNMP community that permit access for SNMP v1 and v2, use the command snmp community in the Global Configuration mode.

Example

The following example defines the SNMP community named private with the default view all, and the access right is read-only.

Switch(config)# snmp community private ro