Why is IPAM important for Neutron?

•No VM connectivity without a valid IP assigned
•Duplicate subnets/IPs in shared or routable space are disastrous
Especially relevant when using provider networks
•Allocation of subnets for large scale deployments can be difficult and time consuming
Especially for Tenants using non-overlapping addresses
Errors in address planning and quota allocation are difficult to reverse
•Users have multiple/heterogeneous environments
Rrack IPs/subnets across multiple clusters
Reclaim IPs/subnets that are no longer in use
 
 

Subnet Allocation 

•What was introduced in Kilo?
̶Subnet Pool - Range of addresses from which subnets may be allocated
-May be exclusive to a tenant or shared
-Enforces a quota for shared pools
-Simplifies centralized management of subnet allocations to tenants
-Example: 10.0.0.0/16 from which smaller subnets (/20, /23, /24, etc.) are allocated
•How does it work?
̶Pools can be managed via the API or neutron client
̶Optionally specify a pool when allocating a subnet
-Leave out the CIDR and just pass a prefix length (or use the default prefix length)
-Specify a CIDR if you want, as long as it fits in the pool without overlap

1. 创建一个subnet pool,一共256个IP,203.0.113.0/24

admin> neutron subnetpool-create --shared --pool-prefix 203.0.113.0/24 \
--default-prefixlen 26 demo-subnetpool4
Created a new subnetpool:
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| default_prefixlen | 26 |
| default_quota | |
| id | 670eb517-4fd3-4dfc-9bed-da2f99f85c7a |
| ip_version | 4 |
| max_prefixlen | 32 |
| min_prefixlen | 8 |
| name | demo-subnetpool4 |
| prefixes | 203.0.113.0/24 |
| shared | True |
| tenant_id | c597484841ff4a8785804c62ba81449b |
+-------------------+--------------------------------------+
$ neutron subnetpool-list
+---------+------------------+------------------------------------+-------------------+
| id | name | prefixes | default_prefixlen |
+---------+------------------+------------------------------------+-------------------+
| 670e... | demo-subnetpool4 | [u'203.0.113.0/24'] | 26 |
| 7b69... | demo-subnetpool | [u'2001:db8:1:2', u'2001:db8:1:2'] | 64 |
+---------+------------------+------------------------------------+-------------------+

2. subnet 32-25=7, 2^7=128个IP, 已经分配出的IP subnet不能再分配了, Subnet pool之外的ip不能分配

$ neutron subnet-create --name demo-subnet1 --ip_version 4 \
--subnetpool demo-subnetpool4 demo-network1
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| id | 6e38b23f-0b27-4e3c-8e69-fd23a3df1935 |
| ip_version | 4 |
| cidr | 203.0.113.0/26 |
| name | demo-subnet1 |
| network_id | b5b729d8-31cc-4d2c-8284-72b3291fec02 |
| subnetpool_id | 670eb517-4fd3-4dfc-9bed-da2f99f85c7a |
| tenant_id | a8b3054cc1214f18b1186b291525650f |
+-------------------+--------------------------------------+

3. 再分配一个128个ip的subnet,这时pool的ip分配完了。

4. 再从该pool分配失败,

5. 再从该pool中分配时,自动找到合适的ip段。

增加pool的ip池,只能增大不能减小,而且可以添加其他断的subnet ip。

admin> neutron subnetpool-update --pool-prefix 203.0.113.0/24 \
--pool-prefix 198.51.100.0/24 demo-subnetpool4
Updated subnetpool: demo-subnetpool4
admin> neutron subnetpool-show demo-subnetpool4
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| default_prefixlen | 26 |
| default_quota | |
| id | 670eb517-4fd3-4dfc-9bed-da2f99f85c7a |
| ip_version | 4 |
| max_prefixlen | 32 |
| min_prefixlen | 8 |
| name | demo-subnetpool4 |
| prefixes | 198.51.100.0/24 |
| | 203.0.113.0/24 |
| shared | True |
| tenant_id | c597484841ff4a8785804c62ba81449b |
+-------------------+--------------------------------------+

http://blog.episodicgenius.com/post/neutron-subnet-pools/

http://www.slideshare.net/carlbaldwin/subnet-pools-and-pluggable-ipam

http://docs.openstack.org/developer/neutron/devref/address_scopes.html

Neutron Address Scopes

则位于subnetpool之上,可以用来控制哪些IP不走NAT出去,而是直接连到外网上的。

创建一个address scopes:

admin> neutron address-scope-create --shared address-scope-ip4 4
Created a new address_scope:
+------------+--------------------------------------+
| Field | Value |
+------------+--------------------------------------+
| id | 97702525-e145-40c8-8c8f-d415930d12ce |
| ip_version | 4 |
| name | address-scope-ip4 |
| shared | True |
+------------+--------------------------------------+

在该address scopes之中创建一个subnetpool:

