Linux 要取得 遠端IP 的 Mac Address(區網)

Linux 在區網內,想要取得某個 IP 的 Mac Address 要怎麼做呢?

Linux 要取得 遠端IP 的 Mac Address(區網)

於 Linux 可以使用 arp、nmap、arping、arp-scan ... 等都可以查~

可以使用 arp -a / -n 來查:

  • arp -a 192.168.1.1 # apt install net-tools # arp 需要安裝 net-tools 套件
    • 192.168.1.88 at ec:11:66:88:ec:10 [ether] on enp3s0
  • arp -n 192.168.1.1
    • Address HWtype HWaddress Flags Mask Iface
    • 192.168.1.88 ether ec:11:66:88:ec:10 C enp3s0
  • sudo nmap -n -sP 192.168.1.0/24 # 掃出目前網路的所有對照
    • Nmap scan report for 192.168.1.1
    • Host is up (0.0029s latency).
    • MAC Address: EC:11:66:88:EC:10 (Unknown)
    • Nmap scan report for 192.168.1.2
    • Host is up (0.00014s latency).
    • MAC Address: C8:66:CC:66:88:CF (Apple)
  • Windows 可以使用 getmac 來查

相關網頁

作者: Tsung

對新奇的事物都很有興趣, 喜歡簡單的東西, 過簡單的生活.

發表迴響

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料