Forgive the newbie question.
I am trying to setup eth1
in interfaces
:
however, I am getting: RTNETLINK answers: file exists
here are the results of ifconfig
:
what am i doing wrong?
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
, you should clear that up first:
sudo ip addr flush eth0
Now you can try again:
sudo ip link set eth0 up
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
/etc/network/interfaces
does not exist and networkmanager is the only thing being use, what then? This isn't a ubuntu system but I am still curious :) EDIT: nevermind, removed some malformed /etc/sysconfig/network-scripts/ifcfg-*
files from trying to edit networkmanager using another program - it really it picky about what it uses, and seems to recreate files if it don't like them instead of doing a obvious error... Also for systems using the journal thing it seems to be journalctl -xe | grep etwork
or systemctl status network