Use the set snmp community command to set SNMP communities and associated access types.
set snmp community {read-only | read-write | read-write-all} [community_string]
Syntax Description
read-only Keyword that assigns read-only access to the specified SNMP community. read-write Keyword that assigns read-write access to the specified SNMP community. read-write-all Keyword that assigns read-write access to the specified SNMP community. community_string (Optional) Specifies the name of the SNMP community. Default
The default configuration has the following communities and access types defined:
- public--read-only
- private--read-write
- secret--read-write-all
Command Type
Switch command.
Command Mode
Privileged.
Usage Guideline
There are three configurable SNMP communities, one for each access type. If you do not specify the community string, the community string configured for that access type is cleared.
Examples
This example shows how to set read-write access to the SNMP community called yappledapple:
Console> (enable) set snmp community read-write yappledapple SNMP read-write community string set.This example shows how to clear the community string defined for read-only access:
Console> (enable) set snmp community read-only SNMP read-only community string cleared. Console> (enable)Related Command
show port counters