It is computed by the SNMP adaptor, based on the host and port information, or it is computed by the SNMP session, based on time
In Java DMK 5.1, you can create new SNMP engine IDs either manually using a Java command line tool called EngineIdGenerator, or automatically in the code of your applications using the SnmpEngineId class. You can see the EngineIdGenerator tool in the examplesDir/current/Snmp/EngineId directory. You must provide either of EngineIdGenerator or SnmpEngineId with any of the following information:
An engine ID you have computed previously
An IP address or DNS host name
A UDP port
An Internet Assigned Numbers Authority (IANA) number
The EngineIdGenerator uses the SnmpEngineId class when generating engine IDs (see the Javadoc entry for SnmpEngineId for details). The SnmpEngineId class simplifies the configuration of SNMP entities by enabling you to identify engines using information that is easily comprehensible to humans, such as host names and port numbers, which it then converts into system-oriented hexadecimal engine IDs for you. The SnmpEngineId class also generates SNMP object identifiers (OIDs) from the engine IDs it creates. This is particularly useful when computing USM MIB user table indexes, as seen in 19.3.6 Creating Users for SNMPv3 USM MIBs.
Compile the EngineIdGenerator class in examplesDir/current/Snmp/EngineId.
$ javac -classpath classpath EngineIdGenerator.java
Start the EngineIdGenerator tool.
$ java -classpath classpath EngineIdGenerator Start making your engine Id construct:(h for help) #:
Typing h will provide examples of information you can provide.
Provide the relevant information to create the engine ID.
Declare your information, using the appropriate separators, as follows:
All three inputs are used
The address and port you specify are used; the IANA number defaults to 42 (SUN Microsystems)
The address you specify is used; the port defaults to 161 and the IANA number defaults to 42 (SUN Microsystems)
The port you specify is used; the host defaults to localhost and the IANA number defaults to 42 (SUN Microsystems)
The IANA number you specify is used; the host defaults to localhost and the IANA number defaults to 42 (SUN Microsystems)
The port and IANA number you specify are used; the host defaults to localhost
The address and IANA number you specify are used; the port defaults to 161
The port defaults to 161, the address defaults to localhost and the IANA number defaults to 42 (SUN Microsystems)
For example, to specify all three of the address, port and IANA number, when prompted you might type:
Start making your engine Id construct:(h for help) #:localhost:8087:42 Generated engine Id ******** [0x8000002a05819dcb6200001f97] ******** #:
Press Control-C when you have finished generating engine IDs