Ask Your Question
0

How can I allocate a particular floating IP to an instance?

asked 2013-04-24 08:40:55 -0500

Rahul gravatar image

updated 2013-04-24 13:11:27 -0500

smaffulli gravatar image

I have installed OpenStack - essex and I'm a newbie. Is it possible to allocate a particular floating IP to an instance?

I will explain the problem.

I'm using private network range for fixed network, public network range for floating. See the network settings. (Here I'm replacing my floating network by 100.0.0.0 series ;) )

# network specific settings
--network_manager=nova.network.manager.FlatDHCPManager
--public_interface=eth0
--flat_interface=eth1
--flat_network_bridge=br100
--fixed_range=10.0.2.32/27
--floating_range=100.0.0.9/27
--network_size=20
--flat_network_dhcp_start=10.0.2.33
--flat_injected=False
--force_dhcp_release
--iscsi_helper=tgtadm
--connection_type=libvirt
--root_helper=sudo nova-rootwrap
--verbose

100.0.0.9 is used by the openstack server. 100.0.0.1 is the gateway.

Created a project and then an instance using web interface, allocated public IP using the option "Access & Security" >> "Allocate IP to Project". (There was no IP in the pool by default).

But I can see that the allocated IP is my gateway IP 100.0.0.1. I want to allocate 100.0.0.10 or after this IP in the series, but how?

Hope my question is clear. Please help..!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-04-30 21:10:14 -0500

annegentle gravatar image

I think you want to allocate a floating ip to an instance http://docs.openstack.org/essex/openstack-compute/admin/content/associating-public-ip.html#AddingaFloatingIPtoanInstance.

Adding a floating IP to an instance is a two step process:

nova floating-ip-create: Allocate a floating IP address from the list of available addresses.

nova add-floating-ip: Add an allocated floating IP address to a running instance.

Here's an example of how to add a floating IP to a running instance with an ID of 12

$ nova floating-ip-create

+-----------------+-------------+----------+------+ | Ip | Instance Id | Fixed Ip | Pool | +-----------------+-------------+----------+------+ | 68.99.26.170 | None | None | | +-----------------+-------------+----------+------+

$ nova add-floating-ip 12 68.99.26.170

Use nova --debug parameter to see all the API calls happening.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2013-04-24 08:40:55 -0500

Seen: 881 times

Last updated: Apr 30 '13