【问题标题】:Network discovering using SharpSNMP Lib使用 SharpSNMP Lib 进行网络发现
【发布时间】:2013-03-20 12:17:13
【问题描述】:

我是 SNMP 新手,需要开发一个 Windows 服务,该服务将为所有网络进行设备发现 (SNMP),然后需要从发现的设备中获取信息。

我可以做的设备发现,虽然我相信有些设备没有被检测到,但现在的问题是检索设备信息。

有人有什么建议吗?

我的发现代码:

    Discoverer _discoverer = new Discoverer();
    _discoverer.AgentFound += Discoverer_AgentFound;

    Console.WriteLine("v1 discovery");
    _discoverer.Discover(VersionCode.V1, new IPEndPoint(IPAddress.Broadcast, 161), new OctetString("public"), 6000);

    Console.WriteLine("v2 discovery");
    _discoverer.Discover(VersionCode.V2, new IPEndPoint(IPAddress.Broadcast, 161), new OctetString("public"), 6000);

    Console.WriteLine("v3 discovery");
    _discoverer.Discover(VersionCode.V3, new IPEndPoint(IPAddress.Broadcast, 161), null, 6000);

【问题讨论】:

    标签: network-programming snmp sharp-snmp


    【解决方案1】:

    SNMP RFC 文档没有定义使用 SNMP 发现设备的标准方法。因此,#SNMP 的Discoverer 类使用一种通用方法来检测设备,

    https://sharpsnmplib.codeplex.com/wikipage?title=SNMP%20Device%20Discovery

    出于安全考虑,管理员可能会通过轻松更改配置来隐藏设备。一般来说,您应该手动添加每个设备。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-05-16
      • 1970-01-01
      • 1970-01-01
      • 2012-11-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多