Ask Your Question

How to configure flat network with dhcp and floating IP for NATs?

asked 2013-07-25 12:54:46 -0500

PerfectSine gravatar image

I have a flat network setup that is currently able to successfully hand out floating IP's to a quantum gre private network. Everything is working in that order, however when I try to attach a VM directly to the flat network Horizon shows an IP being allocated successfully but the VM won't discover any DHCP info. What is preventing DHCP addresses from being handed out to the flat network?

edit retag flag offensive close merge delete


loginto the VM from Horizon and run the dhclient program to see what's happening. You can use tools like tcpdump. My guess is that the request is not reaching the DHCP server.

anant gravatar imageanant ( 2014-07-02 11:44:56 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2015-06-26 02:52:35 -0500

RAHUL1603 gravatar image

The Private network has the DHCP running on it by default but the Public network is does not have DHCP running on it by default. So you need to enable DHCP on it while creating it. OR

Add another small subnet of public network having DHCP enabled. When you add your VM to this network it will get an IP by default.

edit flag offensive delete link more

answered 2015-06-26 11:47:58 -0500

capsali gravatar image

I realize this is an old thread, but in case someone else is wondering how to fetch metadata on an instance connected directly to the provider network, just enabling dhcp on the provider network won't do it because you need a router for the metadata to be serverd.

The simple workaround is to create your public(provider) network and subnet and enable dhcp on it.(this is for images that require dhcp for an ip; if you have an image that already has an ip address assigned to it in the range of the public subnet than there is no need for dhcp; or if you connect to the instance through the novnc window and set it static ip, than on the next reboot it will get the metadata).

Then create a router and attach a port to the public subnet (do not set gateway to this network;leave it empty). This will help the instance get the metadata.

After this, update the public subnet with the following host routes either by cli using

--host-route destination=,nexthop=[ROUTER_PORT_IP] \

Or by going into the network section in horizon, select public/provider network and edit subnet and under Host Route :,[ROUTER_PORT_IP],[PHYSICAL_ROUTER_GATEWAY]

And then you can boot instances with metadata support!

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2013-07-25 12:54:46 -0500

Seen: 1,296 times

Last updated: Jun 26 '15