[Dnsmasq-discuss] Is is possible to configure dnsmasq to query multiple DNS servers for a single request, and return the nearest IP?

石骁毅 ashi009 at gmail.com
Wed Nov 28 03:45:16 GMT 2012


Hi all,

When using a public DNS, there is huge catch for not playing so well with
CDN.
Is there a way to preserve the CDN by asking dnsmasq to send multiple
resolve
request to a few server instead of one, and return the IP with shorter
route path.

It doesn't have to return immediately, but query the second one in another
thread
(just saying,) and after the other is proved nearer then update the entry
in the
cache. So that the client will get a better resolve result when the cache
expires.

I knew this could be done by using `--server` option to assign DNS server
for a list
of domains, but when there are thousands of domains need to be set this is
a little
painful. So I'm seeking for a better solution.

Thanks,
Xiaoyi


PS:
I don't have much options other than using a public DNS, since internet
in China
is highly censored, domains like google.com, twitter.com will be
hijacked using
ISP provided DNS. For example:

root at OpenWrt:~# nslookup twitter.com 202.106.196.115
Server:    202.106.196.115
Address 1: 202.106.196.115 linedns.bta.net.cn

Name:      twitter.com
Address 1: 59.24.3.173
root at OpenWrt:~# nslookup twitter.com 8.8.8.8
Server:    8.8.8.8
Address 1: 8.8.8.8 google-public-dns-a.google.com

Name:      twitter.com
Address 1: 199.59.150.7 r-199-59-150-7.twttr.com
Address 2: 199.59.149.230 www4.twitter.com
Address 3: 199.59.150.39 r-199-59-150-39.twttr.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20121128/a4240627/attachment.html>


More information about the Dnsmasq-discuss mailing list