1.检验系统是否支持bonding
[root@rac1 ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Kernel \r on an \m
[root@rac1 ~]# cat /boot/config-2.6.32-279.el6.x86_64 | grep -i bonding
CONFIG_BONDING=m
#CONFIG_BONDING=m 表示支持bonding
2.备份并修改网卡配置
cp ifcfg-eth0 /home/oracle/ifcfg-eth0.bak
vi ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
IPADDR=192.168.0.21
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
USERCTL=no
ONBOOT=yes
vi ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="none"
ONBOOT="yes"
MASTER=bond0
SLAVE=yes
HWADDR="08:00:27:94:5F:72"
vi ifcfg-eth1
DEVICE="eth1"
BOOTPROTO="none"
ONBOOT="yes"
MASTER=bond0
SLAVE=yes
HWADDR="08:00:27:CE:CE:FA"
3.配置绑定模型
vi /etc/modprobe.d/dist.conf 尾部添加
alias bond0 bonding
options bond0 mode=1 miimon=100
注:mode=1主备模式,mode=0负载均衡模式需要交换机支持
4.配置网卡启动顺序
vi /etc/rc.d/rc.local
ifenslave bond0 eth0 eth1
touch /var/lock/subsys/local
5.关闭NetworkManager服务
service NetworkManager stop
chkconfig NetworkManager off
6.重启网卡
service network restart
7.重启服务器
reboot
8.查看接口配置
ifconfig
网卡的MAC地址是否与bond的一致,一致则成功
9.拨掉单根网线查看bonding是否真正生效