[Dnsmasq-discuss] dnsmasq does not respond correctly on loopback(lo)

Frederick C. Damen fred at damen.org
Thu Oct 14 05:21:08 BST 2010


  On 10/13/2010 04:16 PM, richardvoigt at gmail.com wrote:
>
>
> On Wed, Oct 13, 2010 at 2:20 PM, <fred at damen.org 
> <mailto:fred at damen.org>> wrote:
>
>     I now see the option in the installed man page.
>     There is no mention of this option in my /etc/dnsmasq.conf file.
>
>     I do not suspect that this is the issue though:
>     Each computer, the server in question included, all have the same
>     name(s), i.e. interfaces are not named separately.
>
>
> localise-queries couldn't care less about the interface names.  It 
> tries to return an address in the same subnet as the address of the 
> interface where the query came in.  So for queries coming in on lo0, 
> it would try to return addresses in the 127.x.x.x block.
Assuming localise-queries is turned on:
If I read the man page correctly, if I had the same DNS name associated 
with multiple ip addresses and one of these ip address
is on the same subnet as the subnet of the interface that the request 
came in on then dnsmasq would return the address on this
subnet,  But if there are no single name to multiple ip address 
associations then return the ip address associate with the name
even if the subnets do not match.
This is the situation that I am having trouble with.  DNS name printer1 
is assigned one and only one address, 192.168.0.x.
Thus dnsmasq should return this address no matter what subnet the 
request came in on.

Besides the /etc/dnsmasq.conf does not enable localise-queries and the 
man page seems to suggest that this feature is disabled by default.

Anyhow, how do I get printer1 to be resolved on SERVER without having to 
specify the interface by which to do the DNS name resolution?

