To specify an event trigger owner while configuring management event trigger information, use the
snmpmibeventtriggerowner command in global configuration mode. To disable event trigger configuration and set the default parameters, use the
no form of this command.
Unique name of the trigger that is within the scope of the trigger owner. The trigger names are assigned by the administrator.
Command Default
By default, the trigger name and trigger owner are not defined.
Command Modes
Global configuration (config)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
Usage Guidelines
The
snmpmibeventtriggerowner command enables event trigger configuration mode to configure conditions to trigger events. While configuring a trigger, you can associate each trigger to an event and configure the objects to be monitored.
Examples
The following example shows how to specify a trigger owner:
Router(config)# snmp mib event trigger owner owner1 name trigger1
Router(config-event-trigger)# end
Related Commands
Command
Description
description
Provides a description of the function and use of a trigger.
enable
Enables an event.
frequency
Specifies an interval between trigger samples.
objectid
Specifies the object identifier of an object.
objectlistowner
Specifies the list of objects that can be added to notifications according to trigger type.
snmp mib expression delta
To specify a delta interval for object sampling, use the
snmpmibexpressiondelta command in global configuration mode. To disable the specified interval, use the
no form of this command.
Minimum number of seconds between delta samples. The default is 1.
wildcard
Specifies the number of instances that can be wildcarded during object sampling.
maximum
Specifies the maximum value for object.
wildcard-instance
The maximum number of dynamic instance entries. The default is 0.
Command Default
The default value for minimum delta interval is 1 second.
The default wildcard maximum value is 0.
Command Modes
Global configuration (config)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
Usage Guidelines
Applications may use larger values for minimum delta interval to lessen the impact of constantly computing delta. The
snmpmibexpressiondeltaminimum command enforces a lower overhead for all expressions created after it is set.
For every instance of a delta object, one dynamic instance entry is required to restrict the instance value from the previous sample. The
snmpmibexpressiondeltawildcardmaximum command limits the maximum number of dynamic instance entries that the system supports for wildcarded delta objects in expressions. For a given delta expression, the number of dynamic instances is the number of delta value (that meet all criteria) multiplied by the number of delta values in the expression.
A value of 0 indicates no preset limit. There is a dynamic limit based on system operation and resources. However, changing this value will not eliminate the existing delta wildcard instance objects, but will prevent the creation of more such objects.
Examples
The following example shows how to set the minimum delta interval to 60 seconds:
Router(config)# snmp mib expression delta minimum 60
Router(config-expression)# end
Related Commands
Command
Description
sample
Specifies the method of sampling an object.
snmp mib expression owner
To specify the owner of an expression, use the
snmpmibexpressionowner command in global configuration mode. To disable the expression configuration, use the
no form of this command.
snmpmibexpressionownerexpr-ownernameexpr-name
nosnmpmibexpressionownerexpr-ownernameexpr-name
Syntax Description
expr-owner
Name of an expression owner.
name
Indicates the name of the expression.
expr-name
Name of the expression.
Command Default
By default, the expression owner and expression name are not defined.
Command Modes
Global configuration (config)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
Usage Guidelines
The
snmpmibexpressionowner command enables expression configuration mode and configures expression information such as expression owner and name. You can configure expression properties by using commands such as
expression,
deltainterval, and
expression.
Examples
The following example shows how to specify an expression owner:
Router(config)# snmp mib expression owner owner1 name expression1
Router(config-expression)# end
Related Commands
Command
Description
deltainterval
Specifies an interval for the delta sampling of objects used while evaluating an expression.
description(event)
Describes the function and use of an event.
enable(event)
Enables an event or event trigger.
expression
Specifies an expression for evaluation.
object
Specifies the objects to be used while evaluating an expression.
prefixobject
Enables the application to determine the object based on the instance indexing.
valuetype
Specifies the type of expression value.
snmp mib flash cache
To enable the data collection process for Flash MIB, use the snmpmibflashcachecommand in global configuration mode. To set the command to its default interval, use the no form of this command.
snmpmibflashcache
[ intervalminutes ]
nosnmpmibflashcache
[ intervalminutes ]
Syntax Description
interval
(Optional) Specifies the interval for Flash MIB data collection process.
minutes
(Optional) Data collection interval, in minutes. The values are 1 to 60. The default is 2.
Command Default
The Flash MIB data collection process is disabled.
Command Modes
Global configuration (config)
Command History
Release
Modification
12.2(33)SXI
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
Usage Guidelines
The data collection process collects the data required for sorting the ciscoFlashFileTable in the Flash MIB according to device, partition, file indexes, and file type.
Examples
The following example shows how to set the data collection interval to 10 minutes:
To set the maximum number of entries maintained by the flow monitor alarm history log, use the snmpmibflowmonalarmhistorysizecommand in global configuration mode. To remove the setting for the maximum number of alarm history log entries, use the no form of this command.
snmpmibflowmonalarmhistorysizenum
nosnmpmibflowmonalarmhistorysizenum
Syntax Description
num
Specifies the maximum number of entries maintained by the flow monitor
Command Default
Flow monitor maintains a maximum number of 500 entries in the alarm history log.
Command Modes
Global configuration (config)
Command History
Release
Modification
15.0(1)S
This command was introduced.
Examples
The following example shows how to set the maximum number of entries maintained by the flow monitor to 400:
Enables SNMP and sets the community string and access privileges.
snmp-serverhost
Specifies the recipient of an SNMP notification operation.
snmp mib notification-log default
To create an unnamed Simple Network Management Protocol (SNMP) notification log, use the snmpmibnotification-logdefault command in global configuration mode. To delete the log, use the no form of this command.
snmpmibnotification-logdefault
[ sizenumber ]
nosnmpmibnotification-logdefault
[ sizenumber ]
Syntax Description
size
(Optional) Sets the maximum number of entries that the log can contain.
number
(Optional) Maximum number of entries. The default is 500.
Command Default
500 entries
Command Modes
Global configuration
Command History
Release
Modification
12.0(22)S
This command was introduced.
12.2(13)T
This command was integrated into Cisco IOS Release 12.2(13)T.
Usage Guidelines
This command creates an unnamed default SNMP notification log. The default log has a zero length string as its name (appears in the output of the showsnmpmibnotification-log command asLog Name””).
Creation and removal of the default log can be performed using only the command-line interface (CLI). Creation of named logs using the CLI or SNMP tools (SET operations) is not currently supported. No filters (varbinds) can be associated with the default log.
SNMP notification logging is enabled by default, but logging does not start until either a specific log is created and defined using thiscommand or a named log is created using a SNMP Set operation from a network management station (NMS).
The no form of this command deletes the default notification log and removes the notifications that were a part of this log from the Notification Log MIB database (recursively deletes the log and all its entries).
Examples
The following example shows how to create and activate a default SNMP notification log with a size of 600:
Displays information about the state of local SNMP notification logging.
snmpmibnotification-logglobalageout
Sets the maximum age for a notification.
snmpmibnotification-logglobalsize
Sets the maximum number of notifications allowed in all logs.
snmp mib notification-log default disable
To disable Simple Network Management Protocol (SNMP) notification logging to the “default” log without deleting existing notification log entries, use the snmpmibnotification-logdefaultdisable command in global configuration mode. To reenable logging, use the no form of this command.
snmpmibnotification-logdefaultdisable
nosnmpmibnotification-logdefaultdisable
Syntax Description
This command has no arguments or keywords
Command Default
Logging is enabled.
Command Modes
Global configuration
Command History
Release
Modification
12.0(22)S
This command was introduced.
12.2(13)T
This command was integrated into Cisco IOS Release 12.2(13)T.
Usage Guidelines
The “default” notification log is the null-named notification log.
This command disables SNMP notification logging. However, this command does not delete existing logs. To clear the existing “default” log, use the nosnmpmibnotification-logdefault command.
SNMP notification logging is enabled by default, but logging does not start until a specific log is created and defined using the snmpmibnotification-logdefaultcommand, or a named log is created using an SNMP Set operation from a network management station (NMS).
Examples
In the following example, SNMP notification logging is disabled, but existing logs are not deleted:
Displays information about the state of local SNMP notification logging.
snmpmibnotification-logdefault
Creates an SNMP notification log.
snmpmibnotification-logglobalageout
Sets the maximum age for a notification.
snmpmibnotification-logglobalsize
Sets the maximum number of notifications allowed in all logs.
snmp mib notification-log globalageout
To set the maximum amount of time Simple Network Management Protocol (SNMP) notification log entries remain in the system memory, use the snmpmibnotification-logglobalageoutcommand in global configuration mode. To restore the default value, use the no form of this command.
snmpmibnotification-logglobalageoutminutes
nosnmpmibnotification-logglobalageoutminutes
Syntax Description
minutes
Maximum age (in minutes) that a notification entry is retained in the system memory. The default is 15.
Command Default
The default global ageout value is 15 minutes.
Command Modes
Global configuration
Command History
Release
Modification
12.0(22)S
This command was introduced.
12.2(13)T
This command was integrated into Cisco IOS Release 12.2(13)T.
Usage Guidelines
The ageout value specifies the maximum time a notification log can remain in the Notification Log MIB database. This value applies to all logs (default log and named logs) in the Notification Log MIB database.
The no form of the command restores the default value.
Examples
In the following example, the system is configured to delete entries in the SNMP Notification Log that were logged more than 20 minutes ago:
Sets the maximum number of notifications allowed in all logs.
snmp mib notification-log globalsize
To set the maximum number of entries that can be stored in all Simple Network Management Protocol (SNMP) notification Logs, use the snmpmibnotification-logglobalsizecommand in global configuration mode. To restore the default value, use the no form of this command.
snmpmibnotification-logglobalsizenumber
nosnmpmibnotification-logglobalsizenumber
Syntax Description
number
Maximum number of log entries. The range is from 1 to 15000. This value cannot be set to 0 (limitless). The default is 500.
Command Default
The default global log size is 500 entries.
Command Modes
Global configuration
Command History
Release
Modification
12.0(22)S
This command was introduced.
12.2(13)T
This command was integrated into Cisco IOS Release 12.2(13)T.
Usage Guidelines
The size of the SNMP notification log database can be set globally (for all SNMP notification logs combined) or for each named log. The snmpmibnotification-logglobalsize command sets the maximum number of entries for all notification logs on the local system; in other words, this setting affects the whole Notification Log MIB database. This value is saved to the nlmConfigGlobalEntryLimit object in the SNMP Notification Log MIB.
The default global log size is 500 log entries. The default log size for each individual log (such as the “default log”) is 500 log entries. The maximum size for all logs combined is 15,000 log entries.
Examples
In the following example, the system is configured to delete older log entries when there are more than 600 log entries in all SNMP notification logs on the system:
(Optional) Enables class-based (CB) quality of service (QoS) MIB persistence.
v3mibs
(Optional) Enables persistence for Version 3 MIBs.
Command Default
MIB persistence is disabled.
Command Modes
Global configuration (config)
Command History
T Release
Modification
12.2(2)T
This command was introduced.
12.2(4)T3
The event and expression keywords were added.
12.4(4)T
The cbqos keyword was added.
12.4(20)T
The event and expression keywords were removed.
OS Release
Modification
12.0(32)S
This command was integrated into Cisco IOS Release 12.0(32)S. The event, expression, and cbqos keywords were added.
SB Release
Modification
12.2(31)SB
This command was integrated into Cisco IOS Release 12.2(31)SB. The v3mibs and cbqos keywords were added.
SX Release
Modification
12.2(33)SXI
This command was integrated into Cisco IOS Release 12.2(33)SXI. The cbqos keyword was added.
SR Release
Modification
12.2(33)SRB
This command was integrated into Cisco IOS Release 12.2(33)SRB. The cbqos keyword was added.
12.2(33)SRC
The v3mibs keyword was added.
Usage Guidelines
After entering the snmpmibpersist command, you must enter the writemib-data command to save MIB persistence configuration data to NVRAM.
The Circuit Interface MIB provides a MIB object (cciDescr) that can be used to identify individual circuit-based interfaces for Simple Network Management Protocol (SNMP) monitoring. Circuit interface identification persistence maintains the user-defined name of the circuit across reboots by retaining the value of the cciDescr object in the Circuit Interface MIB (CISCO-CIRCUIT-INTERFACE-MIB). A consistent value for specific circuits is useful for network management applications that use SNMP. Circuit interface identification persistence is enabled using the snmpmibpersistcircuit global configuration command. This command is disabled by default because it uses NVRAM memory.
To enable MIB persistence for all available MIB types, use thesnmpmibpersistcommand without keywords.
Examples
The following example shows how to enable Event MIB persistence:
Router(config)# snmp mib persist cbqos
Router(config)# end
Router# write mib-data
Related Commands
Command
Description
snmpifindexpersist
Enables SNMP interface index values that remain constant across reboots only on a specific interface.
snmp-serverifindexpersist
Globally enables SNMP interface index values that remain constant across reboots.
writemib-data
Saves MIB persistence configuration data to NVRAM.
snmp mib target list
To create a list of target virtual private network (VPN) routing and forwarding (VRF) instance and hosts to associate with a Simple Network Management Protocol (SNMP) community, use the snmpmibtargetlist command in global configuration mode. To delete the list of VRF instances and hosts or to delete a particular VRF or host from the list, use the no form of this command.
This command was integrated into Cisco IOS Release 12.3(2)T.
12.2(25)S
This command was integrated into Cisco IOS Release 12.2(25)S.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2(31)SB2
This command was integrated into Cisco IOS Release 12.2(31) SB2.
12.2(33)SXH
This command was integrated into Cisco IOS Release 12.2(33)SXH.
12.2SX
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
12.2(33)SB
This command was integrated into Cisco IOS Release 12.2(33)SB.
Usage Guidelines
Use this command when using SNMPv1 or SNMPv2 in a VPN environment to configure a list of VRFs or hosts for source address validation. Configuring the target list ensures that the community is valid only if the incoming packet is received from a VRF or host on the target list.
Only the following MIBs are context aware and all the tables in these MIBs can be polled:
CISCO-IPSEC-FLOW-MONITOR-MIB (Cisco IOS Release 12.4T and later)
CISCO-IPSEC-MIB (Cisco IOS Release 12.4T and later)
CISCO-PING-MIB
IP-FORWARD-MIB
MPLS-LDP-MIB
Currently, two SNMP variables in the IP-FORWARD-MIB can be polled: 1.3.6.1.2.1.4.24.3 (ipCidrRouteNumber - Scalar) and 1.3.6.1.2.1.4.24.4.1 (ipCidrRouteEntry - Table).
Note
It is recommended that you use SNMPv3 with the authNoPriv or higher level of security when using SNMP in a VPN environment.
Examples
The following example shows how to add a target list named target1 and add a VRF named vrf1 to the newly created target list:
Router(config)# snmp mib target list target1 vrf vrf1
Related Commands
Command
Description
snmpmibcommunity-map
Associates an SNMP community with an SNMP context, engine ID, or security name.
snmp trap link-status
To enable Simple Network Management Protocol (SNMP) link trap generation, use the
snmptraplink-status command in either interface configuration mode or service instance configuration mode. To disable SNMP link trap generation, use the
no form of this command.
snmptraplink-status
[ permitduplicates ]
nosnmptraplink-status
[ permitduplicates ]
Syntax Description
permitduplicates
(Optional) Permits duplicate SNMP linkup and linkdown traps.
Command Default
SNMP link traps are generated when an interface goes up or down.
Command Modes
Interface configuration (config-if)
Service instance configuration (config-if-srv)
Command History
Release
Modification
10.0
This command was introduced.
12.2(30)S
This command was modified. The
permitduplicates keyword pair was added.
12.3(8)T
This command was integrated into Cisco IOS Release 12.3(8)T.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2SX
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
12.2(33)SB
This command’s behavior was modified on the Cisco 10000 series router for the PRE3 and PRE4 as described in the Usage Guidelines.
12.2(33)SRD1
Support for this command was extended to service instance configuration mode.
12.2(33)SRE6
This command was modified. This command must be enabled on each subinterface from this release onwards.
15.1(3)S3
This command was integrated into Cisco IOS Release 15.1(3)S3.
Usage Guidelines
By default, SNMP link traps are sent when an interface goes up or down. For interfaces such as ISDN interfaces, expected to go up and down during normal usage, the output generated by these traps may not be useful. The
no form of this command disables these traps.
The
permit andduplicates keywords are used together and cannot be used individually. Use the
permitduplicates keyword pair when an interface is not generating SNMP linkup traps, linkdown traps, or both. When the
snmptraplink-statuspermitduplicates command is configured, more than one trap may be sent for the same linkup or linkdown transition.
The
permitduplicates keyword pair does not guarantee that SNMP link traps will be generated nor should configuring these keywords be required to receive traps.
By default, in service instance configuration mode, SNMP link traps are not sent. Also, the
permitduplicates keyword pair is not available in service instance configuration mode.
The
snmptraplink-status command must be used in conjunction with the
snmp-serverenabletrapsatmsubif command in order to enable SNMP trap notifications on ATM subinterfaces. The
snmp-serverenabletrapsatmsubif command must be configured in global configuration mode, and then the
snmptraplink-status command must be configured on each ATM subinterface for which you want to enable SNMP trap notifications.
Cisco 10000 Series Router
In Cisco IOS Release 12.2(33)SB, the
virtual-templatesnmp command has a new default configuration. Instead of being enabled by default,
novirtual-templatesnmp is the default configuration. This setting enhances scaling and prevents large numbers of entries in the MIB ifTable, thereby avoiding CPU Hog messages as SNMP uses the interfaces MIB and other related MIBs.
If you configure the
novirtual-templatesnmp command, the device no longer accepts the
snmp trap link-status command under a virtual-template interface. Instead, the device displays a configuration error message such as the following:
Device(config)# interface virtual-template 1
Device(config-if)# snmp trap link-status
%Unable set link-status enable/disable for interface
If your configuration already has the
snmp trap link-status command configured under a virtual-template interface and you upgrade to Cisco IOS Release 12.2(33)SB, the configuration error occurs when the device reloads even though the virtual template interface is already registered in the interfaces MIB.
Examples
The following example shows how to disable SNMP link traps related to the ISDN BRI interface 0:
Device(config)# interface bri 0
Device(config-if)# no snmp trap link-status
The following example shows how to enable SNMP link traps for service instance 50 on Ethernet interface 0/1:
Device(config)# interface ethernet 0/1
Device(config-if)# service instance 50 ethernet
Device(config-if-srv)# snmp trap link-status
Device(config-if-srv)# end
Related Commands
Command
Description
snmp-serverenabletrapsatmsubif
Enables the sending of ATM subinterface SNMP notifications.
virtual-template snmp
Allows virtual access interfaces to register with SNMP when they are created or reused.
snmp set
To set or modify the value of an object variable during the Simple Network Management Protocol (SNMP) set operation, use the snmpsetcommand in privileged EXEC mode.
Specifies the use of the SNMPv1 security model for a set operation.
v2c
Specifies the use of the SNMPv2c security model for a set operation.
v3
Specifies the use of the SNMPv3 security model for a set operation.
ip-address
IPv4 or IPv6 address of the SNMP host.
vrf
(Optional) Specifies the use of a Virtual Private Network (VPN) routing and forwarding (VRF) instance to send SNMP notifications.
vrf-name
(Optional) Name or instance of a VPN VRF.
community-string
SNMP community string. A community string functions like a password to access the SNMP entity. The string can consist of 1 to 32 alphanumeric characters.
retrynumber
(Optional) Specifies the number of retries to consider for a set operation. The valid range is from 1 to 10.
timeoutseconds
(Optional) Specifies the interval of time between each attempt to set data, in seconds. The valid range is from 1 to 1000.
oid
Specifies the object identifier value of the variable to set.
oid-value
The object identifier value. For example, sysName.0 or 1.3.6.1.4.1.9.9.10.1.3.0.5
oid-type
The type of OID. The following values are valid:
counter--A 32-bit number with a minimum value of 0. When the maximum value is reached, the counter resets to 0.
gauge--A 32-bit number with a minimum value of 0. For example, the interface speed on a router is measured using a gauge object type.
integer--A 32-bit number used to specify a numbered type within the context of a managed object. For example, to set the operational status of a router interface, 1 represents up and 2 represents down.
ip-address--IP address.
string--An octet string in text notation used to represent text strings.
timeticks--Specifies a value based on time ticks. Time ticks represents an integer value that specifies the elapsed time between two events, in units of hundredth of a second.
oid-type-value
Integer or text string value of the OID type specified for the SNMP set operation. The following list describes the integer or text string values that are valid with each oid-type argument value:
counter--Integer value in the range from 0 to 4294967295.
gauge--Integer value in the range from 0 to 4294967295.
integer--Integer value in the range from 0 to 4294967295.
ip-address--IP address in dotted decimal notation.
string--Text string.
timeticks--Integer value in the range from 0 to 4294967295.
Command Default
No variable is set by default.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
12.2(33)SRC
This command was introduced.
12.2(33)SXI
This command was integrated into Cisco IOS Release 12.2(33)SXI.
Usage Guidelines
The SNMP set operation modifies the individual variables in the SNMP entity.
The community string for a set operation can be set to either of the following types:
ro--Sets the read-only access to the SNMP entity. The default value for this community string is public.
rw--Sets read-write access to the SNMP entity. The default value for this community string is private.
Examples
The following example shows how to set the variable using SNMPv2c:
Router# snmp set v2c 10.16.2.8 public retry 2 timeout 60 oid 1.3.6.1.4.1.9.9.96.1.1.1.1.2.17 integer 4
SNMP Response: reqid 10, errstat 0, erridx 0
ccCopyTable.1.2.17 = 4
Related Commands
Command
Description
snmp-servercommunity
Sets the community access string to enable access to an SNMP entity.
snmp-server cache
To enable the Simple Network Management Protocol (SNMP) cache and configure the SNMP cache expiry interval, use the snmp-servercache command in global configuration mode. To disable the cache for MIBs that are kept by the SNMP engine, use the no form of this command.
snmp-servercache
[ intervalseconds ]
nosnmp-servercache
Syntax Description
interval
(Optional) Specifies the SNMP cache interval.
seconds
(Optional) SNMP cache interval, in seconds. Valid values are from 1 to 300. Default is 5.
Command Default
By default, the SNMP cache is enabled. The default expiry interval value is 5 seconds
.
Command Modes
Global configuration (config)
Command History
Release
Modification
12.2(33)SXH
This command was introduced.
Usage Guidelines
This command is used in distributed or modular environments. The SNMP engine cache maintains the cache for MIBs.
Examples
The following example shows how to set the SNMP cache interval to 60 seconds:
Router(config)# snmp-server cache interval 60
This example shows how to disable the SNMP cache:
Router(config)# no snmp-server cache
Related Commands
Command
Description
snmp-servercommunity
Sets the community access string to enable access to the SNMP entity.
snmp-servermanager
Starts the SNMP server manager configuration process.
snmp-server chassis-id
To provide a message line identifying the Simple Network Management Protocol (SNMP) server serial number, use the snmp-serverchassis-id command in global configuration mode. To restore the default value, if any, use the no form of this command.
snmp-serverchassis-idtext
nosnmp-serverchassis-id
Syntax Description
text
Message that identifies the chassis serial number.
Command Default
On hardware platforms where the serial number can be machine read, the default is the serial number. For example, a Cisco 7000 router has a default chassis-id value of its serial number.
Command Modes
Global configuration
Command History
Release
Modification
10.0
This command was introduced.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2SX
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
Usage Guidelines
The Cisco MIB provides a chassis MIB variable that enables the SNMP manager to gather data on system card descriptions, chassis type, chassis hardware version, chassis ID string, software version of ROM monitor, software version of system image in ROM, bytes of processor RAM installed, bytes of NVRAM installed, bytes of NVRAM in use, current configuration register setting, and the value of the configuration register at the next reload. The following installed card information is provided: type of card, serial number, hardware version, software version, and chassis slot number.
The chassis ID message can be seen with the showsnmpcommand.
Examples
In the following example, the chassis serial number specified is 1234456:
Router(config)# snmp-server chassis-id 1234456
Related Commands
Command
Description
showsnmp
Checks the status of SNMP communications.
show snmp chassis
Displays the SNMP server serial number.
snmp-server community
To set up the community access string to permit access to the Simple Network Management Protocol (SNMP), use thesnmp-servercommunity command in global configuration mode. To remove the specified community string, use the noform of this command.
Community string that consists of 1 to 32 alphanumeric characters and functions much like a password, permitting access to SNMP. Blank spaces are not permitted in the community string.
Note
The @ symbol is used for delimiting the context information. Avoid using the @ symbol as part of the SNMP community string when configuring this command.
view
(Optional) Specifies a previously defined view. The view defines the objects available to the SNMP community.
view-name
(Optional) Name of a previously defined view.
ro
(Optional) Specifies read-only access. Authorized management stations can retrieve only MIB objects.
rw
(Optional) Specifies read-write access. Authorized management stations can both retrieve and modify MIB objects.
ipv6
(Optional) Specifies an IPv6 named access list.
nacl
(Optional) IPv6 named access list.
access-list-number
(Optional) Integer from 1 to 99 that specifies a standard access list of IP addresses or a string (not to exceed 64 characters) that is the name of a standard access list of IP addresses allowed access to the SNMP agent.
Alternatively, an integer from 1300 to 1999 that specifies a list of IP addresses in the expanded range of standard access list numbers that are allowed to use the community string to gain access to the SNMP agent.
Command Default
An SNMP community string permits read-only access to all objects.
Command Modes
Global configuration (config)
Command History
Release
Modification
10.0
This command was introduced.
12.0(14)ST
This command was integrated into Cisco IOS Release 12.0(14)ST.
12.0(17)S
This command was integrated into Cisco IOS Release 12.0(17)S.
12.2(14)S
This command was integrated into Cisco IOS Release 12.2(14)S.
12.3(2)T
The access list values were enhanced to support the expanded range of standard access list values and to support named standard access lists.
12.0(27)S
The ipv6nacl keyword and argument pair was added to support assignment of IPv6 named access lists. This keyword and argument pair is not supported in Cisco IOS 12.2S releases.
12.3(14)T
The ipv6nacl keyword and argument pair was integrated into Cisco IOS Release 12.3(14)T to support assignment of IPv6 named access lists. This keyword and argument pair is not supported in Cisco IOS 12.2S releases.
12.2(28)SB
This command was integrated into Cisco IOS Release 12.2(28)SB.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.4(11)T
This command was integrated into Cisco IOS Release 12.4(11)T.
12.2(31)SB2
This command was integrated into Cisco IOS Release 12.2(31)SB2.
12.2(33)SXH
This command was integrated into Cisco IOS Release 12.2(33)SXH.
Cisco IOS XE Release 2.1
This command was introduced on Cisco ASR 1000 Aggregation Series Routers.
12.2(33)SB
This command was integrated into Cisco IOS Release 12.2(33)SB.
12.2(33)SRE
This command was modified. The automatic insertion of the snmp-servercommunity command into the configuration, along with the community string specified in the snmp-serverhost command, is changed. The snmp-servercommunity command has to be manually configured.
15.1(0)M
This command was modified. The automatic insertion of the snmp-servercommunity command into the configuration, along with the community string specified in the snmp-serverhost command, is changed. The snmp-servercommunity command has to be manually configured.
Usage Guidelines
The nosnmp-servercommand disables all versions of SNMP (SNMPv1, SNMPv2C, SNMPv3).
The first snmp-server command that you enter enables all versions of SNMP.
To configure SNMP community strings for the MPLS LDP MIB, use the snmp-servercommunity command on the host network management station (NMS).
Note
In Cisco IOS Release 12.0(3) to 12.2(33)SRD, if a community string was not defined using the snmp-servercommunity command prior to using the snmp-serverhost command, the default form of the snmp-servercommunity command was automatically inserted into the configuration. The password (community string) used for this automatic configuration of the snmp-servercommunity was same as specified in the snmp-serverhost command. However, in Cisco IOS Release 12.2(33)SRE and later releases, you have to manually configure thesnmp-servercommunity command.
The snmp-servercommunity command can be used to specify only an IPv6 named access list, only an IPv4 access list, or both. For you to configure both IPv4 and IPv6 access lists, the IPv6 access list must appear first in the command statement.
Note
The @ symbol is used as a delimiter between the community string and the context in which it is used. For example, specific VLAN information in BRIDGE-MIB may be polled using community@VLAN_ID (for example, public@100) where 100 is the VLAN number. Avoid using the @ symbol as part of the SNMP community string when configuring this command.
Examples
The following example shows how to set the read/write community string to newstring:
Router(config)# snmp-server community newstring rw
The following example shows how to allow read-only access for all objects to members of the standard named access list lmnop that specify the comaccess community string. No other SNMP managers have access to any objects.
Router(config)# snmp-server community comaccess ro lmnop
The following example shows how to assign the string comaccess to SNMP, allow read-only access, and specify that IP access list 4 can use the community string:
Router(config)# snmp-server community comaccess ro 4
The following example shows how to assign the string manager to SNMP and allow read-write access to the objects in the restricted view:
Router(config)# snmp-server community manager view restricted rw
The following example shows how to remove the community comaccess:
Router(config)# no snmp-server community comaccess
The following example shows how to disable all versions of SNMP:
Router(config)# no snmp-server
The following example shows how to configure an IPv6 access list named list1 and links an SNMP community string with this access list:
Router(config)# ipv6 access-list list1
Router(config-ipv6-acl)# permit ipv6 any any
Router(config-ipv6-acl)# exit
Router(config)# snmp-server community comaccess rw ipv6 list1
Related Commands
Command
Description
access-list
Configures the access list mechanism for filtering frames by protocol type or vendor code.
show snmp community
Displays SNMP community access strings.
snmp-serverenabletraps
Enables the router to send SNMP notification messages to a designated network management workstation.
snmp-serverhost
Specifies the targeted recipient of an SNMP notification operation.
snmp-serverview
Creates or updates a view entry.
snmp-server contact
To set the system contact (sysContact) string, use the snmp-servercontact command in global configuration mode. To remove the system contact information, use the no form of this command.
snmp-servercontacttext
nosnmp-servercontact
Syntax Description
text
String that describes the system contact information.
Command Default
No system contact string is set.
Command Modes
Global configuration
Command History
Release
Modification
10.0
This command was introduced.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2SX
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
Examples
The following is an example of a system contact string:
Router(config)# snmp-server contact Dial System Operator at beeper # 27345
Related Commands
Command
Description
show snmp contact
Displays SNMP system contact information.
snmp-serverlocation
Sets the system location string.
snmp-server context
To create a Simple Network Management Protocol (SNMP) context, use the
snmp-servercontext command in global configuration mode. To delete an SNMP context, use the
no form of this command.
snmp-servercontextcontext-name
nosnmp-servercontextcontext-name
Syntax Description
context-name
Name of the SNMP context being created.
Command Default
No SNMP contexts are configured.
Command Modes
Global configuration (config)
Command History
Release
Modification
12.0(23)S
This command was introduced.
12.3(2)T
This command was integrated into Cisco IOS Release 12.3(2)T.
12.2(25)S
This command was integrated into Cisco IOS Release 12.2(25)S.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2(31)SB2
This command was integrated into Cisco IOS Release 12.2(31)SB2.
12.2(33)SXH
This command was integrated into Cisco IOS Release 12.2(33)SXH.
12.2SX
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
12.2(33)SB
This command was integrated into Cisco IOS Release 12.2(33)SB.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
When you use the
nosnmp-servercontext command, all SNMP instances in that context are deleted.
A route distinguisher (RD) is required when you configure an SNMP context. An RD creates routing and forwarding tables and specifies the default route distinguisher for a VPN. The RD is added to the beginning of a IPv4 prefix to make it globally unique. An RD is either ASN relative, which means it is composed of an autonomous system number and an arbitrary number, or it is IP address relative and composed of an IP address and an arbitrary number.
Examples
The following example shows how to create an SNMP context named contextA and associate it with a virtual private network (VPN) routing and forwarding (VRF) instance named CustomerA:
To configure a router to drop Simple Network Management Protocol (SNMP) packets coming from virtual routing and forwarding (VRF) interfaces, use the snmp-serverdropvrf-traffic command in global configuration mode. To disable the configuration, use the no form of this command.
snmp-serverdropvrf-traffic
nosnmp-serverdropvrf-traffic
Syntax Description
This command has no arguments or keywords.
Command Default
SNMP packets are not dropped from VRF interfaces.
Command Modes
Global configuration (config)
Command History
Release
Modification
15.0(1)M
This command was introduced in a release earlier than Cisco IOS Release 15.0(1)M.
Examples
The following example shows how to configure a router to drop SNMP packets coming from VRF interfaces:
Router(config)# snmp-server drop vrf-traffic
Related Commands
Command
Description
snmp-serverchassis-id
Provides a message line identifying the SNMP server serial number.
snmp-server enable informs
Note
Effective with Cisco IOS Release 12.2(33)SXI, the snmp-serverenableinforms command is not available in Cisco IOS software.
This command has no functionality. To enable the sending of Simple Network Management Protocol (SNMP) inform notifications, use one of the snmp-serverenabletrapsnotification-type
commands in global configuration mode combined with thesnmp-serverhosthost-address informs command in global configuration mode.
Command History
Release
Modification
10.0
This command was introduced.
12.2(33)SXI
This command was removed. Instead use one of the snmp-serverenabletrapsnotification-type
commands in global configuration mode combined with thesnmp-serverhosthost-address informs command in global configuration mode.