ifquery working but not ifdown or ifup
I am trying to configure my network card in Ubuntu 14.04.2 using the /etc/network/interfaces
file.
The ifquery
command works like a charm, always returns the right thing, but ifdown
and ifup
do not work until I reboot my computer and when they do, they still show error messages. I think that it might be because my file doesn't save or reload properly.
Here is what it looks like:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.0.0.119
netmask 255.0.0.0
gateway 10.0.0.1
dns-nameservers 8.8.8.8
If there is any information I could add please ask and I will provide as soon as I can.
It seems the interface eth0
was configured before and the address was kept persistently (for some reason) by the kernel.
To clear all addresses from interface eth0
without having to restart network services or bringing the interface up/down :
sudo ip addr flush dev eth0
Then you can use ifup
to configure eth0
by reading /etc/network/interface
file :
sudo ifup eth0
For verbosity :
sudo ifup -v eth0