Subject: dhcpd address assignment
To: None <netbsd-users@netbsd.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: netbsd-users
Date: 02/01/2006 22:07:02
I'm not sure if this should actually be on a dhcp mailing list,
but since I'm using NetBSD I'll ask here first.

The dhcp server is running an old -current snapshot, mostly because
there's no reason to update it -- it's a Soekris serving as a
bridge.  It has dhcpd 3.0.3.  My laptop is running a very recent -current.

The laptop was given a lease by dhcpd; that lease was recorded in
dhcpd.leases.  I stopped dhclient on the laptop, truncated the
dhclient.leases file, and restarted dhclient.  dhcpd on the server
gave it a different address.  Why?

Section 4.3.1 of RFC 2131 seems to imply that the previous address
should be reused.  It was available; in fact, the lease hadn't
expired.  The dhclient.conf file (and hence the options sent) were
the same.  Here are the relevant entries from the dhcpd.leases file:

lease 192.168.2.198 {
  starts 4 2006/02/02 01:39:43;
  ends 4 2006/02/02 05:39:43;
  binding state active;
  next binding state free;
  hardware ethernet 00:11:25:43:e8:a4;
  client-hostname "berkshire.machshav.com.";
}
lease 192.168.2.197 {
  starts 4 2006/02/02 03:03:01;
  ends 4 2006/02/02 07:03:01;
  binding state active;
  next binding state free;
  hardware ethernet 00:11:25:43:e8:a4;
  client-hostname "berkshire.machshav.com.";
}

I did not see any relevant options in the dhcpd.conf man page.  I do not
have any static addresses assigned in my dhcpd.conf file.