[Dnsmasq-discuss] dhcp address allocation

Simon Kelley simon at thekelleys.org.uk
Wed Jul 22 07:57:11 BST 2009


gabriel wrote:
> hi,
> a few months ago i found dnsmasq as a comfortable replacement for my 
> dhcp3-server, bind9 with ddns setup. but one thing i am currently missing:
> 
> the dhcp server from isc tries to provide the same ip address to a client.  
> 
> even if the client disconnects and afterwards connects again to the network 
> the server looks up in the leases file for the outdated ticked an tries to 
> keep its ip. if i didn't got it totally confused this is not the case for 
> dnsmasq - in the sources i found a simple increment for the ip address after 
> some validity and consistency checks were passed.
> 
> so my question finally is: is it possible to get a similar behaviour of 
> dnsmasq without switching to fixed addresses?
> 
> actually i use arpwatch to detect new clients on my network and since the ip 
> addresses from the clients permanently change this is not possible anymore.
> 
> 
> thanks for reply in advance,
> gabriel
> 

Either you're looking at a _very_ old version of dnsmasq or you've 
misunderstood the source. Dnsmasq uses a hash of the MAC address to do 
IP address allocation, precisely so that the IP address of any host can 
remain constant, without having to retain a historical database of 
leases like the ISC daemon.

The increment code is there just to deal with hash collisions, when two 
clients hash to the same IP address.

Is your DHCP address range small compared to the number of clients? If 
so try increasing it so that hash collisions are less likely.

HTH

Simon.




More information about the Dnsmasq-discuss mailing list