目标
添加一块网卡,使用bonding将2块网卡绑定到bond0网卡中,ip为原来的ip地址,使用模式2作为bonding的模式,并测试
步骤
添加网卡
- 关机,点击“编辑虚拟机设置”>“添加”>“网络适配器”,点击确定可看到多了个网络适配器2
- 输入 ifconfig 可看到eth1网卡
- 输入以下命令可看到内核识别到了网卡eth1
[root@Centos6 ~]# cat /etc/udev/rules.d/70-persistent-net.rules
- 输入
ls /etc/sysconfig/network-scripts/
命令发现还没有新网卡eth1的配置文件,要自行制作
[root@Centos6 ~]# cd /etc/sysconfig/network-scripts/ # 切换到网络配置目录
[root@Centos6 network-scripts]# cp ifcfg-eth0 ifcfg-eth1 # 复制eth0文件到eth1文件
[root@Centos6 network-scripts]