Cisco Cisco IOS Software Release 12.4(4)T
Alarm Filtering Support in the Cisco Entity Alarm MIB
snmp-server enable traps
18
Multiple Cisco IOS Releases
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.
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 traps command. 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.
enable traps command. 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.
enable traps command.
The snmp-server enable traps command is used in conjunction with the snmp-server host command.
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.
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.
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:
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):
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:
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).
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:
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:
community string public:
Router(config)# snmp-server enable traps hsrp
Router(config)# snmp-server host myhost.cisco.com traps version 2c public hsrp