LoginSignup
8
8

More than 5 years have passed since last update.

固定IPを設定しないでRaspberryPiに接続

Last updated at Posted at 2014-10-17

PC側にインターネット共有を設定して、RaspberryPiをLANで繋ぐと
一定の法則でIPアドレスが割り当てられるので、ルールを知っているとSSHで接続したりするとき便利。

Macの場合

インターネット共有でつないだ端末には無線LANでは10.0.2.0/24、有線の場合は192.168.2.0/24でIPが割り振られる。Macと有線LANで直接繋いだRaspberryPiは192.168.2.2となり、
$ssh pi@192.168.2.2で繋がる。

参考
http://weekly.ascii.jp/elem/000/000/136/136392/
https://discussionsjapan.apple.com/thread/10061520

Windowsの場合

インターネット共有で繋いだ端末は192.168.0.0/24でIPが割り当てられるので、
Windowsと有線LANで直接繋いだRaspberryPiは192.168.0.2となり、
$ssh pi@192.168.0.2で繋がる。

参考
http://support.microsoft.com/kb/306126/ja

その他の方法(mDNSを使う)

PC側にBonjourを、RaspberryPi側にavahi-daemonを入れればホスト名で接続できるらしい。
http://qiita.com/kasei-san/items/087e5b33207c214c8db6

8
8
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
8
8