Why is my ethernet interface called enp0s10 instead of eth0?

Answer on "What does enp0s10 means?" question:

enp0s10:
| | |
v | |
en| |   --> ethernet
  v |
  p0|   --> bus number (0)
    v
    s10 --> slot number (10)

Source: udev-builtin-net_id.c on GitHub


That's a change in how now udevd assigns names to ethernet devices. Now your devices use the "Predictable Interface Names", which are based on (and quoting the sources):

  1. Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1)
  2. Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example: ens1)
  3. Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0)
  4. Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da)
  5. Classic, unpredictable kernel-native ethX naming (example: eth0)

The why's this changed is documented in the systemd freedesktop.org page, along with the method to disable this:

ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

or if you use older versions:

ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules

As mentioned above, enp0s10 refers to ethernet (en), prefix 0 (p0), slot 10 (s10). The bus number, device number, and function number are pulled from Bus Device Function (BDF) for PCI devices to create the prefix, slot, and function portions of the Predictable Network Interface Name.

If the function is 0, the f0 portion is omitted. I changed the prefix from p0 to p4, and the function from f0 to f1, for clarity in this example.

Expanding on the answer posted by 'DIG mbl':

enp4s10f1                        pci 0000:04:0a.1
| | |  |                                |  |  | |
| | |  |                   domain <- 0000  |  | |
| | |  |                                   |  | |
en| |  |  --> ethernet                     |  | |
  | |  |                                   |  | |
  p4|  |  --> prefix/bus number (4)   <-- 04  | |
    |  |                                      | |
    s10|  --> slot/device number (10) <--    10 |
       |                                        |
       f1 --> function number (1)     <--       1

https://wiki.xen.org/wiki/Bus:Device.Function_(BDF)_Notation https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames

I came across a device with a u7 at the end, for USB port. Some of the different label possibilities are included in this documentation: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-understanding_the_predictable_network_interface_device_names