NIC Details:
[root@mylinz2 network-scripts]# ifconfig -a |grep eth
eth2 Link encap:Ethernet HWaddr 00:0C:29:79:17:FA
eth4 Link encap:Ethernet HWaddr 00:0C:29:79:17:04
eth3 Link encap:Ethernet HWaddr 00:0C:29:79:17:F0
[root@mylinz2 network-scripts]#
Goal:
Configure bonding between eth2 and eth4 with name of bond0.
Step 1:
Add the below line in /etc/modprobe.conf to load the bonding module in to kernel.
# alias bond0 bonding
In redhat 6.3 , you need to create new file called “bonding.conf” under /etc/modprobe.d/ with below mentioned line.
# cat /etc/modprobe.d/bonding.conf
alias bond0 bonding
Step 2:
Now time to create a bonding interface configuration file in /etc/sysconfig/network-scripts/ directory like the below one.
[root@mylinz2 network-scripts]# pwd
/etc/sysconfig/network-scripts
[root@mylinz2 network-scripts]# cat ifcfg-bond0
#This is congiguration file for bond0.Used NIC's eth2 & eth4
DEVICE=bond0
IPADDR=192.168.10.25
NETMASK=255.255.255.0
USRCTL=no
ONBOOT=yes
BOOTPRO=none
BONDING_OPTS="mode=0 miimon=100"
[root@mylinz2 network-scripts]#
Step:3
Create a configuration files under “/etc/sysconfig/network-scripts/” for network interfaces if not exists.If exists,have a contents like the below one.
[root@mylinz2 network-scripts]# cat ifcfg-eth2
DEVICE=eth2
HWADDR=00:0C:29:79:17:FA
BOOTPRO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
[root@mylinz2 network-scripts]# cat ifcfg-eth4
DEVICE=eth4
HWADDR=00:0C:29:79:17:04
BOOTPRO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
Note:Do not copy paste the content from above output.MAC and DEVICE name will differ for each system.
Step:4
Now i have connected LAN cable back to eth4 and pulling out from eth2.
To see complete bonding info,use below command.
POLICY DETAILS
|
---|