- New and Changed Information
- Preface
- Overview
- Configuring CFS
- Configuring NTP
- Configuring PTP
- Configuring CDP
- Configuring System Message Logging
- Configuring Smart Call Home
- Configuring Rollback
- Configuring Session Manager
- Configuring the Scheduler
- Configuring SNMP
- Configuring RMON
- Configuring Online Diagnostics
- Configuring the Embedded Event Manager
- Configuring Onboard Failure Logging
- Configuring SPAN
- Configuring ERSPAN
- Configuring LLDP
- Configuring NetFlow
- Supported RFCs
- EEM Events and Examples
- Configuration Limits for Cisco NX-OS System Management
- Information About SNMP
- Licensing Requirements for SNMP
- Prerequisites for SNMP
- Guidelines and Limitations
- Default Settings
- Configuring SNMP
- Configuring SNMP Users
- Enforcing SNMP Message Encryption
- Assigning SNMPv3 Users to Multiple Roles
- Creating SNMP Communities
- Filtering SNMP Requests
- Configuring SNMP Notification Receivers
- Configuring a Source Interface for SNMP Notifications
- Configuring the Notification Target User
- Configuring SNMP Notification Receivers with VRFs
- Configuring SNMP to Send Traps Using an Inband Port
- Enabling SNMP Notifications
- Disabling LinkUp/LinkDown Notifications on an Interface
- Displaying SNMP ifIndex for an Interface
- Enabling a One-time Authentication for SNMP over TCP
- Assigning the SNMP Device Contact and Location Information
- Configuring the Context to Network Entity Mapping
- Disabling SNMP
- Modifying the AAA Synchronization Time
- Verifying the SNMP Configuration
- Configuration Examples for SNMP
- Additional References
- Feature History for SNMP
Information About SNMP
The Simple Network Management Protocol (SNMP) is an application-layer protocol that provides a message format for communication between SNMP managers and agents. SNMP provides a standardized framework and a common language used for the monitoring and management of devices in a network.
This section includes the following topics:
- SNMP Functional Overview
- SNMP Notifications
- SNMPv3
- SNMP and Embedded Event Manager
- Multiple Instance Support
- High Availability
- Virtualization Support
SNMP Functional Overview
The SNMP framework consists of three parts:
- An SNMP manager—The system used to control and monitor the activities of network devices using SNMP.
- An SNMP agent—The software component within the managed device that maintains the data for the device and reports these data, as needed, to managing systems. Cisco NX-OS supports the agent and MIB. To enable the SNMP agent, you must define the relationship between the manager and the agent.
- A managed information base (MIB)—The collection of managed objects on the SNMP agent.
SNMP is defined in RFCs 3411 to 3418.
Cisco NX-OS supports SNMPv1, SNMPv2c, and SNMPv3. Both SNMPv1 and SNMPv2c use a community-based form of security.
SNMP Notifications
A key feature of SNMP is the ability to generate notifications from an SNMP agent. These notifications do not require that requests be sent from the SNMP manager. Notifications can indicate improper user authentication, restarts, the closing of a connection, loss of a connection to a neighbor router, or other significant events.
Cisco NX-OS generates SNMP notifications as either traps or informs. A trap is an asynchronous, unacknowledged message sent from the agent to the SNMP managers listed in the host receiver table (see the “Configuring SNMP Notification Receivers with VRFs” section). Informs are asynchronous messages sent from the SNMP agent to the SNMP manager which the manager must acknowledge receipt of.
Traps are less reliable than informs because the SNMP manager does not send any acknowledgment when it receives a trap. Cisco NX-OS cannot determine if the trap was received. An SNMP manager that receives an inform request acknowledges the message with an SNMP response protocol data unit (PDU). If Cisco NX-OS never receives a response, it can send the inform request again.
You can configure Cisco NX-OS to send notifications to multiple host receivers. See the “Configuring SNMP Notification Receivers” section for more information about host receivers.
Table 13-1 lists the SNMP traps that are enabled by default.
SNMPv3
SNMPv3 provides secure access to devices by a combination of authenticating and encrypting frames over the network. The security features provided in SNMPv3 are as follows:
- Message integrity—Ensures that a packet has not been tampered with while it was in-transit.
- Authentication—Determines that the message is from a valid source.
- Encryption—Scrambles the packet contents to prevent it from being seen by unauthorized sources.
SNMPv3 provides for both security models and security levels. A security model is an authentication strategy that is set up for a user and the role in which the user resides. A security level is the permitted level of security within a security model. A combination of a security model and a security level determines which security mechanism is employed when handling an SNMP packet.
Security Models and Levels for SNMPv1, v2, v3
The security level determines if an SNMP message needs to be protected from disclosure and if the message needs to be authenticated. The various security levels that exist within a security model are as follows:
- noAuthNoPriv—Security level that does not provide authentication or encryption.
- authNoPriv—Security level that provides authentication but does not provide encryption.
- authPriv—Security level that provides both authentication and encryption.
Three security models are available: SNMPv1, SNMPv2c, and SNMPv3. The security model combined with the security level determine the security mechanism applied when the SNMP message is processed.
Table 13-2 identifies what the combinations of security models and levels mean.
User-Based Security Model
The SNMPv3 User-Based Security Model (USM) refers to SNMP message-level security and offers the following services:
- Message integrity—Ensures that messages have not been altered or destroyed in an unauthorized manner and that data sequences have not been altered to an extent greater than can occur nonmaliciously.
- Message origin authentication—Ensures that the claimed identity of the user on whose behalf received data was originated is confirmed.
- Message confidentiality—Ensures that information is not made available or disclosed to unauthorized individuals, entities, or processes.
SNMPv3 authorizes management operations only by configured users and encrypts SNMP messages.
Cisco NX-OS uses two authentication protocols for SNMPv3:
Cisco NX-OS uses Advanced Encryption Standard (AES) as one of the privacy protocols for SNMPv3 message encryption and conforms with RFC 3826.
The priv option offers a choice of DES or 128-bit AES encryption for SNMP security encryption. The priv option and the aes-128 token indicate that this privacy password is for generating a 128-bit AES key.The AES priv password can have a minimum of eight characters. If the passphrases are specified in clear text, you can specify a maximum of 64 case-sensitive alphanumeric characters. If you use the localized key, you can specify a maximum of 130 characters.

