setup
eth0:192.168.18.1
eth1:192.168.18.2
service network restart
确定内核支持bonding这个模块 cat /boot/config-2.6.32-279.e16.x86_64 |grep BONDING
cd /etc/sysconfig/network-scripts
将两块网卡虚拟成一块网卡
cp ifcfg-eth1
cp ifcfg-eth0 ifcfg-eth1
cp ifcfg-eth0 ifcfg-bond0
vim ifcfg-eth0
DEVICE=eth0
BOOTROTO=none
ONBOOT=yes
TYPE=Ethernet
SLAVE=yes
MASTER=bond0
vim ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
SLAVE=yes
MASTER=bond0
vim ifcfg-bond0
DEVICE=bond0
BOOTROTO=none
ONBOOT=yes
TYPE=Ethernet
IPADDR=192.168.18.1
NETMASK=255.255.255.0
写配置文件,决定包如何工作的
vim /etc/modprobe.d/bond.conf
alias bond0 bonding
options bond miimon=50 mode=1
service network restart
转载于:https://blog.51cto.com/6851768/1212349