转:https://ask.openstack.org/en/question/4276/what-is-the-internal-interface-and-port-for-on-openvswitch/

The internal interface and port in each bridge is both an implementation requirement and exists for historical reasons relating to the implementation of Linux bridging module.

This is referred to as the "local" interface and port. In newer releases of OpenVSwitch, this message has been changed to reflect this, e.g.:

$ovs-vsctl del-port br-eth1
ovs-vsctl: cannot delete port br-eth1 because it is the local port for bridge br-eth1 (deleting this port requires deleting the entire bridge)

The purpose is to hold the IP for the bridge itself (just like some physical bridges do). This is also useful in cases where a bridge has a physical interface that would normally have its own IP. Since assigning a port to an IP wouldn't happen in a physical bridge, assigning an IP to the physical interface would be incorrect, as packets would stop at the port and not be passed across the bridge.

This usage is shown in the documenation under the FAQ:

Q: I created a bridge and added my Ethernet port to it, using commands like these:

   ovs-vsctl add-br br0
ovs-vsctl add-port br0 eth0

and as soon as I ran the "add-port" command I lost all connectivity through eth0. Help!

A: A physical Ethernet device that is part of an Open vSwitch bridge should not have an IP address. If one does, then that IP address will not be fully functional.

You can restore functionality by moving the IP address to an Open vSwitch "internal" device, such as the network device named after the bridge itself. For example, assuming that eth0's IP address is 192.168.128.5, you could run the commands below to fix up the situation:

   ifconfig eth0 0.0.0.0
ifconfig br0 192.168.128.5

(If your only connection to the machine running OVS is through the IP address in question, then you would want to run all of these commands on a single command line, or put them into a script.) If there were any additional routes assigned to eth0, then you would also want to use commands to adjust these routes to go through br0.

If you use DHCP to obtain an IP address, then you should kill the DHCP client that was listening on the physical Ethernet interface (e.g. eth0) and start one listening on the internal interface (e.g. br0). You might still need to manually clear the IP address from the physical interface (e.g. with "ifconfig eth0 0.0.0.0").

There is no compelling reason why Open vSwitch must work this way. However, this is the way that the Linux kernel bridge module has always worked, so it's a model that those accustomed to Linux bridging are already used to. Also, the model that most people expect is not implementable without kernel changes on all the versions of Linux that Open vSwitch supports.

By the way, this issue is not specific to physical Ethernet devices. It applies to all network devices except Open vswitch "internal" devices.

ovs-vsctl set Interface eth0 type=internal

What is the "internal" interface and port for on Openvswitch?的更多相关文章

  1. 正确openvSwitch不同种类port认识

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdm9uemhvdWZ6/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA ...

  2. OpenvSwitch Port Mirror in OpenStack Neutron

    前言 最近使用搭建了一个基于VXLAN的OpenStack 环境,发现要去dump ovs interfaces的包其实还是蛮麻烦的, 经过多番努力,找到了如下的在openstack下网络环境的一些t ...

  3. OpenvSwitch代码分析之bridge和port

    ovs-vsctl add-br br0 会在数据库里面加入新bridge的信息ovs-vsctl add-port br0 eth0 会在数据库里面加入新的port信息 void bridge_ru ...

  4. C#中public、private、protected、internal、protected internal (转载)

    在C#语言中,共有五种访问修饰符:public.private.protected.internal.protected internal.作用范围如下表:访问修饰符 说明public 公有访问.不受 ...

  5. public类型中internal成员

    今天遇到一问题,找到下面的两篇文章,研究比较深入,特转了一下, 最近除了搞ASP.NET MVC之外,我也在思考一些编程实践方面的问题.昨天在回家路上,我忽然对一个问题产生了较为清晰的认识.或者说,原 ...

  6. 能否不同udp socket绑定到同一IP地址和port

    http://www.softlab.ntua.gr/facilities/documentation/unix/unix-socket-faq/unix-socket-faq-4.html http ...

  7. openstack网络(neutron)模式之GRE的基本原理

    neutron网络目的是为OpenStack云更灵活的划分网络,在多租户的环境下提供给每个租户独立的网络环境. neutron混合实施了第二层的VLAN和第三层的路由服务,它可为支持的网络提供防火墙, ...

  8. 学习OpenStack之(6):Neutron 深入学习之 OVS + GRE 之 Compute node 篇

    0.环境 硬件环境见上一篇博客:学习OpenStack之(5):在Mac上部署Juno版本OpenStack 四节点环境 OpenStack网络配置:一个tenant, 2个虚机 Type drive ...

  9. PHP store session with couchbase

    如何用couchbase存储session 有两种常见方式:1.采用memcache模式连接couchbase 只需两句修改: ini_set('session.save_handler', 'mem ...

随机推荐

  1. Django objects.values

    values(*fields) 返回一个ValuesQuerySet —— QuerySet 的一个子类,迭代时返回字典而不是模型实例对象. 每个字典表示一个对象,键对应于模型对象的属性名称. 下面的 ...

  2. 当当网-前端project师測试题

                                     前端project师測试题(笔试时间20分钟.面试时间20分钟)   一.笔试 1.基础问题 (1)前端页面有哪三层构成,各自是什么? ...

  3. Powershell split file

    #网上所得非原创 function split($inFile, $outPrefix, [Int32] $bufSize){ $stream = [System.IO.File]::OpenRead ...

  4. Linux学习总结(十三)文本编辑器 vim

    vim是vi的升级版,会根据文本属性带色彩显示,具体用法如下: 一般模式 : 1.光标定位: 左右移动一个字符, h l上下移动一个字符, k j左右下上 ,左右在两边,下上在中间这样记光标定位行首 ...

  5. 使用jsonp获取天气情况

    在这里使用的是百度天气: 整体代码如下: js: <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js ...

  6. 相机姿态估计(Pose Estimation)

    (未完待续.....) 根据针孔相机模型,相机成像平面一点的像素坐标p和该点在世界坐标系下的3D坐标P有$p=KP$的关系,如果用齐次坐标表示则有: $$dp=KP$$ 其中d是空间点深度(为了将p的 ...

  7. java两种反射的区别 - Class.forName()和ClassLoader.loadClass()

    在理解这两种反射机制之前,需要弄清楚java类的加载机制. 装载:通过类的全限定名获取二进制字节流(二进制的class文件),将二进制字节流转换成方法区中的运行时数据结构,在内存中生成Java.lan ...

  8. Linux 文件系统 的 学习

    学习参考大神:http://www.cnblogs.com/yyyyy5101/articles/1901842.html  总结:简介 http://linux.chinaunix.net/tech ...

  9. winform 实现定位

    如何在winform中 导入地图实现定位功能    ? 从网上下个BaiDuMap.htm, 就是个js文件 在form中加入webBrowser控件,然后在窗体的加载事件中写入如下代码 webBro ...

  10. Python 学习笔记(十一)Python语句(三)

    While 循环语句 用于循环执行程序,即在某条件下,循环执行某段程序,以处理需要重复处理的相同任务. 语法: while 判断条件: 执行语句…… 执行语句可以是单个语句或语句块.判断条件可以是任何 ...