Ask Your Question
1

how do I allocate a public IP to new VM by default

asked 2014-04-23 04:33:46 -0500

Alex Leonhardt gravatar image

updated 2014-04-23 16:30:42 -0500

hi,

so we're POCing OpenStack but do not want/need the "private interface" as it'd be used as an internal / private cloud only, how can I / we allocate a "public IP" to every new VM from a pool and "get rid" of the internal bridge/network (as we wont need it) ?

Thanks!

Alex

====

Update:

hi all, thanks for the replies!

so to try and explain a little more detail .. we still want the tenants and everything that's comes with it regarding restrictions of resources etc.. however we wont have a 'public network's per se, it's a privet class B network range instead. the vms that are being crated by the tenants would only ever need that 'public IP address' (which in reality is a class B network) - there is no need for a private network to be created and it would probably just confuse the users..

so is it not 'simply' possible to allocate a public IP from a pool, e.g. the floating IP pool, by default to all VMs created irrelevant of the tenant / project they're part of?

i try and draw it up when I'm home :)

thanks for your help! Alex

edit retag flag offensive close merge delete

Comments

You want Neutron L3 Agent to work without Open vSwitch Plug-in (on Controller) and Open vSwitch agent (on Compute). In general, you don't want any ML2 plugin for Neutron in Havana. I doubt it's possible in Havana. Tenant is supposed first create router, then private network with qdhcp-xxxxxxxx namespace associated with this private network ,created with dhcp option to avoid assigning private IPs manually , then create internal interface for router to this network and afterwards external network provides gateway for mentioned router to be able via Neutron L3 layer obtain floating IP.
So, classic Neutron L3 Agent && Open vSwithch Plug-in design seems to me not to allow qrouter-xxxxxxxx namespace to work without qdhcp-xxxxxxxxx namespace.

dbaxps gravatar imagedbaxps ( 2014-04-23 05:36:55 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-04-23 06:10:47 -0500

SGPJ gravatar image

updated 2014-04-23 12:31:47 -0500

In typical network topology: private n/w -> router -> public n/w VMs associated to private n/w will not get floating IP dynamically and you need to manually associate it. A quick way to try is by doing below in fresh Openstack setup (not having private network created) * While launching the VM associate to Public network as shown:

C:\fakepath\Capture.JPG

You can do it from admin project where only Public network is available. So every new VM will have a Public IP to it and no need for floating IP. This approach will have limitations but check whether it satisfies your requirement.

Thanks.

edit flag offensive delete link more

Comments

So, every VM should be launched by admin via admin's project ?
Tenant is supposed to have his private network . Looks like you are suggesting the system without any tenant.Thus all VMs should seat on one public network or several public networks. That is what how system been built via proposed solution would look like.
Am I correct ?
Next question. How this VM is supposed to obtain Public IP from public network , usually public network is created with no DHCP ?
Does It mean manually assigned proper static IP from corresponfing public network ?
Next: system designed in this way won't have any router , they are not needed. You may just forget about commands like :
$ ip netns exec qrouter-xxxxxxxx iptables -S -t nat
$ ip netns exec qrouter-xxxxxxxx ip a
$ ip netns exec qrouter-xxxxxxxx ip r
all this stuff is no longer needed or I am missing something in your proposal ?

dbaxps gravatar imagedbaxps ( 2014-04-23 11:25:30 -0500 )edit
1

The typical setup will be private network -> router -> public network and we will attach the VMs to private network & associate floating IP from pool. However for testing earlier in my PoCs; I launched VM directly on Public network, with public IP and within VM manually configured IP. This will have limitations when compared to typical setup.

SGPJ gravatar imageSGPJ ( 2014-04-23 12:12:55 -0500 )edit

thanks, how can I have tenants and one (or more) public IP ranges to use, we really just dont need the private network on VMs and all VMs will need to be allocated an IP on the "public network" only. Ideally that's done as soon as you create the VM and independent from the tenant/project. any clues?

Alex Leonhardt gravatar imageAlex Leonhardt ( 2014-04-23 16:33:48 -0500 )edit
1

answered 2014-04-23 13:01:54 -0500

dbaxps gravatar image

updated 2014-04-23 22:21:22 -0500

You want Neutron L3 Layer to work without Open vSwitch Plug-in. In general, you don't want any ML2 plugin for Neutron in Havana. I guess it is not possible in Havana. Tenant is supposed first create router, then private network, created with dhcp option to avoid assigning private IPs manually, then create internal interface for router to this network and afterwards external network provides gateway for mentioned router to be able via Neutron L3 layer obtain floating IP. Maybe IceHouse with ML2 plugin would serve you needs better assuming flat network approach.

Please, view Ultimate OpenStack IceHouse Guide

edit flag offensive delete link more

Comments

thanks for the link, i think that helps - there is a "use case" for a single flat network which I believe seems like what I'm in for - so will have a read and report back if it is what we're looking for. thanks!

Alex Leonhardt gravatar imageAlex Leonhardt ( 2014-04-23 16:38:21 -0500 )edit

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

1 follower

Stats

Asked: 2014-04-23 04:33:46 -0500

Seen: 982 times

Last updated: Apr 23 '14