When I want to create a SNMPv3 user on the NMS, there need to input an engine ID which is an identifier string from my agent server for each user, because I don't know the agent server's engine ID in advance, so I input an casual id. For example:
createUser -e "0x80001370017f000101" "mytrapuser1" SHA "user1authpass" AES "user1encypass"
authUser log,execute,net mytrapuser1
And I can successfully send the trap from agent server to NMS using below command:
snmptrap -v 3 -a SHA -A user1authpass -x AES -X user1encypass -l authPriv -u mytrapuser1 -e 0x80001370017f000101 {NMS-server-ip} 39 12.0.4.0
Now, everything looks ok.
But when I want to use java SNMP4j to send trap with above user on Agent server, I don't know how to specify the request's engine id as 0x80001370017f000101, that caused the requested engine ID cannot be matched on the NMS.
My Questions:
1. Before I create the user on NMS server, how can I get the engine id which will be used by SNMP4J to send the trap on my application server?
2. If I created a user ahead of time with one engine id, how can I let SNMP4j use it to send the trap?
Is there anyone could help me, thanks very much.
0 Answers