【debian】ネットワーク設定
問題
debianで、ネットワークの設定を変えるには?

答え
/etc/network/interfaces を編集する。
vi /etc/network/interfaces
で、以下のように設定。
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 111.222.333.444
netmask 255.255.255.0
network 111.222.333.0
broadcast 111.222.333.255
gateway 111.222.333.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 111.222.333.555 111.222.333.666
ネームサーバーは、/etc/resolve.conf を編集する。
vi /etc/resolve.conf
で、以下のように設定。
nameserver 8.8.8.8 nameserver 111.222.333.666
resolveconfがインストールされていたら、上の/etc/network/interfacesの変更と連動するので、わざわざ設定しなくてよい。