SOLUTION VERIFIED

Environment

  • Red Hat Enterprise Linux 7
  • NetworkManager
  • teamd

Issue

  • Would like to configure a VLANs with Teaming in RHEL 7.
  • Need to know how to make VLANs like team0.10 for a team0 device with RHEL and NetworkManager.

Resolution

  For steps to use Teaming without VLANs, please see How to create a Team 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:

    # nmcli connection add type team con-name myteam ifname team0 config '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}'
  • Disable IPv4 and IPv6 addressing for the team connection profile. The connection must be brought up again for these changes to take effect. In the example below the connection profile name is myteam:

    # nmcli connection modify myteam ipv4.method disable ipv6.method ignore
    # nmcli connection up myteam
  • 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
  • Create the VLAN connection profiles which will be on top of the new team device. The dev parameter must refer to the team device name, not the team profile name. The following command will create a connection profile named myteam-vlan123 which will provide VLAN ID 123 on top of device team0:

    ### With static IP addressing:
    # nmcli connection add type vlan con-name myteam-vlan123 ifname team0.123 id 123 dev team0 ip4 192.168.0.100/24 gw4 192.168.0.1 ### With DHCP addressing:
    # nmcli connection add type vlan con-name myteam-vlan123 ifname team0.123 id 123 dev team0
  • Other connection properties such as DNS servers, search domains, and static routes can be set for the VLAN profiles after they have 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"

Configure a VLAN on top of a team with NetworkManager (nmcli) in RHEL7的更多相关文章

  1. Configure a VLAN (on top of a bond) with NetworkManager (nmcli) in RHEL7

    not on top of a bond Environment Red Hat Enterprise Linux 7 NetworkManager Issue Need an 802.1q VLAN ...

  2. Create a Team in RHEL7

    SOLUTION VERIFIED September 13 2016 KB2620131 Environment Red Hat Enterprise Linux 7 NetworkManager ...

  3. how to configure team on liunx(RHEL7.x/Centos7.x)

    #install team sofeware yum install teamd -y #check team configuration nmcli con show #Next we create ...

  4. Set up VLAN (802.1q) tagging on a network interface?

    SOLUTION VERIFIED October 13 2015 KB39674 KB741413 environment Red Hat Enterprise Linux 4 Red Hat En ...

  5. Linux系统nmtui/nmcli绑定双网卡为team

    今天给大家带来图形化界面网络配置工具—nmtui的使用方法,可以省去敲命令的繁琐,较少误操作,结果更加直观. 小知识: nmtui:Network Manager Text User Interfac ...

  6. openvswith Frequently Asked Questions

    Open vSwitch <http://openvswitch.org> 参考地址:http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=ope ...

  7. Windows Server 2012 NIC Teaming介绍及注意事项

    Windows Server 2012 NIC Teaming介绍及注意事项 转载自:http://www.it165.net/os/html/201303/4799.html Windows Ser ...

  8. CentOS 7 网卡子接口的创建

    OS:CentOS 7 在linux上创建vlan需要加载802.1q模块: 1.检测OS是否已经加载802.1q模块 [root@controller ~]# modinfo 8021q filen ...

  9. FIM 2010: Kerberos Authentication Setup

    The goal of this article is to provide some background information regarding the Kerberos related co ...

随机推荐

  1. .NetCore MVC中的路由(2)在路由中使用约束

    p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 120%; orphans: 2; widows: 2 ...

  2. Base64编码

    Base64编码 写在前面 今天在做一个Android app时遇到了一个问题:Android端采用ASE对称加密的数据在JavaWeb(jre1.8.0_7)后台解密时,居然解密失败了!经过测试后发 ...

  3. vue入门学习(基础篇)

    vue入门学习总结: vue的一个组件包括三部分:template.style.script. vue的数据在data中定义使用. 数据渲染指令:v-text.v-html.{{}}. 隐藏未编译的标 ...

  4. Android SDK 在线更新镜像服务器资源

    本文转自:http://blog.kuoruan.com/24.html.感谢原作者. 什么是Android SDK SDK:(software development kit)软件开发工具包.被软件 ...

  5. 【干货分享】流程DEMO-资产请购单

    流程名: 资产请购  业务描述: 流程发起时,会检查预算,如果预算不够,流程必须经过总裁审批,如果预算够用,将发起流程,同时占用相应金额的预算,但撤销流程会释放相应金额的预算.  流程相关文件: 流程 ...

  6. iOS之开发中常用的颜色及其对应的RGB值

      R G B 值   R G B 值   R G B 值 黑色 0 0 0 #000000 黄色 255 255 0 #FFFF00 浅灰蓝色 176 224 230 #B0E0E6 象牙黑 41 ...

  7. Android开发学习—— Fragment

    #Fragment* 用途:在一个Activity里切换界面,切换界面时只切换Fragment里面的内容* 生命周期方法跟Activity一致,可以理解把其为就是一个Activity* 定义布局文件作 ...

  8. 软件工程(C编码实践篇)学习心得

    孟繁琛 + 原创作品转载请注明出处 + <软件工程(C编码实践篇)>MOOC课程 http://mooc.study.163.com/course/USTC-1000002006 软件工程 ...

  9. Android NDK debug 方法

    最近又频繁遇到 NDK 的错误,记录一下debug调试的一些经验,以备后续查看 一般来说,在Android Studio中的Monitor中将过滤器的 LOG TAG 设置为 "DEBUG& ...

  10. PC虚拟现实应用的性能分析与优化:从CPU角度切入

    如今,虚拟现实 (VR) 技术正日益受到欢迎,这主要得益于遵循摩尔定律的技术进步让这一全新体验在技术上成为可能.尽管虚拟现实能给用户带来身临其境般的超凡体验,但相比传统应用,其具有双目渲染.低延迟.高 ...