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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM