Custom ethernet interface names changes after every reboot

I recently migrated from CentOS7.9 to Rocky 9. One of our Dell server is showing weird behavior with respect to interface namings. I implemented consistent network interface naming using the following guide. I tried both udev as well as systemd approach.

However, I see the interface names changes across reboots. I did not had this issue with CentOS 7.9. The consistent naming was working correctly.

Here are the “nmcli con show” command output across reboots. See how the device column changes every reboot.

# nmcli con show
NAME  UUID                                  TYPE      DEVICE
eth0  4bb9a27b-d632-4d6c-8672-7d9ce562cb42  ethernet  eth0
eth1  485de0bf-81b3-46fd-b3a0-97ce2bc7b399  ethernet  eth2
eth2  95bf218c-5ea5-4e65-a12e-55cc6315808e  ethernet  eth1
lo    96441e7e-6735-42fe-ba8f-8c2d3cce3eb0  loopback  lo
eth3  d34c1135-a0d1-4bf4-8f3e-1762094e7c4e  ethernet  --
# nmcli con show
NAME  UUID                                  TYPE      DEVICE
eth0  4bb9a27b-d632-4d6c-8672-7d9ce562cb42  ethernet  eth0
eth1  485de0bf-81b3-46fd-b3a0-97ce2bc7b399  ethernet  eth3
eth2  95bf218c-5ea5-4e65-a12e-55cc6315808e  ethernet  eth2
lo    96441e7e-6735-42fe-ba8f-8c2d3cce3eb0  loopback  lo
eth3  d34c1135-a0d1-4bf4-8f3e-1762094e7c4e  ethernet  --
# nmcli con show
NAME  UUID                                  TYPE      DEVICE
eth0  4bb9a27b-d632-4d6c-8672-7d9ce562cb42  ethernet  eth2
eth1  485de0bf-81b3-46fd-b3a0-97ce2bc7b399  ethernet  eth1
eth2  95bf218c-5ea5-4e65-a12e-55cc6315808e  ethernet  eth0
lo    96441e7e-6735-42fe-ba8f-8c2d3cce3eb0  loopback  lo
eth3  d34c1135-a0d1-4bf4-8f3e-1762094e7c4e  ethernet  --

dmesg log:

[    2.562662] wmi_bus wmi_bus-PNP0C14:00: WQBC data block query control method not found
[    2.883749] igb 0000:01:00.0: added PHC on eth0
[    2.883769] igb 0000:01:00.0: eth0: (PCIe:5.0Gb/s:Width x2) e4:43:4b:e6:1d:0e
[    2.884090] igb 0000:01:00.0: eth0: PBA No: K15075-002
[    2.897159] i40e 0000:18:00.0 eth1: NIC Link is Up, 10 Gbps Full Duplex, Flow Control: None
[    3.176154] igb 0000:01:00.1: added PHC on eth2
[    3.176176] igb 0000:01:00.1: eth2: (PCIe:5.0Gb/s:Width x2) e4:43:4b:e6:1d:0f
[    3.176498] igb 0000:01:00.1: eth2: PBA No: K15075-002
[    3.234313] i40e 0000:18:00.1 eth4: renamed from eth3
[    5.870475] i40e 0000:18:00.1 eth3: renamed from eth4
[    9.923676] igb 0000:01:00.0 eth0: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[   10.032653] igb 0000:01:00.1 eth2: igb: eth2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX

Can someone shed some light into what’s happening here. Why Rocky 9 isn’t keeping the interface names consistent.

Thanks

When you said “custom”, I did expect names, like “lan” and “wan”, not “ethN”.

The default names in el8/el9 ought to be persistent and consistent (and they do not look like “ethN”).


Are the connections on the correct interfaces? NetworkManager does pass name of interface to FirewallD, so each connection will get appropriate firewall rules, if they are.


Did you do “fresh install” followed by deployment of appropriate logical confic, or was your “migration” by black magick?

It was a fresh install. After the install the interface names were listed as enp*. But my application expects interface names to be eth[N]. By custom, I did mean eth[N].

to rename the enp* names to eth*, I followed the redhat article I mentioned earlier. I have followed the article correctly to setup persistent interface names (eth[N]) using udev & systemd. But each time I reboot, the interface names changes.

  • Does it need multiple interfaces? (Do all interfaces need an ethN name?)
  • Is there no way to reconfigure it?

Note how interfaces do have initially (random) ethN names. What does the above even do?
Replace name “eth3” with “eth3” in one interface?


[EDIT]
EL9_4 will add new naming scheme – the Red Hat doc has been updated recently.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.