Re: [Dnsmasq-discuss] What if external DNS unreachable or timed out
Thank you. Well it looks like dnsmasq does not cache. When I send SIGUSR1 to dnsmasq (with log-queries option enabled) it returns list of cache which consists of one entry - 127.0.0.1 (flags 4FRI H). This is despite the fact that I performed dozen of queries just before. Log file looks like: query[A] host.domain from 127.0.0.1 forwarded host.domain to 10.0.0.1 reply host.domain is 10.0.10.10 query[A] host.domain from 127.0.0.1 forwarded host.domain to 10.0.0.1 reply host.domain is 10.0.10.10 query[A] host.domain from 127.0.0.1 forwarded host.domain to 10.0.0.1 reply host.domain is 10.0.10.10 10.0.0.1 is my internal DNS server (it is authoritative for domain domain) Is there known list of issues which can force dnsmasq not to cache replies? Otherwise I have no idea where to dig. - Original Message - From: /dev/rob0 r...@gmx.co.uk To: dnsmasq-discuss@lists.thekelleys.org.uk Sent: Thursday, February 12, 2015 10:13:40 PM GMT -05:00 US/Canada Eastern Subject: Re: [Dnsmasq-discuss] What if external DNS unreachable or timed out On Thu, Feb 12, 2015 at 08:43:20PM -0500, Nikolay P wrote: I am wondering what will happen if none of the external DNS servers are reachable or suddenly (for any reason) a DNS query to external servers timed out. Will Dnsmasq reply to the client's request from cache? Assume that this particular query is performed frequently and it should be in Dnsmasq cache. If the record is cached, dnsmasq is not going to ask an upstream nameserver. If a query is made to an upstream nameserver, that means the record is NOT in the cache. Then if the upstream query times out or otherwise fails, that's what dnsmasq will tell the client. So, will the Dnsmasq reply to the client's request from cache if none of the external servers replied? No, it wasn't cached. -- http://rob0.nodns4.us/ Offlist GMX mail is seen only if /dev/rob0 is in the Subject: ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What if external DNS unreachable or timed out
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 14/02/15 20:00, Nikolay P wrote: Thank you. Well it looks like dnsmasq does not cache. When I send SIGUSR1 to dnsmasq (with log-queries option enabled) it returns list of cache which consists of one entry - 127.0.0.1 (flags 4FRI H). This is despite the fact that I performed dozen of queries just before. Log file looks like: query[A] host.domain from 127.0.0.1 forwarded host.domain to 10.0.0.1 reply host.domain is 10.0.10.10 query[A] host.domain from 127.0.0.1 forwarded host.domain to 10.0.0.1 reply host.domain is 10.0.10.10 query[A] host.domain from 127.0.0.1 forwarded host.domain to 10.0.0.1 reply host.domain is 10.0.10.10 10.0.0.1 is my internal DNS server (it is authoritative for domain domain) Is there known list of issues which can force dnsmasq not to cache replies? Otherwise I have no idea where to dig. If the time-to-live value in the replies for host.domain is zero or only a few seconds, then the reply will either not be cached, or thrown out before you get around to re-querying it. Use dig to make the test queries, and it will tell you the TTL values. (It's also possible to disable caching in dnsmasq by configuration. You're unlikely to have done that by accident) Cheers, Simon. - Original Message - From: /dev/rob0 r...@gmx.co.uk To: dnsmasq-discuss@lists.thekelleys.org.uk Sent: Thursday, February 12, 2015 10:13:40 PM GMT -05:00 US/Canada Eastern Subject: Re: [Dnsmasq-discuss] What if external DNS unreachable or timed out On Thu, Feb 12, 2015 at 08:43:20PM -0500, Nikolay P wrote: I am wondering what will happen if none of the external DNS servers are reachable or suddenly (for any reason) a DNS query to external servers timed out. Will Dnsmasq reply to the client's request from cache? Assume that this particular query is performed frequently and it should be in Dnsmasq cache. If the record is cached, dnsmasq is not going to ask an upstream nameserver. If a query is made to an upstream nameserver, that means the record is NOT in the cache. Then if the upstream query times out or otherwise fails, that's what dnsmasq will tell the client. So, will the Dnsmasq reply to the client's request from cache if none of the external servers replied? No, it wasn't cached. -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBCAAGBQJU391GAAoJEBXN2mrhkTWiMQYP/Anapo7LXImykuh7EdzkVYlj Fa7LrmR9aEpI6S0mhPDd3zx37BUquT9xTIhhXSzOwVWuR/eCf8pJx3vq8PHhaQiw OnvMS9jPXk2fLUFEoB8QEs022nKaKokrJMUMnpGN8GkhPSpge4oZcWJCd122lKHm 5HcJvGiMo9OEs4w8eVpt1rcOVWyjBYh4N7XUhCiKDkAAW3mgwxOaaVjfZNVbDDKN arPYWEpUpGs1F8r6l3LWhP0gTzaiBkqCd/L8+PQ8Yl8nMY17Ugh8l/NcYaH0iQ11 BRUJwLCcG2gCgKWVHH8YnXVqv/hESE8zdD/DVe8NJcLzMAV45GCvp951COgJazJg h/xg+T/N4CIN/BDUGrK4GMr7s7eptbfYzYV2VcvNZhqMlPSHY1mcfxlEMdBSGmKS SuJFxqlCzW4/i9EoyPGT7uhSCkjmYOG+SwMqa3GMQAKBdEXe94hTtCV/sHuuD1Ln T6R5r5vkBWVhUX3V8/BwoTSI/jDzqJUNGVNGCfO8McphjzbrX8GwMMtt3d2z+oZK D425KiCSagv44z/rFdijlIIjApbuIFzoalsuPfBBXgVetS1DL1k0ounAxCYPJxSx qdfA+y6ViIskIn1CD6JdfitOOqBX9JeW5M1ehn8ozr/WxDUFF3BYU5qGL+p1RUfL 3zr7pYGjwESyS4G1GRhY =wpl0 -END PGP SIGNATURE- ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] What if external DNS unreachable or timed out
On Thu, Feb 12, 2015 at 08:43:20PM -0500, Nikolay P wrote: I am wondering what will happen if none of the external DNS servers are reachable or suddenly (for any reason) a DNS query to external servers timed out. Will Dnsmasq reply to the client's request from cache? Assume that this particular query is performed frequently and it should be in Dnsmasq cache. If the record is cached, dnsmasq is not going to ask an upstream nameserver. If a query is made to an upstream nameserver, that means the record is NOT in the cache. Then if the upstream query times out or otherwise fails, that's what dnsmasq will tell the client. So, will the Dnsmasq reply to the client's request from cache if none of the external servers replied? No, it wasn't cached. -- http://rob0.nodns4.us/ Offlist GMX mail is seen only if /dev/rob0 is in the Subject: ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] What if external DNS unreachable or timed out
The Dnsmasq home page says: The DNS subsystem provides a local DNS server for the network, with forwarding of all query types to upstream recursive DNS servers and cacheing of common record types (A, , CNAME and PTR, also DNSKEY and DS when DNSSEC is enabled). I am wondering what will happen if none of the external DNS servers are reachable or suddenly (for any reason) a DNS query to external servers timed out. Will Dnsmasq reply to the client's request from cache? Assume that this particular query is performed frequently and it should be in Dnsmasq cache. I am trying to handle a situation when my software sends a DNS query but (very rarely) the reply is being lost and my software runs into timeout. In attempt to resolve this I want to install Dnsmasq on those computers and run it on 127.0.0.1 so instead of asking external servers my software will be asking a local system. So, will the Dnsmasq reply to the client's request from cache if none of the external servers replied? Thank you for your attention. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss