Labels

Wednesday, January 23, 2013

How to Bonding in CentOS

### Bonding in CentOS ###
[root@localhost ~]# yum install ethtool -y
[root@localhost ~]# vim /etc/modprobe.conf
alias bond0 bonding
options bond0 miimon=100 mode=1

[root@localhost ~]# touch /etc/sysconfig/network-scripts/ifcfg-bond0
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=172.16.10.1
NETMASK=255.255.255.0
NETWORK=172.16.10.0
BROADCAST=172.16.10.255
GATEWAY=172.16.10.1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth1DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
HWADDR=00:19:CB:54:A9:83
USERCTL=no
MASTER=bond0
SLAVE=yes

[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth2DEVICE=eth2
ONBOOT=yes
BOOTPROTO=none
HWADDR=F4:EC:38:82:7C:64
USERCTL=no
MASTER=bond0
SLAVE=yes

modprobe bonding
service network restart