Predictable Consistent Network Device Naming

Predictable Consistent Network Device Naming is a convention Linux uses for naming Ethernet adapters. Before this convention, the ethX naming convention was the default convention for naming Ethernet adapters.

The ethX convention names network interfaces as eth[0123…]s0. It names interfaces in the order the kernel finds them at the boot time. For example, it will use the name eth0 for the first detected interface, eth1 for the second detected interface, and so on. It creates problems on systems that change interfaces based on requirements. Removing existing or adding new interfaces causes the previously added ones to change their names. It affects both network adapters embedded on the motherboard and add-in adapters.

To fix these issues and use a consistent network device naming convention, starting from RHEL7, RedHat replaced the ethX naming scheme with the udev device manager. Based on firmware, topology, and location information it assigns a unique name to each interface. To generate a unique name for an interface, It uses the following rules.

  • Use index numbers eno[1-N] for onboard interfaces
  • Use slot numbers ens[1-N] for PCI Express hotplug interfaces
  • Use index number enp[PCI slot]s[card index no] for PCI slot
  • Use traditional eth[0-N] if firmware information is invalid or rules are disabled

In the generated name, the first two letters represent the device's firmware. For example, Ethernet interfaces begin with en, WLAN interfaces begin with wl, and WWAN interfaces begin with ww.

default interface naming scheme Linux

The next letter represents the device’s type, location, or topology. For example, the letter o represents an onboard device, the letter s represents a hot plug slot, and the letter p represents a PCI card.

interface naming terminology

The remaining numbers represent an index, ID, or port.

Let's take an example name eno16777737. In this name, the first two letters en stand for an Ethernet interface. The next letter o stands for an onboard interface. The remaining number 16777737 is a unique ID number.

example of naming scheme

The main benefit of this scheme is that it provides fully automatic, fixed, and predictable names even if interfaces are added or removed. You can easily remove a faulty interface or add a new interface without changing the existing names. The main disadvantage of this scheme is that it assigns names that are harder to remember.

Network interfaces and connections

LAN cards, network adapters, or network interface cards are hardware adapters that provide one or more Ethernet ports. An Ethernet port is called a network device or a network interface.

network interface device

A network interface uses a connection to connect the network. A connection is a collection of all the settings the interface needs to connect to the network. IP configuration, hardware address, boot state, and device name are some examples of the settings the connection includes.

network connections

You can assign multiple connections to an interface but can use only one connection at a time. To assign multiple connections, you need to use a unique name for each connection. You can also configure the interface to automatically select the appropriate connection.

ComputerNetworkingNotes Linux Tutorials Predictable Consistent Network Device Naming