I recently re-did my server, upgrading the board and adding more memory – which went very smoothly (although one of the RAID cards wasnt fully fitted, meaning my RAID-5 threw a wobbler thinking a disk had died – took 8 hours to re-add after seating the card correctly, doh!).
One of the issues I did run into was the ethernet ports. Obviously my original board has 2 NIC’s, and their MAC’s are registered in the OS as eth0 and eth1 respectively – so when i powered the OS up on a new mobo, my default NIC came up as eth2 – ponderous!
Firstly, I tried changing my /etc/sysconfig/network-scripts/ifcfg-eth0 to reflect the new MAC addresses – after a ‘service network restart’, nope – same issue!
Turns out that what you need to do is edit /etc/udev/rules.d/70-persistent-net.rules:
nano /etc/udev/rules.d/70-persistent-net.rules
Comment out the original line:
# PCI device 0x8086:0x1096 (e1000e)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:17:4c:78:f0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
And add a new line with your new MAC:
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1a:4d:56:1b:9c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Reload the network:
service network restart
And voila – its fixed and now running as eth0. The reason I had to change this was KVM was expecting an interface on eth0, rather than eth2, and i couldnt find for love nor money anywhere to change it – not in the NIC against the VM, not in connection settings, not anywhere! But this method fixed it – so try this if your having the same issues!
Sam
