普段DHCPでつないでいるUbuntuをIPアドレスを指定して繋ぐ
sudo vim /etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto em1 iface em1 inet dhcp
こんな風にデフォルトではなっている気がする。
ifconfigなどで現在のアドレスを調べて
192.168.11.x
に割り当てられていた。(家庭用のルータだと192.168.11.x とか192.168.1.xとか192.168.0.x みたいになっているはず)
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto em1 iface em1 inet static address 192.168.11.200 network 192.168.11.0 netmask 255.255.255.0 broadcast 192.168.11.255 gateway 192.168.11.1 dns-nameservers 192.168.11.1
こんなふうに書き換えて
sudo service networking restart
するとできる。
ダメならRebootしてみる。
sudo reboot