CentOS 8 Multiple NIC Ordering

Issues related to configuring your network
Post Reply
Posts: 1
Joined: 2020/05/18 00:59:24

CentOS 8 Multiple NIC Ordering

Post by mschnitter » 2020/05/18 02:11:46


I have recently migrated to CentoOS 8 from CentOS 6. As part of the migration I noticed that CentoOS 8 is using Consistent Network Interface Device Naming. Based on the requirements that I need to work with for the time being, I can't use this method of naming multiple NIC interfaces. I found several posts providing guidance on re-enable the old ethx standard. I was able to do this successfully, however I haven't been able to fix the ordering of the NIC cards. Pining the the DEVICE entry in the ifcfg script to the named device doesn't have any effect for the ordering.

Has anyone been able to successfully and permanently order the NIC cards in Centos 8 like in Centos 6 using the old 70-persistent-net.rules?

To be clear, I have the naming working: eth0, eth1, eth2, ethx

The problem is that the ordering of the NICs will occasionally change after reboots or when updates are applied. I realize Consistent Network Interface Device Naming warns that this can happen, but I have to image there is a way around this for now. At least to allow for software packages to be updated to accommodate this new naming standard.

Steps I followed so far:
1. Edited /etc/default/grub and added net.ifnames=0 and biosdevname=0 to GRUB_CMDLINE_LINUX
2. Generated a new grub file
3. Renamed the interface files in /etc/sysconfig/network-scripts to ifcfg-eth0, ifcfg-ethx
4. Edited the interface files added the NAME and DEVICE directives, removed the UUID parameter.

In an attempt to control the NIC card ordering and assignments, I tried the following separately (not all at once):
1. Adding the HWADDR to ifcfg-ethx - Didn't work
2. Adding the MACADDR to ifcfg-ethx - Didn't work
3. Added 70-persistent-net.rules following old style from CentOS 6 - Didn't work
- Tries using ATTR{address}=="xx:xx:xx:xx:xx:xx" format and KERNEL=="xx.xx.xx" format - Didn't work
4. Played with link flies, not success either

Has anyone been able to solve the problem of change NIC ordering when reverting back to the old naming convention?

User avatar
Posts: 2807
Joined: 2007/12/11 08:17:33
Location: Finland

Re: CentOS 8 Multiple NIC Ordering

Post by jlehtone » 2020/05/18 10:56:02

Frankly, I have never tried. A luxury of not having "requirements that I need to work with".

However, I did recently observe, on CentOS 7 VM (on CentOS 7 libvirt/KVM) that the device names
(of style ethX) were changing on every reboot.
Like I said, I have no interest in the names, and I do use NetworkManager (NM).
I had manually defined a connection (with nmcli) for a device. That did require setting 'ifname'.

NM does (by default) define connections automatically for each device. It does not set 'ifname'
NM does set '802-3-ethernet.mac-address'. I was ables to unset ifname and set mac-address
to bind connection to device persistently, regardless of the name enumeration.

Red Hat describes interface naming in:
https://access.redhat.com/documentation ... networking
Section 2.2 does mention HWADDR.

PS. HWADDR was to match config to a device (and rename device), while MACADDR was to use a arbitrary MAC-address with the device.

Post Reply

Return to “CentOS 8 - Networking Support”