20 Jun

Very useful Ubuntu 16 Networking Note

I hate when things change for no good reason. This week, it’s the interface naming of ethernet on Ubuntu 16. No more does it default to ‘eth0’.. It uses some other ‘ens’ style.. Garbage!

First up, find your ethernet interfaces (this VM has 1 interface to start):

Bah, looks gross!

Fix it by editing your grub config:

Change the line GRUB_CMDLINE_LINUX=""

to   GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

Regenerate your grub file:

Edit your /etc/network/interfaces file, change the names to eth0, eth1 etc

Reboot, and voila.

If you add a new interface, it will come on as ethX, following the already provisioned interfaces.

Now it looks better (I added a new 10G interface, and it comes in as eth1)

Awww yeeeeah

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.