I want to detect all devices in a LAN which have IP: 10.x.x.x Mask: 255.0.0.0. I first wrote a synchronous ping program to ping IPs one by one, but it's tooooo slow. Therefore I improved it by using asynchronous ping, then it's much faster. Now I can use it to detect 10.x.0~255.0~255 in an acceptable time. But it still use tooooooooooooo long time to detect all the IPs 10.0~255.0~255.0~255.
Is there any method/protocol that can just broadcast one message and let all devices in a LAN to respond, so I can detect all the devices? (either Ethernet broadcast or UDP/IP broadcast or any other broadcast.) (I've researched ARP & ICMP but haven't find suitable methods.)
Or any other method even don't need broadcast? I just need to detect all the devices, any method is OK.
Not sure if it's what you are looking for but you can go in command prompt and run the command:
arp -a
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With