[Dnsmasq-discuss] Multiple upstream servers
Simon Kelley
simon at thekelleys.org.uk
Wed Mar 14 20:06:39 GMT 2007
Jay Guerette wrote:
> In my dnsmasq.conf I have the following lines:
>
> server=199.2.252.10
> server=204.97.212.10
> server=204.117.214.10
>
> If I run tcpdump to examine the DNS traffic, I'll see something like
> this right after dnsmasq starts:
>
> 15:50:06.302001 IP 10.0.2.10.33109 > 199.2.252.10.53: 35868+ A?
> www.google.com. (32)
> 15:50:06.302330 IP 10.0.2.10.33109 > 204.97.212.10.53: 35868+ A?
> www.google.com. (32)
> 15:50:06.302363 IP 10.0.2.10.33109 > 204.117.214.10.53: 35868+ A?
> www.google.com. (32)
>
> It seems to test all the servers; but then, it always uses the 1st
> entry, and never uses the others:
>
> 15:50:33.629819 IP 10.0.2.10.33109 > 199.2.252.10.53: 27414+ A?
> www.vonage.com. (32)
<snip>
>
> If I change the order of the server= lines in my .conf, it will repeat
> the initial 'test' behavior and then use the new 1st entry again.
> Enabling/disabling 'strict-order' has no impact.
>
> I have tested on RH 9 with v2.38, and Ubuntu 6.06 with v2.25.
>
I'm not sure what your question is. You are right that dnsmasq tests the
servers on the first query: whichever replys first gets used. If the
server in use stops responding or responds very slowly, the test will be
done again, and a new server will be selected. It's likely that all
three of your servers are about equal, so the first one tends to win the
race, because the query gets sent to it first.
"strict-order" should stop the testing - the first server will always be
used, and if it does not respond, then the query will go to the second
one when it is re-tried. Have you seen different results to this?
HTH
Simon.
> _______________________________________________
> 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