Table Of Contents
Prerequisites for CISCO-FLASH-MIB Enhancements
Information About CISCO-FLASH-MIB Enhancements
ciscoFlashDeviceSize As Varbind for ciscoFlashDeviceChangeTrap
New Notifications for Flash Insertion and Removal
CLI for Enabling Flash Notifications
File Type Support in CISCO-FLASH-MIB
How to Enable Flash Card Notifications
Enabling Flash Card Notifications
Configuration Examples for Enabling Flash Notifications
Enabling Flash Notifications: Example
Verifying the Type of File That Is Stored in Flash Memory: Example
Verifying the Types of Notifications That Have Been Enabled: Example
CISCO-FLASH-MIB Enhancements
The CISCO-FLASH-MIB Enhancements feature includes the following modifications:
•
A new Flash card trap variable (varbind) has been added to the CISCO-FLASH-MIB ciscoFlashDeviceChange notification.
•
Two notifications, one for insertion of a Flash card and one for removal of a Flash card, and file type support information have been added to the CISCO-FLASH-MIB.
•
The command-line interface (CLI) has been modified to control the Flash card insertion and removal notifications.
Feature History for the CISCO-FLASH-MIB Enhancements Feature
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Contents
•
Prerequisites for CISCO-FLASH-MIB Enhancements
•
Information About CISCO-FLASH-MIB Enhancements
•
How to Enable Flash Card Notifications
•
Configuration Examples for Enabling Flash Notifications
Prerequisites for CISCO-FLASH-MIB Enhancements
•
Your Cisco router must support CISCO-FLASH-MIB and be running Cisco IOS Release 12.3(2)T or later software.
•
Before you can view CISCO-FLASH-MIB notifications or enable or disable Flash card notifications, you must first have installed a Cisco router-compatible Flash card.
Information About CISCO-FLASH-MIB Enhancements
This section contains the following concepts:
•
ciscoFlashDeviceSize As Varbind for ciscoFlashDeviceChangeTrap
•
New Notifications for Flash Insertion and Removal
•
CLI for Enabling Flash Notifications
•
File Type Support in CISCO-FLASH-MIB
ciscoFlashDeviceSize As Varbind for ciscoFlashDeviceChangeTrap
The ciscoFlashDeviceChangeTrap notification is sent when a Flash card is inserted or removed from your system. The ciscoFlashDeviceSize varbind has been added to the notification to help you identify the size of the Flash card when it is inserted. The size is shown as a non-zero value of the Flash card. If the Flash card is removed, the value is shown as zero.
New Notifications for Flash Insertion and Removal
Two notifications have been added to the CISCO-FLASH-MIB. The following notification is sent when a Flash card is inserted in your system:
ciscoFlashDeviceInsertedNotifThe following notification is sent if a Flash card is removed from your system:
ciscoFlashDeviceRemoveNotifCLI for Enabling Flash Notifications
Two commands have been modified so that you can enable and disable MIB Flash notifications on your device. Using the snmp-server enable traps command, you can enable all Simple Network Management Protocol (SNMP) notifications (traps or informs) that are available on your system. The flash notification type has been added as a keyword so that you can globally enable or disable Flash card insertion and removal notifications. The snmp-server host command allows you to specify the recipient of a notification. The flash notification type has been added to this command so that you can specify that Flash notifications be sent.
File Type Support in CISCO-FLASH-MIB
The object ciscoFlashFileType has been added to the CiscoFlashFileTable in the CISCO-FLASH-MIB so that you can determine the type of file that is stored in Flash memory.
How to Enable Flash Card Notifications
This section contains the following procedure:
•
Enabling Flash Card Notifications
Enabling Flash Card Notifications
To enable Flash card notifications, perform the following steps:
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
snmp-server enable traps flash [insertion] [removal]
4.
snmp-server host host-address community-string flash
DETAILED STEPS
Troubleshooting Tips
To verify the type of file that is stored in Flash memory, you can use the show bootflash: and show flash commands. (See the "Verifying the Type of File That Is Stored in Flash Memory: Example" section for sample output.)
Configuration Examples for Enabling Flash Notifications
This section contains the following configuration examples:
•
Enabling Flash Notifications: Example
•
Verifying the Type of File That Is Stored in Flash Memory: Example
•
Verifying the Types of Notifications That Have Been Enabled: Example
Enabling Flash Notifications: Example
The following example shows that Flash card notifications have been enabled for all Flash card insertions and deletions:
Router (config)# snmp-server enable traps flash insertion removalRouter (config)# snmp-server host 10.2.0.4 string45 flashVerifying the Type of File That Is Stored in Flash Memory: Example
The following is sample output from the show bootflash: command. The file type is shown under the "type" column.
Router # show bootflash:-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name1 .. unknown AC05EDDF 37A6B8 22 3384888 Dec 14 2000 00:02:15c7200-boot-mz.120-4.XE2 .. unknown A74B5E65 37AC90 14 1365 May 02 2001 01:53:54config/startup^^^^^^Verifying the Types of Notifications That Have Been Enabled: Example
In the following output example, the first ciscoFlashDeviceChangeTrap notification shows that a Flash card has been inserted. The second notification shows that a Flash card has been removed.
csipl-snmp:12> traprcvWaiting for traps.Received SNMPv2c Trap:Community: publicFrom: 10.9.2.13sysUpTimeInstance = 162720snmpTrapOID.0 = ciscoFlashDeviceChangeTrapciscoFlashDeviceMinPartitionSize.2 = 20578304ciscoFlashDeviceName.2 = slot1Received SNMPv2c Trap:Community: publicFrom: 10.9.2.13sysUpTimeInstance = 162721snmpTrapOID.0 = ciscoFlashDeviceInsertedNotifciscoFlashDeviceMinPartitionSize.2 = 20578304ciscoFlashDeviceName.2 = slot1Received SNMPv2c Trap:Community: publicFrom: 10.9.2.13sysUpTimeInstance = 163168snmpTrapOID.0 = ciscoFlashDeviceChangeTrapciscoFlashDeviceMinPartitionSize.2 = 0ciscoFlashDeviceName.2 = slot1Received SNMPv2c Trap:Community: publicFrom: 10.9.2.13sysUpTimeInstance = 163169snmpTrapOID.0 = ciscoFlashDeviceRemovedNotifciscoFlashDeviceName.2 = slot1Additional References
For additional information related to CISCO-FLASH-MIB notifications, refer to the following references:
Related Documents
Related Topic Document TitleCisco MIBs
Introduction to Cisco MIBs at the Cisco.com website.
Cisco configuration fundamentals and network management commands
Cisco IOS Configuration Fundamentals and Network Management Command Reference, Release 12.3
Standards
MIBs
MIBs MIBs Link•
CISCO-FLASH-MIB
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:
RFCs
Technical Assistance
Command Reference
This section documents modified commands. All other commands used with this feature are documented in the Cisco IOS Release 12.3 command reference publications.
•
snmp-server enable traps
•
snmp-server host
snmp-server enable traps
To enable all Simple Network Management Protocol (SNMP) notifications (traps or informs) available on your system, use the snmp-server enable traps command in global configuration mode. To disable all available SNMP notifications, use the no form of this command.
snmp-server enable traps [notification-type]
no snmp-server enable traps [notification-type]
Syntax Description
Defaults
This command is disabled by default. Most notification types are disabled. However, some notification types cannot be controlled with this command.
If you enter this command with no notification-type keywords, the default is to enable all notification types controlled by this command.
Command Modes
Global configuration
Command History
Usage Guidelines
For additional notification types, see the "Related Commands" section 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.
If you do not enter an snmp-server enable traps command, no notifications controlled by this command are sent. 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.
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.
Examples
The following example enables 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 trapsRouter(config)# snmp-server host myhost.cisco.com publicThe following example enables 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 trapsRouter(config)# snmp-server host myhost.cisco.com informs version 2c publicThe following example sends HSRP MIB traps to the host myhost.cisco.com using the community string public.
Router(config)# snmp-server enable traps hsrpRouter(config)# snmp-server host myhost.cisco.com traps version 2c public hsrpThe following example specifies that Flash insertion notifications will be sent:
Router (config)# snmp-server enable traps flash insertionRelated Commands
snmp-server host
To specify the recipient of a Simple Network Management Protocol (SNMP) notification operation, use the snmp-server host command in global configuration mode. To remove the specified host from the configuration, use the no form of this command.
snmp-server host host-address [traps | informs] [version {1 | 2c | 3 [auth | noauth | priv]}] community-string [udp-port port] [notification-type] [vrf vrf-name]
no snmp-server host host-address [traps | informs] [version {1 | 2c | 3 [auth | noauth | priv]}] community-string [udp-port port] [notification-type] [vrf vrf-name]
Syntax Description
Defaults
This command is disabled by default. No notifications are sent.
If you enter this command with no keywords, the default is to send all trap types to the host. No informs will be sent to this host.
If no version keyword is present, the default is version 1. If version 3 is specified, but the security level is not specified, the default security level is noauth.
The no snmp-server host command with no keywords will disable traps, but not informs, to the host. In order to disable informs, use the no snmp-server host informs command.
The default UDP port is 162.
Note
If the community-string is not defined using the snmp-server community command prior to using this command, the default form of the snmp-server community command will automatically be inserted into the configuration. The password (community-string) used for this automatic configuration of the snmp-server community will be the same as specified in the snmp-server host command. This is the default behavior for Cisco IOS Release 12.0(3) and later.
Command Modes
Global configuration
Command History
Usage Guidelines
SNMP notifications can be sent as traps or inform requests. Traps are unreliable because the receiver does not send acknowledgments when it receives traps. The sender cannot determine if the traps were received. However, an SNMP entity that receives an inform request acknowledges the message with an SNMP response PDU. If the sender never receives the response, the inform request can be sent again. Thus, informs are more likely to reach their intended destination.
However, informs consume more resources in the agent and in the network. Unlike a trap, which is discarded as soon as it is sent, an inform request must be held in memory until a response is received or the request times out. Also, traps are sent only once, while an inform may be retried several times. The retries increase traffic and contribute to a higher overhead on the network.
If you do not enter an snmp-server host command, no notifications are sent. To configure the router to send SNMP notifications, you must enter at least one snmp-server host command. If you enter the command with no keywords, all trap types are enabled for the host.
To enable multiple hosts, you must issue a separate snmp-server host command for each host. You can specify multiple notification types in the command for each host.
When multiple snmp-server host commands are given for the same host and kind of notification (trap or inform), each succeeding command overwrites the previous command. Only the last snmp-server host command will be in effect. For example, if you enter an snmp-server host inform command for a host and then enter another snmp-server host inform command for the same host, the second command will replace the first.
The snmp-server host command is used in conjunction with the snmp-server enable command. Use the snmp-server enable command to specify which SNMP notifications are sent globally. For a host to receive most notifications, at least one snmp-server enable command and the snmp-server host command for that host must be enabled.
However, some notification types cannot be controlled with the snmp-server enable command. For example, some notification types are always enabled. Other notification types are enabled by a different command. For example, the linkUpDown notifications are controlled by the snmp trap link-status command. These notification types do not require an snmp-server enable command.
The availability of a notification-type depends on the router type and Cisco IOS software features supported on the router. For example, the envmon notification-type is available only if the environmental monitor is part of the system. To see what notification types are available on your system, use the command help ? at the end of the snmp-server host command.
The vrf keyword allows you to specify the notifications being sent to a specified IP address over a specific VRF. The VRF defines a VPN membership of a customer so that data is stored using the VPN.
Regarding Notification-Type Keywords
The notification-type keywords used in the snmp-server host command do not always match the keywords used in the corresponding snmp-server enable traps command. For example, the notification keyword applicable to MPLS traffic engineering tunnels is specified as mpls-traffic-eng (containing two dashes and no intervening spaces). The corresponding parameter in the snmp-server enable traps command is specified as mpls traffic-eng (containing an intervening space and a dash).
This syntax difference is necessary to ensure that the CLI interprets the notification-type keyword of the snmp-server host command as a unified, single-word construct, which preserves the capability of the snmp-server host command to accept multiple notification-type keywords in the CLI command line. The snmp-server enable traps commands, however, often use two-word constructs to provide hierarchical configuration options and to maintain consistency with the command syntax of related commands. Table 1 maps snmp-server enable traps commands to the keywords used in the snmp-server host command.
Table 1 Notification Keywords and Corresponding SNMP Enable Traps Commands
SNMP Enable Traps Command SNMP Host Command Keywordsnmp-server enable traps mpls ldp
mpls-ldp
snmp-server enable traps mpls traffic-eng1
mpls-traffic-eng
snmp-server enable traps mpls vpn
mpls-vpn
1 See the Cisco IOS Switching Services Command Reference for documentation of this command.
Examples
If you want to configure a unique SNMP community string for traps, but you want to prevent SNMP polling access with this string, the configuration should include an access list. In the following example, the community string is named comaccess and the access list is numbered 10:
Router(config)# snmp-server community comaccess ro 10Router(config)# snmp-server host 172.20.2.160 comaccessRouter(config)# access-list 10 deny anyThe following example sends RFC 1157 SNMP traps to the host specified by the name myhost.cisco.com. Other traps are enabled, but only SNMP traps are sent because only snmp is specified in the snmp-server host command. The community string is defined as comaccess.
Router(config)# snmp-server enable trapsRouter(config)# snmp-server host myhost.cisco.com comaccess snmpThe following example sends the SNMP and Cisco environmental monitor enterprise-specific traps to address 172.30.2.160:
Router(config)# snmp-server enable traps snmpRouter(config)# snmp-server enable traps envmonRouter(config)# snmp-server host 172.30.2.160 public snmp envmonThe following example enables the router to send all traps to the host myhost.cisco.com using the community string public:
Router(config)# snmp-server enable trapsRouter(config)# snmp-server host myhost.cisco.com publicThe following example will not send traps to any host. The BGP traps are enabled for all hosts, but only the ISDN traps are enabled to be sent to a host.
Router(config)# snmp-server enable traps bgpRouter(config)# snmp-server host bob public isdnThe following example enables the router to send all inform requests to the host myhost.cisco.com using the community string public:
Router(config)# snmp-server enable trapsRouter(config)# snmp-server host myhost.cisco.com informs version 2c publicThe following example sends HSRP MIB informs to the host specified by the name myhost.cisco.com. The community string is defined as public.
Router(config)# snmp-server enable traps hsrpRouter(config)# snmp-server host myhost.cisco.com informs version 2c public hsrpThe following example sends all SNMP notifications to xyz.com over the VRF named trap-vrf:
Router(config)# snmp-server host xyz.com vrf trap-vrfThe following example shows that Flash notifications are to be sent:
Router (config)# snmp-server host myhost.cisco.com string1 flashRelated Commands
Copyright © 2003 Cisco Systems, Inc. All rights reserved.