admin> neutron subnetpool-create --address-scope address-scope-ip4 \
--shared --pool-prefix 203.0.113.0/21 --default-prefixlen 26 \
subnet-pool-ip4
Created a new subnetpool:
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| address_scope_id | 97702525-e145-40c8-8c8f-d415930d12ce |
| default_prefixlen | 26 |
| id | e2c4f12d-307f-4616-a4df-203a45e6cb7f |
| ip_version | 4 |
| name | subnet-pool-ip4 |
| prefixes | 203.0.112.0/21 |
| shared | True |
+-------------------+--------------------------------------+

Subnet Pools and Address Scopes的更多相关文章

  1. subnetting and the subnet mask

    原文:https://www.techopedia.com/6/28587/internet/8-steps-to-understanding-ip-subnetting/5 Step 4 - Sub ...

  2. dhcpsrv:windows系统的优秀开源免费dhcp serve软件

    概述: 官方网站 :http://www.dhcpserver.de/ 写博客时的可免费下载版本  2.52, 或者在cnblogs 本地下载 --========================== ...

  3. 我非要捅穿这 Neutron(三)架构分析与代码实现篇(基于 OpenStack Rocky)

    目录 文章目录 目录 Neutron 的软件架构分析与实现 Neutron Server 启动流程 获取 WSGI Application Core API & Extension API C ...

  4. 云计算管理平台之OpenStack网络服务neutron

    一.简介 neutron的主要作用是在openstack中为启动虚拟机实例提供网络服务,对于neutron来讲,它可以提供两种类型的网络:第一种是provider network,这种网络就是我们常说 ...

  5. OpenStack-Ocata版+CentOS7.6 云平台环境搭建 —7.网络服务Neutron配置

    网络服务Neutron本章节结束如何安装并配置网络服务(neutron)采用:ref:`provider networks <network1>`或:ref:`self-service n ...

  6. CentOS7.4安装部署openstack [Liberty版] (一)

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

  7. CentOS7安装OpenStack(Rocky版)-06.安装Neutron网络服务(控制节点)

    上一章介绍了独立的nova计算节点的安装方法,本章分享openstack的网络服务neutron的安装配制方法 ------------------- 完美的分割线 ----------------- ...

  8. OpenStack(queens)最小化搭建记录——控制与计算共两个节点

    境: 2台安装了centos7-minimal的主机 ip地址: 10.132.226.103/24 (controller) 10.132.226.104/24 (compute1) 1.配置主机名 ...

  9. OpenStack Network --- introduction部分 阅读笔记

    Basic Networking 1.混杂模式(promiscuous mode):当网卡被配置为混杂模式时,它们会将所有的frame传递给操作系统,即使MAC地址不匹配. 2.交换机(switch) ...

随机推荐

  1. codeforces #364d As Fast As Possible

    题意:一群学生,要到离这里为l的地方去.有一辆车,车只有k个座位.人和车的速度分别v1,v2,问你所有人到达的最小时间. 思路:数学题.最小时间就是要求所有同学同时到达.每个同学最多上一次车.那么显然 ...

  2. Memcached下载、安装及使用演示。

    Memcached下载及安装: 下载地址: memcached-1.4.5-amd64.zip================================================通过cmd ...

  3. RS-232针脚(8 pin)

    1 CD Carrier Detect 载波检测 2 RXD Receive Data 接收 3 TXD Transmit Data 发送 4 DTR Data Terminal Ready      ...

  4. sublime使用技巧(4)-- 其他技巧【持续更新】

    命令模式 1.切换语言格式,ctrl + shirt + p 2.简化操作 ctrl + shirt + p 输入 snippet:function 自动生成function的基本结构!tab键 移动 ...

  5. 苹果mac shell 终端 命令行快捷键——行首行尾

    ctrl+a //移到行首 ctrl+e //移到行尾 http://blog.csdn.net/hherima/article/details/47083739

  6. oracle 11g r2 blob类型getString报错问题

    摘要: 问题: 在hibernate中实体类中blob类型字段为 private String textBlob; 查询时报错: java.sql.SQLException: 无效的列类型: getS ...

  7. Xampp 环境问题集合

    1.不小心把虚拟机的环境删了,需要重新安装xmapp 安装很简单,但是重启:/opt/lampp/lampp restart 发现 XAMPP:"Another web server dae ...

  8. Linux 在不重启的情况下识别新挂载的磁盘

    在使用 Linux 时,有时候会因为初始时磁盘空间分配估计不足,使用中需要将挂载点扩容的情况,这就需要我们挂载新的磁盘.但是如果我们在 Linux 运行过程中挂载磁盘, Linux 又不能在不重启的情 ...

  9. 网页上10秒倒计时,完了后就自动跳转到另一个网页上html代码

    用html代码的话就这样: <meta http-equiv="Refresh" content="10;URL=http://www.baidu.com" ...

  10. React Native安装步骤

    先贴出中文网安装指南:http://reactnative.cn/docs/0.46/getting-started.html 本文会点出一些安装时遇到的坑,和解决方案! 1.首先是安装Chocola ...