Ask Your Question

Associate public ip to vm's interface

asked 2014-02-13 06:23:48 -0500

mili gravatar image

updated 2014-02-25 00:24:05 -0500


I have deployed Per-tenant routers with private networks on our Havana open-stack, On one of the VMs I have an application that needs public IP assigned to the VM's nic directly without NAT. Is this possible with my current configuration?

UPDATE: I cannot figure this out yet, but i found this: your help is really appreciated

I'm using GRE with OVS, neutron Cheers

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-02-21 10:47:38 -0500

Salvatore gravatar image

It sounds like you have a public address pool and you want to assign these address to VM interfaces. Perhaps then you don't need tenant routers at all?

It is a legitimate request, and it should be possible to boot directly a VM on an external network. However only admins are allowed to do this (or to be more precise the tenant which owns the external network). I will check on the issue you reported. I assume you are using Neutron with the OVS plugin?

No-NAT routers can be considered too, but implementing your use case would be trickier, and I would recommend more directly booting instance on external networks.

The last thing you might want to consider is a provider network. It does not have to be external and you can use the provider extensions to map that network to the physical network (possibly specifying a VLAN id as well) connected to the internet.

edit flag offensive delete link more


Hi Salvatore, Thank you very much for the response, Yes, I'm using neutron with OVS. I'm first going to try using the admin tenant(owner of the external net), I just did this, I created an instance on this tenant and assigned the ip address(public from external net) on it manually(as the external net dose not have dhcp enable) the problem was that there was no internet access, Not sure why this was but maybe because the compute node dose not have access to the external network directly!!!! and I'm not sure how OVS is behaving underneath. I need the per-tenant router for most of my use cases but this specific one I need public ip on vm. per tenant use cases work just fine at the moment, I create a router, set GW to external net all works. Thank you very much and i ...(more)

mili gravatar imagemili ( 2014-02-25 00:10:11 -0500 )edit

answered 2014-02-13 20:29:56 -0500

lifeless gravatar image

updated 2014-02-21 12:30:25 -0500

Jobin gravatar image

You need to boot the vm with the --nic net_id=UUID_OF_PUBLIC_NET and then it will get plugged directly in. Your hypervisor needs access to that provider network of course.

edit flag offensive delete link more


Hi, Thanks for the reply, this did not work for me, now i have a VM stuck in error which i cannot delete with nova delet or nova forcedelete. and the vm did not get any ip.....

mili gravatar imagemili ( 2014-02-13 21:26:44 -0500 )edit

If you can't delete it thats a bug - file that please. Do you have DHCP enabled on your public network range? If not, thats why it didn't get an IP. YOu might want to have the VM be dual-legged - eth0 on the overlay private network, eth1 on the public network.

lifeless gravatar imagelifeless ( 2014-02-13 22:50:44 -0500 )edit

BTW - why can't you use a floating-ip? It's still technically nat, but it should work with pretty much anything.

lifeless gravatar imagelifeless ( 2014-02-13 22:51:30 -0500 )edit

Thanks lifeless, I will report the bug. floating IPs are good for most of the applications but I have couple of applications that dont perform as intended with NAT. Should I create a new public subnet on my network node? As i dont have DHCP enabled on the current public net? I'm really lost here.

mili gravatar imagemili ( 2014-02-14 21:02:02 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-02-13 06:23:48 -0500

Seen: 4,078 times

Last updated: Feb 25 '14