Ubuntu 16.04.1 NIC problems/changes


  I upgraded one of my servers last night to Ubuntu Server 16.04.1 and it went smooth as I would expect it to.  Until I rebooted and my network monitors started saying it couldn’t contact the server.  I thought it was normal I just rebooted from the upgrade.  So after looking through configs to see that everything was still there, about 10 minutes, the monitor was still critical.  So I ran ifconfig and only got the loopback.  I opened the interfaces file and everything was as I had configured it.  This machine is a virtual so I started checking the config and it was fine as well.  So to make a long story short Ubuntu renamed the NIC to ens160 and would not activate the NIC.  I checked the udev rules and there was nothing in the 70-persistant-net.. file and after messing around for about 30 minutes I turned to my friend Google to find solutions.  So the best solution I found and it worked right away was to modify an entry in the GRUB.conf file.  Here is the commands to run.

To see if the NIC is still there run ifconfig -a

Then in /etc/default/grub edit the following line and add the text in red:

GRUB_CMDLINE_LINUX=net.ifnames=0 biosdevname=0

and as root run:


Reboot you system and your NICs should be back to eth0,eth1,etc..  You do need to make sure the OS still sees the NIC before editing the GRUB config file.  I did reinstall drivers before I started down this path.

However if you are using dhcp you may never really notice that this has happened.  I use static and wanted them to be back to eth0.  I did a fresh install for a web server I am working on and this time it named it ens33.  I had no problem because it pulled it’s first IP from DHCP and everything worked fine.  I noticed when I started changing the NIC config.  So mostly this is something to look out for when you are doing an upgrade and the network just stops working.  I liked not having to change my interfaces file so this turns out to be good information.  So good luck and feel free to leave questions.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.