最好的分析FlatDHCPManager的源文,有机会把这篇翻译了

===========================

Over time, networking in OpenStack has been evolving from a simple, barely usable model, to one that aims to support full customer isolation. To address different user needs, OpenStack comes with a handful of “network managers”. A network manager defines the network topology for a given OpenStack deployment. As  of the current stable “Essex” release of OpenStack, one can choose from three different types of network managers: FlatManager, FlatDHCPManager, VlanManager. I’ll discuss the first two of them here.

FlatManager and FlatDHCPManager have lots in common. They both rely on the concept of bridged networking, with a single bridge device. Let’s consider her the example of a multi-host network; we’ll look at a single-host use case in a subsequent post.

For each compute node, there is a single virtual bridge created, the name of which is specified in the Nova configuration file using this option:

flat_network_bridge=br100

All the VMs spawned by OpenStack get attached to this dedicated bridge.

Network bridging on OpenStack compute node

This approach (single bridge per compute node) suffers from a common known limitation of bridged networking: a linux bridge can be attached only to a signle physical interface on the host machine (we could get away with VLAN interfaces here, but this is not supported by FlatDHCPManager and FlatManager). Because of this, there is no L2 isolation between hosts. They all share the same ARP broadcast domain.

The idea behind FlatManager and FlatDHCPManager is to have one “flat” IP address pool defined throughout the cluster. This address space is shared among all  user instances, regardless of which tenant they belong to. Each tenant is free to grab whatever address is available in the pool.

FlatManager

FlatManager provides the most primitive set of operations. Its role boils down just to attaching the instance to the bridge on the compute node. By default, it does no IP configuration of the instance. This task is left for the systems administrator and can be done using some external DHCP server or other means.

FlatManager network topology

FlatDHCPManager

FlatDHCPManager plugs  a given instance into the bridge, and on top of that provides a DHCP server to boot up from.

On each compute node:

  • the network bridge is given an address from the “flat” IP pool
  • a dnsmasq DHCP server process is spawned and listens on the bridge interface IP
  • the bridge acts as the default gateway for all the instances running on the given compute node

FlatDHCPManager – network topology

As for dnsmasq, FlatDHCPManager creates a static lease file per compute node to guarantee the same IP address for the instance over time. The lease file is constructed based on instance data from the Nova database, namely MAC, IP and hostname. The dnsmasq server is supposed to hand out addresses only to instances running locally on the compute node.  To achieve this, instance data to be put into DHCP lease file  are filtered by the ‘host’ field from the ‘instances’ table.  Also, the default gateway option in dnsmasq is set to the bridge’s IP address. On the diagram below you san see that it will be given a different default gateway depending on which compute node the instance lands.

Network gateways for instances running on different compute nodes

Below I’ve shown the routing table from vm_1 and for vm_3 – each of them has a different default gateway:

root@vm_1:~# route -n
Kernel IP routing table
Destination    Gateway     Genmask Flags Metric Ref Use Iface
0.0.0.0        10.0.0.1     0.0.0.0 UG     0   0   0 eth0

root@vm_3:~# route -n
Kernel IP routing table
Destination    Gateway     Genmask Flags Metric Ref Use Iface
0.0.0.0        10.0.0.4     0.0.0.0 UG     0   0   0 eth0

By default, all the VMs in the “flat” network can see one another regardless of which tenant they belong to. One can enforce instance isolation by applying the following  flag in nova.conf:

allow_same_net_traffic=False

This configures  IPtables policies to prevent any traffic between instances (even inside the same tenant), unless it is unblocked in a security group.

From practical standpoint, “flat” managers seem to be usable for homogenous,  relatively small, internal  corporate clouds where there are no tenants at all, or their number is very limited.  Typically, the usage scenario will be a dynamically scaled web server farm or an HPC cluster. For this purpose it is usually sufficient to have a single IP address space where IP address management is offloaded to some central DHCP server or is managed in a simple way by OpenStack’s dnsmasq. On the other hand, flat networking can struggle with scalability, as all the instances share the same L2 broadcast domain.

These issues (scalability + multitenancy) are in some ways addressed by VlanManager, which will be covered in an upcoming blog posts.

转载于:https://www.cnblogs.com/horizonli/p/5172109.html

