首页 技术 正文
技术 2022年11月8日
0 收藏 496 点赞 1,338 浏览 2928 个字

SOLUTION VERIFIED

Environment

  • Red Hat Enterprise Linux 7
  • NetworkManager
  • teamd

Issue

  • Would like to configure a basic Team in RHEL 7.
  • Need to know how to make team0 with RHEL.

Resolution

  For steps to use Teaming with VLANs, please see How to configure a VLAN on top of a team with NetworkManager (nmcli) in RHEL7.

  • Create the team interface connection profile with nmcli. The following command will create a connection profile named myteam which will provide a team device named team0. The team mode will be activebackup and ethtool link monitoring will be used:

    ### With static IP addressing:
    # nmcli connection add type team con-name myteam ifname team0 config '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}' ip4 192.168.0.100/24 gw4 192.168.0.1### With DHCP addressing:
    # nmcli connection add type team con-name myteam ifname team0 config '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}'
  • Create a profile for each team port (slave). The master parameter must refer to the team device name, not the team profile name. In the example below the interfaces ens10 and ens15 are added to team0:

    # nmcli connection add type team-slave con-name myteam-port1 ifname ens10 master team0
    # nmcli connection add type team-slave con-name myteam-port2 ifname ens15 master team0
  • Confirm the team is working as expected with the teamdctl program. At a minimum, ensure the correct runner is in use or connectivity may not work:

    # teamdctl team0 state
    setup:
    runner: activebackup
    ports:
    ens10
    link watches:
    link summary: up
    instance[link_watch_0]:
    name: ethtool
    link: up
    down count: 0
    ens15
    link watches:
    link summary: up
    instance[link_watch_0]:
    name: ethtool
    link: up
    down count: 0
    runner:
    active port: ens10
  • Other connection properties such as DNS servers, search domains, and static routes can be set after the profile has been created. Use the nmcli connection show command to see all the available properties for a connection profile. Use the nmcli connection modify command to set any given property. All properties and their possible values are described in the nm-settings man page.

    # nmcli connection show <profile name># nmcli connection modify <profile name> <property> <value>

Root Cause

  • Please see the RHEL 7 Networking Guide chapter on Teaming and the teamd.conf man page for more information on configuring Teaming and the different modes and configuration options which are available:

Diagnostic Steps

  • It is best to remove or disable any existing connection profiles which correspond to the interfaces to be used in the team. This ensures the right connection profile is always used:

    • The following command will list all the existing connection profiles (connection.id) and the interface (connection.interface-name, if set) they are associated with. If there are any matches for the interfaces to be used, delete the matching profile (or set the profile’s connection.autoconnect property to no and note the profile name so it is not accidentally reused):
    # for connection in $(nmcli -t --fields uuid con) ; do echo ; nmcli con show uuid $connection | egrep "connection.id|connection.interface-name" ; done
    • If an existing profile needs to be removed, do so with the following command where $PROFILE is the connection.id seen in the output from the command above:
    # nmcli connection del "$PROFILE"
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,085
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,560
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,409
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,182
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,819
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,902