3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Raspberry PiのIPを同じネットワーク内から探す

Posted at

MacからRaspberry PiにSSHで接続したいが、アドレスが分からない。

アドレスを探し方を調べたら3つの方法を見つけた。

方法1. arp

Macには最初から入ってるはず

$ arp -a
? (192.168.0.1) at 6c:e4:da:e8:c9:59 on en0 ifscope [ethernet]
? (192.168.0.2) at 40:9f:38:7d:2f:29 on en0 ifscope [ethernet]
? (192.168.0.3) at d8:6c:63:46:39:da on en0 ifscope [ethernet]
? (192.168.0.4) at b0:72:bf:dc:63:45 on en0 ifscope [ethernet]
? (192.168.0.5) at c:96:e6:c:c9:71 on en0 ifscope [ethernet]
? (192.168.0.7) at 58:2f:40:92:18:3a on en0 ifscope [ethernet]
? (192.168.0.9) at e4:f0:42:35:e7:be on en0 ifscope [ethernet]
? (192.168.0.10) at 3c:8d:20:ee:5c:99 on en0 ifscope [ethernet]
? (192.168.0.11) at 50:dc:e7:be:c1:35 on en0 ifscope [ethernet]
? (192.168.0.12) at b8:27:eb:90:c:a1 on en0 ifscope [ethernet]
? (192.168.56.1) at a:0:27:0:0:0 on vboxnet0 ifscope permanent [ethernet]
? (239.255.255.250) at 1:0:5e:7f:ff:fa on en0 ifscope permanent [ethernet]

うーん、結果を見てもどれがRaspberry Piか分からない。
微妙!

方法2. arp-scan

これはLinux/Macのみかな。
Macならbrewでインストールできる。

$ brew install arp-scan

これでインストール完了

検索実行するコマンド

$ sudo arp-scan -l
Interface: en0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9.5 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.0.1	6c:e4:da:e8:c9:59	(Unknown)
192.168.0.2	40:9f:38:7d:2f:29	(Unknown)
192.168.0.11	50:dc:e7:be:c1:35	(Unknown)
192.168.0.9	e4:f0:42:35:e7:be	(Unknown)
192.168.0.7	58:2f:40:92:18:3a	(Unknown)
192.168.0.12	b8:27:eb:90:0c:a1	Raspberry Pi Foundation
192.168.0.10	3c:8d:20:ee:5c:99	(Unknown)
192.168.0.5	0c:96:e6:0c:c9:71	(Unknown)
192.168.0.3	d8:6c:63:46:39:da	(Unknown)
192.168.0.4	b0:72:bf:dc:63:45	Murata Manufacturing Co., Ltd.

おお、素晴らしい!
192.168.0.12 b8:27:eb:90:0c:a1 Raspberry Pi Foundation
この行が目的のIPだね、Raspberry Piと出てるし。

arp-scan はベンダー名まで表示してくれるようだ、いいね!

方法3. Angry IP Scanner

こちらはコマンドラインではなく、GUIアプリ

Angry IP Scanner
https://angryip.org/

Windows, Mac, Linux と対応しているようだ。

Macならbrewでインストールできる。

$ brew cask install angry-ip-scanner

画面はこんな感じ
スクリーンショット 2019-10-16 17.10.27.png

GUI派には良さそう。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?