获取局域网内所有机器的mac地址

Posted on Posted in bash
  1. #!/bin/bash   
  2. for ((i = 1; i < 254; i++))   
  3. do   
  4. arping -I eth0 192.168.0.$i -c 1   
  5. done   
  6. arp -a > /tmp/mactable.txt  

Leave a Reply

Your email address will not be published. Required fields are marked *

sixteen + nine =