[CentOS] again, nic driver order

Mon Nov 23 01:38:01 UTC 2009
Gordon McLellan <gordonthree at gmail.com>

I have two servers with identical hardware ... TYAN i3210w system
boards with dual intel gigabit interfaces, and a PCI intel gigabit
nic.  I'm running Centos 5.4, x86_64,  2.6.18-164.6.1.el5

Every other time I reboot, the nics initialize in a different order.

anaconda had setup /etc/modprobe.conf with alias lines for the cards:

alias eth0 e1000
alias eth1 e1000e
alias eth2 e1000e

However, introducing the bonding driver into the mix seems to have
thrown a wrench in the works.

alias bond0 bonding
options bond0 miimon=80 mode=5 #or something like that, can't get to
the machine right now - no console and the network is down

So, I read about the ifcfg options and try assigning each config
script an HWADDR line.

after rebooting, /var/log/messages announces that hardware address for
eth1 does not match, skipping ... same for eth2

Reading the archives seems to indicate modprobe.conf doesn't do much
and is made obsolete by udev, and that hwaddr is discouraged because
it's a band-aid.  The archives seem to suggest fiddling with udev to
be the answer.  So I modify /etc/udev/rules.d/60-net (or something)
and add a few rules found in an ancient example (those aren't my mac
addresses):
KERNEL=="eth?", SYSFS{address}=="00:37:e9:17:64:af", NAME="eth0"  #
MAC of first NIC in lowercase
KERNEL=="eth?", SYSFS{address}=="00:21:e9:17:64:b5", NAME="eth1"  #
MAC of second NIC in lowercase

Now, all three network cards get assigned as eth0!  eth1 and eth2 are
no longer found.  The pci-express nics (onboard) get detected first,
and the pci nic is last, so it ends up "owning" the eth0 alias.

I don't really care which alias gets assigned to which nic, but I want
that assignment to be constant.

All suggestions are appreciated!

Gordon