snmp-server community

Configures the SNMP community.

Syntax

snmp-server community name
no snmp-server community name

Parameters

name
Specifies the community name. Community string must start with a character and can contain only alpha-numeric characters. Valid string range is 2-16 characters.

Modes

Config mode

Usage Guidelines

You must have admin privileges to perform this task.

No more than 256 community strings can be configured.

All configured communities have READ-only permissions.

Examples

The following example configures the extremero community for the SNMP server and confirms the configuration with the show command.

device# configure terminal
device(config)# snmp-server community extremero
device(config)# end

device# show snmp-server
snmp-server community extremero 
snmp-server host 10.23.17.128 public 162 version 2c 

The following example removes the extremero SNMP community.

device# configure terminal
device(config)# no snmp-server community extremero 
The following examples show the error messages.
device(config)# snmp-server community c 
Error: Length should be between 2 and 16 characters 

device(config)# snmp-server community c123456789012345678 
Error: Length should be between 2 and 16 characters