0

InetAddress.getByName(ip).isReachable(2000) is used to find reachability of a system in 2 seconds.
But when I am trying to find reachabilities of multiple systems(say n systems) in my network serially, it is taking 2n seconds.Is there any other way, so that i can find their reachabilities in lesser time say 3 to 4 seconds?

svkvvenky
  • 1,122
  • 1
  • 15
  • 21

1 Answers1

0

You can use jnetpcap to craft the ping packets by yourself, and listen to the responses. You can throw all ping requests to the network (almost) at once, and be done with it in (a little bit longer than) 2 seconds. You will need to know the mac addresses, though.

Shloim
  • 5,281
  • 21
  • 36