linux下网卡team的配置

1、配置team 网卡

[root@localhost ~]# mcli connection add type team con-name team0 ifname team0 config '{"runner":{"name":"activebackup"}}' ip4 192.168.8.100
bash: mcli: 未找到命令...
[root@localhost ~]# nmcli connection add type team con-name team0 ifname team0 config '{"runner":{"name":"activebackup"}}' ip4 192.168.8.100
成功添加的连接 'team0'(73624a17-1e70-44a4-b855-e7f8aec3f9ba)。
[root@localhost ~]# teamdctl team0 state
setup:
  runner: activebackup
runner:
  active port: 
[root@localhost ~]# nmcli connection add con-name ens33 ifname ens33 type team-slave master team0
成功添加的连接 'ens33'(ee50d5aa-2b5e-463b-b4ad-8df900417064)。
[root@localhost ~]# nmcli connection add con-name ens38 ifname ens38 type team-slave master team0
成功添加的连接 'ens38'(9cfed3c6-0a12-4494-84b9-02f72068a255)。
[root@localhost ~]# 
[root@localhost ~]# teamdctl team0 state
setup:
  runner: activebackup
ports:
  ens33
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        down count: 0
  ens38
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        down count: 0
runner:
  active port: ens33
[root@localhost ~]# ifdown ens33
成功断开设备 'ens33'。
[root@localhost ~]# teamdctl team0 state
setup:
  runner: activebackup
ports:
  ens38
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        down count: 0
runner:
  active port: ens38
[root@localhost ~]# ifup ens33
成功激活的连接(D-Bus 激活路径:/org/freedesktop/NetworkManager/ActiveConnection/5)
[root@localhost ~]# teamdctl team0 state
setup:
  runner: activebackup
ports:
  ens38
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        down count: 0
runner:
  active port: ens38

 

转载于:https://www.cnblogs.com/dayu-liu/p/11365192.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值