Note For an SNMPv3 operation that uses the external AAA server, you must use AES for the privacy protocol in the user configuration on the external AAA server.
CLI and SNMP User Synchronization
SNMPv3 user management can be centralized at the Access Authentication and Accounting (AAA) server level. This centralized user management allows the SNMP agent in Cisco NX-OS to leverage the user authentication service of the AAA server. Once user authentication is verified, the SNMP PDUs are processed further. Additionally, the AAA server is also used to store user group names. SNMP uses the group names to apply the access/role policy that is locally available in the switch.
Any configuration changes made to the user group, role, or password results in database synchronization for both SNMP and AAA.
Cisco NX-OS synchronizes user configuration in the following ways:
- The authentication passphrase specified in the snmp-server user command becomes the password for the CLI user.
- The password specified in the username command becomes the authentication and privacy passphrases for the SNMP user.
- If you create or delete a user using either SNMP or the CLI, the user is created or deleted for both SNMP and the CLI.
- User-role mapping changes are synchronized in SNMP and the CLI.
- Role changes (deletions or modifications) from the CLI are synchronized to SNMP.

Note When you configure a passphrase/password in localized key/encrypted format, Cisco NX-OS does not synchronize the user information (password, roles, and so on).
Cisco NX-OS holds the synchronized user configuration for 60 minutes by default. See the “Modifying the AAA Synchronization Time” section for information on how to modify this default value.
Group-Based SNMP Access

