SNMP Config.pdf

Embed Size (px)

DESCRIPTION

snmp configuration for cisco

Citation preview

  • SNMP Configuration Guide, Cisco IOS XERelease 3SE (Catalyst 3850 Switches)

    Americas HeadquartersCisco Systems, Inc.170 West Tasman DriveSan Jose, CA 95134-1706USAhttp://www.cisco.comTel: 408 526-4000 800 553-NETS (6387)Fax: 408 527-0883

  • THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS,INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

    THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPEDWITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITEDWARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

    The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCBs public domain versionof the UNIX operating system. All rights reserved. Copyright 1981, Regents of the University of California.

    NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED AS IS WITH ALLFAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADEPRACTICE.

    IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING,WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO ORITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationshipbetween Cisco and any other company. (1110R)

    Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output,network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative contentis unintentional and coincidental.

    2013 Cisco Systems, Inc. All rights reserved.

  • C O N T E N T S

    Simple Network Management Protocol 1Finding Feature Information 1

    Information About Configuring SNMP Support 1

    Components of SNMP 1

    SNMP Manager 2

    SNMP Agent 2

    MIB 2

    SNMP Operations 3

    SNMP Get 3

    SNMP Set 3

    SNMP Notifications 3

    Traps and Informs 3

    Versions of SNMP 5

    How to Configure SNMP Support 7

    Configuring System Information 7

    Enabling the SNMP Agent Shutdown Mechanism 9

    Defining the Maximum SNMP Agent Packet Size 10

    Limiting the Number of TFTP Servers Used via SNMP 11

    Troubleshooting Tips 12

    Configuring SNMP Versions 1 and 2 12

    Creating or Modifying an SNMP View Record 12

    Creating or Modifying Access Control for an SNMP Community 13

    Configuring a Recipient of an SNMP Trap Operation 15

    Disabling the SNMP Agent 16

    Configuration Examples for SNMP Support 17

    Example: Configuring SNMPv1 Support 17

    Example: Show SNMP View 18

    Example Configuring SNMP Community Access Strings 19

    Example Configuring Host Information 19

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) iii

  • Additional References 19

    Feature Information for Simple Network Management Protocol 22

    SNMP Inform Request 25Finding Feature Information 25

    Information About SNMP Inform Requests 25

    SNMP Inform Request 25

    How to Configure SNMP Inform Requests 25

    Configuring Devices to Send Traps 26

    Changing Inform Operation Values 27

    Configuration Examples for SNMP Inform Request 28

    Example: Configuring SNMP Inform Request 28

    Additional References 29

    Feature Information for SNMP Inform Request 31

    SNMPv2c 33Finding Feature Information 33

    Information About SNMPv2c 33

    Security Features in SNMPv2c 33

    How to Configure SNMPv2c 34

    Configuring the SNMP Server for SNMPv2c 34

    Verifying SNMPv2c 36

    Configuration Examples for SNMPv2c 37

    Example: Configuring the SNMP Server for SNMPv2c 37

    Additional References for SNMPv2c 38

    Feature Information for SNMPv2c 39

    SNMP Version 3 41Finding Feature Information 41

    Information About SNMP Version 3 41

    Security Features in SNMP Version 3 41

    Cisco-Specific Error Messages for SNMP Version 3 42

    How to Configure SNMP Version 3 44

    Configuring the SNMP Server 44

    Verifying SNMP Version 3 46

    Configuration Examples for SNMP Version 3 47

    Example: Configuring SNMP Version 3 47

    Additional References for SNMP Version 3 47

    Contents

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)iv

  • Feature Information for SNMP Version 3 49

    AES and 3-DES Encryption Support for SNMP Version 3 51Finding Feature Information 51

    Prerequisites for AES and 3-DES Encryption Support for SNMP Version 3 51

    Information About AES and 3-DES Encryption Support for SNMP Version 3 52

    How to Configure AES and 3-DES Encryption Support for SNMP Version 3 52

    Adding a New User to an SNMP Group 53

    Verifying the SNMP User Configuration 53

    Additional References for AES and 3-DES Encryption Support for SNMP Version 3 54

    Feature Information for AES and 3-DES Encryption Support for SNMP Version 3 56

    Cisco Enhanced Image MIB 59Finding Feature Information 59

    Information About Cisco Enhanced Image MIB 59

    Cisco Enhanced Image MIB Overview 59

    Image Installable Table 60

    Image Location Table 60

    Image Table 61

    Sample Output from the Cisco Enhanced Image MIB Query 61Additional References 62

    Feature Information for Cisco Enhanced Image MIB 63

    Contents

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) v

  • Contents

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)vi

  • Simple Network Management Protocol

    The Simple Network Management Protocol (SNMP) is an application-layer protocol that provides amessage format for communication between SNMP managers and agents. SNMP provides a standardizedframework and a common language that is used for monitoring and managing devices in a network.This module describes how to enable an SNMP agent on a Cisco device and how to control the sending ofSNMP notifications from the agent. For information about using SNMP management systems, see theappropriate documentation for your network management system (NMS) application.

    Finding Feature Information, page 1 Information About Configuring SNMP Support, page 1 How to Configure SNMP Support, page 7 Configuration Examples for SNMP Support, page 17 Additional References, page 19 Feature Information for Simple Network Management Protocol, page 22

    Finding Feature InformationYour software release may not support all the features documented in this module. For the latest caveatsand feature information, see Bug Search Tool and the release notes for your platform and software release.To find information about the features documented in this module, and to see a list of the releases in whicheach feature is supported, see the feature information table at the end of this module.Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

    Information About Configuring SNMP Support Components of SNMP, page 1 SNMP Operations, page 3 Versions of SNMP, page 5

    Components of SNMPThe Simple Network Management Protocol (SNMP) is an application-layer protocol that provides amessage format for communication between SNMP managers and agents. SNMP provides a standardizedframework and a common language used for monitoring and managing devices in a network.The SNMP framework has the following components, which are described in the following sections:

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 1

  • SNMP Manager, page 2 SNMP Agent, page 2 MIB, page 2

    SNMP ManagerThe SNMP manager is a system that controls and monitors the activities of network hosts using SNMP.The most common managing system is a network management system (NMS). The term NMS can beapplied either to a dedicated device used for network management or to the applications used on such adevice. Several network management applications are available for use with SNMP and range from simplecommand line interface applications to applications such as the CiscoWorks2000 products that use GUIs.

    SNMP AgentThe SNMP agent is the software component within a managed device that maintains the data for the deviceand reports this data, as needed, to managing systems. The agent resides on the routing device (router,access server, or switch). To enable an SNMP agent on a Cisco routing device, you must define therelationship between the manager and the agent.

    Note Although many Cisco devices can be configured to be an SNMP agent, this practice is not recommended.Commands that an agent needs to control the SNMP process are available through the Cisco CLI withoutadditional configuration.

    MIBA MIB is a virtual information storage area for network management information and consists ofcollections of managed objects. Within a MIB are collections of related objects defined in MIB modules.MIB modules are written in the SNMP MIB module language, as defined in STD 58, RFC 2578, RFC2579, and RFC 2580 (see the MIBs and RFCs topic in the Simple Network Management Protocolmodule for an explanation of RFCs and Standard documents). Individual MIB modules are also referred toas MIBs; for example, the Interfaces Group MIB (IF-MIB) is a MIB module within the MIB on yoursystem.

    An SNMP agent contains MIB variables, whose values the SNMP manager can request or change throughGET or SET operations. A manager can get a value from an agent or store a value in that agent. The agentgathers data from the MIB, the repository for information about device parameters and network data. Theagent can also respond to manager requests to get or set data.The figure below illustrates the communications between the SNMP manager and agent. A manager sendsan agent requests to get and set MIB values. The agent responds to these requests. Independent of thisinteraction, the agent can send the manager unsolicited notifications (traps or informs) to notify themanager about network conditions.

    Figure 1 Communication Between an SNMP Agent and Manager

    Simple Network Management Protocol SNMP Manager

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)2

  • SNMP OperationsSNMP applications perform the following operations to retrieve data, modify SNMP object variables, andsend notifications:

    SNMP Get, page 3 SNMP Set, page 3 SNMP Notifications, page 3

    SNMP GetThe SNMP GET operation is performed by a Network Management Server (NMS) to retrieve SNMP objectvariables. There are three types of get operations:

    GETRetrieves the exact object instance from the SNMP agent. GETNEXTRetrieves the next object variable, which is a lexicographical successor to the specified

    variable. GETBULKRetrieves a large amount of object variable data, without the need for repeated

    GETNEXT operations.

    SNMP SetThe SNMP SET operation is performed by a Network Management Server (NMS) to modify the value ofan object variable.

    SNMP NotificationsA key feature of SNMP is its capability to generate unsolicited notifications from an SNMP agent.

    Traps and Informs, page 3

    Traps and Informs

    Unsolicited (asynchronous) notifications can be generated as traps or inform requests (informs). Traps aremessages alerting the SNMP manager to a condition on the network. Informs are traps that include arequest for confirmation of receipt from the SNMP manager. Notifications can indicate improper userauthentication, restarts, the closing of a connection, loss of connection to a neighboring device, or othersignificant events.Traps are less reliable than informs because the receiver does not send an acknowledgment when it receivesa trap. The sender does not know if the trap was received. An SNMP manager that receives an inform,acknowledges the message with an SNMP response protocol data unit (PDU). If the sender never receives aresponse, the inform can be sent again. Thus, informs are more likely to reach their intended destination.Traps are often preferred even though they are less reliable because informs consume more resources in thedevice and in the network. Unlike a trap, which is discarded as soon as it is sent, an inform must be held inmemory until a response is received or the request times out. Also, traps are sent only once, whereas aninform may be resent several times. The retries increase traffic and contribute to higher overhead on thenetwork. Use of traps and informs requires a trade-off between reliability and resources. If it is importantthat the SNMP manager receives every notification, use informs, but if traffic volume or memory usage areconcerns and the receipt of every notification is not required, use traps.The following figures illustrate the differences between traps and informs.

    SNMP OperationsSNMP Get

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 3

  • The figure below shows that an agent successfully sends a trap to an SNMP manager. Although themanager receives the trap, it does not send an acknowledgment. The agent has no way of knowing that thetrap reached its destination.

    Figure 2 Trap Successfully Sent to SNMP Manager

    In the figure below, the agent successfully sends an inform to the manager. When the manager receives theinform, a response is sent to the agent and the agent knows that the inform reached its destination. Noticethat in this example, the traffic generated is twice as much as in the interaction when the agent sends trapsto the manager.

    Figure 3 Inform Request Successfully Sent to SNMP Manager

    The figure below shows an agent sending a trap to a manager that the manager does not receive. The agenthas no way of knowing that the trap did not reach its destination. The manager never receives the trapbecause traps are not resent.

    Figure 4 Trap Unsuccessfully Sent to SNMP Manager

    The figure below shows an agent sending an inform to a manager that does not reach the manager. Becausethe manager did not receive the inform, it does not send a response. After a period of time, the agentresends the inform. The manager receives the inform from the second transmission and sends a reply. In

    Simple Network Management Protocol Traps and Informs

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)4

  • this example, more traffic is generated than in the scenario shown in the figure above but the notificationreaches the SNMP manager.

    Figure 5 Inform Unsuccessfully Sent to SNMP Manager

    Versions of SNMPThe Cisco software supports the following versions of SNMP:

    SNMPv1Simple Network Management Protocol version 1 is a full Internet standard, defined in RFC1157. (RFC 1157 replaces the earlier versions that were published as RFC 1067 and RFC 1098.)Security is based on community strings.

    SNMPv2cThe community string-based Administrative Framework for SNMPv2. SNMPv2c (the cis for community) is an experimental Internet protocol defined in RFC 1901, RFC 1905, and RFC1906. SNMPv2c is an update of the protocol operations and data types of SNMPv2p (the p is forparty-based security) or SNMPv2 Classic, and uses the community-based security model ofSNMPv1.

    SNMPv3Version 3 of SNMP. SNMPv3 is an interoperable standards-based protocol defined inRFCs 3413 to 3415. SNMPv3 provides secure access to devices by authenticating and encryptingpackets over the network.

    The security features provided in SNMPv3 are as follows:

    Message integrityEnsures that a packet has not been tampered with in transit. AuthenticationDetermines that the message is from a valid source. EncryptionEncodes the contents of a packet to prevent it from being learned by an unauthorized

    source.

    Both SNMPv1 and SNMPv2c use a community-based form of security. The community of SNMPmanagers able to access the agent MIB is defined by a community string.SNMPv2c support includes a bulk retrieval mechanism and detailed error message reporting tomanagement stations. The bulk retrieval mechanism supports the retrieval of tables and large quantities ofinformation, minimizing the number of round trips required. The SNMPv2c improved error handling

    Versions of SNMPTraps and Informs

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 5

  • support includes expanded error codes that distinguish different types of errors; these conditions arereported through a single error code in SNMPv1. The following three types of exceptions are also reported:no such object, no such instance, and end of MIB view.SNMPv3 is a security model in which an authentication strategy is set up for a user and the group in whichthe user resides. A security level is the permitted level of security within a security model. A combinationof a security model and a security level determines which security mechanism is employed when handlingan SNMP packet.Three security models are available: SNMPv1, SNMPv2c, and SNMPv3. The table below lists thecombinations of security models and levels and their meanings.

    Table 1 SNMP Security Models and Levels

    Model Level Authentication Encryption What Happens

    v1 noAuthNoPriv Community String No Uses a communitystring match forauthentication.

    v2c noAuthNoPriv Community String No Uses a communitystring match forauthentication.

    v3 noAuthNoPriv Username No Uses a usernamematch forauthentication.

    v3 authNoPriv Message Digest 5(MD5) or SecureHash Algorithm(SHA)

    No Providesauthenticationbased on theHMAC-MD5 orHMAC-SHAalgorithms.

    v3 authPriv MD5 or SHA Data EncryptionStandard (DES)

    Providesauthenticationbased on theHMAC-MD5 orHMAC-SHAalgorithms.Provides DES 56-bit encryption inaddition toauthenticationbased on theCipher BlockChaining (CBC)CBC-DES(DES-56) standard.

    You must configure an SNMP agent to use the version of SNMP supported by the management station. Anagent can communicate with multiple managers. You can configure the Cisco software to supportcommunications with one management station using the SNMPv1 protocol, one using the SNMPv2cprotocol, and another using SMNPv3.

    Simple Network Management Protocol Traps and Informs

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)6

  • SNMPv3 supports RFCs 1901 to 1908, 2104, 2206, 2213, 2214, and 2271 to 2275. For additionalinformation about SNMPv3, see RFC 2570, Introduction to Version 3 of the Internet-standard NetworkManagement Framework (this is not a standards document).

    How to Configure SNMP SupportThere is no specific command to enable SNMP. The first snmp-server command that you enter enablessupported versions of SNMP. All other configurations are optional.

    Configuring System Information, page 7 Enabling the SNMP Agent Shutdown Mechanism, page 9 Defining the Maximum SNMP Agent Packet Size, page 10 Limiting the Number of TFTP Servers Used via SNMP, page 11 Configuring SNMP Versions 1 and 2, page 12 Disabling the SNMP Agent, page 16

    Configuring System InformationYou can set the system contact, location, and serial number of the SNMP agent so that these descriptionscan be accessed through the configuration file. Although the configuration steps described in this sectionare optional, configuring the basic information is recommended because it may be useful whentroubleshooting your configuration. In addition, the first snmp-server command that you issue enablesSNMP on the device.Perform this task as needed.

    SUMMARY STEPS

    1. enable2. configure terminal3. snmp-server contact text4. snmp-server location text5. snmp-server chassis-id number6. end7. show snmp contact8. show snmp location9. show snmp chassis

    DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:

    Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Configuring System InformationHow to Configure SNMP Support

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 7

  • Command or Action Purpose

    Step 2 configure terminal

    Example:

    Device# configure terminal

    Enters global configuration mode.

    Step 3 snmp-server contact text

    Example:

    Device(config)# snmp-server contact NameOne

    Sets the system contact string.

    Step 4 snmp-server location text

    Example:

    Device(config)# snmp-server location LocationOne

    Sets the system location string.

    Step 5 snmp-server chassis-id number

    Example:

    Device(config)# snmp-server chassis-id 015A619T

    Sets the system serial number.

    Step 6 end

    Example:

    Device(config)# end

    Exits global configuration mode and returns to privilegedEXEC mode.

    Step 7 show snmp contact

    Example:

    Device# show snmp contact

    (Optional) Displays the contact strings configured for thesystem.

    Step 8 show snmp location

    Example:

    Device# show snmp location

    (Optional) Displays the location string configured for thesystem.

    Simple Network Management Protocol How to Configure SNMP Support

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)8

  • Command or Action Purpose

    Step 9 show snmp chassis

    Example:

    Device# show snmp chassis

    (Optional) Displays the system serial number.

    Enabling the SNMP Agent Shutdown MechanismUsing SNMP packets, a network management tool can send messages to users on virtual terminals and onthe console. This facility operates in a similar fashion to the send EXEC command; however, the SNMPrequest that causes the message to be issued to the users also specifies the action to be taken after themessage is delivered. One possible action is a shutdown request. After a system is shut down, typically, it isreloaded. Because the ability to cause a reload from the network is a powerful feature, the system isprotected by the snmp-server system-shutdown global configuration command. If you do not issue thiscommand, the shutdown mechanism is not enabled.Perform this task to enable the SNMP agent shutdown mechanism.

    SUMMARY STEPS

    1. enable2. configure terminal3. snmp-server system-shutdown4. end

    DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:

    Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Step 2 configure terminal

    Example:

    Device# configure terminal

    Enters global configuration mode.

    Step 3 snmp-server system-shutdown

    Example:

    Device(config)# snmp-server system-shutdown

    Enables system shutdown using the SNMP message reload feature.

    Enabling the SNMP Agent Shutdown MechanismHow to Configure SNMP Support

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 9

  • Command or Action Purpose

    Step 4 end

    Example:

    Device(config)# end

    Exits global configuration mode and returns to privileged EXECmode.

    Defining the Maximum SNMP Agent Packet SizeYou can define the maximum packet size permitted when the SNMP agent is receiving a request orgenerating a reply.Perform this task to set the maximum permitted packet size.

    SUMMARY STEPS

    1. enable2. configure terminal3. snmp-server packetsize byte-count4. end

    DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:

    Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Step 2 configure terminal

    Example:

    Device# configure terminal

    Enters global configuration mode.

    Step 3 snmp-server packetsize byte-count

    Example:

    Device(config)# snmp-server packetsize 512

    Establishes the maximum packet size.

    Defining the Maximum SNMP Agent Packet Size How to Configure SNMP Support

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)10

  • Command or Action Purpose

    Step 4 end

    Example:

    Device(config)# end

    Exits global configuration mode and returns to privileged EXECmode.

    Limiting the Number of TFTP Servers Used via SNMPYou can limit the number of TFTP servers used for saving and loading configuration files via SNMP byusing an access list. Limiting the use of TFTP servers in this way conserves system resources andcentralizes the operation for manageability.Perform this task to limit the number of TFTP servers.

    SUMMARY STEPS

    1. enable2. configure terminal3. snmp-server tftp-server-list number4. end

    DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:

    Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Step 2 configure terminal

    Example:

    Device# configure terminal

    Enters global configuration mode.

    Step 3 snmp-server tftp-server-list number

    Example:

    Device(config)# snmp-server tftp-server-list 12

    Limits the number of TFTP servers used for configuration filecopies via SNMP to the servers in an access list.

    Limiting the Number of TFTP Servers Used via SNMPHow to Configure SNMP Support

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 11

  • Command or Action Purpose

    Step 4 end

    Example:

    Device(config)# end

    Exits global configuration mode and returns to privileged EXECmode.

    Troubleshooting Tips, page 12

    Troubleshooting TipsTo monitor SNMP trap activity in real time for the purposes of troubleshooting, use the SNMP debugcommands, including the debug snmp packet EXEC command. For documentation of SNMP debugcommands, see the Cisco IOS Debug Command Reference.

    Configuring SNMP Versions 1 and 2When you configure SNMP versions 1 and 2, you can optionally create or modify views for communitystrings to limit the MIB objects that an SNMP manager can access.Perform the following tasks when configuring SNMP Version 1 or SNMP Version 2.

    Creating or Modifying an SNMP View Record, page 12 Creating or Modifying Access Control for an SNMP Community, page 13 Configuring a Recipient of an SNMP Trap Operation, page 15

    Creating or Modifying an SNMP View RecordYou can assign views to community strings to limit which MIB objects an SNMP manager can access. Youcan use a predefined view or create your own view. If you are using a predefined view or no view at all,skip this task.Perform this task to create or modify an SNMP view record.

    SUMMARY STEPS

    1. enable2. configure terminal3. snmp-server view view-name oid-tree {included | excluded}4. no snmp-server view view-name oid-tree {included | excluded}5. end6. show snmp view

    Configuring SNMP Versions 1 and 2 Troubleshooting Tips

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)12

  • DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:

    Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Step 2 configure terminal

    Example:

    Device# configure terminal

    Enters global configuration mode.

    Step 3 snmp-server view view-name oid-tree {included |excluded}

    Example:

    Device(config)# snmp-server view mib2 mib-2 included

    Creates a view record.

    In this example, the mib2 view that includes all objects inthe MIB-II subtree is created.

    Note You can use this command multiple times to create thesame view record. If a view record for the same objectidentifier (OID) value is created multiple times, thelatest entry of the object identifier takes precedence.

    Step 4 no snmp-server view view-name oid-tree {included |excluded}

    Example:

    Device(config)# no snmp-server view mib2 mib-2 included

    Removes a server view.

    Step 5 end

    Example:

    Device(config)# end

    Exits global configuration mode and returns to privilegedEXEC mode.

    Step 6 show snmp view

    Example:

    Device# show snmp view

    (Optional) Displays a view of the MIBs associated withSNMP.

    Creating or Modifying Access Control for an SNMP Community

    Simple Network Management ProtocolCreating or Modifying Access Control for an SNMP Community

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 13

  • Use an SNMP community string to define the relationship between the SNMP manager and the agent. Thecommunity string acts like a password to regulate access to the agent on the device. Optionally, you canspecify one or more of the following characteristics associated with the string:

    An access list of IP addresses of the SNMP managers that are permitted to use the community string togain access to the agent.

    A MIB view, which defines the subset of all MIB objects accessible to the given community. Read and write or read-only permission for the MIB objects accessible to the community.

    Perform this task to create or modify a community string.

    SUMMARY STEPS

    1. enable2. configure terminal3. snmp-server community string [view view-name] [ro | rw] [ipv6 nacl] [access-list-number]4. no snmp-server community string5. end6. show snmp community

    DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:

    Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Step 2 configure terminal

    Example:

    Device# configure terminal

    Enters global configuration mode.

    Step 3 snmp-server community string [view view-name] [ro | rw] [ipv6nacl] [access-list-number]

    Example:

    Device(config)# snmp-server community comaccess ro 4

    Defines the community access string.

    You can configure one or more communitystrings.

    Step 4 no snmp-server community string

    Example:

    Device(config)# no snmp-server community comaccess

    Removes the community string from theconfiguration.

    Simple Network Management Protocol Creating or Modifying Access Control for an SNMP Community

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)14

  • Command or Action Purpose

    Step 5 end

    Example:

    Device(config)# end

    Exits global configuration mode.

    Step 6 show snmp community

    Example:

    Device# show snmp community

    (Optional) Displays the community access stringsconfigured for the system.

    Configuring a Recipient of an SNMP Trap OperationTo enable multiple hosts, you must issue a separate snmp-server host command for each host. You canspecify 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 orinform), each succeeding command overwrites the previous command. Only the last snmp-server hostcommand will be in effect. For example, if you enter an snmp-server host inform command for a host andthen enter another snmp-server host inform command for the same host, the second command willreplace the first.

    The snmp-server host command is used in conjunction with the snmp-server enable command. Use thesnmp-server enable command to specify which SNMP notifications are sent globally. For a host to receivemost notifications, at least one snmp-server enable command and the snmp-server host command for thathost must be enabled.Some notification types cannot be controlled with the snmp-server enable command. For example, somenotification types are always enabled and others are enabled by a different command. For example, thelinkUpDown notifications are controlled by the snmp trap link-status interface configuration command.These notification types do not require an snmp-server enable command.A notification-type options availability depends on the device type and Cisco IOS software featuressupported on the device. For example, the Cisco software does not support the envmon notification type.To see what notification types are available on your system, use the command help (?) at the end of thesnmp-server host command.Perform this task to configure the recipient of an SNMP trap operation.

    SUMMARY STEPS

    1. enable2. configure terminal3. snmp-server host host-id [traps | informs][ version {1 | 2c | 3 [auth | noauth | priv]}] community-

    string [udp-port port-number] [notification-type]4. end5. show snmp host

    Simple Network Management ProtocolConfiguring a Recipient of an SNMP Trap Operation

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 15

  • DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:

    Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Step 2 configure terminal

    Example:

    Device# configure terminal

    Enters global configuration mode.

    Step 3 snmp-server host host-id [traps | informs][ version {1 | 2c |3 [auth | noauth | priv]}] community-string [udp-port port-number] [notification-type]

    Example:

    Device(config)# snmp-server host 172.16.1.27 version 2c public

    Specifies whether you want the SNMP notifications sentas traps or informs, the version of SNMP to use, thesecurity level of the notifications (for SNMPv3), and therecipient (host) of the notifications.

    Step 4 end

    Example:

    Device(config)# end

    Exits global configuration mode.

    Step 5 show snmp host

    Example:

    Device# show snmp host

    (Optional) Displays the SNMP notifications sent as traps,the version of SNMP, and the host IP address of thenotifications.

    Disabling the SNMP Agent

    SUMMARY STEPS

    1. enable2. configure terminal3. no snmp-server4. end

    Disabling the SNMP Agent Configuring a Recipient of an SNMP Trap Operation

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)16

  • DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:

    Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Step 2 configure terminal

    Example:

    Device# configure terminal

    Enters global configuration mode.

    Step 3 no snmp-server

    Example:

    Device(config)# no snmp-server

    Disables SNMP agent operation.

    Step 4 end

    Example:

    Device(config)# end

    Exits global configuration mode.

    Configuration Examples for SNMP Support Example: Configuring SNMPv1 Support, page 17 Example: Show SNMP View, page 18 Example Configuring SNMP Community Access Strings, page 19 Example Configuring Host Information, page 19

    Example: Configuring SNMPv1 SupportThe following example shows how to enable SNMPv1. The configuration permits any SNMP manager toaccess all objects with read-only permissions using the community string named public. This configurationdoes not cause the router to send traps.

    Device(config)# snmp-server community public

    The following example shows how to permit SNMP access to all objects with read-only permission usingthe community string named public. The router also will send BGP traps to the hosts 172.16.1.111 and172.16.1.33 using SNMPv1. The community string named public is sent with the traps.

    Device(config)# snmp-server community public

    Example: Configuring SNMPv1 SupportConfiguration Examples for SNMP Support

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 17

  • Device(config)# snmp-server enable traps bgpDevice(config)# snmp-server host 172.16.1.111 version 1 publicDevice(config)# snmp-server host 172.16.1.33 public

    The following example shows how to send the SNMP and Cisco environmental monitor enterprise-specifictraps to address 172.30.2.160:

    Device(config)# snmp-server enable trapsDevice(config)# snmp-server host 172.30.2.160 public snmp envmon

    The following example shows how to enable the router to send all traps to the host example.com using thecommunity string public:

    Device(config)# snmp-server enable trapsDevice(config)# snmp-server host example.com public

    The following example shows a configuration in which no traps are sent to a host. The BGP traps areenabled for all hosts, but only the OSPF traps are enabled to be sent to a host.

    Device(config)# snmp-server enable traps bgpDevice(config)# snmp-server host host1 public ospf

    The following example shows how to enable a router to send all informs to the host example.com using thecommunity string named public:

    Device(config)# snmp-server enable trapsDevice(config)# snmp-server host example.com informs version 2c public

    The following example shows how to enable the SNMP manager and set the session timeout to a valuegreater than the default:

    Device(config)# snmp-server managerDevice(config)# snmp-server manager session-timeout 1000

    The following example shows how to enable the SNMP manager to access all objects with read-onlypermissions. The user is specified as abcd and the authentication password is abcdpasswd. To obtain theautomatically generated default local engine ID, use the show snmp engineID command.

    Device(config)# snmp-server view readview internet includedDevice(config)# snmp-server view readview iso includedDevice(config)# snmp-server group group1 v3 noauth read readviewDevice(config)# snmp-server user abcd group1 v3 auth md5 abcdpasswd

    Example: Show SNMP ViewThe following example shows the SNMP view for the system OID tree:

    Device> enableDevice# configure terminalDevice(config)# snmp-server view test system includedDevice(config)# endDevice# show snmp view

    test system - included nonvolatile activecac_view pimMIB - included read-only activecac_view msdpMIB - included read-only activecac_view interfaces - included read-only activecac_view ip - included read-only activecac_view ospf - included read-only active.

    .

    .

    v1default iso - included permanent active

    Example: Show SNMP View Configuration Examples for SNMP Support

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)18

  • v1default internet - included permanent activev1default snmpUsmMIB - excluded permanent activev1default snmpVacmMIB - excluded permanent activev1default snmpCommunityMIB - excluded permanent activev1default ciscoIpTapMIB - excluded permanent activev1default ciscoMgmt.395 - excluded permanent activev1default ciscoTap2MIB - excluded permanent active.

    .

    .

    Example Configuring SNMP Community Access StringsThe following example shows the community access strings configured to enable access to the SNMPmanager:

    Device> enableDevice# configure terminalDevice(config)# snmp-server community public roDevice(config)# snmp-server community private rwDevice(config)# endDevice# show snmp community

    Community name: privateCommunity Index: privateCommunity SecurityName: privatestorage-type: nonvolatile activeCommunity name: publicCommunity Index: publicCommunity SecurityName: publicstorage-type: nonvolatile active

    Example Configuring Host InformationThe following example shows the host information configured for SNMP notifications:

    Device> enableDevice# configure terminalDevice(config)# snmp-server host 10.2.28.1 inform version 2c publicDevice(config)# endDevice# show snmp host

    Notification host: 10.2.28.1 udp-port: 162 type: informuser: public security model: v2c

    Additional ReferencesRelated Documents

    Related Topic Document Title

    Cisco IOS commands Cisco IOS Master Command List, All Releases

    Example Configuring SNMP Community Access StringsAdditional References

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 19

  • Related Topic Document Title

    SNMP commands: complete command syntax,command mode, command history, defaults, usageguidelines, and examples

    Cisco IOS SNMP Command Reference

    Cisco implementation of RFC 1724, RIP Version 2MIB Extensions

    RIPv2 Monitoring with SNMP Using the RFC 1724MIB Extensions feature module

    DSP Operational State Notifications fornotifications to be generated when a digitalsignaling processor (DSP) is used

    DSP Operational State Notifications featuremodule

    Standards and RFCs

    Standard/RFC Title

    CBC-DES (DES-56) standard Symmetric Encryption ProtocolSTD: 58 Structure of Management Information Version 2 (SMIv2) RFC 1067 A Simple Network Management Protocol

    RFC 1091 Telnet terminal-type option

    RFC 1098 Simple Network Management Protocol (SNMP)

    RFC 1157 Simple Network Management Protocol (SNMP)

    RFC 1213 Management Information Base for Network Management ofTCP/IP-based internets:MIB-II

    RFC 1215 Convention for defining traps for use with the SNMPRFC 1901 Introduction to Community-based SNMPv2

    RFC 1905 Common Management Information Services and Protocol overTCP/IP (CMOT)

    RFC 1906 Telnet X Display Location Option

    RFC 1908 Simple Network Management Protocol (SNMP)

    RFC 2104 HMAC: Keyed-Hashing for Message AuthenticationRFC 2206 RSVP Management Information Base using SMIv2RFC 2213 Integrated Services Management Information Base using SMIv2RFC 2214 Integrated Services Management Information Base Guaranteed

    Service Extensions using SMIv2

    RFC 2271 An Architecture for Describing SNMP Management Frameworks

    Simple Network Management Protocol Additional References

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)20

  • Standard/RFC Title

    RFC 2570 Introduction to Version 3 of the Internet-standard NetworkManagement Framework

    RFC 2578 Structure of Management Information Version 2 (SMIv2)RFC 2579 Textual Conventions for SMIv2RFC 2580 Conformance Statements for SMIv2RFC 2981 Event MIB

    RFC 2982 Distributed Management Expression MIB

    RFC 3413 SNMPv3 Applications

    RFC 3415 View-based Access Control Model (VACM) for the SimpleNetwork Management Protocol (SNMP)

    RFC 3418 Management Information Base (MIB) for the Simple NetworkManagement Protocol (SNMP)

    MIBs

    MIB MIBs Link

    Circuit Interface Identification MIB Cisco SNMPv2 Ethernet-like Interfaces MIB Event MIB Expression MIB Support for Delta,

    Wildcarding, and Aggregation Interfaces Group MIB (IF-MIB) Interfaces Group MIB Enhancements MIB Enhancements for Universal Gateways

    and Access Servers MSDP MIB NTP MIB Response Time Monitor MIB Virtual Switch MIB

    To locate and download MIBs for selectedplatforms, releases, and feature sets, use Cisco MIBLocator found at the following URL:http://www.cisco.com/go/mibs

    Simple Network Management ProtocolAdditional References

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 21

  • Technical Assistance

    Description Link

    The Cisco Support and Documentation websiteprovides online resources to downloaddocumentation, software, and tools. Use theseresources to install and configure the software andto troubleshoot and resolve technical issues withCisco products and technologies. Access to mosttools on the Cisco Support and Documentationwebsite requires a Cisco.com user ID andpassword.

    http://www.cisco.com/cisco/web/support/index.html

    Feature Information for Simple Network ManagementProtocol

    The following table provides release information about the feature or features described in this module.This table lists only the software release that introduced support for a given feature in a given softwarerelease train. Unless noted otherwise, subsequent releases of that software release train also support thatfeature.Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

    Table 2 Feature Information for Simple Network Management Protocol

    Feature Name Releases Feature Information

    SNMP (Simple NetworkManagement Protocol)

    11.2(1)15.0(1)S

    The Simple NetworkManagement Protocol (SNMP)feature provides an application-layer protocol that facilitates theexchange of managementinformation between networkdevices. SNMP is part of theTCP/IP protocol suite. SNMPenables network administrators tomanage network performance,find and solve network problems,and plan for network growth.

    Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S.and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks.Third-party trademarks mentioned are the property of their respective owners. The use of the word partnerdoes not imply a partnership relationship between Cisco and any other company. (1110R)

    Simple Network Management Protocol Feature Information for Simple Network Management Protocol

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)22

  • Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to beactual addresses and phone numbers. Any examples, command display output, network topology diagrams,and other figures included in the document are shown for illustrative purposes only. Any use of actual IPaddresses or phone numbers in illustrative content is unintentional and coincidental.

    Simple Network Management Protocol

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 23

  • Example Configuring Host Information

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)24

  • SNMP Inform Request

    The Simple Network Management Protocol (SNMP) Inform Requests feature allows devices to sendinform requests to SNMP managers.

    Finding Feature Information, page 25 Information About SNMP Inform Requests, page 25 How to Configure SNMP Inform Requests, page 25 Configuration Examples for SNMP Inform Request, page 28 Additional References, page 29 Feature Information for SNMP Inform Request, page 31

    Finding Feature InformationYour software release may not support all the features documented in this module. For the latest caveatsand feature information, see Bug Search Tool and the release notes for your platform and software release.To find information about the features documented in this module, and to see a list of the releases in whicheach feature is supported, see the feature information table at the end of this module.Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

    Information About SNMP Inform Requests SNMP Inform Request, page 25

    SNMP Inform RequestThe SNMP Inform Request feature supports sending inform requests. SNMP asynchronous notificationsare usually sent as SNMP traps.Traps are less reliable than informs because an acknowledgment is not sent from the receiving end when atrap is received; however, an SNMP manager that receives an inform acknowledges the message with anSNMP response PDU. If the sender does not receive a response for an inform, the inform can be sent again.

    How to Configure SNMP Inform Requests

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 25

  • Configuring Devices to Send Traps, page 26 Changing Inform Operation Values, page 27

    Configuring Devices to Send TrapsPerform the following task to configure the device to send traps to a host in global configuration mode:

    SUMMARY STEPS

    1. enable2. configure terminal3. snmp-server host host[version {1|2c}]community-string[udp-port port][notification-type]4. snmp-server enable traps[ notification-type] [notification-option]5. end

    DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:

    Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Step 2 configure terminal

    Example:

    Device# configure terminal

    Enters global configuration mode.

    Step 3 snmp-server host host[version {1|2c}]community-string[udp-port port][notification-type]

    Example:

    Device(config)# snmp-server host 10.10.10.10 version 1 public udp-port 2012

    Specifies the recipient of the trap message.

    Configuring Devices to Send Traps How to Configure SNMP Inform Requests

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)26

  • Command or Action Purpose

    Step 4 snmp-server enable traps[ notification-type] [notification-option]

    Example:Device(config)# snmp-server enable traps alarms 3

    Globally enables the trap production mechanism for the specified traps.NoteSome traps are not controlled by the snmp-serverenabletraps command.These traps are either enabled by default or controlled through othercommands. For example, by default, SNMP link traps are sent when aninterface goes up or down. For interfaces expected to go up and downduring normal usage, such as ISDN interfaces, the output generated bythese traps may not be useful. Use the nosnmptrapslink-status interfaceconfiguration command to disable these traps.In order for a host to receive a trap, an snmp-serverhost command must beconfigured for that host, and the trap must be enabled globally through thesnmp-serverenabletraps command, through a different command, such assnmptrapslink-status, or by default.

    Step 5 end

    Example:Device(config)# end

    Exits global configuration mode.

    Changing Inform Operation ValuesPerform the following optional task in global configuration mode to change inform operation values:

    SUMMARY STEPS

    1. enable2. configure terminal3. snmp-server informs [retries retries] [timeout seconds] [pending pending]4. snmp-server trap-source interface5. end

    DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:

    Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Changing Inform Operation ValuesHow to Configure SNMP Inform Requests

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 27

  • Command or Action Purpose

    Step 2 configure terminal

    Example:

    Device# configure terminal

    Enters global configuration mode.

    Step 3 snmp-server informs [retries retries] [timeoutseconds] [pending pending]

    Example:

    Device(config)# snmp-server informs retries 10 timeout 30 pending 100

    Configures inform-specific operation values.

    This example sets the maximum number of times to resend aninform, the number of seconds to wait for an acknowledgmentbefore resending, and the maximum number of informs waitingfor acknowledgments at any one time.

    Step 4 snmp-server trap-source interface

    Example:

    Device(config)# snmp-server trap-source FastEthernet 2/1

    This example sets the IP address for the Fast Ethernet interface inslot2, port 1 as the source for all SNMP notifications.

    Step 5 end

    Example:Device(config)# end

    Exits global configuration mode.

    Configuration Examples for SNMP Inform Request Example: Configuring SNMP Inform Request, page 28

    Example: Configuring SNMP Inform RequestThe following configuration example shows how to configure the SNMP Inform Request feature forSNMPv1 or SNMPv2:The following example sends the SNMP and Cisco environmental monitor enterprise-specific traps toaddress 172.30.2.160:

    Device(config)# snmp-server enable trapsDevice(config)# snmp-server host 172.30.2.160 public snmp envmon

    The following example enables the device to send all traps to the host myhost.example.com using thecommunity string public:

    Device(config)# snmp-server enable trapsDevice(config)# snmp-server host myhost.example.com public

    Example: Configuring SNMP Inform Request Configuration Examples for SNMP Inform Request

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)28

  • The following example will not send traps to any host. The BGP traps are enabled for all hosts, but only theISDN traps are enabled to be sent to a host.

    Device(config)# snmp-server enable traps bgpDevice(config)# snmp-server host bob public isdn

    The following example enables the device to send all inform requests to the host myhost.example.comusing the community string public:

    Device(config)# snmp-server enable trapsDevice(config)# snmp-server host myhost.example.com informs version 2c public

    Additional ReferencesRelated Documents

    Related Topic Document Title

    Cisco IOS commands Cisco IOS Master Command List, All Releases

    SNMP commands: complete command syntax,command mode, command history, defaults, usageguidelines, and examples

    Cisco IOS SNMP Command Reference

    Cisco implementation of RFC 1724, RIP Version 2MIB Extensions

    RIPv2 Monitoring with SNMP Using the RFC 1724MIB Extensions feature module

    DSP Operational State Notifications fornotifications to be generated when a digitalsignaling processor (DSP) is used

    DSP Operational State Notifications featuremodule

    Standards and RFCs

    Standard/RFC Title

    CBC-DES (DES-56) standard Symmetric Encryption ProtocolSTD: 58 Structure of Management Information Version 2 (SMIv2) RFC 1067 A Simple Network Management Protocol

    RFC 1091 Telnet terminal-type option

    RFC 1098 Simple Network Management Protocol (SNMP)

    RFC 1157 Simple Network Management Protocol (SNMP)

    RFC 1213 Management Information Base for Network Management ofTCP/IP-based internets:MIB-II

    RFC 1215 Convention for defining traps for use with the SNMPRFC 1901 Introduction to Community-based SNMPv2

    SNMP Inform RequestAdditional References

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 29

  • Standard/RFC Title

    RFC 1905 Common Management Information Services and Protocol overTCP/IP (CMOT)

    RFC 1906 Telnet X Display Location Option

    RFC 1908 Simple Network Management Protocol (SNMP)

    RFC 2104 HMAC: Keyed-Hashing for Message AuthenticationRFC 2206 RSVP Management Information Base using SMIv2RFC 2213 Integrated Services Management Information Base using SMIv2RFC 2214 Integrated Services Management Information Base Guaranteed

    Service Extensions using SMIv2

    RFC 2271 An Architecture for Describing SNMP Management FrameworksRFC 2570 Introduction to Version 3 of the Internet-standard Network

    Management Framework

    RFC 2578 Structure of Management Information Version 2 (SMIv2)RFC 2579 Textual Conventions for SMIv2RFC 2580 Conformance Statements for SMIv2RFC 2981 Event MIB

    RFC 2982 Distributed Management Expression MIB

    RFC 3413 SNMPv3 Applications

    RFC 3415 View-based Access Control Model (VACM) for the SimpleNetwork Management Protocol (SNMP)

    RFC 3418 Management Information Base (MIB) for the Simple NetworkManagement Protocol (SNMP)

    SNMP Inform Request Additional References

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)30

  • MIBs

    MIB MIBs Link

    Circuit Interface Identification MIB Cisco SNMPv2 Ethernet-like Interfaces MIB Event MIB Expression MIB Support for Delta,

    Wildcarding, and Aggregation Interfaces Group MIB (IF-MIB) Interfaces Group MIB Enhancements MIB Enhancements for Universal Gateways

    and Access Servers MSDP MIB NTP MIB Response Time Monitor MIB Virtual Switch MIB

    To locate and download MIBs for selectedplatforms, releases, and feature sets, use Cisco MIBLocator found at the following URL:http://www.cisco.com/go/mibs

    Technical Assistance

    Description Link

    The Cisco Support and Documentation websiteprovides online resources to downloaddocumentation, software, and tools. Use theseresources to install and configure the software andto troubleshoot and resolve technical issues withCisco products and technologies. Access to mosttools on the Cisco Support and Documentationwebsite requires a Cisco.com user ID andpassword.

    http://www.cisco.com/cisco/web/support/index.html

    Feature Information for SNMP Inform RequestThe following table provides release information about the feature or features described in this module.This table lists only the software release that introduced support for a given feature in a given softwarerelease train. Unless noted otherwise, subsequent releases of that software release train also support thatfeature.Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

    SNMP Inform RequestFeature Information for SNMP Inform Request

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 31

  • Table 3 Feature Information for SNMP Inform Request

    Feature Name Releases Feature Information

    SNMP Inform Request 11.3(1)T12.0(1)T12.1(3)T12.1(14)12.2(8)T15.0(1)S

    The SNMP Inform Requestfeature supports sending informrequests. SNMP asynchronousnotifications are usually sent asSNMP traps. Traps are lessreliable than informs because anacknowledgment is not sent fromthe receiving end when a trap isreceived; however, an SNMPmanager that receives an informacknowledges the message withan SNMP response PDU. If thesender does not receive aresponse for an inform, theinform can be sent again.

    Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S.and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks.Third-party trademarks mentioned are the property of their respective owners. The use of the word partnerdoes not imply a partnership relationship between Cisco and any other company. (1110R)Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to beactual addresses and phone numbers. Any examples, command display output, network topology diagrams,and other figures included in the document are shown for illustrative purposes only. Any use of actual IPaddresses or phone numbers in illustrative content is unintentional and coincidental.

    SNMP Inform Request

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)32

  • SNMPv2c

    Community-based Simple Network Management Protocol Version 2 (SNMPv2c) is an experimentalInternet protocol defined in RFC 1901, RFC 1905, and RFC 1906. SNMPv2c is the community string-based administrative framework for SNMPv2. Community string is a type of password, which istransmitted in cleartext. SNMPv2c is an update of the protocol operations and data types of party-basedSimple Network Management Protocol Version 2 (SNMPv2p) and uses the community-based securitymodel of SNMPv1.

    Finding Feature Information, page 33 Information About SNMPv2c, page 33 How to Configure SNMPv2c, page 34 Configuration Examples for SNMPv2c, page 37 Additional References for SNMPv2c, page 38 Feature Information for SNMPv2c, page 39

    Finding Feature InformationYour software release may not support all the features documented in this module. For the latest caveatsand feature information, see Bug Search Tool and the release notes for your platform and software release.To find information about the features documented in this module, and to see a list of the releases in whicheach feature is supported, see the feature information table at the end of this module.Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

    Information About SNMPv2c Security Features in SNMPv2c, page 33

    Security Features in SNMPv2cCommunity-based Simple Network Management Protocol Version 2 (SNMPv2c) uses a community-basedform of security. The community of SNMP managers that are able to access the agent MIB is defined by anIP address access control list (ACL) and password.The improved error handling support provided by SNMPv2c includes expanded error codes that distinguishdifferent types of errors; all types of errors are reported through a single error code in SNMPv1. Thefollowing three types of exceptions are also reported: no such object, no such instance, and end of MIBview. The following are the details of SNMv2c security model:

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 33

  • Level of security: noAuthNoPriv Authentication method: Community String Availability of encryption: No

    Depending on your release, the party-based SNMP Version 2 (SNMPv2p), which is another variant ofSNMPv2, is not supported. SNMPv2c replaces the party-based administrative and security framework ofSNMPv2p with a community-based administrative framework. SNMPv2c retains the bulk retrieval anderror handling capabilities of SNMPv2p.

    How to Configure SNMPv2c Configuring the SNMP Server for SNMPv2c, page 34 Verifying SNMPv2c, page 36

    Configuring the SNMP Server for SNMPv2cTo configure a Simple Network Management Protocol (SNMP) server user, specify an SNMP group or atable that maps SNMP users to SNMP views. Then, specify the IP address or port number for the remoteSNMP agent of the device where the user resides. Also, before you configure remote users for a particularagent, configure the SNMP engine ID by using the snmp-server engineID command for the remote agent.The SNMP engine ID of the remote agent is required to compute the authentication or privacy digests forthe SNMP password. If the remote engine ID is not configured first, the configuration command will fail.SNMP passwords are localized using the SNMP engine ID of the authoritative SNMP engine. For SNMPnotifications such as inform requests, the authoritative SNMP agent is the remote agent. You mustconfigure the SNMP engine ID of the remote agent in the SNMP database before you can send proxyrequests or inform requests to it.

    Note An SNMP user cannot be removed if the engine ID is changed after configuring the SNMP user. Toremove the user, you must first reconfigure all the SNMP configurations.

    Note Default values do not exist for authentication or privacy algorithms when you configure the SNMPcommands. Also, no default passwords exist. The minimum length for a password is one character,although we recommend that you use at least eight characters for security. If you forget a password, youcannot recover it and must reconfigure the user. You can specify either a plain text password or a localizedMessage Digest 5 (MD5) digest.

    Perform this task to specify an SNMP server group name and to add a new user to an SNMP group.

    Configuring the SNMP Server for SNMPv2c How to Configure SNMPv2c

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)34

  • SUMMARY STEPS

    1. enable2. configure terminal3. snmp-server group [group-name {v1 | v2c | v3 [auth | noauth | priv]}] [read read-view] [write write-

    view] [notify notify-view] [access access-list]4. snmp-server engineID {local engine-id | remote ip-address [udp-port udp-port-number] [vrf vrf-

    name] engine-id-string}5. snmp-server user user-name group-name [remote ip-address [udp-port port]] {v1 | v2c | v3

    [encrypted] [auth {md5 | sha} auth-password]} [access access-list]6. exit

    DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Step 2 configure terminal

    Example:Device# configure terminal

    Enters global configuration mode.

    Step 3 snmp-server group [group-name {v1 | v2c | v3 [auth |noauth | priv]}] [read read-view] [write write-view][notify notify-view] [access access-list]

    Example:Device(config)# snmp-server group group1 v2c auth access lmnop

    Configures the SNMP server group to enable authenticationfor members of a specified named access list.

    In this example, the SNMP server group group1 isconfigured to enable user authentication for members ofthe named access list lmnop.

    Step 4 snmp-server engineID {local engine-id | remote ip-address [udp-port udp-port-number] [vrf vrf-name]engine-id-string}

    Example:Device(config)# snmp-server engineID remote 172.16.15.4 udp-port 120 1a2833c0129a

    Configures the SNMP engine ID.

    In this example, the SNMP engine ID is configured for aremote user.

    SNMPv2cHow to Configure SNMPv2c

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 35

  • Command or Action Purpose

    Step 5 snmp-server user user-name group-name [remote ip-address [udp-port port]] {v1 | v2c | v3 [encrypted][auth {md5 | sha} auth-password]} [access access-list]

    Example:Device(config)# snmp-server user user1 group1 v2c auth md5 password123

    Adds a new user to an SNMPv2c group and configures a plaintext password for the user.Note For the auth-password argument, the minimum length

    is one character; the recommended length is at leasteight characters, and the password should include bothletters and numbers.

    Note If you have the localized MD5 or Secure HashAlgorithm (SHA) digest, you can specify the digestinstead of the plain text password. The digest should beformatted as aa:bb:cc:dd, where aa, bb, cc, and dd arehexadecimal values. Also, the digest should be exactly16 octets in length.

    Step 6 exit

    Example:Device(config)# exit

    Exits global configuration mode.

    Verifying SNMPv2cPerform this task to verify the SNMPv2c configuration. The show commands can be entered in any order.

    SUMMARY STEPS

    1. enable2. show snmp group3. show snmp user [username]4. show snmp engineID

    DETAILED STEPS

    Step 1 enableEnables privileged EXEC mode.

    Example:Device> enable

    Step 2 show snmp groupDisplays information about each SNMP group in the network.

    Example:Device# show snmp group

    groupname: V1 security model:v1 readview : v1default writeview:

    Verifying SNMPv2c How to Configure SNMPv2c

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)36

  • notifyview: row status: activegroupname: ILMI security model:v1 readview : *ilmi writeview: *ilmi notifyview: row status: activegroupname: ILMI security model:v2c readview : *ilmi writeview: *ilmi notifyview: row status: activegroupname: group1 security model:v1 readview : v1default writeview: notifyview: row status: active

    Step 3 show snmp user [username]Displays information about configured characteristics of an SNMP user.

    Example:Device# show snmp user user1

    User name: user1 Engine ID: 00000009020000000C025808 storage-type: nonvolatile active access-list: 10Rowstatus: active Authentication Protocol: MD5Privacy protocol: DES Group name: group1

    Step 4 show snmp engineIDDisplays information about the SNMP engine ID that is configured for an SNMP user.

    Example:Device# show snmp engineID

    Local SNMP engineID: 1A2836C0129ARemote Engine ID IP-addr Port1A2833C0129A remote 10.2.28.1 120

    Configuration Examples for SNMPv2c Example: Configuring the SNMP Server for SNMPv2c, page 37

    Example: Configuring the SNMP Server for SNMPv2cThe following example shows how to configure SNMPv2c. The configuration permits any SNMP managerto access all objects with read-only permissions by using the community string named public. Thisconfiguration does not cause the device to send traps.

    Device(config)# snmp-server community public

    The following example shows how to configure a remote user to receive traps at the noAuthNoPrivsecurity level when the SNMPv2c security model is enabled:

    Device(config)# snmp-server group group1 v2c noauth

    Example: Configuring the SNMP Server for SNMPv2cConfiguration Examples for SNMPv2c

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 37

  • Device(config)# snmp-server user remoteuser1 group1 remote 10.12.8.4Device(config)# snmp-server host 10.12.8.4 informs version 2c noauth remoteuser config

    The following example shows how to configure a remote user to receive traps at the authNoPriv securitylevel when the SNMPv2c security model is enabled:

    Device(config)# snmp-server group group2 v2c authDevice(config)# snmp-server user AuthUser group2 remote 10.12.8.4 v2c auth md5 password1

    The following example shows how to configure a remote user to receive traps at the priv security levelwhen the SNMPv2c security model is enabled:

    Device(config)# snmp-server group group3 v2c privDevice(config)# snmp-server user PrivateUser group3 remote 10.12.8.4 v2c auth md5 password1 priv access des56

    Additional References for SNMPv2cRelated Documents

    Related Topic Document Title

    Cisco IOS commands Cisco IOS Master Command List,All Releases

    SNMP commands Cisco IOS SNMP CommandReference

    Standards and RFCs

    Standard/RFC Title

    RFC 1901 Community-based SNMPv2

    RFC 1905 Simple Network Management Protocol (SNMPv2)

    RFC 1907 Management Information Base for SNMPv2

    Technical Assistance

    Description Link

    The Cisco Support and Documentation websiteprovides online resources to downloaddocumentation, software, and tools. Use theseresources to install and configure the software andto troubleshoot and resolve technical issues withCisco products and technologies. Access to mosttools on the Cisco Support and Documentationwebsite requires a Cisco.com user ID andpassword.

    http://www.cisco.com/cisco/web/support/index.html

    SNMPv2c Additional References for SNMPv2c

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)38

  • Feature Information for SNMPv2cThe following table provides release information about the feature or features described in this module.This table lists only the software release that introduced support for a given feature in a given softwarerelease train. Unless noted otherwise, subsequent releases of that software release train also support thatfeature.Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

    Table 4 Feature Information for SNMV2c

    Feature Name Releases Feature Information

    SNMV2c Cisco IOS XE Release 3.2SE SNMPv2c feature represents thecommunity string-basedadministrative framework forSNMPv2. SNMPv2c supportincludes a bulk retrievalmechanism and detailed errormessage reporting to managementstations.

    Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S.and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks.Third-party trademarks mentioned are the property of their respective owners. The use of the word partnerdoes not imply a partnership relationship between Cisco and any other company. (1110R)Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to beactual addresses and phone numbers. Any examples, command display output, network topology diagrams,and other figures included in the document are shown for illustrative purposes only. Any use of actual IPaddresses or phone numbers in illustrative content is unintentional and coincidental.

    SNMPv2cFeature Information for SNMPv2c

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 39

  • Example: Configuring the SNMP Server for SNMPv2c

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)40

  • SNMP Version 3

    The SNMP Version 3 feature provides secure access to devices by authenticating and encrypting datapackets over the network. Simple Network Management Protocol version 3 (SNMPv3) is an interoperable,standards-based protocol that is defined in RFCs 3413 to 3415. This module discusses the securityfeatures provided in SNMPv3 and describes how to configure the security mechanism to handle SNMPpackets.

    Finding Feature Information, page 41 Information About SNMP Version 3, page 41 How to Configure SNMP Version 3, page 44 Configuration Examples for SNMP Version 3, page 47 Additional References for SNMP Version 3, page 47 Feature Information for SNMP Version 3, page 49

    Finding Feature InformationYour software release may not support all the features documented in this module. For the latest caveatsand feature information, see Bug Search Tool and the release notes for your platform and software release.To find information about the features documented in this module, and to see a list of the releases in whicheach feature is supported, see the feature information table at the end of this module.Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

    Information About SNMP Version 3 Security Features in SNMP Version 3, page 41 Cisco-Specific Error Messages for SNMP Version 3, page 42

    Security Features in SNMP Version 3The security features provided in SNMPv3 are as follows:

    Message integrityEnsures that a packet has not been tampered with in transit. AuthenticationDetermines that the message is from a valid source. EncryptionScrambles the content of a packet to prevent it from being learned by an unauthorized

    source.

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 41

  • SNMPv3 is a security model in which an authentication strategy is set up for a user and the group in whichthe user resides. A security level is the permitted level of security within a security model. A combinationof a security model and a security level determines which security mechanism is used when handling anSNMP packet.The table below describes the combinations of SNMPv3 security models and levels.

    Table 5 SNMP Version 3 Security Levels

    Level Authentication Encryption What Happens

    noAuthNoPriv Username No Uses a username matchfor authentication.

    authNoPriv Message DigestAlgorithm 5 (MD5) orSecure Hash Algorithm(SHA)

    No Provides authenticationbased on the HashedMessage AuthenticationCode (HMAC)-MD5 orHMAC-SHAalgorithms.

    authPriv MD5 or SHA Data EncryptionStandard (DES)

    Provides authenticationbased on the HMAC-MD5 or HMAC-SHAalgorithms. In additionto authentication,provides DES 56-bitencryption based on theCipher Block Chaining(CBC)-DES (DES-56)standard.

    SNMPv3 supports RFCs 1901 to 1908, 2104, 2206, 2213, 2214, and 2271 to 2275. For more informationabout SNMPv3, see RFC 2570, Introduction to Version 3 of the Internet-standard Network ManagementFramework (this document is not a standard).

    Cisco-Specific Error Messages for SNMP Version 3SNMPv3 provides different levels of security. If an authentication or an authorization request fails, adescriptive error message appears to indicate what went wrong. These error messages comply with RFC3414.You can use the snmp-server usm cisco command to disable the descriptive messages, thus preventingmalicious users from misusing the information shown in the error messages. The table below describes theCisco-specific error messages shown when the snmp-server usm cisco command is used, and the tablecompares these messages with the corresponding RFC 3414-compliant error messages.

    Table 6 Cisco-Specific Error Messages for SNMP Version 3

    ConfiguredSecurity Level

    Security Level ofIncoming SNMP Message

    RFC 3414-Compliant ErrorIndication

    Cisco-Specific ErrorMessages

    noAuthNoPriv noAuthNoPriv No error No error

    Cisco-Specific Error Messages for SNMP Version 3 Information About SNMP Version 3

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)42

  • ConfiguredSecurity Level

    Security Level ofIncoming SNMP Message

    RFC 3414-Compliant ErrorIndication

    Cisco-Specific ErrorMessages

    authNoPriv unsupportedSecurityLevel unknownUserName

    authPriv unsupportedSecurityLevel unknownUserName

    authNoPriv noAuthNoPriv AUTHORIZATION_ERROR unknownUserName

    authNoPriv with correctauthentication password

    No error No error

    authNoPriv with incorrectauthentication password

    wrongDigests unknownUserName

    authPriv unsupportedSecurityLevel unknownUserName

    authPriv noAuthNoPriv AUTHORIZATION_ERROR unknownUserName

    authNoPriv with correctauthentication password

    AUTHORIZATION_ERROR unknownUserName

    authNoPriv with incorrectauthentication password

    AUTHORIZATION_ERROR unknownUserName

    authPriv with correctauthentication passwordand correct privacypassword

    No error No error

    authPriv with correctauthentication passwordand incorrect privacypassword

    No response No response

    authPriv with incorrectauthentication passwordand correct privacypassword

    wrongDigests unknownUserName

    authPriv with incorrectauthentication passwordand incorrect privacypassword

    wrongDigests unknownUserName

    Note If an SNMP user belonging to an SNMP group is not configured with the password or if the group securitylevel is not the same as the user security level, the error shown is AUTHORIZATION_ERROR. TheCisco-specific error message for this scenario is unknownUserName.

    SNMP Version 3Information About SNMP Version 3

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 43

  • How to Configure SNMP Version 3To configure the SNMPv3 security mechanism and to use it to handle SNMP packets, you must configureSNMP groups and users with passwords.

    Configuring the SNMP Server, page 44 Verifying SNMP Version 3, page 46

    Configuring the SNMP ServerTo configure an SNMP server user, specify an SNMP group or a table that maps SNMP users to SNMPviews. Then, specify the IP address or port number for the remote SNMP agent of the device where the userresides. Also, before you configure remote users for a particular agent, configure the SNMP engine ID byusing the snmp-server engineID command for the remote agent. The SNMP engine ID of the remote agentis required to compute the authentication or privacy digests for the SNMP password. If the remote engineID is not configured first, the configuration command will fail.SNMP passwords are localized using the SNMP engine ID of the authoritative SNMP engine. For SNMPnotifications such as inform requests, the authoritative SNMP agent is the remote agent. You mustconfigure the SNMP engine ID of the remote agent in the SNMP database before you can send proxyrequests or inform requests to it.

    Note The SNMP user cannot be removed if the engine ID is changed after configuring the SNMP user. Toremove the user, you must first reconfigure all the SNMP configurations.

    Note Default values do not exist for authentication or privacy algorithms when you configure the SNMPcommands. Also, no default passwords exist. The minimum length for a password is one character,although it is recommended to use at least eight characters for security. If you forget a password, youcannot recover it and must reconfigure the user. You can specify either a plain text password or a localizedMD5 digest.

    Perform this task to specify an SNMP server group name and to add a new user to an SNMP group.

    SUMMARY STEPS

    1. enable2. configure terminal3. snmp-server group [group-name {v1 | v2c | v3 [auth | noauth | priv]}] [read read-view] [write write-

    view] [notify notify-view] [access access-list]4. snmp-server engineID {local engine-id | remote ip-address [udp-port udp-port-number] [vrf vrf-

    name] engine-id-string}5. snmp-server user user-name group-name [remote ip-address [udp-port port]] {v1 | v2c | v3

    [encrypted] [auth {md5 | sha} auth-password]} [access access-list]6. end

    Configuring the SNMP Server How to Configure SNMP Version 3

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)44

  • DETAILED STEPS

    Command or Action Purpose

    Step 1 enable

    Example:Device> enable

    Enables privileged EXEC mode.

    Enter your password if prompted.

    Step 2 configure terminal

    Example:Device# configure terminal

    Enters global configuration mode.

    Step 3 snmp-server group [group-name {v1 | v2c | v3 [auth |noauth | priv]}] [read read-view] [write write-view][notify notify-view] [access access-list]

    Example:Device(config)# snmp-server group group1 v3 auth access lmnop

    Configures the SNMP server group to enable authenticationfor members of a specified named access list.

    In this example, the SNMP server group group1 isconfigured to enable user authentication for members ofthe named access list lmnop.

    Step 4 snmp-server engineID {local engine-id | remote ip-address [udp-port udp-port-number] [vrf vrf-name]engine-id-string}

    Example:Device(config)# snmp-server engineID remote 172.16.15.4 udp-port 120 1a2833c0129a

    Configures the SNMP engine ID.

    In this example, the SNMP engine ID is configured for aremote user.

    Step 5 snmp-server user user-name group-name [remote ip-address [udp-port port]] {v1 | v2c | v3 [encrypted] [auth{md5 | sha} auth-password]} [access access-list]

    Example:Device(config)# snmp-server user user1 group1 v3 auth md5 password123

    Adds a new user to an SNMPv3 group and configures a plaintext password for the user.Note For the auth-password argument, the minimum length

    is one character; the recommended length is at leasteight characters, and the password should include bothletters and numbers.

    Note If you have the localized MD5 or SHA digest, you canspecify the digest instead of the plain text password.The digest should be formatted as aa:bb:cc:dd, whereaa, bb, cc, and dd are hexadecimal values. Also, thedigest should be exactly 16 octets in length.

    Step 6 end

    Example:Device(config)# end

    Exits global configuration mode.

    SNMP Version 3How to Configure SNMP Version 3

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 45

  • Verifying SNMP Version 3Perform this task to verify the SNMPv3 configuration. The show commands can be entered in any order.

    SUMMARY STEPS

    1. enable2. show snmp group3. show snmp user [username]4. show snmp engineID

    DETAILED STEPS

    Step 1 enableEnables privileged EXEC mode.

    Example:Device> enable

    Step 2 show snmp groupDisplays information about each SNMP group in the network.

    Example:Device# show snmp group

    groupname: V1 security model:v1 readview : v1default writeview: notifyview: row status: activegroupname: ILMI security model:v1 readview : *ilmi writeview: *ilmi notifyview: row status: activegroupname: ILMI security model:v2c readview : *ilmi writeview: *ilmi notifyview: row status: activegroupname: group1 security model:v1 readview : v1default writeview: notifyview: row status: active

    Step 3 show snmp user [username]Displays information about configured characteristics of an SNMP user.

    Example:Device# show snmp user user1

    User name: user1 Engine ID: 00000009020000000C025808 storage-type: nonvolatile active access-list: 10Rowstatus: active Authentication Protocol: MD5

    Verifying SNMP Version 3 How to Configure SNMP Version 3

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)46

  • Privacy protocol: DES Group name: group1

    Step 4 show snmp engineIDDisplays information about the SNMP engine ID that is configured for an SNMP user.

    Example:Device# show snmp engineID

    Local SNMP engineID: 1A2836C0129ARemote Engine ID IP-addr Port1A2833C0129A remote 10.2.28.1 120

    Configuration Examples for SNMP Version 3 Example: Configuring SNMP Version 3, page 47

    Example: Configuring SNMP Version 3The following example shows how to enable SNMPv3. The configuration permits any SNMP manager toaccess all objects with read-only permissions using the community string named public. Thisconfiguration does not cause the device to send traps.

    Device(config)# snmp-server community public

    The following example shows how to configure a remote user to receive traps at the noAuthNoPrivsecurity level when the SNMPv3 security model is enabled:

    Device(config)# snmp-server group group1 v3 noauthDevice(config)# snmp-server user remoteuser1 group1 remote 10.12.8.4Device(config)# snmp-server host 10.12.8.4 informs version 3 noauth remoteuser config

    The following example shows how to configure a remote user to receive traps at the authNoPriv securitylevel when the SNMPv3 security model is enabled:

    Device(config)# snmp-server group group2 v3 authDevice(config)# snmp-server user AuthUser group2 remote 10.12.8.4 v3 auth md5 password1

    The following example shows how to configure a remote user to receive traps at the priv security levelwhen the SNMPv3 security model is enabled:

    Device(config)# snmp-server group group3 v3 privDevice(config)# snmp-server user PrivateUser group3 remote 10.12.8.4 v3 auth md5 password1 priv access des56

    Additional References for SNMP Version 3

    Example: Configuring SNMP Version 3Configuration Examples for SNMP Version 3

    SNMP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3850 Switches) 47

  • Related Documents

    Related Topic Document Title

    Cisco IOS commands Cisco IOS Master Command List, All Releases

    SNMP commands: complete command syntax,command mode, command history, defaults,usage guidelines, and examples

    Cisco IOS SNMP Support Command Reference

    Standards and RFCs

    Standard/RFC Title

    RFC 2104 HMAC: Keyed-Hashing for Message AuthenticationRFC 2570 Introduction to Version 3 of the Internet-standard

    Network Management Framework

    RFC 2576 Coexistence between Version 1, Ve