Ask Your Question

How to connect VMs to network with "real" DHCP?

asked 2013-09-12 02:34:19 -0500

tudor gravatar image

updated 2013-09-12 02:48:41 -0500

I'm trying to integrate my VMs into the same IP address space as an existing "real" network. I have a running version of OpenStack Grizzly with Quantum and OpenVSwitch.

For example, while an instance is running my OpenVSwitch bridges looks like this:

$ sudo ovs-vsctl show
    Bridge br-tun
        Port br-tun
            Interface br-tun
                type: internal
    Bridge br-int
        Port br-int
            Interface br-int
                type: internal
        Port "qvobf9997d8-9b"
            tag: 2
            Interface "qvobf9997d8-9b"
        Port "patch-br-eth1"
            tag: 2
            Interface "patch-br-eth1"
                type: patch
                options: {peer=patch-br-int}
        Port "tap48ad9b5d-6d"
            tag: 1
            Interface "tap48ad9b5d-6d"
                type: internal
        Port "int-br-eth1"
            Interface "int-br-eth1"
    Bridge br-ex
        Port br-ex
            Interface br-ex
                type: internal
    Bridge "br-eth1"
        Port "br-eth1"
            Interface "br-eth1"
                type: internal
        Port "phy-br-eth1"
            Interface "phy-br-eth1"
        Port patch-br-int
            Interface patch-br-int
                type: patch
                options: {peer="patch-br-eth1"}
        Port "eth1"
            Interface "eth1"
    ovs_version: "1.4.2"

And my quantum subnets look like this:

$ quantum subnet-list
| id                                   | name       | cidr            | allocation_pools                                     |
| 7e573fa2-c6db-42ae-93a9-b72a23e30000 | 50-network | | {"start": "", "end": ""} |

So, in theory, the VM is connected via port qvobf9997d8-9b which is tagged as 2. Then the tag 2 is patched via a patch peer to br-eth1 (clearing the tag), which contains the "real" interface eth1. The host is assigned IP, which is on br-eth1.

What I would like to happen is:

  1. The IP address is requested from DHCP server on startup and shown in Horizon.
  2. All routing is then done across the two virtual bridges (br-int and br-eth1) to eth1 and out as though it was a physical machine on eth1 but with a different MAC address.

What actually happens is this:

  1. Quantum assigns the first IP from the pool, even though I've specified "DHCP Enable: No". So OpenStack thinks the IP is
  2. When the instance finished booting, udhcpc requests an IP from the DHCP server and receives a response, e.g. So my patch is working, as far as DHCP is concerned.
  3. However, I can't ping any other machine on the network, nor can the network ping the VM.

How do I tell Quantum to get the DHCP from an external DHCP server so that it shows up correctly in Horizon?

Why is it that, if I remove the subnet, no device is created for the VM?

And, is it possible to do a patch between a "real" switch and a virtual one like this? If so, how?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-06-30 05:57:32 -0500

Ping does not work, as the ip address assigned by neutron is not the same as the one that you have (successfully) configured up via your external dhcp server. (It does not matter, that you disable the dhcp server on that subnet, Openstack still assigned an ip address for you, as you also pointed out) Ping will work, if you set prevent_arp_spoofing to False in /etc/neutron/plugins/ml2/ml2_conf.ini. (I don't know if there is such a parameter in Grizzly release) Security wise, this might not be the best idea, though.

The answer to your question is that you should use floating IP-s instead. (assuming that you have plenty of IP addresses to allocate) Using an external server is also supported with flat networking, but I suspect, you don't want to go with that one.

edit flag offensive delete link more


well, I just realized, that I became a thread necromancer :)

Viktor Schlaffer gravatar imageViktor Schlaffer ( 2016-06-30 09:39:14 -0500 )edit

@Viktor Schlaffer can this be achieved with a 2nd flat network on a dedicated network interface? I would like to use an external DHCP provider for my 2nd provider network

fattony666 gravatar imagefattony666 ( 2018-09-05 09:09:17 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2013-09-12 02:34:19 -0500

Seen: 554 times

Last updated: Sep 12 '13