Interface names
Most interface names are assigned by device drivers.
Names assigned by device drivers
Most interface names that Linux assigns are of the form <prefix><n> where <prefix> depends on the interface type. <n> is an index number that identifies an individual interface of a particular type.
Table 1 summarizes the prefixes that network device drivers use for interfaces that are associated with real hardware.
Prefix | Interface type | Device driver module | Hardware |
---|---|---|---|
eth | Ethernet | qeth, lcs, mlx5_core | OSA-Express, RoCE Express features |
ctc | Channel-to-Channel | ctcm | ESCON channel card, FICON® channel card |
mpc | Channel-to-Channel | ctcm | ESCON channel card |
hsi | HiperSockets | qeth | Real HiperSockets |
Prefix | Interface type | Device driver module | Comment |
---|---|---|---|
hsi | HiperSockets, virtual NIC | qeth | Virtual NIC-type HiperSockets coupled to a guest LAN |
eth | virtual NIC | qeth | QDIO virtual NIC coupled to a guest LAN or virtual switch |
eth | virtual NIC | virtio_net | virtio virtual NIC |
ctc | virtual Channel-to-Channel | ctcm | virtual CTCA |
mpc | virtual Channel-to-Channel | ctcm | virtual CTCA |
iucv | IUCV | netiucv | IUCV authorizations are required |
When the first interface name for a particular type is created, it is assigned the index number 0, the second is assigned 1, the third 2, and so on. For example, the first HiperSockets interface is named hsi0, the second hsi1, the third hsi2, and so on.
When a network device is set offline, it retains its interface name. When a device is removed, it surrenders its interface name and the name can be reassigned as network devices that are defined in the future. When an interface is defined, the Linux® kernel always assigns the interface name with the lowest free index number for the particular type. For example, if the network device with an associated interface name hsi1 is removed while the devices for hsi0 and hsi2 are retained, the next HiperSockets interface to be defined becomes hsi1.
Persistent names assigned by other means
In Linux distributions, a user-space component typically assigns a persistent name
to the network interface, for example enc
+device number for OSA and HiperSockets. or
eno
+UID or ens
+ FID for ROCE, see RoCE Express.
Often these components rename the interfaces quickly, and you might see multiple
instances of [interface_name]: renamed from eth0
in the log file.
These interface names are retained when a device is set offline. The user-space components typically ensure that the names are persistent even if a device is removed and hot-plugged or if the Linux instance is rebooted.
Prefix | Interface type | Comment |
---|---|---|
enc | HiperSockets, OSA | Real HiperSockets or virtual NIC type HiperSockets coupled to a guest LAN |
eno | ens | Ethernet | PCI-based network devices |
Your distribution might provide a way to track the mapping or to assign meaningful names to your interfaces.