[CentOS] again, nic driver order

Mon Nov 23 14:29:22 UTC 2009
Ross Walker <rswwalker at gmail.com>

On Nov 23, 2009, at 8:29 AM, Gordon McLellan <gordonthree at gmail.com>  
wrote:

> On Mon, Nov 23, 2009 at 8:04 AM, Gordon McLellan <gordonthree at gmail.com 
> > wrote:
>> Digging around google a bit more I came up with different rules, and
>> fingers crossed, they seem to work!
>>
>> SUBSYSTEM=="net", SYSFS{address}=="00:1b:21:4d:c3:e8", NAME="eth0"   
>> # pro/1000gt
>> SUBSYSTEM=="net", SYSFS{address}=="00:e0:81:b5:7a:30", NAME="eth1"   
>> # internal 1
>> SUBSYSTEM=="net", SYSFS{address}=="00:e0:81:b5:7a:31", NAME="eth2"   
>> # internal 2
>>
>
> Replying to myself here, as I'm going crazy anyway.
>
> It turns out it was just a fluke the server booted up with the correct
> order.  Another reboot and the nic's are all screwed up again, the
> built in and external card sharing eth0, the second built in as eth1.
>
> On the second server, things are the same even with the new rules, nic
> drvier order is seemingly chosen at random with each boot.
>
> Any other thoughts and suggestions!?

Don't touch udev, expecting admins to write udev rules for network  
interface binding is just not realistic. Udev rules are meant to be  
static across hardware reconfigurations while ifcfg files are meant to  
be modified to suit your current configuration.

Use HWADDR="00:1b:21:4d:c3:e8" in the ifcfg files along with NAME=eth0  
for eth0 and so on.

modprobe.conf associates an alias with a driver, and the ifcfg files  
associate a MAC address with an alias.

Also for CentOS 5 you can specify the bonding interface options in the  
ifcfg files (so you can have varying types of bonded interfaces) with  
MODPROBE_OPTIONS="".

-Ross