70-persistent-net-rules

Home » CentOS » 70-persistent-net-rules
CentOS 6 Comments

When my machine installs (CentOS 6.3) the two network cards are getting reversed. The PCI card is getting eth0 and the motherboard is getting eth1. I would like them in reverse order to keep things the same as they used to be.

How can I easily tell these two to reverse?

Generate the 70-persistent-net-rules with motherboard eth0 first then the PCI slot?

6 thoughts on - 70-persistent-net-rules

  • Jerry Geis wrote:

    Edit the existing one? It does persist through reboots, which is what you might expect from the name.

    mark

  • Mark

    I’d like to automate- Editing is prone to mistakes. Its not just one machine.

    So I’d like to automate it.

    jerry

  • Jerry Geis wrote:

    That’s a lot more complicated, since each have their own MACs. Do you have a) some kind of centrally-controlled configuration, and b) are they all under DHCP, and only allow known MAC addresses to get IPs? If yes to both of those, you could write a script to make it, using those, and push it out.

    On the other hand, you only need to do it once for each machine.

    mark

  • I don’t think you can always count on the detection order – so blindly automating a swap is probably a bad idea. Also, you are going to need the right MAC addresses in your ifcfg-eth? files to keep them nailed down.

  • I don’t know of convenient way to automate it. Is it possible to install the OS w/o the 2nd NIC? That way the embedded NIC will always be eth0. Later you can install the 2nd NIC which will get detected as eth1.

LEAVE A COMMENT