[pve-devel] implementation of a dhcp service in proxmox ?

Alexandre DERUMIER aderumier at odiso.com
Tue May 21 09:40:47 CEST 2013


Hi everybody,

I'm thinking about to implement a dhcp service inside proxmox,

I think this a good missing feature actually.


I have have a look at openstack and ovirt, they both use dnsmasq as dhcp server,
But I think it could also be done with Net::DHCP::Packet, I have find a sample daemon here:
http://www.netlab.linkpc.net/download/tmp/dhcpd.pl

dnsmasq seem to be killed/reloaded to handle configuration change,
so something more dynamic, using proxmox config files across cluster could be great.


I thinked to define a dynamic range by bridge-vlan + static ip allocation by nic in vm config file.


Now, I have few questions about implementation, I don't known if somebody have played with openstack,ovirt or other to see how it's work,help is welcome.


Bridged network
---------------
I think we need 1 ip for the dhcp server, for each range. (1 range by bridge-vlan ?).

So do we need to assign 1 ip to each bridge ? (including vmbrXvX)

I would like to have 1 dhcp server by proxmox host to manage dhcp for local vm only, 
so do I need 1 ip for dhcp server by bridge by host ?.

I don't known if we can use a "internal" ip by bridge and reuse it on each host ?

openstack seem to create a new tap with an ip for the dhcp server plugged to bridge.
(http://techbackground.blogspot.fr/2013/05/debugging-quantum-dhcp-and-open-vswitch.html)


NAT network
-----------
For Nat, I think we only need static ip configuration for each vm nic.


Seem that currently proxmox use netdev, so userland.
qemu documentation seem to say that performance are lower than tap. (lot of overhead)
http://wiki.qemu.org/Documentation/Networking.

Advantage of netdev is that we can use an dhcp server embbeded in qemu
ex : -netdev user,id=mynet0,net=192.168.76.0/24,dhcpstart=192.168.76.9

If we use tap, can the dhcp listen directly to the tap interface ? What is the dhcp server ip in this case ?



Routed network
--------------
Don't have played with routed network yet, but 
interesting article here:
http://tjworld.net/wiki/Linux/KvmQemuEasyRoutedNetwork




















More information about the pve-devel mailing list