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. Java MyBatis 插入数据库返回主键

    最近在搞一个电商系统中由于业务需求,需要在插入一条产品信息后返回产品Id,刚开始遇到一些坑,这里做下笔记,以防今后忘记. 类似下面这段代码一样获取插入后的主键 User user = new User ...

  2. Yii1.1的验证规则

    在Yii1.1的数据验证是由CValidator完成,在CValidator中提供了各种基本的验证规则 <?php public static $builtInValidators=array( ...

  3. WPF 微信 MVVM 【续】修复部分用户无法获取列表

    看过我WPF 微信 MVVM这篇文章的朋友,应该知道我里面提到了我有一个小号是无法获取列表的,始终也没找到原因. 前两天经过GitHub上h4dex大神的指导,知道了原因,是因为微信在登录以后,web ...

  4. 前端常用的WindowsCMD命令

    前面的话   在网上找了一些关于命令提示符CMD的资料,但是很多资料都是把所有的功能罗列出来,大部分都不会用到.所以,自己把常用的CMD命令总结如下,方便查阅 操作类 help 列出所有支持的指令及说 ...

  5. 获取微软原版“Windows 10 推送器(GWX)” 卸载工具

    背景: 随着Windows 10 免费更新的结束,针对之前提供推送通知的工具(以下简称GWX)来说使命已经结束,假设您还未将Windows 8.1 和Windows 7 更新到Windows 10 的 ...

  6. 【HanLP】资料链接汇总

    Java中调用HanLP配置 HanLP自然语言处理包开源官方文档 了解HanLP的全部 自然语言处理HanLP 开源自由的汉语言处理包主页 GitHub源码 基于hanLP的中文分词详解-MapRe ...

  7. 基于NPOI的Excel数据导入

    从Excel导入数据最令人头疼的是数据格式的兼容性,特别是日期类型的兼容性.为了能够无脑导入日期,折腾了一天的NPOI.在经过测试确实可以导入任意格式的合法日期后,写下这篇小文,与大家共享.完整代码请 ...

  8. wireshark 相关提示

    Packet size limited during capture      提示说明标记的包没有抓全,在某些操作系统中,默认只抓96个字节,tcpdump中有"-s"参数可用于 ...

  9. How to accept Track changes in Microsoft Word 2010?

    "Track changes" is wonderful and remarkable tool of Microsoft Word 2010. The feature allow ...

  10. 绿色版的Linux.NET——“Jws.Mono”

    Linux.NET环境的搭建,不仅是一项比较耗时的事情,同时也是一项略显复杂繁琐的事情.特别是对于近期的几个Mono版本,由于官方所提供的源码包中出现代码文件的缺失,这总让我们的付出变得徒劳.另外一方 ...