Objective

Simple Network Management Protocol (SNMP) is a network management protocol which helps to record, store, and share information about the devices in the network. This helps the administrator address network issues. SNMP uses Management Information Bases (MIBs) to store available information in a hierarchical manner.

An SNMP User is defined by login credentials such as username, password, and authentication method. It is operated in association with an SNMP group and an engine ID. For instructions on how to configure an SNMP Group through the Command Line Interface (CLI), click here. Only SNMPv3 use SNMP users. Users with access privileges are associated with an SNMP view.

For example, SNMP users could be configured by a network manager to associate them to a group so that access rights can be assigned to a group of users in that particular group rather than to a single user. A user can only belong to one group. In order to create an SNMPv3 User, an Engine ID must be configured and an SNMPv3 Group must be available.

This article aims to show you how to configure SNMP Users through the CLI of a Cisco Switch.

Applicable Devices

- Sx350 Series

- SG350X Series

- Sx500 Series

- Sx550X Series

Software Version

- 1.4.7.05 — Sx300, Sx500

- 2.2.8.04 — Sx250, Sx350, SG350X, Sx550X

Configure SNMP Users on a Switch

Create an Engine ID

Step 1. Access the CLI of the switch.

Note: In this example, PuTTY is the application used to access the switch CLI. The default username and password is cisco/cisco. If you have customized your credentials, use your username and password.

Step 2. Switch to Global Configuration mode by entering the following command:

Step 3. Create an Engine ID using the following syntax:

snmp-server engineID local {engineid/default}

Note: The engine-id must be unique within your administrative domain. In this example, snmp-server engineID local 57AD57AD57AD is entered.

Step 4. Add an SNMP user using the following syntax:

snmp-server user username groupname {{v1/v2c/remote host/auth {{md5/sha}} auth-password [priv priv-password] ]}}

Where:

- username — This defines the name of the user on the host that connect to the agent. The username can be up to 20 characters.

- groupname — This is the name of the group to which the user belongs. The group name can be up to 30 characters.

- v1 — This specifies that the user is an SNMP v1 user.

- v2c — This specifies that the user is an SNMPv2c user.

- v3 — This specifies that the user is an SNMPv3 user.

- remote host — (Optional) IP address (IPv4, IPv6 or IPv6z) or host name of the remote SNMP host.

- auth — (Optional) This specifies the authentication level to be used.

- md5 — (Optional) This specifies the Hash Message Authentication Code (HMAC) MD5-96 authentication level.

- Sha — (Optional) This specifies the HMAC-SHA-96 authentication level.

- auth-password — (Optional) This specifies the authentication password. It can be up to 32 characters.

- encrypted-auth-password — (Optional) This specifies the authentication password in encrypted format.

- priv-password — (Optional) This specifies the privacy password. It can be up to 64 characters.

- encrypted-priv-password — (Optional) This specifies the privacy password in encrypted format.

Note: In this example, snmp-server user John_Doe CiscoTesters v3 auth md5 Cisco1234$ is entered.

Step 5. Verify the SNMP User with the following command:

You should now have configured an SNMP User through the CLI of the switch.