Predictable Consistent Network Device Naming

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

The ethX convention names network interfaces as eth[0123…]s0. It names interfaces in the order the kernel finds them at boot time. For example, it will use the name eth0 for the first detected interface, eth1 for the second detected interface, and so on. This convention creates problems in 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.

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

  • 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

The first two letters of the generated name 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 following letter represents the device's type, location, or topology. For example, the letter o represents an onboard device, s represents a hot plug slot, and p represents a PCI card.

Interface naming terminology

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

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

Example of the 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 to the network. A connection is a collection of all the settings the interface needs to connect to the network. Some examples of the settings the connection includes are IP configuration, hardware address, boot state, and device name.

Network connections

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

Conclusion

The transition from the ethX naming convention to the Predictable Consistent Network Device Naming scheme in Linux addresses the challenges posed by devices changing names upon addition or removal. This new approach ensures stability and predictability in network configuration by utilizing unique identifiers based on firmware and topology. While it simplifies management and enhances consistency, the trade-off lies in the complexity of names, which may be harder to memorize. Understanding these naming conventions is essential for effectively managing network interfaces, especially in dynamic environments.

ComputerNetworkingNotes Linux Tutorials Predictable Consistent Network Device Naming

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com