Primary interface not eth0
I’ve seen this happen a couple of times with a Debian 4 “Etch” install where the primary Ethernet interface is eth2 or eth3 instead of eth0. I’ve worked out what it is now.
It can happen when you move a hard drive from one system to another, replace the motherboard or ethernet card, clone a drive or in any way cause the MAC address of the Ethernet interface to change.
You see, there is a script which assigns the device numbers based on the MAC address so that in a machine with multiple cards, the numbers will never change. So if you remove an Ethernet interface, it will reserve its device number in case that card ever re-appears.
So how to fix it ? Very simple. Just delete the MAC address cache and reboot. This command will do it:
rm /etc/udev/rules.d/z25_persistent-net.rules reboot
