「Team」- 配置(Linux)

  CREATED BY JENKINSBOT

使用NetworkManager来配置

创建Team接口

添加网络绑定接口team0,并添加eth0、eth1这两个从属网口:

#!/bin/bash

nmcli connection add type team con-name team0 ifname team0 config team1-master-json.conf
nmcli connection add type team-slave con-name team0-slave0 ifname eth0 master team0
nmcli connection add type team-slave con-name team0-slave1 ifname eth1 master team0

配置Team接口

配置网络绑定接口team0,并激活:

#!/bin/bash

nmcli connection modify team0 ipv4.address 172.16.1.65/24 ipv4.method manual
nmcli connection up team0

查看Team接口状态

查看网卡team0的绑定状态:

#!/bin/bash

teamdctl team0 state

参考文献

参数team1-master-json.conf