• 1.给两台虚拟机增加网卡,使用仅主机模式,网段为:192.168.57.0/24

  • 2.修改两台主机网卡配置

[root@linux-node1 ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1
[root@linux-node1 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth1
TYPE=Ethernet
BOOTPROTO=static
NAME=eth1
DEVICE=eth1
ONBOOT=yes
IPADDR=192.168.57.11
NETMASK=255.255.255.0
[root@linux-node1 ~]# systemctl restart network [root@linux-node2 ~]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1
[root@linux-node2 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth1
TYPE=Ethernet
BOOTPROTO=static
NAME=eth1
DEVICE=eth1
ONBOOT=yes
IPADDR=192.168.57.12
NETMASK=255.255.255.0
[root@linux-node2 ~]# systemctl restart network
  • 3.修改桥接网络配置

[root@linux-node1 ~]# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
physical_interface_mappings = public:eth0,internal:eth1
public:公网 internal:私网
[root@linux-node1 ~]# source admin-openstack
[root@linux-node1 ~]# openstack endpoint list
  • 4.修改ml2的配置

[root@linux-node1 ~]# vim /etc/neutron/plugins/ml2/ml2_conf.ini
flat_network:单一扁平网络
flat_network = public,internal
[root@linux-node1 ~]# systemctl restart neutron-server
[root@linux-node1 ~]# systemctl restart neutron-linuxbridge-agent
  • 5.计算节点:linux-node2一样配置/etc/neutron/plugins/ml2/linuxbridge_agent.ini

physical_interface_mappings = public:eth0,internal:eth1
[root@linux-node2 ~]# systemctl restart neutron-linuxbridge-agent
  • 6.创建网络

[root@linux-node1 ~]# source admin-openstack
[root@linux-node1 ~]# openstack network create --share \
--provider-physical-network internal \
--provider-network-type flat internal <--网络名称 [root@linux-node1 ~]# openstack subnet create --network internal \
--allocation-pool start=192.168.57.100,end=192.168.57.200
--dns-nameserver 192.168.56.2 --gateway 192.168.57.2 \
--subnet-range 192.168.57.0/ internal-subnet
  • 7.dashboard查看并创建云主机

在创建云主机时即可选择网络,如图:

 

实现阿里云的FLAT网络(经典网络)一个公网ip,一个私网ip,如图:

VNC查看:

OpenStack入门篇(二十)之实现阿里云ESC多FLAT网络的更多相关文章

  1. 028-实现阿里云ESC多FLAT网络

    实现类似于阿里云ECS的网络结构,其效果为云主机拥有两块和两个不同的网络,一个网络是用于用于和外网连接,一个用于内网通信,但宿主机上至少有两个网卡,整体配置如下:1.在wmare里给宿主机添加一块网卡 ...

  2. OpenStack入门篇(二十二)之实现阿里云VPC的SDN网络

    1.修改/etc/neutron/neutron.conf配置 [root@linux-node1 ~]# vim /etc/neutron/neutron.conf [defalut] ... co ...

  3. Openstack入门篇(十二)之neutron服务(计算节点)的部署与测试

    1.Neutron组件安装 [root@linux-node2 ~]# yum install -y openstack-neutron-linuxbridge ebtables ipset 2.配置 ...

  4. Openstack入门篇(十八)之Cinder服务-->使用NFS作为后端存储

    1.安装cinder-volume组件以及nfs [root@linux-node2 ~]# yum install -y openstack-cinder python-keystone [root ...

  5. Openstack入门篇(十六)之Cinder服务的部署与测试

    1.理解块存储服务 操作系统获得存储空间的方式一般有两种: 通过某种协议(SAS,SCSI,SAN,iSCSI 等)挂接裸硬盘,然后分区.格式化.创建文件系统:或者直接使用裸硬盘存储数据(数据库) 通 ...

  6. Openstack入门篇(十五)之如何创建生产使用的openstack镜像

    在linux-node1节点上: [root@linux-node1 ~]# yum install -y openstack-nova-compute [root@linux-node1 ~]# y ...

  7. Openstack入门篇(十四)之horizon服务的部署与测试

    1.Horizon介绍 •提供一个web界面操作openstack的系统 •使用Django框架基于openstack API开发 •支持将session存储在DB.memcached •支持集群 t ...

  8. Openstack入门篇(十)之nova服务(计算节点)的部署与测试

    1.安装服务软件包 [root@linux-node2 ~]# yum install -y centos-release-openstack-newton [root@linux-node2 ~]# ...

  9. OpenStack入门篇(十九)之网络虚拟化基础

    1.Linux Bridge的基本概念 假设宿主机有 1 块与外网连接的物理网卡 eth0,上面跑了 1 个虚机 VM1,现在有个问题是: 如何让 VM1 能够访问外网?① 给 VM1 分配一个虚拟网 ...

随机推荐

  1. 使用uwsgi发布项目

    1.先下载 uwsgi 指定豆瓣源下载 pip install -i https://pypi.douban.com/simple uwsgi 2.查看你的uwsgi基于那个python解释器运行的 ...

  2. [翻译] LiquidFloatingActionButton

    LiquidFloatingActionButton https://github.com/yoavlt/LiquidFloatingActionButton LiquidFloatingAction ...

  3. PHP 实现单点登录

    1.准备两个虚拟域名 127.0.0.1  www.openpoor.com 127.0.0.1  www.myspace.com 2.在openpoor的根目录下创建以下文件 index.PHP [ ...

  4. zabbix 监控iptables

    参看的文章链接忘了...... yum -y install iptstate 1.脚本位置和内容 [root@web1 scripts]# pwd /etc/zabbix/scripts [root ...

  5. <Lord don’t move that mountain>

    <Lord don’t move that mountain> Lord, don't move that mountain(主,不要移走高山) Give me strength to c ...

  6. 【模块化】 RequireJS入门教程总结与推荐

    之所以学习RequireJS,肯定对 模块化有一定的理解.这里有几篇学习 RequireJS的文章,推荐给大家去学习. Javascript模块化编程(一):模块的写法 Javascript模块化编程 ...

  7. 经验总结13--EF配置

    EF配置,开发前的准备及步骤. 使用V22013和EF6.1. 1.使用VS新建MVC项目. 2.创建实体类. 3.配置web.config的数据库链接字符串. <connectionStrin ...

  8. tomcat服务器宕机解决方案

    报错信息: java.lang.Object.wait(Native Method) java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:1 ...

  9. java 接口的概念

    一:概念 接口是功能的集合.同样可以看做一种数据类型,是比抽象类更为抽象的“类”. 接口描述应该具备的方法,并没有具体的实现.具体实现由接口的实现类(相当于接口的子类来完成). 好处: 使功能和实现分 ...

  10. Spring AOP源码分析(二)动态A0P自定义标签

    摘要: 本文结合<Spring源码深度解析>来分析Spring 5.0.6版本的源代码.若有描述错误之处,欢迎指正. 之前讲过Spring中的自定义注解,如果声明了自定义的注解,那么就一定 ...