![Cisco 2948G - Catalyst Switch Configuration Manual Download Page 375](http://html.mh-extra.com/html/cisco/2948g-catalyst-switch/2948g-catalyst-switch_configuration-manual_67462375.webp)
24-7
Catalyst 4500 Series, Catalyst 2948G, Catalyst 2980G Switches Software Configuration Guide
—
Release 8.1
78-15486-01
Chapter 24 Configuring SNMP
Configuring SNMPv1 and SNMPv2c from the CLI
To configure SNMPv1 and SNMPv2c from the command-line interface (CLI), perform this task in
privileged mode:
This example shows how to define community strings, assign a trap receiver, and specify which traps to
send to the trap receiver:
Console> (enable) set snmp community read-only Everyone
SNMP read-only community string set to 'Everyone'.
Console> (enable) set snmp community read-write Administrators
SNMP read-write community string set to 'Administrators'.
Console> (enable) set snmp community read-write-all Root
SNMP read-write-all community string set to 'Root'.
Console> (enable) set snmp trap 172.16.10.10 read-write
SNMP trap receiver added.
Console> (enable) set snmp trap 172.16.10.20 read-write-all
SNMP trap receiver added.
Console> (enable) set snmp trap enable all
All SNMP traps enabled.
Console> (enable) show snmp
RMON: Disabled
Extended RMON: Extended RMON module is not present
Traps Enabled:
Port,Module,Chassis,Bridge,Repeater,Vtp,Auth,ippermit,Vmps,config,entity,stpx
Port Traps Enabled: 1/1-2,4/1-48,5/1
Community-Access Community-String
---------------- --------------------
read-only Everyone
read-write Administrators
read-write-all Root
Trap-Rec-Address Trap-Rec-Community
---------------------------------------- --------------------
172.16.10.10 read-write
172.16.10.20 read-write-all
Console> (enable)
Note
To disable access for an SNMP community, set the community string for that community to the null
string (do not enter a value for the community string).
Task
Command
Step 1
Define the SNMP community strings for
each access type.
set snmp community read-only community_string
set snmp community read-write community_string
set snmp community read-write-all community_string
Step 2
Assign a trap receiver and community. You
can specify up to ten trap receivers.
set snmp trap rcvr_address rcvr_community [port
rcvr_port] [owner rcvr_owner] [index rcvr_index]
Step 3
Specify the SNMP traps to send to the trap
receiver.
set snmp trap enable [all | auth | bridge | chassis |
config | entity | entityfru | envfan | envpower |
envshutdown | envtemp | flashinsert | flashremove |
ippermit | module | stpx | syslog | system | vlancreate |
vlandelete | vmps | vtp]
Step 4
Verify the SNMP configuration.
show snmp