title: Getting an unknown IP Address from known MAC address using ARP?
body: <p>I am on a Windows platform (Win7) and I have a scenario where I know the MAC addresses of devices but their IPs are dynamically chosen when booting up.</p>
  
  <p>I want to write a batch script that pings these specific devices to make sure they are alive. There are many other devices on the network that I don't want to ping, just a set of 10 specific MACs I want to get the IP address from then ping them only. They are all in the address scheme 10.1.(1-255).(1-255)</p>
  
  <p>This much I know, I can ping the entire address spectrum and then </p>
  
  <pre><code>arp -a &gt; arp.txt
  </code></pre>
  
  <p>...to output a document containing the list of IPs and associated MAC addresses in this format</p>
  
  <pre><code>Interface: 192.168.2.27 --- 0xb
    Internet Address      Physical Address      Type
    192.168.2.1           00-1f-90-c0-25-fd     dynamic   
    192.168.2.3           00-00-aa-a1-d3-78     dynamic   
    192.168.2.16          ac-72-89-a7-7e-98     dynamic   
    192.168.2.17          78-45-c4-2f-71-0b     dynamic   
    192.168.2.18          68-b5-99-8e-1c-35     dynamic   
    192.168.2.24          b8-ac-6f-30-00-34     dynamic   
    192.168.2.26          00-90-a9-6f-e0-be     dynamic   
  </code></pre>
  
  <p><strong>My question is</strong> how can I (via a batch script or other automated method) find the line of the MAC address I am interested in and put the IP address into a variable that I can then use.</p>
  
  <p>In UNIX I can grep but in Windows I'm at a loss.</p>
  
  <p>Thanks in advance for any help.</p>