Snmpv3 configuration example, Network requirements, Configuration procedure – H3C Technologies H3C SR8800 User Manual
Page 114
102
[Sysname] snmp-agent trap enable
[Sysname] snmp-agent target-host trap address udp-domain 1.1.1.2 params securityname
public v1
2.
Configure the SNMP NMS:
# Configure the SNMP version for the NMS as v1 or v2c, create a read-only community and name
it public, and create a read and write community and name it private. For how to configure the
NMS, see the manual for the NMS.
NOTE:
The configurations on the agent and the NMS must match.
3.
Verify the configuration:
{
After the above configuration, an SNMP connection is established between the NMS and the
agent. The NMS can get and configure the values of some parameters on the agent through
MIB nodes.
{
Execute the shutdown or undo shutdown command to an idle interface on the agent, and the
NMS receives the corresponding trap.
SNMPv3 configuration example
Network requirements
As shown in
, the NMS (1.1.1.2/24) uses SNMPv3 to monitor and manage the interface status
of the agent (1.1.1.1/24), and the agent automatically sends traps to report events to the NMS.
The NMS and the agent perform authentication when they set up an SNMP session. The authentication
algorithm is MD5 and the authentication key is authkey. The NMS and the agent also encrypt the SNMP
packets between them by using the DES algorithm and the privacy key prikey.
Figure 38 Network diagram
Configuration procedure
1.
Configure the SNMP agent:
# Configure the IP address of the agent as 1.1.1.1/24 and make sure that the agent and the NMS
can reach each other. (Details not shown)
# Assign the NMS read and write access to the objects under the snmp node (OID 1.3.6.1.2.1.2),
and deny its access to any other MIB object. Set the user name to managev3user, authentication
algorithm to MD5, authentication key to authkey, the encryption algorithm to DES56, and the
privacy key to prikey.
<Sysname> system-view
[Sysname] undo snmp-agent mib-view ViewDefault
[Sysname] snmp-agent mib-view included test interfaces
[Sysname] snmp-agent group v3 managev3group read-view test write-view test
[Sysname] snmp-agent usm-user v3 managev3user managev3group authentication-mode md5
authkey privacy-mode des56 prikey