Skip to content Skip to sidebar Skip to footer

How To Get A List Of All Valid Ip Address In A Local Network Using Javascript?

I'm writing a jQuery mobile/Cordova application for a mobile device, who can connect (say by WiFi) to a particular local network (LAN), who has a server that can provide some servi

Solution 1:

I once faced a similiar challange. What I did was:

  1. Implementing a /ping serverwise that returns a json formatted response to the client.
  2. So the "Client" just calls all IPs in own IP-Adress range (e.g. 192.168.178.1/ping to 192.168.178.254/ping) and in case there is a response:
  3. You found your server.

IPs that are currently not taken by any client do no harm - so no need to find out which ones are valid. Code needed?

Post a Comment for "How To Get A List Of All Valid Ip Address In A Local Network Using Javascript?"