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?
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.
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.
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
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
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
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
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, 126.96.36.199, is OpenDNS
Note: when you make changes to your desired network, remember disconnect and reconnect or restart network manager for changes to take effect