Ubuntu – No network after upgrade to 16.04


I upgraded my server to 16.04 from 14.04, which in turn was upgraded from 12.04, all using the command line do-release-upgrade. This is a server build, with absolutely no GUI. It runs apache2, bind9, nfs, and a few other network-related services. For the most part, nothing was broken in the upgrade… except the network. Now, I have to run

sudo /etc/init.d/networking start

after every reboot to get it to connect to the network. Not very helpful for a server. My guess is that the networking script simply isn't being run on startup; normally, I could fix the issue by running

sudo update-rc.d networking defaults

but the above command just gives an error about being unable to connect to upstart.

What can I do to fix my network?

Edit: The contents of /etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Best Answer

same here.

I think something went wrong while migrating from upstart to systemd in the installation process?

i will describe how i fixed it

Following this guide i enabled systemd networking: http://xmodulo.com/switch-from-networkmanager-to-systemd-networkd.html

Steps i did:

$ sudo systemctl enable systemd-networkd
$ sudo systemctl enable systemd-resolved
$ sudo systemctl start systemd-resolved
$ sudo rm /etc/resolv.conf
$ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
$ sudo vi /etc/systemd/network/20-dhcp.network




Now everything is working fine :-)

Related Question