Reassociating MAC addresses to ethX after a MAC change
I'm running logical partitions (kind of like VM's) on a Hitachi CB500 blade chassis. I have to make a change to the blade that will regenerate new MAC id's for the six network interfaces (eth0-eth5). Therefore, each ethx device will get a new MAC. Each of these eth devices is bonded. So I have six eth devices and three bonded devices. My concern is being able to reassociate the correct devices to each other after the MAC's change. When I make the change, I assume that new entries will be added to /etc/udev/rules.d/70-persistent-net.rules. Since there is already an entry for eth0, it could likely call it eth6 (the next available eth device name available) and give it a new MAC. As I'm managing six different devices, it seems to me that I'll reboot to find eth6-eth11 entries, all with new MAC's and new eth numbers and I won't know which entry (from eth6-eth11) to rename back to eth0. Which device is really eth0? Anyone dealt with this before?
Responses
What RHEL version is this? I assume RHEL6, if so:
Move your 70-persistent-net.rules somewhere else before the change, ensure your ifcfg-eth* do not have HWADDR in them. You don't need HWADDR on RHEL6.
udev will see the new MACs as "new" devices, create 70-persistent-net.rules with eth0-eth5, and the existing ifcfg-eth* files will just work.
The only thing which could trip you up is devices enumerating in a different order, so say the old eth0 becomes eth1 and something else becomes eth0. In that case, you'd just edit 70-persistent-net.rules to assign the correct MACs to the correct device names and reboot.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
