[SNMP4J] seek clarification on SNMP v3 set operation
dajiang
hdajiang at rfnetech.com
Fri Apr 13 12:41:59 CEST 2012
Hi list,
Here is my question or puzzle:
Based on SnmpRequest in the SNMP4J package, I am writing some Java code
to do SNMP (v3) set on some device. Basically it works.
For my curiosity, I use Wireshark to capture packet exchanges between my
code and the device; and compare them with a case whereby I use
iReasoning MIB browser to do the SNMP v3 set operation.
To my surprise, although both methods work, they use different packet
exchanges.
For MIB browser, the followings are the packets exchange:
192.168.1.222 is the setter, while 192.168.1.20 is the device.
No. Time Source Destination Protocol
Length Info
2 5.598626 192.168.1.222 192.168.1.20
SNMP 113 get-request
No. Time Source Destination Protocol
Length Info
3 5.822897 192.168.1.20 192.168.1.222
SNMP 156 report 1.3.6.1.6.3.15.1.1.4.0
No. Time Source Destination Protocol
Length Info
4 5.823536 192.168.1.222 192.168.1.20
SNMP 183 encryptedPDU: privKey Unknown
No. Time Source Destination Protocol
Length Info
5 8.193932 192.168.1.20 192.168.1.222
SNMP 238 encryptedPDU: privKey Unknown
No. Time Source Destination Protocol
Length Info
6 8.289356 192.168.1.20 192.168.1.222
SNMP 183 encryptedPDU: privKey Unknown
For SNMP4J library, these are the packets:
No. Time Source Destination Protocol
Length Info
8 82.873071 192.168.1.222 192.168.1.20
SNMP 103 set-request
No. Time Source Destination Protocol
Length Info
9 83.734217 192.168.1.20 192.168.1.222
SNMP 146 report 1.3.6.1.6.3.15.1.1.4.0
No. Time Source Destination Protocol
Length Info
10 83.939049 192.168.1.222 192.168.1.20
SNMP 183 encryptedPDU: privKey Unknown
No. Time Source Destination Protocol
Length Info
11 83.941801 192.168.1.20 192.168.1.222
SNMP 167 report 1.3.6.1.6.3.15.1.1.2.0
No. Time Source Destination Protocol
Length Info
12 83.942512 192.168.1.222 192.168.1.20
SNMP 183 encryptedPDU: privKey Unknown
No. Time Source Destination Protocol
Length Info
13 84.881048 192.168.1.222 192.168.1.20
SNMP 183 encryptedPDU: privKey Unknown
No. Time Source Destination Protocol
Length Info
14 85.512266 192.168.1.20 192.168.1.222
SNMP 238 encryptedPDU: privKey Unknown
No. Time Source Destination Protocol
Length Info
15 85.523770 192.168.1.20 192.168.1.222
SNMP 238 encryptedPDU: privKey Unknown
No. Time Source Destination Protocol
Length Info
16 85.637430 192.168.1.20 192.168.1.222
SNMP 183 encryptedPDU: privKey Unknown
No. Time Source Destination Protocol
Length Info
17 85.638656 192.168.1.20 192.168.1.222
SNMP 183 encryptedPDU: privKey Unknown
No. Time Source Destination Protocol
Length Info
19 163.383344 192.168.1.20 192.168.1.222
SNMP 238 encryptedPDU: privKey Unknown
Other than exchanged packets numbers, the biggest difference is MIB
browser using get-request, while SNMP4J using set-request. Can someone
help me understand why there are differences? Do I use SNMP4J wrongly? Thx.
Best Regards
More information about the SNMP4J
mailing list