[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to make DNS and DHCP server play nice?



Bill Moseley writes:
 > On Thu, May 29, 2003 at 10:51:38PM -0400, Jerry Quinn wrote:
 > 
 > > That's one.  You don't have to go out of your way in the simple case
 > > to get dnsmasq to forward dns requests upstream.  It also incorporates
 > > /etc/hosts into its cache.
 > 
 > Just so I'm clear, the reason it reads /etc/hosts is so that some other 
 > machine can look up the IP of the machine where dnsmasq is running.  In 
 > other words, dnsmasq can figure out all the hosts (and their IPs) from 
 > reading the leases file except the machine running dhcpd (and also 
 > dnsmasq) won't have an entry in the leases file so dnsmasq has to read 
 > it from the /etc/hosts file.

It can figure out all the dynamic hosts from the leases file.  Any
static ones you would add to /etc/hosts on the dnsmasq machine
(including the dnsmasq server).

 > > The real value for me is that dnsmasq will watch dhcpd.leases and
 > > incorporate dynamic IP clients into its cache.  I have the common
 > > configuration of a single gateway with a handful of machines behind
 > > it.  Running dhcp on the gateway makes it simpler to admin internal
 > > addresses.  And dnsmasq means I get name services for the dynamic
 > > clients without working hard.
 > 
 > Very nice.  I don't think the bind config is overly complicated (once
 > you figure it out) but dnsmasq is nice because you don't need to
 > duplicate information.  I have internal hosts listed in dhcpd.conf
 > (fixed IP numbers), and in a local zone for forward lookups, and in
 > another zone for reverse.

Yeah, bind isn't horrible.  It's just that I didn't feel like playing
with it further.  I can certainly figure out just about anything, but
my time is limited, so there's only so many parts of the system I can
manage in depth.

 > I wonder if I could use bind on eth0 and dnsmasq on eth1.  Seems like 
 > I'd have a lame server for my real domains when an internal machine 
 > asked the dnsmasq/bind machine to do a lookup.

Sounds like your network is more complex than simple single external
dialup/cable/adsl connection plus a few machines.  Do your internal
machines have externally visible IP's?

 > By the way, on my LAN (that uses fixed IPs via dhcpd and MAC address) my 
 > leases file does not show "client-hostname".  Is there something that 
 > needs to be setup with dhclient to send the hostname to dhcpd?

My dhclient is stock debian testing.  But I'm also not using fixed
IP's.  Perhaps there is an issue there?

Jerry



Reply to: