PurposeCommand or Action
Adds a new user for an SNMP group.
snmp-server user username group-name
{remote host [ udp-port port]} {v1
Step 5
The username is the name of the user on the host that connects to the agent.
[access access-list] | v2c [access
The group-name is the name of the group to which the user is associated.
access-list] | v3 [encrypted] [access
access-list] [auth {md5 | sha}
Enter remote to specify a remote SNMP entity to which the user belongs and
the hostname or IP address of that entity with the optional UDP port number.
The default is 162.
auth-password] } [priv {des | 3des | aes
{128 | 192 | 256}} priv-password]
Example:
Switch(config)# snmp-server user
Pat public v2c
Enter the SNMP version number (v1, v2c, or v3). If you enter v3, you have these
additional options:
•
encrypted specifies that the password appears in encrypted format. This
keyword is available only when the v3 keyword is specified.
•
auth is an authentication level setting session that can be either the
HMAC-MD5-96 (md5) or the HMAC-SHA-96 (sha) authentication level
and requires a password string auth-password (not to exceed 64 characters).
If you enter v3 you can also configure a private (priv) encryption algorithm and
password string priv-password using the following keywords (not to exceed 64
characters):
•
priv specifies the User-based Security Model (USM).
•
des specifies the use of the 56-bit DES algorithm.
•
3des specifies the use of the 168-bit DES algorithm.
•
aes specifies the use of the DES algorithm. You must select either 128-bit,
192-bit, or 256-bit encryption.
(Optional) Enter access access-list with a string (not to exceed 64 characters)
that is the name of the access list.
Returns to privileged EXEC mode.end
Example:
Switch(config)# end
Step 6
Verifies your entries.show running-config
Example:
Switch# show running-config
Step 7
(Optional) Saves your entries in the configuration file.copy running-config startup-config
Example:
Switch# copy running-config
Step 8
startup-config
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
458
How to Configure SNMP