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. session实现购物车

    为实现简单的购物功能(购物车添加.账户查看.购物车商品删除.实时的购物商品数量及价格的计算显示.购物车商品数量可手动输入等),用session实现了一简单的以php语言为基础.连接MySQL数据库的购 ...

  2. 编写高质量代码:改善Java程序的151个建议(第5章:数组和集合___建议75~78)

    建议75:集合中的元素必须做到compareTo和equals同步 实现了Comparable接口的元素就可以排序,compareTo方法是Comparable接口要求必须实现的,它与equals方法 ...

  3. java字符乱码

    在java中处理字符时,经常会发生乱码,而主要出现的地方在读取文本文件时发生,或者是写入到文件中,在其他地方打开乱码. 如下例子: BufferedReader br = null; try { br ...

  4. C# MVC 5 - 生命周期(应用程序生命周期&请求生命周期)

    本文是根据网上的文章总结的. 1.介绍 本文讨论ASP.Net MVC框架MVC的请求生命周期. MVC有两个生命周期,一为应用程序生命周期,二为请求生命周期. 2.应用程序生命周期 应用程序生命周期 ...

  5. HTML5 progress和meter控件

    在HTML5中,新增了progress和meter控件.progress控件为进度条控件,可表示任务的进度,如Windows系统中软件的安装.文件的复制等场景的进度.meter控件为计量条控件,表示某 ...

  6. VisualStudio2013 如何打开之前版本开发的(.vdproj )安装项目

    当你的项目使用早于 visualstudio2013 的版本开发并且使用 Visual Studio Installer 制作安装项目时,在升级至 VS2013 后会发现新安装项目无法打开, VS20 ...

  7. QT5利用chromium内核与HTML页面交互

    在QT5.4之前,做QT开发浏览器只能选择QWebkit,但是有过使用的都会发现,这个webkit不是出奇的慢,简直是慢的令人发指,Release模式下还行,debug下你就无语了,但是webkit毕 ...

  8. spring注解源码分析--how does autowired works?

    1. 背景 注解可以减少代码的开发量,spring提供了丰富的注解功能.我们可能会被问到,spring的注解到底是什么触发的呢?今天以spring最常使用的一个注解autowired来跟踪代码,进行d ...

  9. 每天一个设计模式-7 生成器模式(Builder)

    每天一个设计模式-7 生成器模式(Builder) 一.实际问题 在讨论工厂方法模式的时候,提到了一个导出数据的应用框架,但是并没有涉及到导出数据的具体实现,这次通过生成器模式来简单实现导出成文本,X ...

  10. SAP CRM 性能小技巧

    导言 本页面打算收集SAP CRM实施中可以用于避免性能问题的注意事项,重要的事项会由图标标识. 如果你有其他的技巧想要说出来,别犹豫! 性能注意事项 通用 缓存读取类访问,特别是在性能关键的地方,比 ...