开发者

Query DNS in Ubuntu

I use two DNS servers a public one (8.8.8.8) and a local one (192.168.1.20) In ubuntu, If I wrote both DNSs 192.168.1.20, 8.8.8.8 it will always query the first and until the first is down and then it will start querying the second. And of course I have to make the local point again to 8.8.8.8 Like this i have almost no problems, I can resolve local addresses and also public ones but when I'm out of the office that's were all the problems start. Having the local DNS first makes ubuntu checks for it every single time it needs to resolve. So I end up switching switching the priority of the DNS every (8.8.8.8, 192.168.1.20) time I change my location.

This is not the case if I was using windows. It somehow sends to both DNSs at once or something of that sort. Is there a way to avo开发者_StackOverflow社区id changing the DNS for every location?


Ubuntu also must query each server in /etc/resolv.conf if there is no answer from the first server.
Give an output of 'dig google.com' please


You wrote 'until the first is down'... The system of course will connect other servers ONLY if has no respond from the first one!! The servers are listed in preferable order


Not an answer but a possible work around.
Are you able to use different network interfaces for each network?
If so you can specify different "dns-nameservers" in the "/etc/network/interfaces" file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