Nameserver

為什麼我網站的本地檢索名稱伺服器與線上檢索的名稱伺服器不同?

  • January 15, 2019

我的網站無法正確解析,因此我通過 PowerShell 中的 nslookup 檢查了名稱伺服器並查看了 bodis.com。然後我上網查了一下,希望我查的是同名伺服器,看看domaincontrol.com。

為什麼會出現差異?不是兩個查找都在檢查 1.1.1.1 名稱伺服器嗎?

ipconfig /flushdns在本地機器上做了。

這是通過 PowerShell 獲得的本地結果:

PS C:\Users\[username]> nslookup -d2 -type=NS example.com
------------
SendRequest(), len 38
   HEADER:
       opcode = QUERY, id = 1, rcode = NOERROR
       header flags:  query, want recursion
       questions = 1,  answers = 0,  authority records = 0,  additional = 0

   QUESTIONS:
       1.1.1.1.in-addr.arpa, type = PTR, class = IN

------------
------------
Got answer (67 bytes):
   HEADER:
       opcode = QUERY, id = 1, rcode = NOERROR
       header flags:  response, want recursion, recursion avail.
       questions = 1,  answers = 1,  authority records = 0,  additional = 0

   QUESTIONS:
       1.1.1.1.in-addr.arpa, type = PTR, class = IN
   ANSWERS:
   ->  1.1.1.1.in-addr.arpa
       type = PTR, class = IN, dlen = 17
       name = one.one.one.one
       ttl = 1237 (20 mins 37 secs)

------------
Server:  one.one.one.one
Address:  1.1.1.1

------------
SendRequest(), len 42
   HEADER:
       opcode = QUERY, id = 2, rcode = NOERROR
       header flags:  query, want recursion
       questions = 1,  answers = 0,  authority records = 0,  additional = 0

   QUESTIONS:
       example.com, type = NS, class = IN

------------
------------
Got answer (84 bytes):
   HEADER:
       opcode = QUERY, id = 2, rcode = NOERROR
       header flags:  response, want recursion, recursion avail.
       questions = 1,  answers = 2,  authority records = 0,  additional = 0

   QUESTIONS:
       example.com, type = NS, class = IN
   ANSWERS:
   ->  example.com
       type = NS, class = IN, dlen = 12
       nameserver = ns1.bodis.com
       ttl = 10800 (3 hours)
   ->  example.com
       type = NS, class = IN, dlen = 6
       nameserver = ns2.bodis.com
       ttl = 10800 (3 hours)

------------
Non-authoritative answer:
example.com
       type = NS, class = IN, dlen = 12
       nameserver = ns1.bodis.com
       ttl = 10800 (3 hours)
example.com
       type = NS, class = IN, dlen = 6
       nameserver = ns2.bodis.com
       ttl = 10800 (3 hours)

這是來自http://www.kloth.net/services/dig.php的線上結果:

…這是來自伺服器 1.1.1.1 的 example.com 的探勘結果

$$ dig @1.1.1.1 example.com NS $$

; <<>> DiG 9 <<>> @1.1.1.1 example.com NS
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11416
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;example.com.  IN  NS

;; ANSWER SECTION:
example.com. 2793  IN  NS  ns68.domaincontrol.com.
example.com. 2793  IN  NS  ns67.domaincontrol.com.

;; Query time: 5 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Tue Jan 15 03:11:46 2019
;; MSG SIZE  rcvd: 94

沒有“the” 1.1.1.1 名稱伺服器。這是一個任播地址,它可以路由到 Internet 上您附近某處的數十、數百甚至數千個 DNS 伺服器中的任何一個(CloudFlare 並沒有確切說明他們擁有多少 DNS 伺服器)。

如果您最近更改了域名伺服器,您可以要求 1.1.1.1為您的域清除記憶體

引用自:https://serverfault.com/questions/949079