I am trying to switch from using dhcp to a static IP on an Ubuntu 10.04 server.
In /etc/network/interfaces I changed
auto eth0
iface eth0 inet dhcp
to
auto eth0
iface eth0 inet static
address 210.4.211.xxx
netmask 255.255.255.xxx
gateway 210.4.211.xxx
and added a line to /etc/hosts as so
210.4.211.xxx servername.example.com servername
Now when I restart networking from inside an SSH connection I get
user@servername:~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces...
SIOCDELRT: No such process
and networking is still running using the DHCP address.
Even worse, if I restart networking from the virtual server console, (or I reboot the server), it fails to bring up eth0 and the server is unreachable.
user@servername:~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces...
SIOCADDRT: No such process
Failed to bring up eth0
What do these errors mean and how do I fix them?