Can I determine the current IP from a known MAC Address?

后端 未结 7 432
难免孤独
难免孤独 2021-02-01 03:06

I have a shell script which uses etherwake to wake up a machine on my local network. After the machine is awake, I\'m not sure of the IP address.

While trying to answer

7条回答
  •  遇见更好的自我
    2021-02-01 03:21

    Neal's answer takes indeed too long. I had to get it work with a 60k+ IPs range. The trick to make this work is to check arp table after each ping. This also fixes the root problem : no need. I did it in Java (see threadedScan() here) because I was on windows and needed a solution which wouldn't spawn thousands of cmd prompts while trying to ping with start command. And it works faster (~10 sec for my 60k range) with a fixedThreadPool.

提交回复
热议问题