Note Because group is a standard SNMP term used industry-wide, we refer to role(s) as group(s) in this SNMP section.
SNMP access rights are organized by groups. Each group in SNMP is similar to a role through the CLI. Each group is defined with read access or read-write access.
You can begin communicating with the agent once your username is created, your roles are set up by your administrator, and you are added to the roles.
SNMP and Embedded Event Manager
The Embedded Event Manager (EEM) feature monitors events, including SNMP MIB objects, and triggers an action based on these events. One of the actions could be to send an SNMP notification. EEM sends the cEventMgrPolicyEvent of CISCO-EMBEDDED-EVENT-MGR-MIB as the SNMP notification.
See Chapter 16, “Configuring the Embedded Event Manager” for more information about EEM.
Multiple Instance Support
A device can support multiple instances of a logical network entity, such as protocol instances or VRFs. Most existing MIBs cannot distinguish between these multiple logical network entities. For example, the original OSPF-MIB assumes a single protocol instance on a device, but you can now configure multiple OSPF instances on a device.
SNMPv3 uses contexts to distinguish between these multiple instances. An SNMP context is a collection of management information you can access through the SNMP agent. A device can support multiple contexts for different logical network entities. An SNMP context allows the SNMP manager to access one of the multiple instances of a MIB module supported on the device for the different logical network entities.
Cisco NX-OS supports the CISCO-CONTEXT-MAPPING-MIB to map between SNMP contexts and logical network entities. You can associate an SNMP context to a VRF, protocol instance, or topology.
SNMPv3 supports contexts with the contextName field of the SNMPv3 PDU. You can map this contextName field to a particular protocol instance or VRF.
For SNMPv2c, you can map the SNMP community to a context using the snmpCommunityContextName MIB object in the SNMP-COMMUNITY-MIB (RFC 3584). You can then map this snmpCommunityContextName to a particular protocol instance or VRF using the CISCO-CONTEXT-MAPPING-MIB or the CLI.
To map an SNMP context to a logical network entity, follow these steps:
Step 1 Create the SNMPv3 context.
Step 2 Determine the logical network entity instance.
Step 3 Map the SNMPv3 context to a logical network entity.
Step 4 Optionally, map the SNMPv3 context to an SNMPv2c community.
For more information, see the “Configuring the Context to Network Entity Mapping” section.
High Availability
Cisco NX-OS supports stateless restarts for SNMP. After a reboot or supervisor switchover, Cisco NX-OS applies the running configuration.
Virtualization Support
Cisco NX-OS supports one instance of the SNMP per virtual device context (VDC). By default, Cisco NX-OS places you in the default VDC. For more information, see the Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide, Release 5.x .
SNMP supports multiple MIB module instances and maps them to logical network entities. For more information, see the “Multiple Instance Support” section.
SNMP is also VRF aware. You can configure SNMP to use a particular VRF to reach the SNMP notification host receiver. You can also configure SNMP to filter notifications to an SNMP host receiver based on the VRF where the notification occurred. For more information, see the “Configuring SNMP Notification Receivers with VRFs” section.
Licensing Requirements for SNMP
Guidelines and Limitations
SNMP has the following configuration guidelines and limitations:
- Cisco NX-OS supports read-only access to some SNMP MIBs. See the Cisco NX-OS MIB support list at the following URL for more information:
http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml
Default Settings
Table 13-3 lists the default settings for SNMP parameters.
Configuring SNMP
This section includes the following topics:
- Configuring SNMP Users
- Enforcing SNMP Message Encryption
- Assigning SNMPv3 Users to Multiple Roles
- Creating SNMP Communities
- Filtering SNMP Requests
- Configuring SNMP Notification Receivers
- Configuring a Source Interface for SNMP Notifications
- Configuring the Notification Target User
- Configuring SNMP Notification Receivers with VRFs
- Configuring SNMP to Send Traps Using an Inband Port
- Enabling SNMP Notifications
- Disabling LinkUp/LinkDown Notifications on an Interface
- Displaying SNMP ifIndex for an Interface
- Enabling a One-time Authentication for SNMP over TCP
- Assigning the SNMP Device Contact and Location Information
- Configuring the Context to Network Entity Mapping
- Disabling SNMP
- Modifying the AAA Synchronization Time

Note Be aware that the Cisco NX-OS commands for this feature may differ from those commands used in Cisco IOS.
BEFORE YOU BEGIN
Make sure that you are in the correct VDC. To change the VDC, use the switchto vdc command.
SUMMARY STEPS
2. snmp-server user name [ auth { md5 | sha } passphrase [ auto ] [ priv [ aes-128 ] passphrase ] [ engineID id ] [ localizedkey] ]
DETAILED STEPS
This example shows how to configure the SNMP contact and location information:
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# snmp-server user Admin auth sha abcd1234 priv abcdefgh
Enforcing SNMP Message Encryption
You can configure SNMP to require authentication or encryption for incoming requests. By default, the SNMP agent accepts SNMPv3 messages without authentication and encryption. When you enforce privacy, Cisco NX-OS responds with an authorizationError for any SNMPv3 PDU request using securityLevel parameter of either noAuthNoPriv or authNoPriv.
Use the following command in global configuration mode to enforce SNMP message encryption for a user:
Use the following command in global configuration mode to enforce SNMP message encryption for all users:
Assigning SNMPv3 Users to Multiple Roles
After you configure an SNMP user, you can assign multiple roles for the user.

