首页   >   新闻首页   >   网站建设   >   如何判断域名的DNS服务器记录是否正确

如何判断域名的DNS服务器记录是否正确

2021-02-20 14:23

在Linux/Unix上,可以使用dig工具,在win2000上,可以使用nslookup工具,从互联网根服务器上查询域名的DNS服务器。
以dig为例:
_________________________________________________
dig @a.gtld-servers.net abc.com
_________________________________________________
结果:
_________________________________________________
; <<>> DiG 9.2.1 <<>> @a.gtld-servers.net abc.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1625
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;abc.com. IN A

;; AUTHORITY SECTION:
abc.com. 172800 IN NS sens01.dig.com.
abc.com. 172800 IN NS sens02.dig.com.
abc.com. 172800 IN NS orns01.dig.com.
abc.com. 172800 IN NS orns02.dig.com.

;; ADDITIONAL SECTION:
sens01.dig.com. 172800 IN A 199.181.134.16
sens02.dig.com. 172800 IN A 199.181.135.199
orns01.dig.com. 172800 IN A 63.70.44.44
orns02.dig.com. 172800 IN A 63.70.47.44

;; Query time: 580 msec
;; SERVER: 192.5.6.30#53(a.gtld-servers.net)
;; WHEN: Tue Jul 8 14:43:10 2003
;; MSG SIZE rcvd: 177
_____________________________________________________
错误结果:
_____________________________________________________
; <<>> DiG 9.2.1 <<>> @a.gtld-servers.net abcnotexists.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 35479
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;abcnotexists.com. IN A

;; AUTHORITY SECTION:
com. 172800 IN SOA a.gtld-servers.net. nstld.verisign-grs.com. 2003070701 1800 900 604800 86400

;; Query time: 405 msec
;; SERVER: 192.5.6.30#53(a.gtld-servers.net)
;; WHEN: Tue Jul 8 14:44:44 2003
;; MSG SIZE rcvd: 107
____________________________________________________
可以看到,只有Question,没有Answer。或者可以用whois工具:
whois abc.com
[whois.crsnic.net]

Whois Server Version 1.3

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://beitongyun.cn
for detailed information.

Domain Name: ABC.COM
Registrar: NETWORK SOLUTIONS, INC.
Whois Server: whois.networksolutions.com
Referral URL: http://beitongyun.cn

Name Server: SENS01.DIG.COM
Name Server: SENS02.DIG.COM
Name Server: ORNS01.DIG.COM
Name Server: ORNS02.DIG.COM
Status: REGISTRAR-LOCK
Updated Date: 13-aug-2003
Creation Date: 22-may-1996
Expiration Date: 23-may-2005

>>> Last update of whois database: Tue, 8 Jun 2004 20:06:03 EDT <<<

以win2000 nslookup为例,
nslookup
? server a.gtld-servers.net
? set type=NS
? abc.com

互联网根服务器通常每天刷新一次,新注册的域名需要24~48小时,才能在根服务器中出现,修改DNS服务器情况类似。


北通云建站致力于网站建设、网站推广、小程序制作、微信营销等项目的专业互联网服务提供商。 


网站建设及相关业务电话:0518-85119858 ,值班经理:18352802022