I'm developing a wake up on LAN project but that I want to control if computer is open or not on my local area network. But I don't want to use ICMP or WMI (there are DCs on my network). So is there any other options for this problem like Socket Connection, check specific ports are using or not like this?
How to control if a computer is open or not from LAN except ICMP (Ping)?
169 Views Asked by İbrahim Akgün At
2
There are 2 best solutions below
0

As you probably know, "Wake on LAN" is just a UDP broadcast on port 60000, with the packet containing the MAC address of the host you wish to activate:
UDP 255.255.255.0:60000
Soooooo ....
What good is "ping" (or anything else?) going to do if the host is "off"?
All you're really interested in is:
1) Can the host(s) in question receive your UDP broadcasts?
2) Is there anything between you and the host(s) blocking the port?
What's wrong with ICMP?
Anyway, you try accessing a port and measuring how long it takes for the connection to fail. If it fails quickly (You'll have to measure what 'quickly' is on your system), the computer is probably up and refusing connections. If it fails after a long time (again, measure to find out what 'long' is), the computer is probably down.
I doubt you'll be able to achieve 100% accuracy this way.