本文介绍了只知道MAC地址获取IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个批处理文件,这给了我一个IP回来,但我只知道MAC地址

  ARP -a

我不会工作,因为我从来没有ping通的IP了。我想与字面上只知道MAC地址搜索它在网络中

解决方案
for /f "skip=3 delims=\" %%A in ('net view ^| findstr /v /C:"The command completed successfully"') do Echo %%A >> "%userprofile%\desktop\computerlist.txt"

Lists turned on computers.

 wmic /node:@computerlist.txt nicconfig where macaddress='whatever:whatever:etc' get ipaddress /format:htable

To get IP for a specified MACAddress

 wmic /node:@computerlist.txt nicconfig get ipaddress /format:htable

to get the IPAddress for all MACAddresses on a computer.

这篇关于只知道MAC地址获取IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 16:00