Note Only users belonging to a network-admin role can assign roles to other users.
Use the following command in global configuration mode to assign a role to an SNMP user:
Creating SNMP Communities
You can create SNMP communities for SNMPv1 or SNMPv2c.
Use the following command in global configuration mode to create an SNMP community string:
Filtering SNMP Requests
You can assign an access list (ACL) to a community to filter incoming SNMP requests. If the assigned ACL allows the incoming request packet, SNMP processes the request. If the ACL denies the request, SNMP drops the request and sends a system message.
Create the ACL with the following parameters:
See the Cisco Nexus 7000 Series NX-OS Security Configuration Guide, Release 5.x for more information on creating ACLs. The ACL applies to both IPv4 and IPv6 over UDP and TCP.
Use the following command in global configuration mode to assign an ACL to a community to filter SNMP requests:
Configuring SNMP Notification Receivers
You can configure Cisco NX-OS to generate SNMP notifications to multiple host receivers.
Use the following command in global configuration mode to configure a host receiver for SNMPv1 traps:
Use the following command in global configuration mode to configure a host receiver for SNMPv2c traps or informs:
Use the following command in global configuration mode to configure a host receiver for SNMPv3 traps or informs:

Note The SNMP manager must know the user credentials (authKey/PrivKey) based on the SNMP engine ID of the Cisco NX-OS device to authenticate and decrypt the SNMPv3 messages.
Configuring a Source Interface for SNMP Notifications
You can configure SNMP to use the IP address of an interface as the source IP address for notifications. When a notification is generated, its source IP address is based on the IP address of this configured interface.
You can configure this as follows:
- All notifications sent to all SNMP notification receivers.
- All notifications sent to a specific SNMP notification receiver. This configuration overrides the global source interface configuration.

Note Configuring the source interface IP address for outgoing trap packets does not guarantee that the device will use the same interface to send the trap. The source interface IP address defines the source address inside of the SNMP trap, and the connection is opened with the address of the egress interface as source.
Use the following command in global configuration mode to configure a host receiver on a source interface:
Use the following command in global configuration mode to configure a source interface for sending out all SNMP notifications:
Use the show snmp source-interface command to display information about configured source interfaces.
Configuring the Notification Target User
You must configure a notification target user on the device to send SNMPv3 inform notifications to a notification host receiver.
Cisco NX-OS uses the credentials of the notification target user to encrypt the SNMPv3 inform notification messages to the configured notification host receiver.

Note For authenticating and decrypting the received inform PDU, the notification host receiver should have the same user credentials as configured in Cisco NX-OS to authenticate and decrypt the informs.
Use the following command in global configuration mode to configure the notification target user:
Configuring SNMP Notification Receivers with VRFs
SNMP adds entries into the cExtSnmpTargetVrfTable of the CISCO-SNMP-TARGET-EXT-MIB when you configure the VRF reachability and filtering options for an SNMP notification receiver.

Note You must configure the host before configuring the VRF reachability or filtering options.
You can configure Cisco NX-OS to use a configured VRF to reach the host receiver.
Use the following command in global configuration mode to configure a VRF to use for sending notifications to the host receiver:
You can configure Cisco NX-OS filter notifications based on the VRF in which the notification occurred.
Use the following command in global configuration mode to filter notifications based on a configured VRF:
Configuring SNMP to Send Traps Using an Inband Port
You can configure SNMP to send traps using an inband port. To do so, you must configure the source interface (at the global or host level) and the VRF used to send the traps.
SUMMARY STEPS
2. snmp-server source-interface traps if-type if-number
4. snmp-server host ip-address use-vrf vrf_name [ udp_port number ]
DETAILED STEPS
This example shows how to configure SNMP to send traps using a globally configured inband port:
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# snmp-server source-interface traps ethernet 1/2
switch(config)# show snmp source-interface
-------------------------------------------------------------------
-------------------------------------------------------------------
-------------------------------------------------------------------
switch(config)# snmp-server host 171.71.48.164 use_vrf default
switch(config)# show snmp host
-------------------------------------------------------------------
Host Port Version Level Type SecName
-------------------------------------------------------------------
171.71.48.164 162 v2c noauth trap public
Source interface: Ethernet 1/2
-------------------------------------------------------------------
Enabling SNMP Notifications
You can enable or disable notifications. If you do not specify a notification name, Cisco NX-OS enables all notifications.
Table 13-4 lists the commands that enable the notifications for Cisco NX-OS MIBs.

