RTNETLINK answers: file exists - configure interface
Solution 1:
If you had been manually setting a temporary configuration, e.g by doing something like sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0
, as described here, you should clear that up first:
sudo ip addr flush eth0
Now you can try again:
sudo ifup eth0
Solution 2:
Manual methods are unlikely to work correctly if Network Manager is installed and running. If it is installed, it is advisable to set the details there:
If you have removed Network Manager, your interfaces file will also need a gateway and DNS nameservers:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.117
netmask 255.255.255.0
gateway 192.168.1.1 #or whatever your router address is
dns-nameservers 192.168.1.1 8.8.8.8
Then get the system to re-read and use the changes:
sudo ifdown eth0 && sudo ifup -v eth0
Check:
ping -c3 www.google.com