cd
/etc/sysconfig/network-scripts/
cp
ifcfg-eth0
ifcfg-bond0
vi
ifcfg-bond0
将第一行改成
DEVICE=bond0
加上ip、
掩码
等,最终如下:
DEVICE=bond0
BOOTPROTO=static
IPADDR=172.31.0.13
NETMASK=255.255.255.0
BROADCAST
=172.31.3.254
ONBOOT=yes
TYPE=Ethernet
删掉ifcfg-eth0和ifcfg-eth1中ip、掩码等信息,最终如下:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=dhcp
vi
/etc/modules.conf
加入下列两行
alias
bond0
bonding
options
bond0
miimon=100
mode=1
mode=0是
负载均衡
,mode=1是冗余模式。有7种模式可选,请自行搜索
linux
网卡
mode。