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 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 eth0Create 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.1If 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的更多相关文章
- 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 ...
- Create a Team in RHEL7
SOLUTION VERIFIED September 13 2016 KB2620131 Environment Red Hat Enterprise Linux 7 NetworkManager ...
- #centos7 设置bond、bridge、vlan
#centos7 设置bond.bridge.vlan #centos7 设置bond.bridge.vlan # CentOS7中 nmcli命令由NetworkManager提供 # 可以用于设置 ...
- 配置bond和vlan
网卡是光口还是电口的方法ethtool 网卡名字 一看速度二看port是否是firber首先查看需要做bond的物理网卡,如enp130s0f0,enp131s0f0以物理网卡为enp130s0f0, ...
- 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 ...
- redhat 7.0 配置Bond
把/etc/sysconfig/network-scripts/目录下的ifcfg-bond*文件手动移动到/tmp目录. 重启网络:systemctl restart NetworkManager ...
- Linux进阶之bond链路聚合
一.简述: 一般来讲,生产环境必须提供7×24小时的网络传输服务.借助于网卡绑定技术,不仅可以提高网络传输速度,更重要的是,还可以确保在其中一块网卡出现故障时,依然可以正常提供网络服务.假设我们对两块 ...
- openvswith Frequently Asked Questions
Open vSwitch <http://openvswitch.org> 参考地址:http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=ope ...
- CentOS 7 网卡子接口的创建
OS:CentOS 7 在linux上创建vlan需要加载802.1q模块: 1.检测OS是否已经加载802.1q模块 [root@controller ~]# modinfo 8021q filen ...
随机推荐
- .net点选验证码实现思路分享
哈哈好久没冒泡了,最进看见点选验证码有点意思,所以想自己写一个. 先上效果图 如果你被这个效果吸引了就请继续看下去. 贴代码前先说点思路: 1.要有一个汉字库,并按字形分类.(我在数据库里是安部首分类 ...
- Android SwipeRefreshLayout 下拉刷新——Hi_博客 Android App 开发笔记
以前写下拉刷新 感觉好费劲,要判断ListView是否滚到顶部,还要加载头布局,还要控制 头布局的状态,等等一大堆.感觉麻烦死了.今天学习了SwipeRefreshLayout 的用法,来分享一下,有 ...
- Restful资源文章
理解RESTful架构 RESTful API设计指南 RESTful架构详解 NodeJs的RESTful API
- iOS开发系列--打造自己的“美图秀秀”
--绘图与滤镜全面解析 概述 在iOS中可以很容易的开发出绚丽的界面效果,一方面得益于成功系统的设计,另一方面得益于它强大的开发框架.今天我们将围绕iOS中两大图形.图像绘图框架进行介绍:Quartz ...
- Jquery mobiscroll 移动设备(手机)wap日期时间选择插件以及滑动、滚动插件
Jquery Mobiscroll是一个用于触摸设备(Android phones, iPhone, iPad, Galaxy Tab)的日期和时间选择器jQuery插件.以及各种滑动插件 可以让用户 ...
- Node-Webkit打包
1.node-webkit是什么? NW.js is an app runtime based on Chromium and node.js. You can write native apps i ...
- javascript:逆波兰式表示法计算表达式结果
逆波兰式表示法,是由栈做基础的表达式,举个例子: 5 1 2 + 4 * + 3 - 等价于 5 + ((1 + 2) * 4) - 3 原理:依次将5 1 2 压入栈中, 这时遇到了运算符 + ...
- C#创建、安装、卸载、调试Windows Service(Windows 服务)的简单教程
前言:Microsoft Windows 服务能够创建在它们自己的 Windows 会话中可长时间运行的可执行应用程序.这些服务可以在计算机启动时自动启动,可以暂停和重新启动而且不显示任何用户界面.这 ...
- Java compiler level does not match解决方法
从别的地方导入一个项目的时候,经常会遇到eclipse/Myeclipse报Description Resource Path Location Type Java compiler level d ...
- Lind.DDD.LindMQ~关于持久化到Redis的消息格式
回到目录 关于持久化到Redis的消息格式,主要是说在Broker上把消息持久化的过程中,需要存储哪些类型的消息,因为我们的消息是分topic的,而每个topic又有若干个queue组成,而我们的to ...