I decided to get rid of network-manager
for some reason, and now in order to get on the network, I have to run sudo ifup eth0
. Here's what cat /etc/network/interfaces
gives:
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
How do I ensure I don't perform this laborious process again... how do I get the network started automatically on boot-up?
DHCP
Static
Restart networking.
If you use static, you might want to check /etc/resolv.conf to make sure name servers have been specified. It might look like this:
Add eth0 to
auto lo
, like:This will bring up lo (loopback) and eth0 on running
ifup -a
(done at boot time).From
man interfaces
:this is not helpful if you do not wish to setup an IP address on this interface. In my case I wanted to bring up eth0 so it will enter the vswitch config. I had to add the following for the interface in /etc/network/interfaces
Today i had the same "ignoring unknown interface eth0=eth0" issue. For me, the problem was due to the fact that I was configuring eth1 (in static) instead of eth0 (I didn't have eth0 configured).
So I just renamed eth1 to eth0 and it worked.
Hoping it could help anyone who done the same mistake.
P.S.: sorry for my bad english, don't hesitate to tell any mistake ;)
For people running into this problem and the selected answer isn't working, run
ifconfig -a
to make sure your ethernet device is displayed aseth0
which is likely the default in your config as well. Mine iseth1
for whatever reason.So in
/etc/network/interfaces
I had to use:I also edited
/etc/NetworkManager/NetworkManager.conf
and set:I had the same problem where ifup ens192 would bring up the interface, but boot or service networking restart would both fail to bring up the ens192 interface ... it was resolved by using only one auto line ...
the new auto line was like this ...
the version that was not working looked like this (where I have two auto lines)