Web pages:
http://blogs4linux.blogspot.com/2011/08/configuring-bonded-devices-on-red-hat.htm
http://rrvkumar.wordpress.com/category/linux/
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-networkscripts-interfaces-chan.html
---------------------------------------------------------------------------------------------------
For Testing
To load by hand:
modprobe bonding
to see the module: lsmod | grep bond
[root@lcls-dmp1-cs01 network-scripts]# lsmod | grep bonding
bonding 97505 0
-------------------------------------------------------------------
To bond eth2 and eth3 together:
ifcfg-eth2:
# Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe
DEVICE=eth2
BOOTPROTO=none
USERCTL=no
ONBOOT=yes
TYPE=Ethernet
ETHTOOL_OPTS="autoneg on"
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
-----------------------------------------------------------------
ifcfg-eth3
# Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe
DEVICE=eth3
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
TYPE=Ethernet
ETHTOOL_OPTS="autoneg on"
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
-----------------------------------------------------------------
Bonding interface: ifcfg-bond0
DEVICE=bond0
IPADDR=198.168.2.12
NETMASK=255.255.255.0
NETWORK=198.168.2.0
BROADCAST=198.168.2.255
ONBOOT=yes
BOOTPROTO=static
USERCTL=no
BONDING_OPTS="mode=0 miimon=100"
MTU=9000
---------------------------------------------------------------
Bonding options can be added to the modules.conf
"options bonding miimon=100 mode=0"
Or in the ifcfg-bond0 file:
BONDING_OPTS="mode=0 miimon=100"
miimom specifies the MII link monitoring frequency in milliseconds. This determines how often the link state of each slave is checked for link failures. A value of zero disables MII link monitoring.
mode =1,a value of “0″ specifies that the bonding mode is a round robin mode providing load balancing and fault tolerance and a value of “1″ specifies that only one slave in a bond is active and the interface is in a fault tolerance mode. |
----------------------------------------------------------------
Bonding Link information
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0-2 (October 7, 2008)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth2
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: b8:ca:3a:f2:4e:d0
Slave Interface: eth3
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: b8:ca:3a:f2:4e:d1
------------------------------------------------------------------
DHCP Config:
We use DHCP to provide the IP for the camera. This allows for
easily switching out cameras without having to configure the IP.
#########################
#Set up BOND interface
#########################
subnet 198.168.2.0 netmask 255.255.255.0 {
# interface eth2;
interface bond0;
option routers 198.168.2.1;
option subnet-mask 255.255.255.0;
range dynamic-bootp 198.168.2.2 198.168.2.2;
default-lease-time 300;
max-lease-time 300;
}
---------------------------------------------------------------------
|