Networking – Google Public DNS is not used in trace route

dnsgoogle-public-dnsnameservernetworkingwebserver

In my PC I am using Google Public DNS as my DNS servers. In Internet protocol (TCP/IP) properties I have set Preferred DNS server to 8.8.4.4 and Alternate DNS server to 8.8.8.8.

According to me this DNS server should be used to resolve any request to website to its IP by using this DNS servers (see Google DNS and How Domain Name Servers Work).

But when I checked trace route to a website in my PC I got the following output:

 Tracing route to www.google.com [74.125.236.80] over a maximum of 30 hops:   
 1    <1 ms    <1 ms    <1 ms  192.168.1.201  
 2   360 ms   349 ms   292 ms  122.178.216.1    
 3   145 ms   107 ms   148 ms  122.166.32.121    
 4    32 ms    53 ms   120 ms  122.166.32.9   
 5    45 ms    42 ms   121 ms  122.175.255.29  
 6    63 ms    76 ms    51 ms  182.79.255.45    
 7    52 ms   134 ms    61 ms  72.14.194.22    
 8    86 ms    59 ms    72 ms  72.14.232.202    
 9   106 ms   107 ms    60 ms  66.249.94.39   
10   101 ms   103 ms   117 ms  209.85.249.235   
11   148 ms   224 ms   276 ms  74.125.236.80   Trace complete. 

When I checked all these IPs in who.is I found that they belong to my ISP. So my question is where is Google Public DNS used? Also how come my ISP's nameserver is used even if I set Google Public DNS as the DNS server in my PC? Or are my settings wrong?

Best Answer

You don't see the DNS request in traceroute. To see which DNS server is used, try nslookup:

# nslookup www.google.com
Server:         10.0.0.100
Address:        10.0.0.100#53

Non-authoritative answer:
Name:   www.google.com
Address: 173.194.75.106
Name:   www.google.com
Address: 173.194.75.147
Name:   www.google.com
Address: 173.194.75.99
Name:   www.google.com
Address: 173.194.75.103
Name:   www.google.com
Address: 173.194.75.104
Name:   www.google.com
Address: 173.194.75.105

Or:

# dig www.google.com |grep SERVER
;; SERVER: 10.0.0.100#53(10.0.0.100)

The Name and Address (or SERVER) part is your DNS server. Traceroute gives you the route from your IP to google, which of course will go through your ISP.

Related Question