Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

As I look for DNS servers in command prompt:

   IPv4 Address. . . . . . . . . . . : 192.168.1.2(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCP Server . . . . . . . . . . . : 192.168.1.1
   DNS Servers . . . . . . . . . . . : 192.168.1.1

Why do they have the same IP address as the Default Gateway i.e. my router?

I have DNS servers set to "Obtain IP adresses automatically" in the configuration settings. Are there any public DNS server addresses which are actually being used?

share|improve this question

3 Answers 3

Your home router tends to 'act' as both DNS server, and DHCP server.

DHCP server, when receiving request of IP address from connected devices, will provide a few things:

  1. IP Address
  2. Default Gateway (which will point to itself - aka the router - 192.168.1.1 in this sample)
  3. DNS Servers (which most home-use routers with default configuration will default to the gateway as the DNS server)

In a sense, this makes it easier for home user, they don't have to worry about the nitty gritty details of getting Gateway, and DNS servers, as all are provided by the DHCP server (aka router). And the router, acting as a DNS, simply relaying request through your ISP DNS server.

Your router will (most often than not) receive DHCP information from your ISP. DHCP information from your ISP will have similar info, but used by the router, not passed down to your PC. Hence onward, your router will have your "Public IP" address, Default Gateway (somewhere on the ISP), and DNS server information.

If you want to specify your own DNS server, you can do that in 2 places:

  1. Individual PC / Devices connected to the router
  2. Router

If you set it on the router (and everyone are still on "Obtain IP address automatically"):
Every devices will get the DNS server you set on the router.

If you set it on the PC / Devices connected to the router, the ONLY THAT DEVICE have that DNS server information on them, and all others will use whatever your router gave to them.

Hope this helps. If it is not clear enough please let me know and I'll try to add some more details, or some graph to make it easier to understand.

share|improve this answer

99% of home-based routers will provide basic DNS resolution, along with being the DHCP server, and a few other features. I'll go through each one.

DHCP Server is the computer that responds to the broadcast request for an address. The router manages this list, so it knows what IP addresses are in use, and can then update the DNS Server part of it.

The DNS Server will do the name resolution between different operating systems on the network, and some basic websites everyone should know about (i.e. Google, Superuser, the like). When it doesn't know the IP address for a name, it then forwards it on to your ISP's DNS servers (or, if you configured it differently, another DNS server). The router is going to 99% of the time be your default gateway, meaning that any traffic that is not in your local subnet will go through the router. This is default behaviour.

Although recommendations of which x to use for y, the only public DNS servers I recommend are the Google DNS servers, 8.8.8.8 and 8.8.4.4

share|improve this answer
    
Can I find which DNS servers am I currently on? Those I've mentioned above doesn't look like the real addresses. –  cpx Nov 14 '13 at 1:19
    
These descriptions are incorrect. The DHCP server does respond to address requests, but those replies contain the host address to use, the default gateway, the DNS servers, and potentially a long list of other config data. It may update dynamic DNS servers somewhere, but that's a separate function, unrelated to the question. The router in this case appears to be running a DNS server. It does not have own knowledge of "well-known sites", though, it needs to look everything up elsewhere; the advantage of having it is that the reply can be cached for a while. –  Gabe Nov 14 '13 at 1:25
    
I know about the extra info but didn't include it as I didn't feel it was relevant (yet). As for the well known sites, I made a mistake, as I put in my own router config for some sites I use constantly –  Canadian Luke Nov 14 '13 at 1:29

The DNS Server is responsible for turning names (such as www.superuser.com) into IP addresses (such as 198.252.206.16). The replies will be cached by the programs needing them, but these programs don't share them - so if you visit a website with both Chrome and Firefox, they will both independently look up the address to use.

However, the replies are also cached by the (first) DNS Server they query. In this case, that's your router, so the second lookup, if it's soon after the first, will not need to go to the internet, but can be answered by your router directly - that will be in less than 1 millisecond, rather than (probably) tens of milliseconds if you ask your ISP, more if the ISP's nameserver setup ends up not having the reply in its cache.

Whether your router uses a single "forwarding nameserver" (probably your ISP's, assuming they preconfigured it) or does the full resolution itself (here's a complete description) depends on the router configuration.

If you get pages full of ads when you mistype, or blocked addresess, these might be your ISP sending fake replies. If you want to avoid that, or just generally don't trust the router configuration, you can change your network settings by hand and explicitly set other DNS servers to use - 8.8.8.8 and 8.8.4.4 are addresses you can use where the service is provided by Google; it's designed to be very fast, and they promise to never do any of the reply faking.

share|improve this answer

Your Answer

 
discard

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.