How to ping MAC address in Linux

后端 未结 5 1416
南方客
南方客 2021-01-31 12:19

I want to ping a known MAC address, I tried to use nmap:

sudo nmap -sP 192.168.15.1/24 | grep  20:64:32:3F:B1:A9

But in this case its ping all

5条回答
  •  面向向阳花
    2021-01-31 13:07

    Here is another and rather simpler answer.

    ping $(arp-scan --localnet | grep 80:1f:02:fa:90:b7  | awk ' { printf $1 } ')
    

    Note that the mac address has to use lower case letters.

    arp-scan seems to run much faster than arp.

提交回复
热议问题