[Dnsmasq-discuss] Simple conf for local hostname resolution only
j-frankish at slb.com
Wed May 18 05:31:37 BST 2011
> >> On Tue, May 17, 2011 at 3:14 AM, John Frankish <j-frankish at slb.com> wrote:
> >> > I haven't found where to search the list so my apologies if this is
> >> > asked/answered elsewhere.
> >> >
> >> > I have a router that acts as a dhcp server and resolves wan
> >> >addresses, but it does not have the option to resolve local hostnames.
> >> >
> >> > I'm looking for a simple dnsmasq configuration that will:
> >> >
> >> > 1. Resolve local hostnames and nothing else 2. Assign a hostname to
> >> > ps3, internet radio and similar that don't have their own hostname
> >> > (using their mac address I guess)
> >> >
> >> > I cannot see the forest for the trees using google, is there an
> >> > example of the above somewhere?
> >> Don't create a dhcp-pool
> >> Use /etc/ethers to assign names to each mac-address.
> >> Set up /etc/resolv.conf to check dnsmasq first, then your upstream
> >> recursive DNS. dnsmasq is smart enough not to forward queries to itself.
> > Thanks
> > What do you mean by "Don't create a dhcp-pool"?
> Sorry, I meant "dhcp-range". Since your other computer is handling dhcp,
> you shouldn't configure dhcp support in dnsmasq.
> > "/etc/ethers" OK, understood
> > " Set up /etc/resolv.conf to check dnsmasq first" - you mean enter the ip
> address of the machine running dnsmasq?
> Generally the loopback address, as in
> server 127.0.0.1
> > Maybe I' m being dumb here, but where/how is dnsmasq going to get the
> local hostnames without me entering them in /etc/hosts on the machine
> running dnsmasq?
> Sorry, you're right. /etc/ethers would work if dnsmasq was also the dhcp
> server. You do want /etc/hosts (or the dnsmasq hostsfile option), and then
> you are setting up name/ipaddr pairs, not name/macaddr. Only the dhcp
> server knows the ipaddr/macaddr mapping.
..and herein lies the problem - the dhcp server is a cisco rvs4000 router.
If I understand correctly, there's no way for dnsmasq to get the name/ipaddr pairs and/or
ipaddr/macaddr pairs from the router and thus it will not be able to resolve the local hostnames?
More information about the Dnsmasq-discuss