SNMPv3 Get Request not working

Topics: bug report (break and fix)
Aug 3, 2011 at 8:10 AM

Hello,

I have a big problem with the SNMPV3 functionality.
I test this library with an SNMPv3 agent available on the web (http://www.mg-soft.si/snmpv3.html#SNMPv3ACCESS),
but a lot of response are bad.
One request is running when i use the NoAuthNoPriv.

Here is my commands with responses:
 

   C:\Test_SnmpV3>snmpget -v=3 -l=noauthnoPriv
     -u=noAuthUser 212.30.73.70 1.3.6.1.2.1.1.1.0
    Variable: Id: .1.3.6.1.2.1.1.1.0; Data: Hardware: x86 Family 6 Model 15 Stepping
     8 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Uniprocesso
    r Free)

    C:\Test_SnmpV3>snmpget -v=3 -l=authnoPriv -
    a=MD5 -A=AuthPassword -u=MD5_User 212.30.73.70 1.3.6.1.2.1.1.1.0
    Variable: Id: .1.3.6.1.6.3.15.1.1.2.0; Data: 19634

    C:\Test_SnmpV3>snmpget -v=3 -l=authPriv -a=
    MD5 -A=AuthPassword -x=DES -X=PrivPassword -u=MD5_DES_User 212.30.73.70 1.3.6.1.
    2.1.1.1.0
    Variable: Id: .1.3.6.1.6.3.15.1.1.2.0; Data: 19635


I catured with wireshark the SNMP negociation and i have perhaps find the problem.
The EngineBots is not recovered at the 2nd response and the EngineTime is not incremented.

Of course i have tested this SNMPv3 Agent with a lot of software(LoriotPro,Nettoolworks, etc..)
and these sofware run with this Agent.

do you have an idea?

Thanks for your excellent SNMP library and sorry for my bad English.

Coordinator
Aug 6, 2011 at 5:35 AM

Hi,

I don't know what do you mean by "a lot of response are bad". 

Like you advised, I executed the commands against this remote agent. I tried each five times, and only one error occurred,

 

G:\sharpsnmplib\bin>snmpget -v=3 -l=authPriv -a=MD5 -A=AuthPassword -x=DES -X=PrivPassword -u=MD5_DES_User 212.30.73.70 1.3.6.1.2.1.1.1.0

TimeoutException: timeout: 1000

 

This is expected, as SNMP v3 communication is slow, and setting a small timeout value can lead to such exceptions.

If you experienced other problems, you may paste out the error messages, or send the Wireshark captures to me.

Generally speaking, SNMP is not designed for Internet communications as the packets may lost in the middle. Therefore, to test out #SNMP, I typically use a local Net-SNMP agent. Milan (SNMP#NET author) uses a snmp4j agent. Local agents have better performance and are easier to test out.

Regards,

Lex

Aug 8, 2011 at 4:58 PM

Hi,
After your reply , i tested this library with an other SNMP Agent.
I tested with Linux SNMPD and it works.
I tested with an Hirshman switch and it works.

So I'm sorry!
In fact, this URL http://www.mg-soft.si/snmpv3.html#SNMPv3ACCESS is not reliable.
This soft doesn't respect the authentification sequence.
When i send a discovery, this Agent give me a response with an EngineId but not a EngineBots and EngineTime.

Thank you very much for this library and for your disponibility.