vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
IPADDR=172.16.10.88
NETMASK=255.255.252.0
BROADCAST=172.16.10.254
ONBOOT=yes
TYPE=Ethernet
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
修改/etc/modprobe.conf
添加如下内容:
alias bond0 bonding
options bond0 miimon=100 mode=1
#service network restart
在rc.local中添加:
Ifenslave bond0 eth0 eth1
即可