ラズパイ・Raspbian 8.0(Jessie)の、固定IPでeth0のインターネットへ自動接続の設定。
[crayon]
$ sudo vi /etc/network/interfaces
———————————————————————————-
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and ‘man dhcpcd.conf’
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
———————————————————————————-
$ sudo vi /etc/dhcpcd.conf
———————————————————————————-
#最下行に追加する。
interface eth0
static ip_address=192.168.0.99
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
static domain_search=
———————————————————————————-
$ sudo ifup eth0(で、確認。)
$ sudo reboot(で、ラズパイ再起動。)
[/crayon]