Use the snmp-server community global configuration command to set up the community access string to permit access to the SNMP protocol. To remove the specified community string, use the no form of this command.
Syntax
snmp-server community string [ro | rw | su] [ip-address]
no snmp-server community string [ip-address]
stringCharacter string, up to 20 characters, that acts like a password and permits access to the SNMP protocol.
roSpecifies read-only access.
rwSpecifies read-write access.
suSpecifies SNMP administrator access.
ip-addressManagement station IP address.
Default Configuration
The default is read-only and if no IP address is entered, all IP addresses are allowed.
Command Mode
Global Configuration Mode
User Guidelines
There are no user guidelines for this command.
Examples
The following example sets up the community access string public to permit administrative access to the SNMP protocol, at an administrative station with the IP address 192.168.1.20.
Console (config)# snmp-server community public su 192.168.1.20
snmp-server contact
Use the snmp-server contact global configuration command to set up a system contact. To remove the system contact information, use the no form of the command.
Syntax
snmp-server contact text
no snmp-server contact
textCharacter string, up to 160 characters, describing the system contact information.
Default Configuration
This command has no default configuration.
Command Mode
Global Configuration Mode
User Guidelines
There are no user guidelines for this command.
Examples
The following example sets up Dell_Technical_Support asthe system contact point.
Use the snmp-server location global configuration command to set up information about where the device is located. To remove the location string, use the no form of this command.
Syntax
snmp-server location text
no snmp-server location
textCharacter string, up to 160 characters, describing the system location.
Default Configuration
The default is no community.
Command Mode
Global Configuration Mode
User Guidelines
There are no user guidelines for this command.
Examples
The following example sets the device location as New_York.
Console (config)# snmp-server location New_York
snmp-server enable traps
Use the snmp-server enable traps global configuration command to enable the switch to send SNMP traps. To disable SNMP traps, use the no form of the command.
Syntax
snmp-server enable traps
no snmp-server enable traps
Default Configuration
This command has no default configuration.
Command Mode
Global Configuration Mode
User Guidelines
There are no user guidelines for this command.
Examples
The following example displays the command to enable SNMP traps.
Console (config)# snmp-server enable traps
snmp-server trap authentication
Use the snmp-server trap authentication global configuration command to enable the switch to send Simple Network Management Protocol traps when authentication failed. To disable SNMP authentication failed traps, use the no form of this command.
Syntax
snmp-server trap authentication
no snmp-server trap authentication
Default Configuration
This command has no default configuration.
Command Mode
Global Configuration Mode
User Guidelines
There are no user guidelines for this command.
Examples
The following example enables authentication when SNMP traps failed.
Console (config)# snmp-server trap authentication
snmp-server host
Use the snmp-server host global configuration command to specify the recipient of Simple Network Management Protocol (SNMP) notification operation. To remove the specified host, use the no form of this command.
Use the snmp-server set global configuration command to set the SNMP MIB value by the CLI.
Syntax
snmp-server set variable name [name value ... ]
variable nameThe name of the MIB variable name to be modified.
name valueList of name and value pairs. In case of scalar MIBs there is only a single pair of name values. In case of entry in a table the first pairs are the indexes, followed by one or more fields.
Default Configuration
This command has no default configuration.
Command Mode
Global Configuration Mode
User Guidelines
Although the CLI can set any required configuration, there might be a situation where an SNMP user sets a MIB variable that doesn't have an equivalent command. Use the snmp-server set command for those situations.
Examples
The following example sets the scalar MIB sysName to the value dell.
Console (config)# snmp-server set sysName sysName dell
The following example sets the entry MIB rndCommunityTable with keys 0.0.0.0 and public. The field rndCommunityAccess gets the value super and the rest of the fields get their default values.
Console (config)# snmp-server set rndCommunityTable
rndCommunityMngStationAddr 0.0.0.0 rndCommunityString public
rndCommunityAccess super
show snmp
Use the show snmp privileged EXEC command to display the SNMP status.
Syntax
show snmp
Default Configuration
This command has no default configuration.
Command Mode
Privileged EXEC Mode
User Guidelines
There are no user guidelines for this command.
Examples
The following example displays SNMP communication status.