Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1298461
  • 博文数量: 464
  • 博客积分: 9399
  • 博客等级: 中将
  • 技术积分: 6364
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-19 09:15
文章分类

全部博文(464)

文章存档

2014年(12)

2013年(123)

2012年(173)

2011年(156)

我的朋友

分类: 虚拟化

2012-11-20 10:12:04

一台机器,2块网卡,安装nova 和glance。

nova-network using FlatDHCP manager

采用flatdhcp的设置。这个比flat复杂一点。不过还是比较容易理解的。

FlatDHCP,类似亚马逊EC2的,是内网,通过nat指向一个外网的

 

测试的服务器是在内网,192.168.1.0/24 网段,服务器的Ip就设置成 192.168.1.65

 

fixed_range 10.0.0.0 /8

这就是虚拟机实例启动获得的固定IP地址

network_siez 8

我的理解就是网络里多少台实例,8,表示8个虚拟机

floating range 192.168.1.128/29

这个地方,是我以前没理解了,不过看他觉得例子,感觉明白多了。

floating range,其实就是实例获得的外网IP,外网的IP通过NAT的方式进行对应。

实例的固定IP,是内网的IP,你可以决定是否需要外网的IP,如果需要,就是通过动态获得一个外网的IP。

这里我们把192.168.1.0 作为一个外网的网段。

 

I decided to have my instances use addresses in 192.168.1.129 - 192.168.1.134 range. Consulting my handy subnet calculator, I used 192.168.1.128/29 for this entry.

这些设置,如果是在nova下

With that completed, we’ll move on to configuring the networking options. First up is adding the network manager related options to /etc/nova.conf:


--network_manager=nova.network.manager.FlatDHCPManager
--fixed_range=10.0.0.0/8
--network_size=8


Now, let’s add our network into the database with the nova-manage command:


# nova-manage network create 10.0.0.0/8 1 8


Finally, we will create the floating addresses using a range that will not overlap with the StackOps installation.


# nova-manage floating create cactus 192.168.1.136/29





阅读(767) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~