
61
To do…
Use the command…
Remarks
Enable the SNMP agent
snmp-agent
Optional
Disabled by default.
You can also enable the SNMP
agent by using any command that
begins with
snmp-agent
except the
snmp-agent calculate-password
and
snmp-agent ifmib long-ifindex
enable
commands.
Configure system information for
the SNMP agent
snmp-agent sys-info
{
contact
sys-contact
|
location
sys-location
|
version
{
all
| {
v1
|
v2c
|
v3
}
*
} }
Optional
By default, the contact is
Hangzhou
H3C Tech. Co.,Ltd.
, the physical
location is
Hangzhou, China
, and
the protocol version is
SNMPv3
.
Configure the local engine ID
snmp-agent local-engineid
engineid
Optional
The default local engine ID is the
company ID plus the device ID.
Create or update a MIB view
snmp-agent mib-view
{
excluded
|
included
}
view
-
name
oid
-
tree
[
mask
mask-value
]
Optional
By default, the MIB view
ViewDefault is predefined and its
OID is 1.
Configure an SNMPv3 group
snmp-agent group
v3
group-name
[
authentication
|
privacy
]
[
read-view
read-view
]
[
write-view
write-view
]
[
notify-view
notify-view
] [
acl
acl-number
]
Required
Convert a plain text key to an
encrypted key
snmp-agent calculate-password
plain-password
mode
{
3desmd5
|
3dessha
|
md5
|
sha
}
{
local-engineid
|
specified-engineid
engineid
}
Optional
Add a user to the SNMPv3 group
snmp-agent usm-user
v3
user-name
group-name
[ [
cipher
]
authentication-mode
{
md5
|
sha
}
auth-password
[
privacy-mode
{
3des
|
aes128
|
des56
}
priv-password
] ] [
acl
acl-number
]
Required
If the
cipher
keyword is specified,
the arguments
auth-password
and
priv-password
are considered as
encrypted keys.
Configure the maximum size (in
bytes) of SNMP packets for the
SNMP agent
snmp-agent packet max-size
byte
-
count
Optional
By default, the SNMP agent can
receive and send the SNMP
packets up to 1,500 bytes.
CAUTION:
After you change the local engine ID, the existing SNMPv3 users become invalid, and you must re-create
the SNMPv3 users.