24-12
Catalyst 2950 Desktop Switch Software Configuration Guide
78-14982-01
Chapter 24 Configuring SNMP
Configuring SNMP
The snmp-server host command specifies which hosts receive the notifications. The snmp-server
enab le trap command globally enables the mechanism for the specified notification (for traps and
informs). To enable a host to receive an inform, you must configure an snmp-server host informs
command for the host and globally enable informs by using the sn mp-se rver ena ble tr aps comman d.
To remove the specified host from receiving traps, use the no sn mp - server ho s t host global
configurat ion co mma nd. The no snmp-server host command with no keywords disables traps, but not
inform s, to the host . To disabl e informs , use the no sn m p- server h o st in form s g lo bal configur ation
command. T o disable a spec ific trap type , use the no snmp-server enable traps notification-types global
configurati on comm a nd.
Step 5 snmp-server host host-addr
[traps | informs] [version {1 | 2c | 3
[auth | noauth | priv]}]
community-string [udp-port port]
[notification-type]
Specify the recipient of an SNMP trap operation.
For host-addr, specify th e name or In ternet ad dress of the host (the
targeted recipient).
(Optiona l) Enter traps (the default) to send SNMP traps to the host.
(Optiona l) Enter informs to send SNMP informs to the host.
(Optional) Specify the SNMP version (1, 2c, or 3). SNMPv1 is not
available with informs.
(Optional) For version 3, select authentication level auth, or
noauth., or priv.
Note The priv keyword is available only wh en the crypt o software
image is installed.
For community-string, enter the passwo rd-l ike comm un ity string
sent with the notification operation.
(Optiona l) For udp-port port, enter the UDP port on the remote
device.
(Optiona l) For notification-type, use the keywords listed in
Table 24-4 on page 24-10. If no type is specified, all notifications are
sent.
Step 6 snmp-server enable traps
notification-types Enable the switch to send tra ps or inform s and specify the t ype of
notifications to be sent. For a list of notification types, see Table 24-4 on
page 24-10, or enter this: snmp-server enable traps ?
To enable mu ltiple types of traps, you m ust enter a separate snmp-s erver
enable t ra ps com mand fo r each trap type.
Step 7 snmp-server tr ap-sou rce interface-id (Optional) Specify the source interface, which provides the IP address for
the trap message. This command also sets the source IP address for
informs.
Step 8 snmp-server queue-length length (Optional) Establish the message queue length for each trap host. The
range is 1 to 1000; the default is 10 .
Step 9 snmp-server trap -time out seconds (Opt ional) Define how often to re send tr ap message s. The ra nge is 1 to
1000; the d efaul t is 30 se cond s.
Step 10 end Return to privileged EXEC mode.
Step 11 show running-config Verify your e ntri es.
Step 12 copy running-config startup-config (Optiona l) Save your entries in the co nfigurati on file.
Command Purpose