>     Computers severed by dnsmasq both for DHCP and DNS work as expected,
>      i.e. the network printer 192.168.0.x, DNS name 'printer1' gets
>     its name through dnsmasq DHCP server on 192.168.0.1,
>           computer nick 192.168.0.y who has its DNS server set in
>     /etc/resolv.conf to 192.168.0.1 can ping printer1,
>     printer1.damen.org <http://printer1.damen.org>.
>     The SERVER 192.168.0.1(and external interface) with its first
>     nameserver set to 127.0.0.1 and following nameservers set to
>     external name
>     servers in its /etc/resolv.conf can not ping printer1,
>     printer1.damen.org <http://printer1.damen.org>.  On the SERVER if
>     you direct the DNS queries
>     to go directly to 192.168.0.1 using dig's @ option the DNS name
>     printer1 can be resolved correctly.  Going directly to
>     DNS server at 127.0.0.1 using dig does not resolve the DNS name.
>
>     Before I added 127.0.0.1 as the first nameserver in
>     /etc/resolv.conf the name resolution for DNS names external to my
>     LAN was slow and after
>     adding it external name resolution when fast,  and the fact that
>     'dig @127.0.0.1 <http://127.0.0.1> printer1' does not indicate
>     inability to contact the
>     DNS server, I suspect that dnsmasq is acting as a DNS server on
>     127.0.0.1.  But why does dnsmasq not resolve the names in its DHCP
>     configuration on the 127.0.0.1 interface?
>
>
> You might use netstat to find out for sure what process is listening 
> on 127.0.0.1:53 <http://127.0.0.1:53>
>
>
>     Thanks for the help,
>
>     Fred
>
>     > I guess I gave you the wrong spelling of the option.  It is in
>     the online
>     > man page but has an 's' not a 'z'.  You might also check for the
>     abbreviated
>     > option which is "-y".
>     >
>     > *-y, --localise-queries*Return answers to DNS queries from
>     /etc/hosts which
>     > depend on the interface over which the query was received. If a
>     name in
>     > /etc/hosts has more than one address associated with it, and at
>     least one of
>     > those addresses is on the same subnet as the interface to which
>     the query
>     > was sent, then return only the address(es) on that subnet. This
>     allows for a
>     > server to have multiple addresses in /etc/hosts corresponding to
>     each of its
>     > interfaces, and hosts will get the correct address based on
>     which network
>     > they are attached to. Currently this facility is limited to IPv4.
>     >
>     >
>     >
>     > On Tue, Oct 12, 2010 at 6:38 PM, <fred at damen.org
>     <mailto:fred at damen.org>> wrote:
>     >
>     >> localize-queries does not appear in my /etc/dnsmasq.conf and
>     there are no
>     >> /etc/dnsmasq.d/* files.
>     >> There is no mention of localize-queries in the dnsmasq
>     installed man page.
>     >>
>     >> > Are you by any chance using localize-queries?
>     >> >
>     >> > On Mon, Oct 11, 2010 at 11:52 PM, <fred at damen.org
>     <mailto:fred at damen.org>> wrote:
>     >> >
>     >> >> Greetings,
>     >> >>
>     >> >> I have dnsmasq working using DHCP and DNS fine except that
>     the dnsmasq
>     >> >> server responds incorrectly on the loopback address, i.e. other
>     >> computers
>     >> >> that get ip address(s) (dhcp) and resolve names (DNS) works but
>     >> resolving
>     >> >> dns names on the host on which dnsmasq is running indicates the
>     >> configured
>     >> >> dns names are unresolvable.
>     >> >>
>     >> >> /etc/resole.conf
>     >> >> nameserver 127.0.0.1
>     >> >> nameserver xx.xx.xx.xx
>     >> >>
>     >> >> /etc/dnsmasq.conf
>     >> >> ...
>     >> >> interface=lo
>     >> >> interface=eth0
>     >> >> listen-address=127.0.0.1
>     >> >> ...
>     >> >>
>     >> >> /var/log/messages
>     >> >> ...
>     >> >> Oct 11 23:32:55 damen dnsmasq[17165]: started, version 2.52
>     cachesize
>     >> 150
>     >> >> Oct 11 23:32:55 damen dnsmasq[17165]: compile time options: IPv6
>     >> >> GNU-getopt DBus no-I18N DHCP TFTP
>     >> >> Oct 11 23:32:55 damen dnsmasq-dhcp[17165]: DHCP, IP range
>     192.168.0.16
>     >> --
>     >> >> 192.168.0.254, lease time 12h
>     >> >> Oct 11 23:32:55 damen dnsmasq[17165]: reading /etc/resolv.conf
>     >> >> Oct 11 23:32:55 damen dnsmasq[17165]: using nameserver
>     xx.xx.xx.xx#53
>     >> Oct
>     >> >> 11 23:32:55 damen dnsmasq[17165]: ignoring nameserver
>     127.0.0.1 - local
>     >> >> interface
>     >> >> Oct 11 23:32:55 damen dnsmasq[17165]: read /etc/hosts - 5
>     addresses ...
>     >> >>
>     >> >> ping printer1
>     >> >> ping: unknown host printer1
>     >> >>
>     >> >> dig @192.168.0.1 <http://192.168.0.1> printer1
>     >> >> ...
>     >> >> ;; QUESTION SECTION:
>     >> >> ;printer1.                      IN      A
>     >> >>
>     >> >>
>     >> >> ;; ANSWER SECTION:
>     >> >> printer1.               0       IN      A       192.168.0.101
>     >> >> ...
>     >> >>
>     >> >> dig @127.0.0.1 <http://127.0.0.1> printer1
>     >> >> ...
>     >> >> ;; QUESTION SECTION:
>     >> >> ;printer1.                      IN      A
>     >> >>
>     >> >> ;; AUTHORITY SECTION:
>     >> >> .                       6862    IN      SOA
>     a.root-servers.net <http://a.root-servers.net>.
>     >> >> nstld.verisign-grs.com <http://nstld.verisign-grs.com>.
>     2010101101
>     >> >> 1800 900 604800 86400
>     >> >> ...
>     >> >>
>     >> >> uname -a
>     >> >> Linux damen.us <http://damen.us>
>     2.6.33.6-147.2.4.fc13.x86_64 #1 SMP Fri Jul 23 17:14:44
>     >> UTC
>     >> >> 2010 x86_64 x86_64 x86_64 GNU/Linux
>     >> >>
>     >> >>
>     >> >> Any and all help appreciated,
>     >> >>
>     >> >> Fred
>     >> >>
>     >> >>
>     >> >>
>     >> >>
>     >> >> _______________________________________________
>     >> >> Dnsmasq-discuss mailing list
>     >> >> Dnsmasq-discuss at lists.thekelleys.org.uk
>     <mailto:Dnsmasq-discuss at lists.thekelleys.org.uk>
>     >> >> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>     >> >>
>     >> >
>     >>
>     >>
>     >
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20101013/14c7238a/attachment-0001.htm 


More information about the Dnsmasq-discuss mailing list