<div dir="ltr">Hi Robert.<div>Turn on query logging by doing "rndc querylog". You should see a message saying that has been done in "named.log", to where each query will now be logged. If you have views, part of the query log will contain which view was matched. So this will tell you two things:</div><div><ol><li>If the queries you are making are actually being handled by BIND at all.</li><li>If they are, which view handled them.</li></ol></div><div>Try that and see what you discover.</div><div><br></div><div>By the way, if you want to see a snapshot of the cache you will have to dump it to disk using "rndc dumpdb -all", This will produce a file called "named_dump.db" in the working directory. Commonly this will be the same location as your zone files. It's a text file, so you can look through it with cat/more/less etc.</div><div><br></div><div>Cheers, Greg</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 3 Aug 2022 at 21:23, Robert Moskowitz <<a href="mailto:rgm@htt-consult.com">rgm@htt-consult.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    This is boarderline not thinking on my part.<br>
    <br>
    OF COURSE those FQDNs resolve fast; they are in local ZOne files. 
    No lookup needed.<br>
    <br>
    Sheesh.<br>
    <br>
    "Slow down, you move to fast.  Got to make the Mornin' last!"  :)<br>
    <br>
    <div>On 8/3/22 14:43, Robert Moskowitz
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      Perhaps this is only caching the zones in the Internal View, not
      all public stuff looked up by internal clients?<br>
      <br>
      I say this because I get fast responses to internal servers, but
      slow if at all to external ones.<br>
      <br>
      Grasping here because my search foo is weak and I can't find where
      it is defined exactly what IS cached.<br>
      <br>
      <div>On 8/3/22 10:52, Robert Moskowitz via
        bind-users wrote:<br>
      </div>
      <blockquote type="cite">
        
        thanks Greg.  Yes I need to figure out how to troubleshoot
        this.  But here is some stuff:<br>
        <br>
        # cat resolv.conf <br>
        # Generated by NetworkManager<br>
        search <a href="http://attlocal.net" target="_blank">attlocal.net</a> <a href="http://htt-consult.com" target="_blank">htt-consult.com</a><br>
        nameserver 23.123.122.146<br>
        nameserver 2600:1700:9120:4330::1<br>
        <br>
        My server is 23.123.122.146.  That IPv6 addr is my ATT router.<br>
        <br>
        # cat named.conf<br>
            include "/etc/named/named.acl";<br>
        <br>
        options {<br>
            listen-on port 53 { any; };<br>
            listen-on-v6 port 53 { any; };<br>
            use-v4-udp-ports { range 10240 65535; };<br>
            use-v6-udp-ports { range 10240 65535; };<br>
            directory     "/var/named";<br>
            dump-file     "/var/named/data/cache_dump.db";<br>
            statistics-file "/var/named/data/named_stats.txt";<br>
            memstatistics-file "/var/named/data/named_mem_stats.txt";<br>
            allow-query     { localhost; };<br>
        <br>
            dnssec-enable no;<br>
            dnssec-validation no;<br>
            bindkeys-file "/etc/named.iscdlv.key";<br>
            managed-keys-directory "/var/named/dynamic";<br>
            pid-file "/run/named/named.pid";<br>
            session-keyfile "/run/named/session.key";<br>
        };<br>
        <br>
        logging {        channel default_debug {<br>
                        file "data/named.run";<br>
                        severity dynamic;        };};<br>
        <br>
        view "internal"<br>
        {    include "/etc/named/named.internal";};<br>
        <br>
        view    "external"<br>
        {    include "/etc/named/named.external";};<br>
        <br>
        include "/etc/named/rndc.key";<br>
        include "/etc/named.root.key";<br>
        <br>
        # cat named.acl <br>
        acl "httslaves"  {<br>
        //    address of NSs<br>
            208.83.69.35;    // <a href="http://ns1.mudkips.net" target="_blank">ns1.mudkips.net</a><br>
            208.83.66.130;    // <a href="http://ns2.mudkips.net" target="_blank">ns2.mudkips.net</a><br>
            63.68.132.50;    // <a href="http://ns1.icsl.net" target="_blank">ns1.icsl.net</a><br>
            2607:f4b8:2600:1::1;    // <a href="http://ns1.mudkips.net" target="_blank">ns1.mudkips.net</a><br>
            2607:f4b8:2600:6::1;    // <a href="http://ns2.mudkips.net" target="_blank">ns2.mudkips.net</a><br>
        };<br>
        <br>
        acl "httnets" {<br>
            127.0.0.1;<br>
            <a href="http://23.123.122.144/28" target="_blank">23.123.122.144/28</a>;<br>
            <a href="http://192.168.32.0/24" target="_blank">192.168.32.0/24</a>;<br>
            <a href="http://192.168.64.0/24" target="_blank">192.168.64.0/24</a>;<br>
            <a href="http://192.168.96.0/24" target="_blank">192.168.96.0/24</a>;<br>
            <a href="http://192.168.160.0/23" target="_blank">192.168.160.0/23</a>;<br>
            <a href="http://192.168.128.0/23" target="_blank">192.168.128.0/23</a>;<br>
            <a href="http://192.168.192.0/22" target="_blank">192.168.192.0/22</a>;<br>
            <a href="http://192.168.224.0/24" target="_blank">192.168.224.0/24</a>;<br>
            ::1;<br>
            2600:1700:9120:4330::/64;<br>
        };<br>
        <br>
        <br>
        # cat named.internal <br>
        <br>
            match-clients        { httnets; };<br>
            match-destinations    { httnets; };<br>
            allow-query        { httnets; };<br>
            allow-query-cache    { httnets; };<br>
            allow-recursion        { any; };<br>
            recursion yes;<br>
            empty-zones-enable yes;<br>
        <br>
            zone "." IN {<br>
                type hint;<br>
                file "<a href="http://named.ca" target="_blank">named.ca</a>";    };<br>
        <br>
                include "/etc/named.rfc1912.zones";<br>
        <br>
            zone "<a href="http://htt-consult.com" target="_blank">htt-consult.com</a>" { <br>
                type master;<br>
                file "httin-consult.com.zone";    };<br>
        <br>
            zone "<a href="http://labs.htt-consult.com" target="_blank">labs.htt-consult.com</a>" {<br>
                type master;<br>
                file "labs.htt-consult.com.hosts";    };<br>
                zone "<a href="http://intelcon.htt-consult.com" target="_blank">intelcon.htt-consult.com</a>" {<br>
                        type master;<br>
                        file
        "intelcon.htt-consult.com.hosts";                };<br>
                zone "<a href="http://mobile.htt-consult.com" target="_blank">mobile.htt-consult.com</a>" {<br>
                        type master;<br>
                        file "mobile.htt-consult.com.hosts";        };<br>
            zone "<a href="http://test.htt-consult.com" target="_blank">test.htt-consult.com</a>" { <br>
                type master;<br>
                file "test.httin-consult.com.hosts";    };<br>
                zone "128.168.192.in-addr.arpa" {<br>
                        type master;<br>
                        file "128.168.192.in-addr.arpa.zone";  };<br>
                zone "0-24.128.168.192.in-addr.arpa" {<br>
                        type master;<br>
                        file "0-24.128.168.192.in-addr.arpa.zone";    };<br>
            zone "htt" {<br>
                type master;<br>
                file "htt.zone";  };<br>
            zone "home.htt" {<br>
                type master;<br>
                file "home.htt.zone";    };<br>
        <br>
        <br>
        Do you also want my named.external?<br>
        <br>
        <br>
        <div>On 8/3/22 09:39, Greg Choules
          wrote:<br>
        </div>
        <blockquote type="cite">
          
          <div dir="ltr">Hi Robert.
            <div>May we see the file /etc/resolv.conf and your BIND
              configuration? It's difficult to guess what might be going
              on with only a small snippet of information.</div>
            <div>If you "ping somewhere" (or "ssh a-server", or
              whatever) the OS will consult resolv.conf to determine
              where to send DNS queries. If that's not your local
              instance of BIND then you could be looking for trouble in
              the wrong place.</div>
            <div><br>
            </div>
            <div>If you *do* have an address of the local machine as the
              first 'nameserver' entry in resolv.conf you will need to
              know what that query looks like to determine how BIND is
              going to handle it.</div>
            <div>You also need to know what BIND will try and do when it
              does receive queries.</div>
            <div><br>
            </div>
            <div>Packet captures are your friend here, using tcpdump (to
              disk, not to screen). Gather evidence first, then make
              theories.</div>
            <div><br>
            </div>
            <div>Cheers, Greg</div>
          </div>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Wed, 3 Aug 2022 at
              14:29, Robert Moskowitz <<a href="mailto:rgm@htt-consult.com" target="_blank">rgm@htt-consult.com</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Part of my problem is
              that caching does not seem to be working in my <br>
              internal view.<br>
              <br>
              Something is happening such that my internal systems AND
              the server <br>
              itself cannot resolve names and looses it even 5 min
              later, indicating <br>
              not caching.<br>
              <br>
              I read <a href="https://kb.isc.org/docs/aa-00851" rel="noreferrer" target="_blank">https://kb.isc.org/docs/aa-00851</a><br>
              <br>
              In my include for the internal view (named.internal) I
              have:<br>
              <br>
                   match-clients        { httnets; };<br>
                   match-destinations    { httnets; };<br>
                   allow-query        { httnets; };<br>
                   allow-query-cache    { httnets; };<br>
                   allow-recursion        { any; };<br>
                   recursion yes;<br>
                   empty-zones-enable yes;<br>
              <br>
              Yet I get on my DNS server:<br>
              <br>
              ping <a href="http://www.google.com" rel="noreferrer" target="_blank">www.google.com</a><br>
              ping: <a href="http://www.google.com" rel="noreferrer" target="_blank">www.google.com</a>:
              Name or service not known<br>
              <br>
              Then later it works.<br>
              <br>
              Then later it doesn't again.<br>
              <br>
              Sigh.  If at least caching was working for internal use, I
              would be able <br>
              to work more smoothy?<br>
              <br>
              <br>
              <br>
              <br>
              -- <br>
              Visit <a href="https://lists.isc.org/mailman/listinfo/bind-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a>
              to unsubscribe from this list<br>
              <br>
              ISC funds the development of this software with paid
              support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a>
              for more information.<br>
              <br>
              <br>
              bind-users mailing list<br>
              <a href="mailto:bind-users@lists.isc.org" target="_blank">bind-users@lists.isc.org</a><br>
              <a href="https://lists.isc.org/mailman/listinfo/bind-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a><br>
            </blockquote>
          </div>
        </blockquote>
        <br>
        <br>
        <fieldset></fieldset>
      </blockquote>
      <br>
      <br>
      <fieldset></fieldset>
    </blockquote>
    <br>
  </div>

</blockquote></div>