<br><br><div class="gmail_quote">On Wed, Oct 13, 2010 at 11:21 PM, Frederick C. Damen <span dir="ltr">&lt;<a href="mailto:fred@damen.org">fred@damen.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


  
    
  
  <div bgcolor="#ffffff" text="#000000"><div class="im">
    On 10/13/2010 04:16 PM, <a href="mailto:richardvoigt@gmail.com" target="_blank">richardvoigt@gmail.com</a> wrote:
    <blockquote type="cite"><br>
      <br>
      <div class="gmail_quote">On Wed, Oct 13, 2010 at 2:20 PM, <span dir="ltr">&lt;<a href="mailto:fred@damen.org" target="_blank">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&#39;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></div>
    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?</div></blockquote><div><br></div><div>Initially, use either netstat or the dnsmasq logs (check after you query, not just the startup information) to verify that your request actually is going to dnsmasq and not some other dns daemon.  The dnsmasq logs might also contain other clues as to what is happening.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000"><div><div></div><div class="h5"><br>
    <br>
    <blockquote 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 &#39;printer1&#39;
          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 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 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&#39;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 &#39;dig @<a href="http://127.0.0.1" target="_blank">127.0.0.1</a> printer1&#39; 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 href="http://127.0.0.1:53" target="_blank">127.0.0.1:53</a></div>
        <div> </div>
        </div></blockquote><br>
  </div></div></div>

</blockquote></div><br>