DNS server settings on router?

okppko

Distinguished
Nov 6, 2009
350
0
18,790
hardware: 802.11g wifi router.
software: ubuntu 10.04lts.

ubuntu computer is connected to router using 802.11g wifi card.

on the router the first DNS server and
second DNS server are set to user defined figures.

Question: Must the first DNS server and second DNS server on the computer
be set to the same user defined figures as on the router, to ensure that the user
defined first DNS server and second DNS server figures are actually used?

Thank you.
 

SinrG202

Distinguished
Aug 18, 2009
6
0
18,510
DNS servers are more of a personal preference. ISP's will often distribute routers with thier own DNS servers. This means you go through them to find anyother website/ip address. You will have no problems if you have a working internet connection (Default Gateway is important for this) and have different (but valid) DNS servers on every device.

When stuck for DNS servers you can use Primary 8.8.8.8 Secondary 8.8.4.4. These belong to google so should pretty much resolve anything and can default searches to google. I generally stick any non-corporate DNS servers as above.

Most routers will push out themselves as the default gateway and the dns server. This is fine, and normal. This just means it's added itself to the dns path. This means you will be able to resolve internal IPs (other devices on your own network).
 
If you use netflix or other video service, you may want to use your ISP's DNS servers as some CDN's (content delivery networks) use your DNS to determine your geographical location and will select the closest server to you to stream the content/video. Using google's DNS or OpenDNS servers make it appear that you are in a different geographical location.
 

okppko

Distinguished
Nov 6, 2009
350
0
18,790
Thank you for answers.
On the router I have set the DNS servers to what I want. But I don't know
how to set the DNS servers on the ubuntu computer. So the question
is mainly, if the DNS settings on the router are used, also if the DNS settings
on the computer are different?
 
I beleive you can just edit your /etc/resolv.conf file and add this line to the top of the file:

nameserver xxx.xxx.xxx.xxx

Where xxx.xxx.xxx.xxx is the LAN IP address of your router, then it will use your router's DNS servers. If that doesn't work, then just add a line for each dns server and use the same addresses that you have configured in your router.
 

SinrG202

Distinguished
Aug 18, 2009
6
0
18,510


You know.. I've never considered that.