centos7下给bond网卡配置bridge桥接
这篇的主题可以用几个关键字组合:centos7+kvm + bond + bridge 。brige主要用在KVM虚拟化环境下,而bond是进行物理层面的冗余。具体配置信息如下
- 物理网卡名称:enp0s8、enp0s9
- bond名称:bond0
- 桥接名称:br0
enp0s8网卡配置
1[root@361way network-scripts]# cat ifcfg-enp0s8
2TYPE=Ethernet
3BOOTPROTO=none
4NAME=enp0s8
5DEVICE=enp0s8
6ONBOOT=yes
7MASTER=bond0
enp0s9网卡配置
1[root@361way network-scripts]# cat ifcfg-enp0s9
2TYPE=Ethernet
3BOOTPROTO=none
4NAME=enp0s9
5DEVICE=enp0s9
6ONBOOT=yes
7MASTER=bond0
bond0接口配置
1[root@361way network-scripts]# cat ifcfg-bond0
2TYPE=Bond
3BOOTPROTO=none
4PEEDNS=yes
5BONDING_MASTER=yes
6NAME=bond0
7DEVICE=bond0
8ONBOOT=yes
9BRIDGE=br0
br0接口配置
1[root@361way network-scripts]# cat ifcfg-br0
2TYPE=Bridge
3BOOTPROTO=static
4PEEDNS=yes
5NAME=br0
6DEVICE=br0
7ONBOOT=yes
8IPADDR=192.168.0.100
9NETMASK=255.255.255.0
10GATEWAY=192.168.0.1
11DNS1=8.8.8.8
12USERCTL=no
在rhel7/centos7下新增了一个另一个和bond类似的类型Team,同理Team接口也可以按同样的方法配置bridge接口,只不过将Team桥接成br0。
捐赠本站(Donate)
如您感觉文章有用,可扫码捐赠本站!(If the article useful, you can scan the QR code to donate))
- Author: shisekong
- Link: https://blog.361way.com/kvm-bond-bridge/5727.html
- License: This work is under a 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议. Kindly fulfill the requirements of the aforementioned License when adapting or creating a derivative of this work.