开发者

Device auto discovery in IPv6/IPv4 network

We have Win CE IPv6/IPv4 devices installed in a room and connected to a network. Every now and then a person would come with a laptop, plug it into the network and run a diagnostics program.

This program should be able to somehow auto find or discover all those devices. The catch is that device IPs are unknown to the diag program.

I've been looking into the IPv6 link-local discovery but i'm not quite sure how to test this.

In our local LAN if i pi开发者_JS百科ng a known IPv6 address of another computer it pings ok, but if i do ping -6 fe80::1 I get "Destination host unreachable" and for ping -6 FF02::1 I get "Request timed out"

so i'm not sure how to even test link-local discover on windows.

So how can this be done?


If the devices support zeroconf, then you should be able to use "net view" to get a list of local servers. You can then use the Windows dns implementation to resolve an IP address from the host name. The Ping.exe command would be a shortcut if you wanted to do all of this from a script, since it will take a hostname and display the IP address it is pinging.

There's probably a more elegant way using the zeroconf protocol directly, but the above should work fine too.


Try to use nmap to scan entire network and get the current connected devices with assigned ip address, for free you can get os and version detection.

Here you can get the windows binaries: http://nmap.org/download.html

Regards.


For IPv4 use broadcast on 169.254.254.255 for non-configured devices, or you can DHCP request and broadcast to the discovered subnet, or I"m sure some applications just broadcast out to 255.255.255.255.

The IPv6 use multicast on the link-local scope for every adapter, there is no broadcast in IPv6 so you cannot use ICMP ping.

This would mean for IP version agnostic application you need to implement an application layer discovery service or use an existing technology such as ZeroConf.


LLDP could be useful in that context.

I think Windows CE doesn't support it directly, but maybe you could obtain the information that you need through an intermediary switch – assuming you are connected to the same switch as the devices, or that you have SNMP access to that switch.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