Usage Guidelines
For additional
notification types, see the Related Commands table for this command.
SNMP
notifications can be sent as traps or inform requests. This command enables
both traps and inform requests for the specified notification types. To specify
whether the notifications should be sent as traps or informs, use the
snmp-server
host [traps |
informs]
command.
To configure the
router to send these SNMP notifications, you must enter at least one
snmp-server
enable
trapscommand. If you enter the command with no
keywords, all notification types are enabled. If you enter the command with a
keyword, only the notification type related to that keyword is enabled. To
enable multiple types of notifications, you must issue a separate
snmp-server
enable
traps command for each notification type and
notification option.
Most notification
types are disabled by default but some cannot be controlled with the
snmp-server
enable
traps command.
The
snmp-server
enable
trapscommand is used in conjunction with the
snmp-server
hostcommand. Use the
snmp-server
host command to specify which host or hosts
receive SNMP notifications. To send notifications, you must configure at least
one
snmp-server
host command.
Catalyst 6500
Series Switches
The following
MIBs were enhanced or supported in Cisco IOS Release 12.2(33)SXI and later
releases on the Catalyst 6500 series switch:
-
CISCO-L2-TUNNEL-CONFIG-MIB-LLDP--Enhancement. The CISCO-L2-TUNNEL-CONFIG-MIB
provides SNMP access to the Layer 2 tunneling-related configurations.
-
CISCO-PAE-MIB--Enhancement for critical condition and includes traps when the
port goes into the Guest Vlan or AuthFail VLAN.
-
CISCO-MODULE-AUTO-SHUTDOWN-MIB--Supported. The CISCO-MODULE-AUTO-SHUTDOWN-MIB
provides SNMP access to the Catalyst 6500 series switch Module Automatic
Shutdown component.
-
CISCO-AUTH-FRAMEWORK-MIB--Supported. The CISCO-AUTH-FRAMEWORK-MIB provides SNMP
access to the Authentication Manager component.
-
CISCO-ENTITY-DIAG-MIB--The CISCO-ENTITY-DIAG-MIB provides SNMP traps for
generic online diagnostics (GOLD) notification enhancements.
Examples
The following
example shows how to enable the router to send all traps to the host specified
by the name myhost.cisco.com, using the community string defined as public:
Router(config)# snmp-server enable traps
Router(config)# snmp-server host myhost.cisco.com public
The following
example shows how to configure an alarm severity threshold of 3:
Router# snmp-server enable traps alarms 3
The following
example shows how to enable the generation of a DSP operational state
notification from from the command-line interface (CLI):
Router(config)# snmp-server enable traps dsp oper-state
The following
example shows how to enable the generation of a DSP operational state
notification from a network management device:
setany -v2c 1.4.198.75 test cdspEnableOperStateNotification.0 -i 1
cdspEnableOperStateNotification.0=true(1)
The following
example shows how to send no traps to any host. The Border Gateway Protocol
(BGP) traps are enabled for all hosts, but the only traps enabled to be sent to
a host are ISDN traps (which are not enabled in this example).
Router(config)# snmp-server enable traps bgp
Router(config)# snmp-server host user1 public isdn
The following
example shows how to enable the router to send all inform requests to the host
at the address myhost.cisco.com, using the community string defined as public:
Router(config)# snmp-server enable traps
Router(config)# snmp-server host myhost.cisco.com informs version 2c public
The following
example shows how to send HSRP MIB traps to the host myhost.cisco.com using the
community string public:
Router(config)# snmp-server enable traps hsrp
Router(config)# snmp-server host myhost.cisco.com traps version 2c public hsrp
The following
example shows that VRRP will be used as the protocol to enable the traps:
Router(config)# snmp-server enable traps vrrp
Router(config)# snmp-server host myhost.cisco.com traps version 2c vrrp
The following
example shows how to send IEEE 802.1X MIB traps to the host
“myhost.example.com” using the community string defined as public:
Router(config)# snmp-server enable traps dot1x
Router(config)# snmp-server host myhost.example.com traps public