Network Interface Naming

Rakesh Jain
2 min readApr 30, 2020

--

People often get confused by the network interfaces naming as earlier we used to see traditional naming conventions like eth0, eth1 and so on ..

Starting with v197 systemd/udev will automatically assign predictable, stable network interface names for all local Ethernet, WLAN and WWAN interfaces. This is a departure from the traditional interface naming scheme (“eth0”, “eth1”, “wlan0”, …), but should fix real problems.

Basic idea is that unlike previous *nix naming scheme where probing for hardware occurs in no particular order and may change between reboots, here interface name depends on physical location of hardware and can be predicted/guessed by looking at lspci or lshw output.

Two character prefixes based on the type of interface:
* en -- ethernet
* sl -- serial line IP (slip)
* wl -- wlan
* ww -- wwan
* ib -- Infiniband

  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)

With this new scheme you now get:

  • Stable interface names across reboots
  • Stable interface names even when hardware is added or removed, i.e. no re-enumeration takes place (to the level the firmware permits this)
  • Stable interface names when kernels or drivers are updated/changed
  • Stable interface names even if you have to replace broken ethernet cards by new ones
  • The names are automatically determined without user configuration, they just work
  • The interface names are fully predictable, i.e. just by looking at lspci you can figure out what the interface is going to be called
  • Fully stateless operation, changing the hardware configuration will not result in changes in /etc
  • Compatibility with read-only root
  • The network interface naming now follows more closely the scheme used for aliasing block device nodes and other device nodes in /dev via symlinks
  • Applicability to both x86 and non-x86 machines
  • The same on all distributions that adopted systemd/udev
  • It’s easy to opt out of the scheme

Hope you like the tutorial. Please let me know your feedback in the response section.

Happy learning!

--

--

Rakesh Jain
Rakesh Jain

Written by Rakesh Jain

DevOps Professional | Technical writer

No responses yet