Yet another strange problem that I was banging my head at recently was the magical swapping of network interfaces after reboot. It’s not such a big issue, as reboots are rare, but when they happen, it annoys the hell out of me. The problem is that I’ll get my eth0 device would become eth1 and my eth1 would change to eth0. And back again after the next reboot.
Today I got really bored with this swapping, as I had to change my firewall settings once again, and decided to solve it once and for all.
The solution turned out to be trivial. There is a simple way of specifying which network settings should apply to which network device. All I had to do was edit
/etc/sysconfig/network-scripts/ifcfg-eth0 file and add
HWADDR=my:mac:address:here line. Then I did the same for the eth1 device.
I’ve tried a few reboots just to test the solution and so far it looks great.