not on top of a bond

Environment

  • Red Hat Enterprise Linux 7
  • NetworkManager

Issue

  • Need an 802.1q VLAN in RHEL 7 when using NetworkManager.

Resolution

  • Remove any existing connection profiles for the interface which will have the VLAN(s). Assuming this interface is eth0:

    # for connection in $(nmcli -t --fields name,device connection | awk -F ":" '($2 ~ "eth0") {print $1}') ; do nmcli connection delete $connection ; done
  • Create a profile for the underlying interface with no IP addressing assigned:

    # nmcli connection add type ethernet ifname eth0 con-name eth0
    # nmcli connection modify eth0 ipv4.method disabled ipv6.method ignore
    # nmcli connection up eth0
  • Create a VLAN on top of eth0 with the IP addressing. The following assumes a VLAN ID of 10. Use either DHCP or set a static IP address:

    ### Using DHCP for IP addressing:
    # nmcli connection add type vlan ifname eth0.10 con-name eth0.10 id 10 dev eth0 ### With a static IP of 192.168.1.10/24 and gateway of 192.168.1.1:
    # nmcli connection add type vlan ifname eth0.10 con-name eth0.10 id 10 dev eth0 ip4 192.168.1.10/24 gw4 192.168.1.1
  • If using static addressing, you may want to also set DNS name server entries:

    # nmcli connection modify eth0.10 ipv4.dns 8.8.8.8

on top of a bond

Environment

  • Red Hat Enterprise Linux 7
  • NetworkManager

Issue

  • Need an 802.1q VLAN on top of a bond in RHEL 7 when using NetworkManager.

Notice

  • There is a bug on RHEL 7.0, and the problem is fixed in RHEL 7.1 kernel.

Resolution

  The following instructions assume that eth0 and eth1 are the names of the interfaces to be used as the bond slaves.

  • Remove any existing connection profiles for the interfaces which will be used as the bond slaves:
# for connection in $(nmcli -t --fields name,device connection | awk -F ":" '($2 ~ "eth{0,1}") {print $1}') ; do nmcli connection delete $connection ; done
# nmcli connection reload
  • Create a bond with no IP addressing assigned:
# nmcli connection add type bond ifname bond0 con-name bond0 mode active-backup miimon 100
# nmcli connection modify bond0 ipv4.method disabled
# nmcli connection modify bond0 ipv6.method ignore # nmcli connection add type bond-slave ifname eth0 con-name eth0 master bond0
# nmcli connection add type bond-slave ifname eth1 con-name eth1 master bond0 # nmcli connection up bond0
  • Create a VLAN on top of bond0 with the IP addressing. The following assumes a VLAN ID of 10. Use either DHCP or set a static IP address:
### Using DHCP for IP addressing:
# nmcli connection add type vlan ifname bond0.10 con-name bond0.10 id 10 dev bond0 ### With a static IP of 192.168.1.10/24 and gateway of 192.168.1.1:
# nmcli connection add type vlan ifname bond0.10 con-name bond0.10 id 10 dev bond0 ip4 192.168.1.10/24 gw4 192.168.1.1
  • If using static addressing, you may want to also set DNS name server entries:
# nmcli connection modify bond0.10 ipv4.dns 8.8.8.8

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

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

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

  2. Create a Team in RHEL7

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

  3. #centos7 设置bond、bridge、vlan

    #centos7 设置bond.bridge.vlan #centos7 设置bond.bridge.vlan # CentOS7中 nmcli命令由NetworkManager提供 # 可以用于设置 ...

  4. 配置bond和vlan

    网卡是光口还是电口的方法ethtool 网卡名字 一看速度二看port是否是firber首先查看需要做bond的物理网卡,如enp130s0f0,enp131s0f0以物理网卡为enp130s0f0, ...

  5. 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 ...

  6. redhat 7.0 配置Bond

    把/etc/sysconfig/network-scripts/目录下的ifcfg-bond*文件手动移动到/tmp目录. 重启网络:systemctl restart NetworkManager ...

  7. Linux进阶之bond链路聚合

    一.简述: 一般来讲,生产环境必须提供7×24小时的网络传输服务.借助于网卡绑定技术,不仅可以提高网络传输速度,更重要的是,还可以确保在其中一块网卡出现故障时,依然可以正常提供网络服务.假设我们对两块 ...

  8. openvswith Frequently Asked Questions

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

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

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

随机推荐

  1. ajax

    常见的HTTP状态码状态码:200 请求成功.一般用于GET和POST方法 OK301 资源移动.所请求资源移动到新的URL,浏览器自动跳转到新的URL Moved Permanently304 未修 ...

  2. Matlab 绘制三维立体图(以地质异常体为例)

    前言:在地球物理勘探,流体空间分布等多种场景中,定位空间点P(x,y,x)的物理属性值Q,并绘制三维空间分布图,对我们洞察空间场景有十分重要的意义. 1. 三维立体图的基本要件: 全空间网格化 网格节 ...

  3. 旺财速啃H5框架之Bootstrap(三)

    好多天没有写了,继续走起 在上一篇<<旺财速啃H5框架之Bootstrap(二)>>中已经把CSS引入到页面中,接下来开始写页面. 首先有些问题要先处理了,问什么你要学boot ...

  4. [C#] C# 知识回顾 - 异常介绍

    异常介绍 我们平时在写程序时,无意中(或技术不够),而导致程序运行时出现意外(或异常),对于这个问题, C# 有专门的异常处理程序. 异常处理所涉及到的关键字有 try.catch 和 finally ...

  5. 浅谈 LayoutInflater

    浅谈 LayoutInflater 版权声明:本文为博主原创文章,未经博主允许不得转载. 微博:厉圣杰 源码:AndroidDemo/View 文中如有纰漏,欢迎大家留言指出. 在 Android 的 ...

  6. 【C#公共帮助类】 Utils 10年代码,最全的系统帮助类

    为大家分享一下个人的一个Utils系统帮助类,可能有些现在有新的技术替代,自行修改哈~ 这个帮助类主要包含:对象转换处理 .分割字符串.截取字符串.删除最后结尾的一个逗号. 删除最后结尾的指定字符后的 ...

  7. web服务器集群

    概述 集群和分布式都是从集中式进化而来的.分布式和集群会相互合作的,同时的集群和分布式.在这里重点说说集群 集群是什么? 集群能提高单位时间内处理的任务数量,提升服务器性能 有多台服务器去处理任务,但 ...

  8. SSH免密码登录

    每次用SSH登录服务器都要输入密码,次数多了就觉得有些麻烦,反正是自己个人用的电脑,安全应该有保障,如何能直接登录上去而不需要输入密码呢?其实一句话就讲清楚了:把自己公钥放在服务器上. Linux客户 ...

  9. Fedora 22中的日期和时间配置

    Introduction Modern operating systems distinguish between the following two types of clocks: A real- ...

  10. 让Unity NavMesh为我所用

    Unity里面整合了一个NavMesh功能,虽然让人又爱又恨. 但当你在其他地方需要这个NavMesh的数据时,就更让人欲罢不能了. 比如说服务器需要Unity的NavMesh数据时. 比如说你想将U ...