OpenStack Networking – FlatManager and FlatDHCPManager相关推荐

  1. OpenStack Networking网络

    OpenStack Networking允许n你创建和管理网络对象,例如网络.子网和端口,其它OpenStack服务可以使用它们.插件可以实现为服务不同的网络设备和软件,为OpenStack架构和部署 ...

  2. openstack云计算平台 2(计算服务、Networking 服务、命令行方式启动实例)

    目录 一.组件3-计算服务 1.简介 2.安装并配置控制节点 3.安装并配置计算节点 4.验证操作 二.组件4-Networking 服务 1.简介 2.安装并配置控制节点 3.控制节点配置网络选项- ...

  3. Centos 安装OpenStack

    shell命令行 配置文件内容 数据库命令 准备工作: 配置网络 1.controller node # hostname controller # vi /etc/sysconfig/network ...

  4. OpenStack 应答文件简单翻译

    此文章转载自https://blog.csdn.net/hoobui/article/details/80841548 [general] #安装在服务器上的公钥的路径.如果可用密钥没有 #已安装在远 ...

  5. vmware vcenter 5.5 + OpenStack Havana vlan 网络部署

    OS: RHEL6.5 OpenStack: Havana Icehouse Controller: KVM Compute: Vmware vcenter 5.5 1. 安装vcenter以及下载 ...

  6. 使用RDO安装havana、icehouse版本的openstack(centos)

    先安装操作系统:Centos6.4 havana Step 1: Software repositories sudo yum install -y http://rdo.fedorapeople.o ...

  7. openstack网络服务neutron

    一.环境准备 1.虚拟机准备 IP地址 主机名 操作系统 192.168.56.11 linux-node1 CentOS7 192.168.56.12 linux-node2 CentOS7 其中, ...

  8. OpenStack(Kilo版本)基础架构学习笔记

    一.OpenStack项目简介 OpenStack是一个由NASA(美国国家航空航天局)和Rackspace合作研发并发起的,以Apache许可证授权的自由软件和开放源代码项目. OpenStack  ...

  9. Openstack组件部署 — Netwotking service组件介绍与网络基本概念

    目录 目录 前文列表 Openstack Networking serivce 基本的Neutron概念 Neutron的抽象对象 网络networks 子网subnets 路由器routers 端口 ...

最新文章

  1. 联邦学习最新研究趋势
  2. vue 集成html5 plus - 懒懒de尐彪 - 博客园
  3. eplan怎样创建和修改图框_EPLAN标题页及图框的设计
  4. 图论 —— AOE 网与关键路径
  5. 任正非:不要过度消费客户及民众对我们的同情与支持
  6. python随机数调用
  7. android-circlebutton介绍
  8. org.hibernate.NonUniqueObjectException:
  9. Url传值的Get method and Post method
  10. 读《About Face 4 交互设计精髓》2
  11. 2018年烽火通信c语言笔试题,2018-9-19 烽火通信C++面经
  12. 0xC0000005: 读取位置 0x00000000 时发生访问冲突
  13. 支持自动查找和选择的ComboBox的具体实现
  14. Tesseract学习(一)
  15. 第25章 JDBC核心技术第3节
  16. 应用程序日志管理工具
  17. sqlserver数据库练习3
  18. Python实现简单的爬虫
  19. 运算放大器的datasheet参数介绍
  20. 我的java自学经历,土木转行java的

热门文章

  1. react 动态添加组件属性_React的组件动态参数使用Underscore和Context来传递
  2. php get 传循环出来的参数_简单学习PHP中的反射
  3. 服务器跟域名解析失效,dns根域名解析失败有什么影响
  4. 表面粗糙度的基本评定参数是_表面粗糙度100个常见问题
  5. 小米鸿蒙最新信息,小米新机将搭载鸿蒙系统?还得等鸿蒙进一步的消息!
  6. Tomcat的虚拟目录映射常用的几种方式
  7. easyUI 的combobox如何获取除valueField和textField外的三个值
  8. layUI使用table.reload时出现了两次请求问题
  9. mysql5.6.19安装图解_mysql5.6.19安装说明
  10. JAVA→封装类Wrapper、字符串String及其方法、==与equals()、正则表达式、StringBuilder与StringBuffer、内嵌类