zoukankan      html  css  js  c++  java
  • [CentOS8]nmcli team

    网卡绑定

    • 添加team0链接
    # nmcli connection add type team con-name team0
    # nmcli connection show
    NAME   UUID                                  TYPE      DEVICE
    eth1   2e76cb15-18f2-4b4f-b1b4-88be2e76b41d  ethernet  eth1
    team0  2dd5668e-8f29-4ed6-8b4f-c2368022a511  team      nm-team
    eth0   55e201dc-0f9e-44c7-b6ae-da09370e3718  ethernet  eth0
    
    • 将网卡eth0 eth1 加入team0
    # nmcli connection add type team-slave ifname eth0 master team0
    # nmcli connection add type team-slave ifname eth1 master team0
    # nmcli connection show
    NAME             UUID                                  TYPE      DEVICE
    eth1             2e76cb15-18f2-4b4f-b1b4-88be2e76b41d  ethernet  eth1
    team0            2dd5668e-8f29-4ed6-8b4f-c2368022a511  team      nm-team
    eth0             55e201dc-0f9e-44c7-b6ae-da09370e3718  ethernet  eth0
    team-slave-eth0  a9c44f6d-93e6-4ce3-a875-ad8694a4f28a  ethernet  --
    team-slave-eth1  c95e5aab-cc6c-4ba8-972e-c06e606dc0fa  ethernet  --
    
    • 启动team
    # nmcli connection up team-slave-eth0
    # nmcli connection show
    NAME             UUID                                  TYPE      DEVICE
    team0            2dd5668e-8f29-4ed6-8b4f-c2368022a511  team      nm-team
    team-slave-eth0  a9c44f6d-93e6-4ce3-a875-ad8694a4f28a  ethernet  eth0
    team-slave-eth1  c95e5aab-cc6c-4ba8-972e-c06e606dc0fa  ethernet  eth1
    eth0             55e201dc-0f9e-44c7-b6ae-da09370e3718  ethernet  --
    eth1             2e76cb15-18f2-4b4f-b1b4-88be2e76b41d  ethernet  --
    

    • 查看team状态
    # teamdctl nm-team state
    setup:
      runner: roundrobin
    ports:
      eth0
        link watches:
          link summary: up
          instance[link_watch_0]:
            name: ethtool
            link: up
            down count: 0
      eth1
        link watches:
          link summary: up
          instance[link_watch_0]:
            name: ethtool
            link: up
            down count: 0
    
    • 修改IP地址
    # 修改手动模式
    # nmcli connection modify team0 ipv4.method manual
    # 添加IP地址
    # nmcli connection modify team0 ipv4.addresses 172.16.1.134/24
    # 修改网关
    # nmcli connection modify team0 ipv4.gateway 172.16.1.2
    

    END

  • 相关阅读:
    笔记:一篇关于容器和虚拟机的对比
    语义化版本说明脑图
    KiCad EDA 5.1.4 发布了
    KiCad 5.1.4 无法覆铜?
    mac 常用的终端命令
    PC 商城扫描二维码登录
    Git的撤销与回滚
    springboot 集成elasticsearch5.4.3
    redis 缓存类型为map
    基于Elasticsearch 5.4.3的商品搜索系统
  • 原文地址:https://www.cnblogs.com/leoshi/p/12503210.html
Copyright © 2011-2022 走看看