Consistent network device naming with systemd

Traditionally network device names in linux started with eth0/wlan0 where number 0 was incremented for each additional device. Problem with this naming was that device numbers did not match actual locations in computer.

Starting with v197 systemd/udev assigns predictable, stable network interface names for all local Ethernet, WLAN and WWAN interfaces. Naming is based on firmware, topology and location information.

Advantage of this approach is that the names are fully automatic, predictable and they stay fixed even if the hardware is removed or added. This allows hardware to be replaced without network cards being renamed.

Device naming is following the schemes:

  • o = onboard device
  • s = PCI hotplug
  • x = MAC address
  • P = PCI domain
  • p = PCI bus number
  • s = slot number

For example device enp0s3 would be Ethernet device in PCI bus 0 slot 3.

Ethernet device named by MAC address would start with en followed by x and MAC address (f.e. enx00112233445566).

PCI hotplug Ethernet device would start with en followed by s and the slot number, followed by f and the function number for cards that have more than one function (f.e. ens1f4).

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.