Network interface names
![]()
Interface names are typically assigned by systemd based on device attributes. Other naming mechanisms might be used depending on the distribution or network management tools.
Predictable interface names are commonly based on UIDs. Only if unique UIDs are not guaranteed, predictable interface names are based on FIDs. Kernels that support UID-based predictable interface names have a sysfs attribute /sys/bus/pci/devices/<function_address>/uid_is_unique for its PCI functions. In this path, <function_address> is the PCI ID that identifies a PCI function in the PCI stack.
The availability of predictable interface names on a particular distribution depends on whether the distribution supports and adopts these names. For UID-based predictable interface names, UID uniqueness must be enforced in your environment.
UID uniqueness
- LPAR
- The hardware administrator must set the UID uniqueness option in the hardware configuration of the partition.
For more information, see the section about defining partitions in z/OS® HCD User's Guide, SC34-2669.
- DPM partition
- UID uniqueness is always enforced.
- KVM virtual server
- UID uniqueness is always enforced.
- z/VM® guest virtual machine
- UID uniqueness must be enforced in both the partition and in z/VM.
# cat /sys/bus/pci/devices/0001:00:00.0/uid_is_unique 1
Predictable names
Predictable interface names use one of two naming schemes, depending on whether UID uniqueness checking is enabled and whether the virtual functions (VFs) are isolated. Isolated VFs refer to VFs, where the associated physical function (PF) is assigned to another partition or guest. Enable UID uniqueness checking if supported by your environment.
UID uniqueness checking enforced (eno)
- PF interface name
- For PFs with enforced UID uniqueness checking , interface names depend on the UID, where
<UID_in_decimal>is the UID in decimal notation. - VF interface names
- For isolated VFs:
eno<UID_of_VF_in_decimal>
| PCI network device | Isolated VFs |
|---|---|
| PF | eno<UID_in_decimal>n<phys_port_name> |
| VF, isolated | eno<UID_of_VF_in_decimal> |
| VF, parent PF present | eno<UID_of_PF_in_decimal>v<VF_number> |
UID uniqueness not enforced (ens)
- PF interface name
- For PFs where UID uniqueness checking is not enforced, interface names depend on the FID, where
<FID_in_decimal>is the FID in decimal notation. - VF interface names
- For isolated VFs:
ens<FID_of_VF_in_decimal>
| PCI network device | Interface name |
|---|---|
| PF | ens<FID_in_decimal>n<phys_port_name> |
| VF, isolated | ens<FID_of_VF_in_decimal> |
| VF, parent PF present | ens<FID_of_PF_in_decimal>v<VF_number> |
| UID and FID of the PCI function | With enforced UID uniqueness (preferred) | Without enforced UID uniqueness |
|---|---|---|
| UID: 0x0, FID: 0x0 | eno0 | ens0 |
| UID: 0x5, FID: 0x7 | eno5 | ens7 |
| UID: 0xa, FID: 0xb | eno10 | ens11 |
| UID: 0x10, FID: 0x20 | eno16 | ens32 |
The eth<n> naming scheme
Distributions that do not adopt predictable interface names might use the earlier eth<n> scheme.
Such distributions typically assure a persistent mapping of PCI functions to interface names through distribution-specific tooling. On other distributions, forcing the eth<n> naming scheme with the net.ifnames=0 can lead to a nonpersistent mapping.
Other naming schemes
- enP<UID_or_counter>s<FID_in_dec>
- enP<UID_or_counter>p0s
- enP<UID_or_counter>p0np0
- enP<UID_or_counter>p0s0np0
- enP<UID_or_counter>p0
This list is not exhaustive, and even the ens<FID_in_dec> pattern might be used.
In these schemes, <UID_or_counter> represents the UID, in decimal notation, in environments where UID uniqueness is enforced. Without UID uniqueness, a hexadecimal counter is used. <FID_in_dec> represents the FID in decimal notation.
For example, the interface name for a PCI function with FID 0x8ca and UID 0x10 could be enP16s2250, enP0s2250, enP1s2250, ... enP7s2250, enP16p0s, enP0p0s, enP1p0s, ... enP16p0np0 ...
The multiple dependencies on the hardware, on the hardware configuration, on the Linux kernel, and on the udev-rules of the distribution makes it difficult and error prone to predict interface names that follow these schemes.
altnames
Distributions might include interface names for multiple naming schemes as altnames. Such altnames can include predictable interface names. Always use the primary interface name for your network configuration. For example, you might not be able to use altnames for persistent configurations.
The output of ip a shows altnames, if present, for your network interfaces.
# ip a 1: lo: ... ... 2: eno4272: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 82:11:a1:b9:82:06 brd ff:ff:ff:ff:ff:ff altname ens993 altname enP4272p0s0 ...