Why RHEL7 system is failing in renaming the interfaces with error "systemd-udevd: error changing net interface name ethX to ethY: File exists" ?

Solution Verified - Updated -

Issue

  • In RHEL 7 system NIC naming has been changed to ethX style by adding net.ifnames=0 and biosdevname=0 to grub file. After doing that and rebooting the system when system boots up, MAC address mapping to NIC names are as eth0 - 8c:dc:d4:b7:xx:xx and eth1 - 8c:dc:d4:33:yy:yy
  • Now the requiremet is NIC port whose MAC is 8c:dc:d4:b7:xx:xx should be named as eth1 and the NIC port whose MAC is 8c:dc:d4:33:yy:yy should be named as eth0.
  • So to achieve that have tried adding HWADDR accordingly in the respective ifcfg-ethN files and then after reboot interfaces are coming up in the same way as that as that of original mapping.
  • In logs can see below error at the time when udev tried renaming the interfaces:
Apr 20 05:32:38 HOSTNAME systemd-udevd: error changing net interface name eth0 to eth1: File exists
Apr 20 05:32:38 HOSTNAME systemd-udevd: error changing net interface name eth1 to eth0: File exists

Environment

  • Red Hat Enterprise Linux 7.1
  • udevd

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.