[Bioclusters] alternative DHCP implementations?

Jonathan Barber jon at compbio.dundee.ac.uk
Wed Mar 30 13:48:45 EST 2005

On Tue, Mar 29, 2005 at 11:52:39AM -0500, Chris Dagdigian wrote:
> Hi folks,
> Anyone using non-ISC implementations of DHCP services on Linux or Mac OS X?
> With "old" versions of ISC DHCP the server would hand out IP addresses 
> from the Dynamic range one at a time, starting from the lowest number 
> and moving incrementally upwards in the range.
> This made cluster deployment and node naming an easy process:
> 1. set up dynamic IP range for initial boot
> 2. power on nodes in the order in which you want them named
> 3. nodes get IP addresses & hostnames assigned from 1 .. N
> 4. Scrape the dhcpd.leases file to pull MAC addresses out for all nodes
> 5. Use MAC info to create dhcpd.conf entries for static-by-mac allocation
> 6. Reboot cluster; all nodes are now named/numbered correctly
> The "current" version of ISC DHCP (Internet Systems Consortium DHCP 
> Server V3.0.2) has much different behavior:
> - It "usually" gives out IP address in backwards order, starting from 
> the highest number in the range and going down incrementally by one each 
> time a lease is assigned.
> The end result is that freshly booted clusters get "named backwards" 
> from node0NN ... node001. This does not break anything but does cause 
> "extra work" in settings where previously we would rely on DHCP to 
> assist us with initially naming/numbering nodes in cases where MAC info 
> is not known ahead of time.
> Even this behavior is not absolute. The docs seem to indicate now that 
> dynamic IPs are stored in a hashtable like element and that there is 
> *no* way to predict or control the order in which dynamic leases are 
> assigned.
> We are thinking about trying to find a replacement DHCP server that has 
> a predictable method of allocating dynamic IP addresses (even if only 
> for the initial cluster deployment)  Has anyone done this? Any suggestions?

How about sniffing the DHCP packets being sent out by the booting
machines and recording the order in which MAC addresses are seen?

Example of combining tcpdump and a perl one liner (untested):

tcpdump -i eth0 -n port 67 and port 68 |\
    perl -ne '/Request from (\S*)/;\
    exists $a{$1} ? next : print "$1\n", $a{$1}=1;'

The match captures the MAC, and the "defined" tests whether the MAC has
already been observed. If it hasn't been seen, print the MAC and record

> -Chris

More information about the Bioclusters mailing list