Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have servers that have swappable hard drives and two NICs.
When I moved one to another server, the network would no longer work stating that the device eth0 was no longer present. Instead, i had eth2, eth3.
I did some research and found that if you delete /etc/udev/rules.d/70-persistent-net.rules it would work again. So, i deleted that file and it did find eth0 and eth1 again... but then all my IP settings i had set up in my sysconfig files no longer worked. Then, when i switched the network cable to the other NIC it all worked. For some reason it did not map eth0 to the same port (same location on back of server) on the new machine.
How can I insure that eth0 always be mapped to the port I want it to be on? Is it even possible with udev? Or anything else I can do?
Possibly it would allow you to edit the persistent rules file and make the appropriate card with the specific MAC address eth0..
so you would end up with 2 rules that map to eth0 but one rule would be for each server ..
I don't know if that is allowed (two rules mapping to the same device name) but you could certainly try it.. I'm thinking it might ignore the rule for the device that doesn't exist..
An alternative is to ignore the MAC address completely in the name assignment rules and use the PCI bus location. With identical hardware (ie motherboards with multiple network interfaces) the PCI bus location will be the same.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.