这篇的主题可以用几个关键字组合:centos7+kvm + bond + bridge 。brige主要用在KVM虚拟化环境下,而bond是进行物理层面的冗余。具体配置信息如下
物理网卡名称:enp0s8、enp0s9 bond名称:bond0 桥接名称:br0
enp0s8网卡配置
[root@361way network-scripts]# cat ifcfg-enp0s8 TYPE=Ethernet BOOTPROTO=none NAME=enp0s8 DEVICE=enp0s8 ONBOOT=yes MASTER=bond0
enp0s9网卡配置
[root@361way network-scripts]# cat ifcfg-enp0s9 TYPE=Ethernet BOOTPROTO=none NAME=enp0s9 DEVICE=enp0s9 ONBOOT=yes MASTER=bond0
bond0接口配置
[root@361way network-scripts]# cat ifcfg-bond0 TYPE=Bond BOOTPROTO=none PEEDNS=yes BONDING_MASTER=yes NAME=bond0 DEVICE=bond0 ONBOOT=yes BRIDGE=br0
br0接口配置
[root@361way network-scripts]# cat ifcfg-br0 TYPE=Bridge BOOTPROTO=static PEEDNS=yes NAME=br0 DEVICE=br0 ONBOOT=yes IPADDR=192.168.0.100 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 DNS1=8.8.8.8 USERCTL=no
在rhel7/centos7下新增了一个另一个和bond类似的类型Team,同理Team接口也可以按同样的方法配置bridge接口,只不过将Team桥接成br0。