DIS-200G Series Gigabit Ethernet Switch CLI Reference Guide
172
32-10
snmp-server community
This command is used to configure the community string to access the SNMP. Use the
no
form of this
command to remove the community string,
snmp-server community
COMMUNITY-STRING
[ro | rw] [view
VIEW-NAME
]
no snmp-server community
COMMUNITY-STRING
Parameters
COMMUNITY-STRING
Specifies the community string with a maximum of 32 characters.
Spaces are not allowed here.
ro
(Optional) Specifies read-only access.
rw
(Optional) Specifies read-write access.
view
VIEW-NAME
(Optional) Specifies a view name of a previously defined view. It
defines the view accessible by the SNMP community.
Default
Community
View Name
Access right
private
CommunityView
Read/Write
public
CommunityView
Read Only
Command Mode
Global Configuration Mode.
Command Default Level
Level: 15.
Usage Guideline
This command provides an easy way to create a community string for SNMPv1 and SNMPv2c management.
When creating a community with the snmp-server community command, two SNMP group entries, one for
SNMPv1 and one for SNMPv2c, which has the community name as their group names are created. If the view
is not specified, it is permitted to access all objects.
Example
This example shows how to create a new community named “comaccess” with read-only access right.
Switch# configure terminal
Switch(config)# snmp-server view interfacesMibView 1.3.6.1.2.1.2 included
Switch(config)# snmp-server community comaccess view interfacesMibView ro
Switch(config)#