Re: [pve-devel] DHCP server
On Sat, 19 Jul 2014 14:27:14 + Dietmar Maurer diet...@proxmox.com wrote: Please coordinate this with Alexandre. But I think a prototype would be interesting, because using perl gives use most flexibility. As I recall it Alexandre were opting for dnsmasq so I don't think our efforts will interfere. I am also leaning more to a Perl solution because we will not depend on the development of dnsmasq and also dnsmasq is tailored for many other purposes as well. Does it work for all client OS we use? I can test (I have these clients installed) with the following clients: - Windows 7 enterprise edition (XP is EOL and I do not want to install windows 8 and 8.1 since I will never be using them. The same applies to windows server 2008(r1|r2), 2010(r1) and 2013) - FreeBSD 8+9+10 - OpenBSD 5 - Omnios 151010 - RHEL/CentOS 5,6,7 - Debian 7 + testing and unstable - Ubuntu 12.04 and 14.04 Anyone missing apart from windows server? Sure, I also think we do not need those other features. I will prepare a prototype. I have made these decisions for design: 1) Leases and config are stored in files placed in /etc/pve to accommodate sharing between nodes as well as HA, perhaps in /etc/pve/priv/dhcp. Because of the shared nature how should distribution be handled? 2) A new tab should be created in the cluster page named DHCP server. A simple checkbox to enable/disable the server. This config is saved in datacenter.cfg (dhcpd: 0|1) 3) When a node starts it will read the option dhcpd to deside whether to start dhcp service or not. 4) There should be some sort of monitoring of this config so that all nodes react properly to disabling or enabling dhcp service. 5) The new tab should present the user a drop-down with known interfaces for which dhcp services can be enabled. Choosing an interface will open a config block where the following options is available: - range in net - lease time - renew time - gateway - dns server - optional list of MAC's which will be allowed to request an IP - optional list of MAC's which will be assigned a 'static' IP - optional ntp server For each of the config blocks should be possible to disable/enable and delete - a checkbox for enable/disable and a button for delete. Anything else missing above? I will begin looking into the making the perl prototype others will in parallel could start implementing the tab and rpc part for configuration and control since I believe this part will be necessary even if the dnsmasq road is chosen. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: Live within your income, even if you have to borrow to do so. -- Josh Billings signature.asc Description: PGP signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] DHCP server
On Sat, 19 Jul 2014 05:07:58 + Dietmar Maurer diet...@proxmox.com wrote: Thanks for that link. But I have no idea how stable that is. And is it feature complete? ipv6 support? I found the answer to ipv6: As of perl 5.14 all needed to support ipv6 is to replace any instance of IO::Socket::INET with IO::Socket::IP like $handle = IO::Socket::INET-new(..) replaced with $handle = IO::Socket::IP-new(..) read http://www.perl.org/about/whitepapers/perl-ipv6.html https://metacpan.org/pod/IO::Socket::IP I have just tried it in the example server and client and everything works:-) From what I have read IO::Socket::IP is a high-level abstraction layer on-top IO::Socket::INET and IO::Socket::INET6 which deduces which kind of socket to use, eg. ipv4 or ipv6. And since Debian Wheezy provides perl 5.14 we are home free;-) $ dpkg -s perl Package: perl Status: install ok installed Priority: standard Section: perl Installed-Size: 16598 Maintainer: Niko Tyni nt...@debian.org Architecture: amd64 Version: 5.14.2-21+deb7u1 -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: Honi soit la vache qui rit. signature.asc Description: PGP signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] DHCP server
Thanks for that link. But I have no idea how stable that is. And is it feature complete? ipv6 support? I found the answer to ipv6: As of perl 5.14 all needed to support ipv6 is to replace any instance of Perl is not the problem. I talk about DHCP features/extension for v6? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] DHCP server
On Sat, 19 Jul 2014 16:38:02 + Dietmar Maurer diet...@proxmox.com wrote: just lock the file before you write (or what is the question?) I was thinking of these scenarios: 1a) Client broadcast request for IP 2a) Each nodes listen so each could give a reply simultaneously! 1b) Several clients request for an IP simultaneously 2b) Each nodes listen so each could give a reply simultaneously and therefore the same IP could be distributed to different clients! The problem is that each node has its own copy of the lease file and that merging is done by corosync after a node has made changes to the file so we will need to implement some kind of two-phase commit among the nodes taking part in the cluster. Alternatively we deside that only one node is handling DHCP requests at a time but this will break the concept of multi master functionality in proxmox. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: The trouble with eating Italian food is that five or six days later you're hungry again. -- George Miller signature.asc Description: PGP signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] DHCP server
On Sat, 19 Jul 2014 16:41:02 + Dietmar Maurer diet...@proxmox.com wrote: Thanks for that link. But I have no idea how stable that is. And is it feature complete? ipv6 support? I found the answer to ipv6: As of perl 5.14 all needed to support ipv6 is to replace any instance of Perl is not the problem. I talk about DHCP features/extension for v6? Easy: Get address of peer and if address parses to an ipv6 return an ipv6 address from the ipv6 address range. See also: https://metacpan.org/pod/IO::Socket::IP#host-port-IO::Socket::IP-split_addr-addr -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: This is the tomorrow you worried about yesterday. And now you know why. signature.asc Description: PGP signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] DHCP server
On Sat, 19 Jul 2014 05:07:58 + Dietmar Maurer diet...@proxmox.com wrote: Thanks for that link. But I have no idea how stable that is. And is it feature complete? ipv6 support? I have done a number of tests with the client part of Net::DHCP which is very promissing. Test has been made against a dnsmasq server running on FreeBSD and against a isc-dhcp-server running on Debian. All tests run flawlessly and results were identical. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: For 20 dollars, I'll give you a good fortune next time ... signature.asc Description: PGP signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] DHCP server
I was thinking of these scenarios: 1a) Client broadcast request for IP 2a) Each nodes listen so each could give a reply simultaneously! We know the MAC address of our VMs, so only the node where the VM resides can answer. 1b) Several clients request for an IP simultaneously 2b) Each nodes listen so each could give a reply simultaneously and therefore the same IP could be distributed to different clients! 1.) lock file (cluster wide lock) 2.) allocate IP 3.) release lock ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel