跟踪路由中不使用 Google 公共 DNS

IT *_*her 3 networking dns webserver google-public-dns nameserver

在我的 PC 中,我使用 Google 公共 DNS 作为我的 DNS 服务器。在 Internet 协议 (TCP/IP) 属性中,我将首选 DNS 服务器设置为 8.8.4.4,将备用 DNS 服务器设置为 8.8.8.8。

根据我的说法,这个 DNS 服务器应该用于通过使用这个 DNS 服务器来解析对网站的任何请求到它的 IP(请参阅Google DNS域名服务器如何工作)。

但是当我在我的 PC 中检查到一个网站的跟踪路由时,我得到了以下输出:

 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. 
Run Code Online (Sandbox Code Playgroud)

当我在who.is 中检查所有这些 IP 时,我发现它们属于我的 ISP。所以我的问题是谷歌公共 DNS 在哪里使用?另外,即使我将 Google 公共 DNS 设置为 PC 中的 DNS 服务器,为什么我的 ISP 的名称服务器也会被使用?还是我的设置不对?

小智 5

您在 traceroute 中看不到 DNS 请求。要查看使用了哪个 DNS 服务器,请尝试使用 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
Run Code Online (Sandbox Code Playgroud)

或者:

# dig www.google.com |grep SERVER
;; SERVER: 10.0.0.100#53(10.0.0.100)
Run Code Online (Sandbox Code Playgroud)

名称和地址(或服务器)部分是您的 DNS 服务器。Traceroute 为您提供从 IP 到 google 的路由,这当然会通过您的 ISP。