RHEL/CentOS7 ethX Naming: Source Workaround and Stability Limits

The source reports that disabling predictable names after installing CentOS7/RHEL7 can leave onboard/add-in NICs in an unwanted order. It first reproduces a third-party one-interface example, then proposes a MAC-based mapping for a multi-NIC host. Neither is a universal guarantee of stable ethX names.

Historical single-interface example

Original English ip-a output showingeno16777736and MAC address

The source edits the corresponding ifcfg file, changing NAME/DEVICE to eth0, then renames the file:

Original English ifcfg settings withNAMEandDEVICEeth0
cd /etc/sysconfig/network-scripts/
mv ifcfg-eno16777736 ifcfg-eth0

Its third-party example adds net.ifnames=0 biosdevname=0 to the existing GRUB_CMDLINE_LINUX value in /etc/default/grub:

Original English GRUB configuration withnet.ifnames=0biosdevname=0

It then rebuilds the BIOS-style GRUB configuration and reboots:

grub2-mkconfig -o /boot/grub2/grub.cfg
init 6
Original English grub2-mkconfig output
Original English init6command screenshot
Original English postrebooteth0 output, including an unrelated transient D-Bus error

Those are the source’s historical actions, not commands performed by this translation. Boot mode/configuration paths vary, a reboot interrupts service, and renaming an active management NIC can interrupt access. A successful single-interface screenshot does not resolve ordering on a different multi-NIC system.

The source’s multi-interface proposal

  1. Leave /etc/default/grub unchanged in that separate proposal.
  2. Use the desired ethX name consistently in each ifcfg filename and NAME/DEVICE field, and bind the intended real MAC using HWADDR.
  3. Create the source’s /etc/udev/rules.d/70-persistent-net.rules mapping for the intended interfaces.
  4. Reboot in a planned maintenance session and verify every physical interface/MAC/name association.
Original English ifcfg-eth9HWADDRexample, unchangedGRUBsettings and network-script listing
Original English ten-interface MAC-to-nameudevrule screenshot
Original English verification listingeth0throughatleasteth11withMACaddresses

The rule screenshot contains ten shown eth0–eth9 mappings; the verification crop also includes later interfaces such as eth10/eth11, so it is not a complete inventory/mapping proof for every visible NIC. Its MACs are examples for that host and must not be reused for another machine.

Vendor guidance and limitations

Red Hat’s RHEL7 networking guide describes HWADDR/DEVICE identification. Its separate support guidance warns that ethX is also the kernel’s temporary namespace: renaming into it can race with other NICs, so the source’s “final solution” title overstates applicability. Check supported naming behavior for the actual release and choose a non-conflicting supported mapping; do not blindly combine the source’s global-disable and leave-GRUB-unchanged branches.

Sources

Can't find an answer?

Upload a log for AI diagnosis, or ask the AI assistant directly in the console.