[Dnsmasq-discuss] DHCP for only known hosts.

Jima jima at beer.tclug.org
Thu May 4 15:36:32 BST 2006


On Thu, 4 May 2006, Sebastian Muñiz wrote:
> I am using dnsmasq as a dhcp server in my wireless lan.
> I need dnsmasq just give ips to those declared in a list, and nothing else.
> If the dhcp request comes from an unknown mac address it should be discarded.
> So, I made a list with some stanzas like
>
*snip*
>
> and a dhcp-range like
> dhcp-range=172.16.0.0,172.16.0.0,12h
>
> It seems strange, but it works.
> However sometimes Dnsmasq gives a random client the ip 172.16.0.0
>
> Is this the right way to do this?

  Nope.  From the man page, in the dhcp-range section:

The end address may be replaced by the keyword static which tells dnsmasq 
to enable DHCP for the network specified, but not to dynamically allocate 
IP addresses. Only hosts which have static addresses given via dhcp-host 
or from /etc/ethers will be served.

  So I'm guessing you'll want:

dhcp-range=172.16.0.0,static,12h

  Let us know if that doesn't fix things up. :)

      Jima


More information about the Dnsmasq-discuss mailing list