How to connect VMs to network with "real" DHCP?
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
e1bbbcb1-e20d-48e5-ae89-823c1a485625
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 | 192.168.50.0/24 | {"start": "192.168.50.172", "end": "192.168.50.179"} |
+--------------------------------------+------------+-----------------+------------------------------------------------------+
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 192.168.50.250, which is on br-eth1.
What I would like to happen is:
- The IP address is requested from DHCP server on startup and shown in Horizon.
- 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:
- Quantum assigns the first IP from the pool, even though I've specified "DHCP Enable: No". So OpenStack thinks the IP is 192.168.50.172
- When the instance finished booting, udhcpc requests an IP from the DHCP server and receives a response, e.g. 192.168.50.186. So my patch is working, as far as DHCP is concerned.
- 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?