centos 6.1_64位系统 双网卡邦定

下面是设定一个ip为192.168.0.223的负载平衡双网卡

vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.0.223
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
USERCTL=no

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


vi /etc/modprobe.d/dist.conf 加入
alias bond0 bonding
options bond0 mode=0 miimon=100


加载bonding模块

modprobe bonding


重起计算机