<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 10/13/2010 04:16 PM, <a class="moz-txt-link-abbreviated" href="mailto:richardvoigt@gmail.com">richardvoigt@gmail.com</a> wrote:
    <blockquote
      cite="mid:AANLkTi=bkfywJ_tDoYqWpzTdvhMx-b_XhxmkA8hOgbc0@mail.gmail.com"
      type="cite"><br>
      <br>
      <div class="gmail_quote">On Wed, Oct 13, 2010 at 2:20 PM, <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:fred@damen.org">fred@damen.org</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          I now see the option in the installed man page.<br>
          There is no mention of this option in my /etc/dnsmasq.conf
          file.<br>
          <br>
          I do not suspect that this is the issue though:<br>
          Each computer, the server in question included, all have the
          same name(s), i.e. interfaces are not named separately.<br>
        </blockquote>
        <div><br>
        </div>
        <div>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.</div>
      </div>
    </blockquote>
    Assuming localise-queries is turned on:<br>
    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<br>
    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<br>
    subnet,  But if there are no single name to multiple ip address
    associations then return the ip address associate with the name <br>
    even if the subnets do not match.<br>
    This is the situation that I am having trouble with.  DNS name
    printer1 is assigned one and only one address, 192.168.0.x.<br>
    Thus dnsmasq should return this address no matter what subnet the
    request came in on.<br>
    <br>
    Besides the /etc/dnsmasq.conf does not enable localise-queries and
    the man page seems to suggest that this feature is disabled by
    default.<br>
    <br>
    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?<br>
    <br>
    <blockquote
      cite="mid:AANLkTi=bkfywJ_tDoYqWpzTdvhMx-b_XhxmkA8hOgbc0@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div> </div>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          Computers severed by dnsmasq both for DHCP and DNS work as
          expected,<br>
           i.e. the network printer 192.168.0.x, DNS name 'printer1'
          gets its name through dnsmasq DHCP server on 192.168.0.1,<br>
                computer nick 192.168.0.y who has its DNS server set in
          /etc/resolv.conf to 192.168.0.1 can ping printer1, <a
            moz-do-not-send="true" href="http://printer1.damen.org"
            target="_blank">printer1.damen.org</a>.<br>
          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<br>
          servers in its /etc/resolv.conf can not ping printer1, <a
            moz-do-not-send="true" href="http://printer1.damen.org"
            target="_blank">printer1.damen.org</a>.  On the SERVER if
          you direct the DNS queries<br>
          to go directly to 192.168.0.1 using dig's @ option the DNS
          name printer1 can be resolved correctly.  Going directly to<br>
          DNS server at 127.0.0.1 using dig does not resolve the DNS
          name.<br>
          <br>
          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<br>
          adding it external name resolution when fast,  and the fact
          that 'dig @<a moz-do-not-send="true" href="http://127.0.0.1"
            target="_blank">127.0.0.1</a> printer1' does not indicate
          inability to contact the<br>
          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<br>
          configuration on the 127.0.0.1 interface?<br>
        </blockquote>
        <div><br>
        </div>
        <div>You might use netstat to find out for sure what process is
          listening on <a moz-do-not-send="true"
            href="http://127.0.0.1:53">127.0.0.1:53</a></div>
        <div> </div>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <br>
          Thanks for the help,<br>
          <br>
          Fred<br>
          <div>
            <div class="h5"><br>
              &gt; I guess I gave you the wrong spelling of the option.
               It is in the online<br>
              &gt; man page but has an 's' not a 'z'.  You might also
              check for the abbreviated<br>
              &gt; option which is "-y".<br>
              &gt;<br>
              &gt; *-y, --localise-queries*Return answers to DNS queries
              from /etc/hosts which<br>
              &gt; depend on the interface over which the query was
              received. If a name in<br>
              &gt; /etc/hosts has more than one address associated with
              it, and at least one of<br>
              &gt; those addresses is on the same subnet as the
              interface to which the query<br>
              &gt; was sent, then return only the address(es) on that
              subnet. This allows for a<br>
              &gt; server to have multiple addresses in /etc/hosts
              corresponding to each of its<br>
              &gt; interfaces, and hosts will get the correct address
              based on which network<br>
              &gt; they are attached to. Currently this facility is
              limited to IPv4.<br>
              &gt;<br>
              &gt;<br>
              &gt;<br>
              &gt; On Tue, Oct 12, 2010 at 6:38 PM, &lt;<a
                moz-do-not-send="true" href="mailto:fred@damen.org">fred@damen.org</a>&gt;
              wrote:<br>
              &gt;<br>
              &gt;&gt; localize-queries does not appear in my
              /etc/dnsmasq.conf and there are no<br>
              &gt;&gt; /etc/dnsmasq.d/* files.<br>
              &gt;&gt; There is no mention of localize-queries in the
              dnsmasq installed man page.<br>
              &gt;&gt;<br>
              &gt;&gt; &gt; Are you by any chance using
              localize-queries?<br>
              &gt;&gt; &gt;<br>
              &gt;&gt; &gt; On Mon, Oct 11, 2010 at 11:52 PM, &lt;<a
                moz-do-not-send="true" href="mailto:fred@damen.org">fred@damen.org</a>&gt;
              wrote:<br>
              &gt;&gt; &gt;<br>
              &gt;&gt; &gt;&gt; Greetings,<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; I have dnsmasq working using DHCP and
              DNS fine except that the dnsmasq<br>
              &gt;&gt; &gt;&gt; server responds incorrectly on the
              loopback address, i.e. other<br>
              &gt;&gt; computers<br>
              &gt;&gt; &gt;&gt; that get ip address(s) (dhcp) and
              resolve names (DNS) works but<br>
              &gt;&gt; resolving<br>
              &gt;&gt; &gt;&gt; dns names on the host on which dnsmasq
              is running indicates the<br>
              &gt;&gt; configured<br>
              &gt;&gt; &gt;&gt; dns names are unresolvable.<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; /etc/resole.conf<br>
              &gt;&gt; &gt;&gt; nameserver 127.0.0.1<br>
              &gt;&gt; &gt;&gt; nameserver xx.xx.xx.xx<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; /etc/dnsmasq.conf<br>
              &gt;&gt; &gt;&gt; ...<br>
              &gt;&gt; &gt;&gt; interface=lo<br>
              &gt;&gt; &gt;&gt; interface=eth0<br>
              &gt;&gt; &gt;&gt; listen-address=127.0.0.1<br>
              &gt;&gt; &gt;&gt; ...<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; /var/log/messages<br>
              &gt;&gt; &gt;&gt; ...<br>
              &gt;&gt; &gt;&gt; Oct 11 23:32:55 damen dnsmasq[17165]:
              started, version 2.52 cachesize<br>
              &gt;&gt; 150<br>
              &gt;&gt; &gt;&gt; Oct 11 23:32:55 damen dnsmasq[17165]:
              compile time options: IPv6<br>
              &gt;&gt; &gt;&gt; GNU-getopt DBus no-I18N DHCP TFTP<br>
              &gt;&gt; &gt;&gt; Oct 11 23:32:55 damen
              dnsmasq-dhcp[17165]: DHCP, IP range 192.168.0.16<br>
              &gt;&gt; --<br>
              &gt;&gt; &gt;&gt; 192.168.0.254, lease time 12h<br>
              &gt;&gt; &gt;&gt; Oct 11 23:32:55 damen dnsmasq[17165]:
              reading /etc/resolv.conf<br>
              &gt;&gt; &gt;&gt; Oct 11 23:32:55 damen dnsmasq[17165]:
              using nameserver xx.xx.xx.xx#53<br>
              &gt;&gt; Oct<br>
              &gt;&gt; &gt;&gt; 11 23:32:55 damen dnsmasq[17165]:
              ignoring nameserver 127.0.0.1 - local<br>
              &gt;&gt; &gt;&gt; interface<br>
              &gt;&gt; &gt;&gt; Oct 11 23:32:55 damen dnsmasq[17165]:
              read /etc/hosts - 5 addresses ...<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; ping printer1<br>
              &gt;&gt; &gt;&gt; ping: unknown host printer1<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; dig @<a moz-do-not-send="true"
                href="http://192.168.0.1" target="_blank">192.168.0.1</a>
              printer1<br>
              &gt;&gt; &gt;&gt; ...<br>
              &gt;&gt; &gt;&gt; ;; QUESTION SECTION:<br>
              &gt;&gt; &gt;&gt; ;printer1.                      IN    
               A<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; ;; ANSWER SECTION:<br>
              &gt;&gt; &gt;&gt; printer1.               0       IN    
               A       192.168.0.101<br>
              &gt;&gt; &gt;&gt; ...<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; dig @<a moz-do-not-send="true"
                href="http://127.0.0.1" target="_blank">127.0.0.1</a>
              printer1<br>
              &gt;&gt; &gt;&gt; ...<br>
              &gt;&gt; &gt;&gt; ;; QUESTION SECTION:<br>
              &gt;&gt; &gt;&gt; ;printer1.                      IN    
               A<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; ;; AUTHORITY SECTION:<br>
              &gt;&gt; &gt;&gt; .                       6862    IN    
               SOA     <a moz-do-not-send="true"
                href="http://a.root-servers.net" target="_blank">a.root-servers.net</a>.<br>
              &gt;&gt; &gt;&gt; <a moz-do-not-send="true"
                href="http://nstld.verisign-grs.com" target="_blank">nstld.verisign-grs.com</a>.
              2010101101<br>
              &gt;&gt; &gt;&gt; 1800 900 604800 86400<br>
              &gt;&gt; &gt;&gt; ...<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; uname -a<br>
              &gt;&gt; &gt;&gt; Linux <a moz-do-not-send="true"
                href="http://damen.us" target="_blank">damen.us</a>
              2.6.33.6-147.2.4.fc13.x86_64 #1 SMP Fri Jul 23 17:14:44<br>
              &gt;&gt; UTC<br>
              &gt;&gt; &gt;&gt; 2010 x86_64 x86_64 x86_64 GNU/Linux<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; Any and all help appreciated,<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; Fred<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt;
              _______________________________________________<br>
              &gt;&gt; &gt;&gt; Dnsmasq-discuss mailing list<br>
              &gt;&gt; &gt;&gt; <a moz-do-not-send="true"
                href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
              &gt;&gt; &gt;&gt; <a moz-do-not-send="true"
                href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss"
                target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;<br>
              &gt;&gt;<br>
              &gt;&gt;<br>
              &gt;<br>
              <br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>