team,聚合连接(链路聚合)

由多块网卡(team-slave)一起组建而成的虚拟网卡,

即“组队”

 作用1:轮询式(roundrobin)的流量负载均衡

 作用2:热备份(activebackup)连接冗余

热备份配置 : {"runner":{"name":"activebackup"}}

man帮助辅助 :

man teamd.conf   --> /example   #全文查找example #按n 跳转下一个匹配

一、添加team组设备

# nmcli connection add type team con-name team0 ifname team0 config '{"runner": {"name": "activebackup"}}'

# type类型 # con-name设备文件名  # ifname设备名 # config配置

# cat /etc/sysconfig/network-scripts/ifcfg-team0

# ifconfig team0

二、添加组成员(eth1和eth2)

# nmcli connection add type team-slave ifname eth1 master team0 #con-name # 可省略(自动命名设备文件名) 则省

# nmcli connection add type team-slave ifname eth2 master team0

三、配置team0的IP地址

# nmcli connection modify team0 ipv4.method manual ipv4.addresses ‘192.168.1.1/24 192.168.1.254’ connection.autoconnect yes

四、激活team0

# nmcli connection up team-slave-eth1   #激活从设备eth1

# nmcli connection up team-slave-eth2   #激活从设备eth2

# nmcli connection up team0                    #激活主设备team0     

五、验证

# teamdctl team0 state                               #专用于查看team信息

注:删除

# nmcli connection delete team-slave-eth1 

# nmcli connection delete team-slave-eth2

# nmcli connection delete team0