M BUZZ CRAZE NEWS
// news

How to find out which interface name to use?

By Sarah Rodriguez

I'm setting up an Ubuntu 16 LTS on Proxmox, /etc/network/inetrface file shows only default:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

I'm adding this:

allow-hotplug ens19
iface ens19 inet static address <> gateway <> dns-nameservers 8.8.8.8

And it's not working, not until I change this to ens18, I cannot seem to figure out where can I find which interface name should it be? I have a few Ubuntu servers there, some are ens18 some ens19, I'm setting this up randomly until one of those work.

So my question here is: were to look at what name it should be? Or this is just an abstraction and could be anything, and I'm missing smth else? Thanks.

1 Answer

You can run ip link to see all of the network interfaces in the guest and find out what the name of the interface currently is.

The name of the interface should always be the same for any particular version of Proxmox, but if you update Proxmox, then guest interface names in newly created guests might change.

The interface name is set by consistent network device naming, and refers to the location of the virtual NIC on the virtual PCI Express (or PCI for old i440fx guests) bus. QEMU decides where to put the interface when it first creates each VM. You can see this information by running lspci in the guest.

For example:

00:18.0 Ethernet controller: Red Hat, Inc. Virtio network device

This interface will be given the name enp0s18 (on older kernels it will instead be ens18).

01:06.0 Ethernet controller: Red Hat, Inc. Virtio network device (rev 01)

This interface will be given the name enp1s6.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy