Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

My default DNS on my router is set to DynDNS. If I set the router as default DNS on my pc, it would use DynDNS as the DNS. Then what if I set Google Public DNS as DNS on my pc, and DynDNS on my router, which DNS will it use?

share|improve this question
"which DNS will it use?" - the it refers to your Ubuntu PC I guess? – gertvdijk Jan 12 '13 at 1:49

2 Answers 2

up vote 1 down vote accepted

Your all-in-one-router (effectively also DNS+DHCP+Switch, etc.) is just a 'relay' device in this. It needs another DNS server to relay your DNS queries to and this is called a recursive lookup. PCs can 'ask' these DNS queries either to your router, or they can talk to another one on the internet directly if you want to, e.g. (one of Google's Public DNS service). It will then just bypass the router in DNS queries.

The router might see the queries passing, but unless it intercepts it, it will just happily pass that as all other traffic you send into the world via it.

share|improve this answer
Thanks for answering with details. – Im'juz ChanYun Jan 12 '13 at 1:58

Network Manager settingsfor your network would actually determine how would a computer resolves domains. Open the Network Connections editor (you can do that either through Network Manager indicator -> Edit Connections or typing in terminal nm-connection-editor ). Select your network name, click Edit button, and go to IPv4 Settings tab. enter image description here

Now, take a look at the Method drop-down menu. There's two options of particular interest Automatic (DHCP) and Automatic (DHCP) addresses only. Automatic (DHCP) would use router's DNS. If you had specified another DNS server, like in the image above, your computer would use router's DNS as well as the one you specified. Which one would be used then ? The closest, your routers. If that one couldn't resolve - the second DNS server is asked to resolve. Try using these settings, and you will see the output of nm-tool | tail tell you two DNS addresses, just like here

enter image description here

What would happen if you used Automatic (DHCP) address only ? As the name suggests, suggests , your machine would only receive an IP address from the router, but use DNS that you specified. And again, we can verify that with nm-tool

enter image description here

How do you know it works ? You could always test with websites that your internet service provider blocks ( if you know of such, of course ). Or you could also use dig command , which is a domain information look-up

enter image description here

As you can see in the image above, on line 13 it confirms that with Automatic (DHCP) address only setting, my machine sends requests to the DNS server I specified, which in this case,, is OpenDNS

Note: when you make changes to your desired network, remember disconnect and reconnect or restart network manager for changes to take effect

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.