Centos7配置team聚合链之主备模式支持KVM桥模式

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lic95/article/details/85028362

        需要在生产环境下要部署kvm虚拟化生产环境,因为网络采用的是叶脊拓扑,需要对多个网卡进行绑定,常用绑定技术为bond和team,team是centos7新支持的,性能和稳定性都高于bond,因此决定采用team对多个网卡进行绑定。需要绑定的两块万兆卡名称为ens7f0和ens7f1配置步骤如下:
1、 配置ens7f0

[root@localhost network-scripts]# cat ifcfg-ens7f0
NAME=ens7f0
DEVICE=ens7f0
ONBOOT=yes
DEVICETYPE=TeamPort
TEAM_MASTER=team0
TEAM_PORT_CONFIG='{"prio":9}'

2、 配置ens7f1

[root@localhost network-scripts]# cat ifcfg-ens7f1
NAME=ens7f1
DEVICE=ens7f1
DEVICETYPE=TeamPort
ONBOOT=yes
TEAM_MASTER=team0
TEAM_PORT_CONFIG={"prio": 10,"sticky": true}

3、 配置team0

[root@localhost network-scripts]# cat ifcfg-team0
DEVICE=team0
NAME=team0
DEVICETYPE=Team
TEAM_CONFIG='{"runner": {"name": "activebackup"},"link_watch": {"name": "ethtool","delay_up": 2500,"delay_down": 1000}}'
ONBOOT=yes
BRIDGE=br0

4、 配置br0

[root@localhost network-scripts]# cat ifcfg-br0
TYPE=Bridge
BOOTPROTO=static
NAME=br0
DEVICE=br0
ONBOOT=yes
IPADDR=192.168.217.12
NETMASK=255.255.255.0
GATEWAY=192.168.217.254
DNS1=119.29.29.29
DNS2=8.8.8.8

5、 查看网卡状态

[root@localhost network-scripts]# teamdctl team0 state view
setup:
  runner: activebackup
ports:
  ens7f0
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        down count: 0
  ens7f1
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        down count: 0
runner:
  active port: ens7f0

至此,整个team端口组配置完毕,实测无任何问题

猜你喜欢

转载自blog.csdn.net/lic95/article/details/85028362