实验环境: centos6 centos7
IP规划: centos6: eth0+eth1=bond0 bond0:192.168.16.100
centos7:
eth0:192.168.16.66
实验目的: 实现centos6的网卡冗错,网卡的高可用
实验步骤: centos6添加两块网卡:eth0,eth1 分别配置: vim ifcfg-eth0 NAME=eth0 DEVICE=eth0 ONBOOT=yes MASTER=bond0 SLAVE=yes ################### vim ifcfg-eth1 NAME=eth1 DEVICE=eth1 ONBOOT=yes MASTER=bond0 SLAVE=yes #################### 添加bond0配置 vim ifcfg-bond0 NAME=bond0 DEVICE=bond0 ONBOOT=yes TYPE=bond IPADDR=192.168.16.200 PREFIX=24 BONDING_OPTS="model=1 miion=10" #model=1是主备模式
重启网卡:ifconfig eth0 down
ifconfig eth1 down
ifconfig bond0 up
或者service network restart
#可能会出现ip地址被占用的情况,需要更换bond0的IP
检测IP:
centos7------>192.168.16.200
可以连通,并切断centos6的bond0的网卡连接,测试切换
#可能是vmware模拟问题,测试切换没有用