SNMP V3 discovery fails using SnmpSharpNet

匿名 (未验证) 提交于 2019-12-03 01:45:01

问题:

I am having a issue with UdpTarget.Discovery(SecParam) in various servers (Linux variants) where SNMP is setup. In those servers where both V1 and V3 targets are defined the Discovery works and returns as true. Where the V1 target is not defined (i.e., v1 community string is not configured) and only V3 is defined, the UdpTarget.Discovery(SecParam) fails with the error message : Request has reached maximum retries.. The relevant part of code is

    IpAddress agent = new IpAddress(ip);     UdpTarget target = new UdpTarget((IPAddress)agent, 161, 3000, 3);// Construct target     SecureAgentParameters SecParam = new SecureAgentParameters();     var checkDiscovery = target.Discovery(SecParam);

Can anyone please help explain (a) whether there is indeed a linkage between V3 and V1 for UdpTarget.Discovery method? (b) if No, What should be done to make it work?

Just wanted to add that using linux command line tools such as snmpwalk - i am able to walk a OID on these servers by providing the V3 credentials (auth and priv). But not able to achieve thru code as I am failing in the Discovery Step.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!