设备发现问题 [英] Device Discovery Problem

查看:114
本文介绍了设备发现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用我们在客户端网络上安装的黑匣子"中的设备IP和MAC信息填充列表/网格视图.有时,可能会有超过100个这样的盒子.因此,即使它们为我们提供了静态IP,我也希望通过发现或手动输入来填充列表.

发现UDP后,所有通信都通过TCP进行.除UDP发现外,其他所有程序都可以正常运行.我以前没有搞过UDP,所以我可能只是缺少一些简单的东西.

通过反复试验,错误和阅读大量文章/示例,我得出了以下结论或问题:

有没有办法在没有IP的情况下爆炸端口?使用udpclient,看来我必须首先连接到有效或活动的远程主机.当我放置一系列要发送的IP时,如果初始节点不处于活动状态,我将不会从任何远程IP那里得到任何回报.即使在我发送邮件时,有有效设备在该范围内进行回复.仅当我从一个活动的节点开始时,我才会在udpclient.Receive中获取响应.

还有另一种方法吗?我做错了什么,需要发布一些代码吗?我看过多播和广播组,但认为客户端的IT管理员可能会犹豫.任何帮助深表感谢.抱歉,很长的帖子.只是想解释一下我想在哪里使用它.


Jason

I need to populate a list/gridview with device IP & MAC information from "black boxes" that we install on client networks. Sometimes there can be over 100 of these boxes. So I want to populate the list by discovery versus manual entry even if they give us the static IPs.

After UDP discovery, all communication takes place via TCP. Everything works fine with the program, except the UDP discovery. I haven''t messed with UDP before, so I may just be missing something simple.

Through trial, error, and reading a lot of posts/examples I''ve come to these conclusions or questions:

Is there no way to just blast the port without an IP? Using the udpclient, it seems I must first connect to a valid or alive remote host. When I put in a range of IPs to send to, if the initial node is not alive, I''ll get nothing back from any of the remote IPs. Even when there are valid devices replying back in that range as I send. Only if I start with a node that is alive, I''ll get back the response in udpclient.Receive.

Is there another way of doing this? Am I doing something wrong and need to post some code? I''ve looked at multicasting and broadcast groups, but think the client'' IT Admin may be hesitant. Any help is much appreciated. Sorry for the long post. Just trying to explain where I want to go with it.


Jason

推荐答案

只要未在网络上被阻止,您就可以使用UDP广播,其中黑匣子"侦听广播并发回其IP /MAC信息发送给发件人,它不会立即生效,因此您可能需要等待几秒钟.

[
So long as it is not blocked on the network you could use UDP broadcast, where by the "black boxes" listen for the broadcast and send back their IP/MAC information to the sender, it will not be instant so you may have to wait a few seconds.

This[^] article has some information on UDP broadcast.


这篇关于设备发现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