命令如下:
For /L %i in (0,1,255) do ping 192.168.0.%i /n 1 ARP -a >c:/11.txt
将以上命令做成批处理文件执行后,在C盘根目录下会生成一个11.txt的文件,在这个文件里将有如下对应的IP-MAC列表.
192.168.0.64 00-01-02-93-91-32 dynamic
192.168.0.65 00-e0-4d-1e-47-36 dynamic
192.168.0.66 00-18-8b-b7-47-4c dynamic
192.168.0.67 00-04-75-96-16-bb dynamic
192.168.0.68 00-0a-e6-29-90-89 dynamic
192.168.0.81 52-54-ab-1f-6f-af dynamic
192.168.0.108 00-0c-6e-df-f2-73 dynamic1
92.168.0.200 00-19-d1-27-f6-00 dynamic