具体操作步骤如下:
1.等待net插线ip link查看网卡状态,
2.备份原有ifcfg-eth1文件供回退使用,vi /etc/sysconfig/network-scripts/ifcfg-eth1添加如下字段:
DEVICE=eth1
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
3.备份原有ifcfg-eth0文件供回退使用,vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=no
MASTER=bond0
SLAVE=yes
4. vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=192.168.0.11
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
5.备份配置文件供回退使用vi /etc/modprobe.d/dist.conf #添加bond模式
alias bond0 bonding
options bond0 mode=1 miimon=100
6.vi /etc/rc.d/rc.local 添加开机自启动
ifenslave bond0 eth0 eth1
7. /etc/init.d/network reload #平滑重启网卡
8.cat /proc/net/bonding/bond0 查看bond信息
9.ifconfig查看网卡状态
10.Route查看路由状态