Linux中多个网卡配置(team的配置方式)

第一步:建立team接口

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

第二步:把物理口接入team接口(在创建前首先添加俩个网卡)

nmcli connection add con-name team0-port1 type team-slave ifname ens38 master team

nmcli connection add con-name team0-port2 type team-slave ifname ens39 master team

然后把俩个口都给down掉,在重新up(即连接)

nmcli connection down team0-port1

nmcli connection down team-port2

nmcli connection up team0-port1

nmcli connection up team0-port2

第三步:给team配置ip

nmcli connection modify team0 ipv4.addresses  192.168.234.155

nmcli connection modify team0 ipv4.method manual

nmcli connection down team0

nmcli connection up team0

 

番外篇:切换网卡

teamdctl team0 state 查看当前网卡

nmcli connection down teamo-port1

teamdctl team0 state

 

 

相关推荐
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页