- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- ethernet device name gets changed after reboot.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2013 11:17 AM
12-09-2013 11:17 AM
ethernet device name gets changed after reboot.
Hello All.
i have a server running redhat linux 6.3 OS. Its primary IP is binded with 2 ethernet card (eth0 and eth1) and using bond0. Whenever the server is rebooted, the eth0 and eth1 gets renamed to eth2 and eth3 respectively. because of this the server does not comes on network since bond0 looks for the eth0 and eth1 devices.
so to fix this issue what we do is delete the file /etc/udev/rules.d/70-persistent-net.rules and reboot the server. after reboot the the ethernet devices gets the name eth0 and eth1 and hence the issue gets fixed.
I am looking for a way by which we do not have to do the above manual work everytime we reboot the server.
Regards,
Vijay
iGATE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2013 01:12 PM
12-09-2013 01:12 PM
Re: ethernet device name gets changed after reboot.
For legacy compatibility reasons, RHEL 6.x has actually two overlapping mechanisms for assigning the eth* names to NICs persistently.
First, and the more modern one, is the /etc/udev/rules.d/70-persistent-net.rules, which you already know.
The other is the "HWADDR=" lines in /etc/sysconfig/network-scripts/ifcfg-eth* files.
I think RHEL is transitioning to the udev method (which is apparently becoming the de facto standard across enterprise Linux distributions), but RHEL 6.x still may use the HWADDR= lines too.
I would guess that your server has HWADDR= lines with incorrect MAC addresses in /etc/sysconfig/network-scripts/ifcfg-eth0 and .../ifcfg-eth1. When you remove the 70-persistent-net.rules file, remove the HWADDR= lines too. Alternatively, make sure that the correct MAC addresses are associated with correct interface names in both places.
Alternatively, is your server a virtual machine? In that case, some VM hosts can cause the MAC addresses of the guest's virtual NICs to vary each time the guest is stopped and restarted at the VM level. In that case, you will need to remove the HWADDR= lines and also do something about the /lib/udev/rules.d/75-persistent-net-generator.rules file. A comment at the beginning of that file says:
# do not edit this file, it will be overwritten on update
So, editing or removing the 75-persistent-net-generator.rules file won't help, since the standard version will come back whenever the udev RPM is updated. But "man udev" custom files in /etc/udev/rules.d/ will override identically-named standard files in /lib/udev/rules.d. In other words, to permanently disable the /lib/udev/rules.d/75-persistent-net-generator.rules file, run this command:
echo "# network interface name/MAC persistence is intentionally disabled" >/etc/udev/rules.d/75-persistent-net-generator.rules
After that, if you delete the 70-persistent-net.rules file, it will not be re-created.
I think the installation of VMware Tools does something like this on VMware guests running Linux RHEL 6.x.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2013 03:24 PM
12-09-2013 03:24 PM
Re: ethernet device name gets changed after reboot.
Hi Matti,
Thanks for the reply!!
This is a physical server Environment.
The file /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-eth1 have the HWADDR line commented.
do you suggest me to have that line HWADDR added in the file /etc/sysconfig/network-scripts/ifcfg-eth*??
OR do i have to always rely on removing the file /etc/udev/rules.d/70-persistent-net.rules?
please suggest.
Regards,
Vijay
iGATE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2013 04:32 PM
12-13-2013 04:32 PM
Re: ethernet device name gets changed after reboot.
To stop the auto-creation of /etc/udev/rules.d/70-persistent-net.rules, create a file named /etc/udev/rules.d/75-persistent-net-generator.rules. The filename must be exactly that.
(Technically, it can be an empty file, but it is better to write just a comment in it, to indicate the reason why the file has been created. Someone might wonder why there is an empty file in /etc/udev/rules.d, assume that it is useless, and then delete it.)
Then delete the /etc/udev/rules.d/70-persistent-net.rules one final time, and it won't be re-created any more.
The 75-persistent-net-generator.rules file in /etc/udev/rules.d will override the file with the same name in /lib/udev/rules.d, so the automatic creation of the 70-persistent-net.rules file won't happen any more.
The procedure above is better than modifying or deleting /lib/udev/rules.d/75-persistent-net-generator.rules, because any update of the udev RPM will overwrite the files in /lib/udev/rules.d,and that would undo the modification and cause the problem to happen again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2013 09:36 PM
12-14-2013 09:36 PM
Re: ethernet device name gets changed after reboot.
Hi Matti,
Thanks for the suggestion.
I will try this option and let you know.
Regards,
Vijay
iGATE