I want to ping all possible IPs in my LAN, and I have the code for it, but right now, I've already cut the weight time from 5s to 2s, and it's still about 8 minutes to test them all. How long should it take to ping an IP on my same LAN?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
It should take less than a millisecond to ping a host on the same physical network. In reality, networks get busy and hosts get slow - it might take 5 milliseconds.
Like UDP, there is no guarantee that you'll receive a reply at all.
You can also try broadcast pings, but those are usually not routed. E.g. if you're on 192.168.0.0/24 network, you can try
ping 192.168.0.255 and all hosts on same network will respond.
I would suggest using Nmap instead. It's designed for doing this kind of thing and can scan very large networks quite quickly.