When I want to create a SNMPv3 user on the NMS, there need to input an engine ID which is an identifier string from SNMP Agent server for each user, so I input an casual id. For example:
And I can successfully send the trap from Agent server to NMS using below command:
snmptrap -e 0x8000000001020304 -v 3 -u myuser -a MD5 -A myjjpassword -x DES -X myjjpassword1 -l noAuthNoPriv 172.24.8.133:162 “” 220.127.116.11.4.1.48183 18.104.22.168.4.1.48183.1 s “smartmon”
Now, everything looks ok.
But when I want to use java SNMP4j to send trap with the created user mytrapuser1 on Agent server, I don’t know how to specify the request’s engine id as 0x80001370017f000101, that caused the trap is sent failed on agent or the requested engine ID cannot be matched on the NMS.
- Is the Engine ID sent from the command line specially processed?
- If I am sending TRAP v3 via SNMP4J, how do I pass the appropriate engine ID?
- If the engine ID configured in the snmptrapd.conf file is “0x8000000001020304”, what should be written in the Java code?
Is there anyone could help me, thanks very much.