[Dnsmasq-discuss] "--all-servers" always on?

Simon Kelley simon at thekelleys.org.uk
Thu Dec 12 17:27:21 GMT 2019


By default, dnsmasq send a query to all the upstream servers over 50
queries or every 20 seconds. If you're testing and doing queries slowly,
the 20 second rule can make it look like _every_ query gets broadcast.

If this is a problem, you can edit src/config.h and recompile.


#define FORWARD_TEST 50 /* try all servers every 50 queries */
#define FORWARD_TIME 20 /* or 20 seconds */



Cheers,

Simon.


On 10/12/2019 16:41, John Siu wrote:
> You will need "log-queries=extra" in config to see it. Then use
> nslookup/dig to different domains.
> 
> On Tue, Dec 10, 2019 at 11:35 AM John Siu <john.sd.siu at gmail.com> wrote:
>>
>> I see it doing it for every single request.
>>
>> On Tue, Dec 10, 2019 at 11:12 AM Simon Rettberg
>> <simon.rettberg at rz.uni-freiburg.de> wrote:
>>>
>>> Am Mon, 9 Dec 2019 11:58:22 -0500
>>> schrieb John Siu <john.sd.siu at gmail.com>:
>>>
>>> dnsmasq sends queries to all servers occasionally to determine which
>>> one replies fastest, and then keeps using that one exclusively for a
>>> while. Do you see every single query sent to all servers, or just the
>>> first one after restarting dnsmasq?
>>>
>>> - Simon
>>>
>>>> OS: Ubuntu 18.04 with all updates
>>>> dnsmasq version: 2.79-1
>>>>
>>>> According to man page:
>>>>
>>>> --all-servers
>>>>     By default, when dnsmasq has more than one upstream server
>>>> available, it will send queries to just one server. Setting this flag
>>>> forces dnsmasq to send all queries to all available servers. The
>>>> reply  from  the  server which  answers first will be returned to the
>>>> original requester.
>>>>
>>>> I don't have that flag in command line or in the config file. However
>>>> with "log-queries=extra" in config file, I am seeing following:
>>>>
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 query[A]
>>>> news.com from 10.10.10.101
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 2001:1998:f00:2::1
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 2001:1998:f00:1::1
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 2606:4700:4700::1001
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 2606:4700:4700::1111
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 2001:4860:4860::8844
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 2001:4860:4860::8888
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 209.18.47.63
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 209.18.47.62
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 209.18.47.61
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 1.0.0.1
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 1.1.1.1
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 8.8.4.4
>>>> Dec 09 11:29:24 door dnsmasq[9403]: 3640 10.10.10.101/49351 forwarded
>>>> news.com to 8.8.8.8
>>>> Dec 09 11:29:25 door dnsmasq[9403]: 3640 10.10.10.101/49351 reply
>>>> news.com is 35.190.79.82
>>>>
>>>> Is --all-servers behavior changed to default on? Is there a way to
>>>> revert it?
>>>>
>>>> Thank you!
>>>>
>>>> John Siu
>>>
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list