I'm working on a program to discover all computer on a network. What is the best way to do that

My network is There are few machines on this network and i want to know their ips

Should i have to answer my Arp table of my computer or ping all the machines for responses one by one, or a broadcast maybe ?

  • Questions about programming and application development are off-topic here. You should as this question on Stack Overflow where there are many network-savvy programmers.
    – Ron Maupin
    Feb 5, 2016 at 13:20
  • I'm more interesting by the theorical concept. I don't want a programming answer Feb 5, 2016 at 13:44
  • You could try any of those for IPv4, but the ARP cache is probably incomplete. None of those will work for IPv6. This question has been asked and answered multiple times on Stack Overflow.
    – Ron Maupin
    Feb 5, 2016 at 13:50

2 Answers 2


Since you have control of the network, (you do have admin control of the network gear; otherwise your Q is off-topic here), just look at the ARP caches on the switch(es) and router(s). Any system that is actively using the network will be known to your network gear, even if it wanted to "hide" from discovery/probing from other workstations/systems/programs.


I could be wrong, but it seems in your case pinging and checking ARP table afterwards would show you the hosts. If your task is to discover pingable hosts.

Yeah, I forgot the IPv6...

  • This only works if the hosts will respond to ping. Many hosts can have a built-in firewall which will block ping.
    – Ron Maupin
    Feb 5, 2016 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.