日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Configure a VLAN on top of a team with NetworkManager (nmcli) in RHEL7

發(fā)布時間:2025/3/17 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Configure a VLAN on top of a team with NetworkManager (nmcli) in RHEL7 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

2019獨角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>

SOLUTION VERIFIED

  • September 13 2016?KB1248793

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:ens10link watches:link summary: upinstance[link_watch_0]:name: ethtoollink: updown count: 0ens15link watches:link summary: upinstance[link_watch_0]:name: ethtoollink: updown 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:
    • Networking Guide: Configure Network Teaming

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"

?

轉(zhuǎn)載于:https://my.oschina.net/u/3362827/blog/1635752

總結(jié)

以上是生活随笔為你收集整理的Configure a VLAN on top of a team with NetworkManager (nmcli) in RHEL7的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。