[Dnsmasq-discuss] Re: Silly question

rance at frontiernet.net rance at frontiernet.net
Thu Jan 17 20:29:08 GMT 2008

Quoting Philippe Faure <philippe at faure.ca>:

> As you know, I am running dnsmasq on a server.  What would happen if  
>  I set it to
> run a DHCP client.  Would DNSMASQ reply to the client's request?  I   
> know that I
> can for dnsmasq to assign a constant IP to a dhcp client with a given name.
> that way, the PC name would be associated with an IP in the   
> dnsmasq.leases file,
> and therefore solve both the client ping problem and the self ping problem.
> What do you think?
> Philippe


first Im copying the list so that the question and answer stays  
public.  In the future please try to keep public discussions public,  
that way others can benefit from your questions in the list archives.

Second, your idea is not going to work.

a server must have a static ip address unless the server itself has  
more than one interface in which case at least ONE must be static. the  
others can be dhcp but why?  if the dhcp server is ON the machine that  
needs the dynamic address dnsmasq wont be running at system boot when  
the networking starts and the dhcp requests will fail. Besides, if you  
could get it to work at all, your static ip address would be  
reassigned to the address in the dhcp reply and then all your  
networking would stop working.

You are better off using and understanding the options in the dnsmasq  
config file.

just add the static ips to your hosts file and send dnsmasq a reload  
signal or restart signal to get it to re-read your hosts file, and  
then all clients can ping the server.

simple, and consistent with good networking setup.

next your other question was about getting the server to ping the clients.

The server needs to resolv to the dnsmasq instance not the standard  
resolv.conf supplied by a dhcp client on an external interface.

simply stated you need two resolv.conf files, the syntax is the same for both.

the regular resolv.conf tells the server that IT is the name  
resolution master.

the other one tells dnsmasq where to go if it cant figure it out locally.

More information about the Dnsmasq-discuss mailing list