Quantcast
Channel: C# Based Open Source SNMP Library for .NET and Mono
Viewing all articles
Browse latest Browse all 576

Commented Issue: SNMP v3 discovery bug [7243]

$
0
0
I tried snmpget with my device (Cisco SF 300), but without success. I used the following command:<br />snmpget -c=public -v=3 -a=MD5 -l=authNoPriv -A=800000090340f4ecf2b113 -u=billing -X=testing345 192.168.209.4 1.3.6.1.2.1.2.2.1.7.3<br />(I tried to get state of 3 interface). Every time I run this command I got different replay, for example:<br />Variable: Id: .1.3.6.1.6.3.15.1.1.5.0; Data: 7<br />Data were changing incrementally. OID is different then I entered in command.<br />I also tried version bigdipper 7 and using the same command receive exception:<br />snmpget -c=public -v=3 -a=MD5 -l=authNoPriv -A=800000090340f4ecf2b113 -u=billing -X=testing345 192.168.209.4 1.3.6.1.2.1.2.2.1.7.3<br />Lextm.SharpSnmpLib.SnmpException: invalid v3 packet data hash detected<br /> at Lextm.SharpSnmpLib.Messaging.MessageFactory.ParseMessage(Int32 first, Stream stream, UserRegistry registry) in d:\sharpsnmpl<br />ib\SharpSnmpLib\Messaging\MessageFactory.cs:line 190<br /> at Lextm.SharpSnmpLib.Messaging.MessageFactory.ParseMessages(Byte[] buffer, Int32 index, Int32 length, UserRegistry registry) i<br />n d:\sharpsnmplib\SharpSnmpLib\Messaging\MessageFactory.cs:line 108<br /> at Lextm.SharpSnmpLib.Messaging.SnmpMessageExtension.GetResponse(ISnmpMessage request, Int32 timeout, IPEndPoint receiver, User<br />Registry registry, Socket udpSocket) in d:\sharpsnmplib\SharpSnmpLib\Messaging\SnmpMessageExtension.cs:line 428<br /> at Lextm.SharpSnmpLib.Messaging.SnmpMessageExtension.GetResponse(ISnmpMessage request, Int32 timeout, IPEndPoint receiver, Sock<br />et udpSocket) in d:\sharpsnmplib\SharpSnmpLib\Messaging\SnmpMessageExtension.cs:line 351<br /> at Lextm.SharpSnmpLib.Messaging.SnmpMessageExtension.GetResponse(ISnmpMessage request, Int32 timeout, IPEndPoint receiver) in d<br />:\sharpsnmplib\SharpSnmpLib\Messaging\SnmpMessageExtension.cs:line 309<br /> at SnmpGet.Program.Main(String[] args) in d:\sharpsnmplib\Samples\C#\snmpget\Program.cs:line 183<br /><br />May be I doing something wrong?
Comments: Just fixed the remaining issue in Messenger.cs, https://github.com/lextm/sharpsnmplib/tree/989a7c22ec838139516137552ee007e49e23a4fe The code is still bit of ugly. Will see if later can use the session concept to simplify the code base.

Viewing all articles
Browse latest Browse all 576

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>