[CentOS] again, nic driver order (bonding)

Sat Nov 28 18:50:50 UTC 2009
Thomas Harold <thomas-lists at nybeta.com>

On 11/22/2009 8:38 PM, Gordon McLellan wrote:
> 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.

On the servers where I'm currently using bonding... (this is what Ross 
Walker said on the 23rd).  Here's an example for a server w/ 4 total 
NICs, bonded into a pair of pairs.

/etc/modprobe.conf

alias eth0 tg3
alias eth1 tg3
alias eth2 forcedeth
alias eth3 forcedeth
alias scsi_hostadapter sata_nv
# BONDING
# Set general bonding options (allows multiple bonds)
options bonding max_bonds=2
# Define the two bonds
alias bond0 bonding
alias bond1 bonding

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
HWADDR=00:16:36:##:##:##
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
TYPE=Ethernet

/etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
TYPE=Ethernet
BONDING_OPTS="mode=1 miimon=100"
NETWORK=nnn.nnn.nnn.nnn
NETMASK=nnn.nnn.nnn.nnn
IPADDR=nnn.nnn.nnn.nnn
GATEWAY=nnn.nnn.nnn.nnn

Basically, we create (1) file for each ethernet interface under 
/etc/sysconfig/network-scripts (ifcfg-eth0, ifcfg-eth1, ifcfg-eth2, 
ifcfg-eth3), then we create (1) file for each bonded interface there as 
well (ifcfg-bond0, ifcfg-bond1).  Bond membership is defined in the 
ifcfg-eth# files, while the bond options are defined in the ifcfg-bond# 
file.

You can find out MACs by looking /etc/sysconfig/hwconf.