- sample (event trigger) through snmp mib event sample
- snmp mib event trigger owner through snmp-server enable informs
- snmp-server enable traps ospf cisco-specific state-change through snmp-server enable traps voice poor-qov
- snmp-server engineID local through snmp trap link-status
- startup (test boolean) through write mib-data
- Index
snmp-server enable traps ospf cisco-specific state-change through snmp-server enable traps voice poor-qov
snmp-server enable traps
To enable all Simple Network Management Protocol (SNMP) notification types that are available on your system, use the snmp-server enable trapscommand in global configuration mode. To disable all available SNMP notifications, use the noform of this command.
snmp-server enable traps [notification-type] [vrrp]
no snmp-server enable traps [notification-type] [vrrp]
Syntax Description
notification-type |
(Optional) Type of notification (trap or inform) to enable or disable. If no type is specified, all notifications available on your device are enabled or disabled (if the no form is used). The notification type can be one of the following keywords: alarms --Enables alarm filtering to limit the number of syslog messages generated. Alarms are generated for the severity configured as well as for the higher severity values. |
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
vrrp |
(Optional) Specifies the Virtual Router Redundancy Protocol (VRRP). |
Command Default
No notifications controlled by this command are sent.
Command Modes
Global configuration (config)
Command History
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
Related Commands
Command |
Description |
---|---|
snmp-server enable traps atm pvc |
Enables ATM PVC SNMP notifications. |
snmp-server enable traps atm pvc extension |
Enables extended ATM PVC SNMP notifications. |
snmp-server enable traps bgp |
Enables BGP server state change SNMP notifications. |
snmp-server enable traps calltracker |
Enables Call Tracker callSetup and callTerminate SNMP notifications. |
snmp-server enable traps envmon |
Enables environmental monitor SNMP notifications. |
snmp-server enable traps frame-relay |
Enables Frame Relay DLCI link status change SNMP notifications. |
snmp-server enable traps ipsec |
Enables IPsec SNMP notifications. |
snmp-server enable traps isakmp |
Enables IPsec ISAKMP SNMP notifications. |
snmp-server enable traps isdn |
Enables ISDN SNMP notifications. |
snmp-server enable traps memory |
Enables memory pool and buffer pool SNMP notifications. |
snmp-server enable traps mpls ldp |
Enables MPLS LDP SNMP notifications. |
snmp-server enable traps mpls traffic-eng |
Enables MPLS TE tunnel state-change SNMP notifications. |
snmp-server enable traps mpls vpn |
Enables MPLS VPN specific SNMP notifications. |
snmp-server enable traps repeater |
Enables RFC 1516 hub notifications. |
snmp-server enable traps snmp |
Enables RFC 1157 SNMP notifications. |
snmp-server enable traps syslog |
Enables the sending of system logging messages via SNMP. |
snmp-server host |
Specifies whether you want the SNMP notifications sent as traps or informs, the version of SNMP to use, the security level of the notifications (for SNMPv3), and the destination host (recipient) for the notifications. |
snmp-server informs |
Specifies inform request options. |
snmp-server trap-source |
Specifies the interface (and the corresponding IP address) from which an SNMP trap should originate. |
snmp trap illegal-address |
Issues an SNMP trap when a MAC address violation is detected on an Ethernet hub port of a Cisco 2505, Cisco 2507, or Cisco 2516 router. |
vrrp shutdown |
Disables a VRRP group. |