Web Hosting Talk







View Full Version : Get all the IPS in a LAN


superprogram
02-18-2005, 06:07 PM
I am programming a net send utility for a LAN in windows networking environment
Is there any way I can show the users IPs of all the PCS which are switched on at the moment?
San

krumms
02-18-2005, 10:33 PM
you might be able to send out a UDP broadcast packet and listen for the responses.

Burhan
02-19-2005, 02:39 AM
You can use something like this (same idea as krumms):


FOR /L %i IN (1,1,254) DO ping -n 1 192.168.0.%i | FIND /i "Reply">>c:\ipaddresses.txt


Of course, change the IP address for those that match your network.