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?
Best Answer
Ah, silly me. After further searching, turns out SIOCADDRT and SIOCDELRT are at least related to ADDing and DELeting routes.
Because I was using a fancy subnet mask of 255.255.255.192, I didn't notice that I had the gateway set to the base address of the subnet, not the default route (In this case using .64 instead of .65).
So if anyone else gets this error, it is probably because you have the wrong gateway set. Why it errors out with "No such process" is beyond me though.