Note The snmp-server enable traps command enables both traps and informs, depending on the configured notification host receivers.
Use the following commands in global configuration mode to enable the specified notification:
Disabling LinkUp/LinkDown Notifications on an Interface
You can disable linkUp and linkDown notifications on an individual interface. You can use these limit notifications on a flapping interface (an interface that transitions between up and down repeatedly).
Use the following command in interface configuration mode to disable linkUp/linkDown notifications for the interface:
Displaying SNMP ifIndex for an Interface
The SNMP ifIndex is used across multiple SNMP MIBs to link related interface information. The ifIndex is also used by NetFlow to collect information on an interface.
Use the following command in any mode to display the SNMP ifIndex values for interfaces:
Enabling a One-time Authentication for SNMP over TCP
You can enable a one-time authentication for SNMP over a TCP session.
Use the following command in global configuration mode to enable a one-time authentication for SNMP over TCP:
Assigning the SNMP Device Contact and Location Information
You can assign the device contact information, which is limited to 32 characters (without spaces) and the device location.
BEFORE YOU BEGIN
Make sure that you are in the correct VDC. To change the VDC, use the switchto vdc command.
DETAILED STEPS
Enter configuration commands, one per line. End with CNTL/Z. |
||
(Optional) Displays information about one or more destination profiles. |
||
This example shows how to configure the SNMP contact and location information:
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# snmp contact Admin
Configuring the Context to Network Entity Mapping
You can configure an SNMP context to map to a logical network entity, such as a protocol instance or VRF.
BEFORE YOU BEGIN
Make sure that you are in the correct VDC. To change the VDC, use the switchto vdc command.
Determine the logical network entity instance. For more information on VRFs and protocol instances, see the Cisco Nexus 7000 Series NX-OS Unicast Routing Configuration Guide, Release 5.x , or the Cisco Nexus 7000 Series NX-OS Multicast Routing Configuration Guide, Release 5.x .
SUMMARY STEPS
2. snmp-server context context-name [ instance instance-name ] [ vrf vrf-name ] [ topology topology-name ]
3. snmp-server mib community-map community-name context context-name
DETAILED STEPS
This example shows how to map VRF red to the SNMPv2c public community string:
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# vrf context red
switch(config)# snmp-server context public1 vrf red
switch(config)# snmp-server mib community-map public context public1
This example shows how to map OSPF instance Enterprise to the same SNMPv2c public community string:
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# router ospf Enterprise
switch(config)# snmp-server context public1 instance Enterprise
switch(config)# snmp-server mib community-map public context public1
Use the following command in global configuration mode to delete the mapping between an SNMP context and a logical network entity:
Disabling SNMP
You can disable SNMP on a device.
Use the following command in global configuration mode to disable SNMP:
Verifying the SNMP Configuration
To display the SNMP configuration information, perform one of the following tasks:
Configuration Examples for SNMP
This example shows how to configure Cisco NX-OS to send the Cisco linkUp or Down notifications to one notification host receiver using the Blue VRF and defines two SNMP users, Admin and NMS:
This example shows how to configure SNMP to send traps using an inband port configured at the host level:
Source interface: Ethernet 1/2
-------------------------------------------------------------------
Additional References
For additional information related to implementing SNMP, see the following sections:
Related Documents
Cisco Nexus 7000 Series NX-OS System Management Command Reference |
|
Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide, Release 5.x |
|
http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml |
MIBs
To locate and download MIBs, go to the following URL: http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml |
Feature History for SNMP
Table 13-5 lists the release history for this feature.
Updated the snmp-server enable traps commands. See the “Enabling SNMP Notifications” section . |
||
Assigns an ACL to an SNMP community to filter SNMP requests. See the “Filtering SNMP Requests” section. |
||
Adds support to designate an interface to act as the source interface for SNMP notifications. See the “Configuring SNMP Notification Receivers” section. |
||
Adds ability to modify the synchronized user configuration timeout. See the “Modifying the AAA Synchronization Time” section. |
||
Added ability to disable the SNMP protocol. See the “Disabling SNMP” section. |