Get IP from MAC address. arp -a not showing device

SouPress picture SouPress · Aug 20, 2014 · Viewed 90.5k times · Source

I'm trying to write a batch file that's supposed to find the dynamically assigned IP of my Android phone when it's connected to the network (Tenda WiFi router).

So I'm trying arp -a and searching for my phone's MAC address so I can get its IP from the table.

C:\Users\Leeroy>arp -a

Interface: 192.168.0.100 --- 0xb
  Internet Address      Physical Address      Type
  192.168.0.1           c8-3a-35-35-f6-68     dynamic
  192.168.0.255         ff-ff-ff-ff-ff-ff     static
  224.0.0.22            01-00-5e-00-00-16     static
  224.0.0.251           01-00-5e-00-00-fb     static
  224.0.0.252           01-00-5e-00-00-fc     static
  239.255.255.250       01-00-5e-7f-ff-fa     static
  255.255.255.255       ff-ff-ff-ff-ff-ff     static

The problem is it doesn't show up in the table! I tried ping 192.168.0.255 but it still doesn't show up. I tried requesting 192.168.0.100 (IP of my desktop PC) from the phone's browser, and that sure enough puts the phone on the radar. But I don't have the option to manually do that everytime I want it to appear in the arp table.

How do I get the Android phone to appear in the arp table (without doing anything from it besides connecting to WiFi)?

Answer

PaddyD picture PaddyD · Aug 20, 2014

I have tried this and it works:

for /L %N in (1,1,254) do start /b ping -n 1 -w 200 192.168.0.%N

provided the phone has ICMP enabled, you should have no problem.