[Dnsmasq-discuss] Question

rance at frontiernet.net rance at frontiernet.net
Sat Jan 26 13:09:52 GMT 2008

Quoting xerces8 <xerces8 at butn.net>:

> "Heath Woodson" <heathwoodson at gmail.com> wrote:
>> Setting this up for the first time and I have a simple question but it isnt
>> clearly answered anywhere. I want to assign ips with DHCP in a static manner
>> can I just use the /etc/host file on the machine running dnsmasq to do this
>> and uncomment this line
>> # Enable the address given for "judge" in /etc/hosts
>> # to be given to a machine presenting the name "judge" when
>> # it asks for a DHCP lease.
>> #dhcp-host=judge
> I do that by having lines like this in dnsmasq.conf :
> dhcp-host=judge,
> I tried to do this by putting the entries in /etc/hosts,
> but it did not work for some reason.
> Simon, can you help ? Is there an option needed to enable this ?
> That is: no dhcp-host=xxx line in dnsmasq.conf, but a line in /etc/hosts:
> judge
> Regards,
> David

It only works if you have the entry in /etc/hosts AND and entry in  
dnsmasq.conf telling dnsmasq to read /etc/hosts where appropriate.

Meaning that the dhcp-host= lines are required.

More information about the Dnsmasq-discuss mailing list