
97
[Agent] snmp-agent sys-info contact Mr.Wang-Tel:3306
[Agent] snmp-agent sys-info location telephone-closet,3rd-floor
# Enable notifications, specify the NMS at 1.1.1.2 as a notification destination, and set the
username to
managev3user
for the notifications.
[Agent] snmp-agent trap enable
[Agent] snmp-agent target-host trap address udp-domain 1.1.1.2 params securityname
managev3user v3 privacy
2.
Configure the SNMP NMS:
{
Specify SNMPv3.
{
Create the SNMPv3 user
managev3user
.
{
Enable both authentication and privacy functions.
{
Use SHA-1 for authentication and AES for encryption.
{
Set the authentication key to
123456TESTauth&!
and the privacy key to
123456TESTencr&!
.
{
Set the timeout timer and maximum number of retries.
For information about configuring the NMS, see the NMS manual.
NOTE:
The SNMP settings on the agent and the NMS must match.
3.
Verify the configuration:
# Try to get the value of
sysName
from the agent. The get attempt succeeds.
Send request to 1.1.1.1/161 ...
Protocol version: SNMPv3
Operation: Get
Request binding:
1: 1.3.6.1.2.1.1.5.0
Response binding:
1: Oid=sysName.0 Syntax=OCTETS Value=Agent
Get finished
# Try to set the device name from the agent. The set attempt fails because the NMS does not
have access rights to the node.
Send request to 1.1.1.1/161 ...
Protocol version: SNMPv3
Operation: Set
Request binding:
1: 1.3.6.1.2.1.1.5.0
Response binding:
Session failed ! SNMP: Cannot access variable, No Access, error index=11:
Oid=sysName.0 Syntax=OCTETS Value=Sysname Set finished
%Aug 14 16:13:21:475 2013 Agent SNMP/5/SNMP_SETDENY:
-IPAddr=1.1.1.2-SecurityName=managev3user-SecurityModel=SNMPv3-OP=SET-Node=sysNam
e(1.3.6.1.2.1.1.5.0)-Value=Sysname; Permission denied.
# Log in to the agent. You can see a notification on the NMS.
hh3cLogIn inform received from: 192.168.41.41 at 2013/8/14 17:36:16
Time stamp: 0 days 08h:03m:43s.37th
Agent address: 1.1.1.1 Port: 62861 Transport: IP/UDP Protocol: SNMPv2c Inform
Manager address: 1.1.1.2 Port: 10005 Transport: IP/UDP
Community: public