Linux-PowerEdge Digest, Vol 48, Issue 4
christian.peper at kpn.com
christian.peper at kpn.com
Mon Aug 4 02:28:39 CDT 2008
> Date: Sat, 2 Aug 2008 15:40:15 -0500
> From: "Moe, Justin" <justin.moe at xo.com>
> Subject: RE: PE1850/1950/2950 + RHEL4/5 + Nic teaming ?
> To: "Florent Gilain" <Florent.Gilain at direct-energie.com>,
> <linux-poweredge at lists.us.dell.com>
>
> Content-Type: text/plain; charset="us-ascii"
>
> There is plenty of information on Ethernet bonding, which I
> believe is what you are referring to.
>
> In a nutshell, it does the same thing as windows does, the
> only real difference as far as the system is concerned is
> that the interface is named bond$FOO vs eth$FOO.
>
> Search for 'linux ethernet teaming', there is a huge amount
> of documentation out there on it. We implemented it here on
> a 2950 III running Debian stable and it's working a treat.
Here is a script I use during post installation, to set up bonding of 2
ethernet cards (one BCM and one Intel) on OEL (aka RHEL AS) 4u5 running
on a PE2950.
It first sets up the kernel module to use bonding. Then it configures
the bond and both NICs. Note that ifconfig shows you a bonded logical
NIC, not the underlying 2 physical NICs.
I could have used Intel's Linux drivers and used something they
provided, but we found this works just fine and does not rely on 3rd
party code, only on mainstream disto sources. Which is one less
dependency.
Chris.
---begin---
BondBM()
{
Info "Creating network files and scripts"
# Set the file /etc/modprobe.conf
cp /etc/modprobe.conf /root/modprobe.conf.org
echo "# bond0 devices eth0 and eth4" >
/etc/modprobe.conf
echo "# mode=0 loadbalance and failover" >>
/etc/modprobe.conf
echo "# mode=1 failover" >>
/etc/modprobe.conf
echo "alias bond0 bonding" >>
/etc/modprobe.conf
echo "options bonding miimon=100 mode=1" >>
/etc/modprobe.conf
echo "# end bond0" >>
/etc/modprobe.conf
cat /root/modprobe.conf.org >>
/etc/modprobe.conf
#Set the file /etc/sysconfig/network-scripts/ifcfg-bond0
echo DEVICE=bond0 >
/etc/sysconfig/network-scripts/ifcfg-bond0
echo USERCTL=no >>
/etc/sysconfig/network-scripts/ifcfg-bond0
echo ONBOOT=yes >>
/etc/sysconfig/network-scripts/ifcfg-bond0
echo BROADCAST=${sBroadCast} >>
/etc/sysconfig/network-scripts/ifcfg-bond0
echo NETWORK=${sNetWork} >>
/etc/sysconfig/network-scripts/ifcfg-bond0
echo NETMASK=$sNetMask >>
/etc/sysconfig/network-scripts/ifcfg-bond0
echo GATEWAY=${sGateWay} >>
/etc/sysconfig/network-scripts/ifcfg-bond0
echo IPADDR=${sIpAdress} >>
/etc/sysconfig/network-scripts/ifcfg-bond0
#Set the file /etc/sysconfig/network-scripts/ifcfg-eth0
cp /etc/sysconfig/network-scripts/ifcfg-eth0
/root/ifcfg-eth0.org
echo DEVICE=eth0 >
/etc/sysconfig/network-scripts/ifcfg-eth0
echo USERCTL=no >>
/etc/sysconfig/network-scripts/ifcfg-eth0
echo ONBOOT=yes >>
/etc/sysconfig/network-scripts/ifcfg-eth0
echo MASTER=bond0 >>
/etc/sysconfig/network-scripts/ifcfg-eth0
echo SLAVE=yes >>
/etc/sysconfig/network-scripts/ifcfg-eth0
echo BOOTPROTO=none >>
/etc/sysconfig/network-scripts/ifcfg-eth0
#Set the file /etc/sysconfig/network-scripts/ifcfg-eth4
cp /etc/sysconfig/network-scripts/ifcfg-eth4
/root/ifcfg-eth4.org
echo DEVICE=eth4 >
/etc/sysconfig/network-scripts/ifcfg-eth4
echo USERCTL=no >>
/etc/sysconfig/network-scripts/ifcfg-eth4
echo ONBOOT=yes >>
/etc/sysconfig/network-scripts/ifcfg-eth4
echo MASTER=bond0 >>
/etc/sysconfig/network-scripts/ifcfg-eth4
echo SLAVE=yes >>
/etc/sysconfig/network-scripts/ifcfg-eth4
echo BOOTPROTO=none >>
/etc/sysconfig/network-scripts/ifcfg-eth4
# probe the bonding module
/sbin/modprobe bonding
}
#End BondBM()
---end---
More information about the Linux-PowerEdge
mailing list