[Dnsmasq-discuss] DHCP Address - Lease in numerical order

Paul Fox pgf at foxharp.boston.ma.us
Fri Dec 21 14:01:09 GMT 2007


 > On Thu, 20 Dec 2007, Simon Kelley wrote:
 > > It's not random:  the address is derived from the start and
 > > end addresses of the address pool and a hash of the MAC
 > > address.  This means that a given host will (nearly) always
 > > be offered the same address, without dnsmasq having to keep
 > > track of the addresses allocated in the past to hosts which
 > > don't have a lease right now.
 > >
 > > The alternatives are it to keep a much bigger database which
 > > has historical information about all leases offered to all
 > > hosts for all time (ISC), or not to attempt to give hosts
 > > stable addresses at all (udhcpd).  I thought the
 > > hash-function trick was a particularly neat alternative.

i wouldn't have thought that offering the same address was important
enough to do it "for all time".  i would have thought "if still
available" would be good enough.  after all, if it's been in use by
someone else, then any sessions/caches/whatever the client might have
had are now invalid in any case.

so why isn't it sufficient to keep a record of which client last had
any address in the offered ranges?  this is no bigger than the records
one has to keep if all addresses are in use, right?

(which isn't to say your solution isn't clever.  :-)

paul
=---------------------
 paul fox, pgf at foxharp.boston.ma.us (arlington, ma, where it's 17.8 degrees)



More information about the Dnsmasq-discuss mailing list