Command Manual (For Soliton) – SNMP-RMON
H3C S3100 Series Ethernet Switches
Chapter 1 SNMP Configuration Commands
1-31
messages with specific source addresses, thus restricting access between the NMS
and the agent.
Description
Use the
snmp-agent usm-user
{
v1
|
v2c
} command to add a user to an SNMP group.
Use the
undo snmp-agent usm-user
{
v1
|
v2c
}
command to remove a user from an
SNMP group.
This command is applicable to SNMPv1 and SNMPv2c, and is equal to using the
snmp
-
agent community
command to create a community.
As the SNMP protocol defines, in the networking of SNMPv1 and SNMPv2c,
community name is used for authentication between NMS and agent, and in the
networking of SNMPv3, username is used for authentication. If you want to configure a
username and use the username for authentication, the device supports SNMPv1 and
SNMPv2c users. Creating an SNMPv1 or SNMPv2c user is equal to adding a new
community name. If you fill the newly created username into the community name field
of the NMS, the NMS can establish a connection with the SNMP.
To make the configured user take effect, you must create a group first.
Related commands:
snmp-agent group
,
snmp-agent community
, and
snmp-agent
local-engineid
.
Examples
# Create a group named
readCom
and an SNMPv2c user
userv2c
.
<Sysname> system-view
[Sysname] snmp-agent sys-info version v2c
[Sysname] snmp-agent group v2c readCom
[Sysname] snmp-agent usm-user v2c userv2c readCom
Specify the SNMP version of the NMS as
SNMPv2c
, fill the write community name field
with
userv2c
. Then the NMS can access the agent.
# Create an SNMPv2c user
userv2c
in group
readCom
, permitting only the NMS with
an IP address 1.1.1.1 to access the agent, and denying the access of other NMSs.
<Sysname> system-view
[Sysname] acl number 2001
[Sysname-acl-basic-2001] rule permit source 1.1.1.1 0.0.0.0
[Sysname-acl-basic-2001] rule deny source any
[Sysname-acl-basic-2001] quit
[Sysname] snmp-agent sys-info version v2c
[Sysname] snmp-agent group v2c readCom
[Sysname] snmp-agent usm-user v2c userv2c readCom acl 2001
Specify the SNMP version of the NMS with an IP address 1.1.1.1 as
SNMPv2c
, fill the
write community name field with
userv2c
. Then the NMS can access the agent.