rohaniのブログ

ゆるっと自然言語処理奴。ときどき工作系バイト。

同じLAN内にある機器のIPアドレスを見るにはarp-scanを使うと良い

arp-scanbrew installで導入できる。

同じLAN内にある機器のIPアドレスを見るには下記のコマンドを行う。

$ sudo arp-scan -l --interface en0

Interface: en0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9.5 with 256 hosts (https://github.com/royhills/arp-scan)
xxx.xxx.xxx.xxx(IPアドレス) xx:xx:xx:xx:xx:xx(MACアドレス)  xxxxx(機器名)

516 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.5: 256 hosts scanned in 1.0 seconds (100.0 hosts/sec). 1 responded

上記のような結果が返ってくる。