手机版 收藏 导航

如何查看域名使用的 DNS 服务器地址_如何查看域名的主域名服务器 IP 地址

原创   www.link114.cn   2024-02-25 10:52:31

如何查看域名使用的 DNS 服务器地址_如何查看域名的主域名服务器 IP 地址

在命令提示符或终端窗口中输入 nslookup domain.com,其中 domain.com 替换为你要查看的域名。这将显示该域名的 DNS 服务器地址。例如:

C:\>nslookup google.com
Server:  dns.google
Address:  8.8.8.8

Non-authoritative answer:
Name:    google.com
Addresses:  172.217.16.78, 2607:f8b0:4007:80d::200e

Linux 和 macOS 用户可以使用 dig 命令查看域名的 DNS 服务器地址。在终端中输入 dig @8.8.8.8 domain.com ns,其中 8.8.8.8 是 Google 公共 DNS 服务器地址,你也可以使用其他公共 DNS 服务器地址。这将显示该域名的名称服务器(DNS 服务器)地址。例如:

$ dig @8.8.8.8 google.com ns

; <<>> DiG 9.10.6 <<>> @8.8.8.8 google.com ns
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38472
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com.                    IN      NS

;; ANSWER SECTION:
google.com.             172800  IN      NS      ns1.google.com.
google.com.             172800  IN      NS      ns2.google.com.
google.com.             172800  IN      NS      ns3.google.com.
google.com.             172800  IN      NS      ns4.google.com.

;; Query time: 15 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Apr 25 15:22:37 UTC 2023
;; MSG SIZE  rcvd: 172

也可以使用一些在线工具来查看域名的 DNS 服务器地址,如 whatsmydns.netdnschecker.org等。只需输入域名,就可以查看该域名的 DNS 服务器地址。

如何查看域名的主域名服务器 IP 地址 域名的主域名服务器是负责管理该域名的核心 DNS 服务器。通常,每个域名都有一个或多个主域名服务器。查看域名的主域名服务器 IP 地址可以使用以下方法:

在命令提示符或终端窗口中输入 nslookup -type=ns domain.com,其中 domain.com 替换为你要查看的域名。这将显示该域名的主域名服务器。例如:

C:\>nslookup -type=ns google.com
Server:  dns.google
Address:  8.8.8.8

Non-authoritative answer:
google.com     nameserver = ns1.google.com
google.com     nameserver = ns2.google.com
google.com     nameserver = ns3.google.com
google.com     nameserver = ns4.google.com

Authoritative answers can be found from:
ns1.google.com      internet address = 216.239.32.10
ns2.google.com      internet address = 216.239.34.10
ns3.google.com      internet address = 216.239.36.10
ns4.google.com      internet address = 216.239.38.10

Linux 和 macOS 用户可以使用 dig 命令查看域名的主域名服务器 IP 地址。在终端中输入 dig domain.com ns,其中 domain.com 替换为你要查看的域名。这将显示该域名的名称服务器(主域名服务器)及其 IP 地址。例如:

$ dig google.com ns

; <<>> DiG 9.10.6 <<>> google.com ns
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13392
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com.                    IN      NS

;; ANSWER SECTION:
google.com.             172800  IN      NS      ns1.google.com.
google.com.             172800  IN      NS      ns2.google.com.
google.com.             172800  IN      NS      ns3.google.com.
google.com.             172800  IN      NS      ns4.google.com.

;; ADDITIONAL SECTION:
ns1.google.com.          172800  IN      A       216.239.32.10
ns2.google.com.          172800  IN      A       216.239.34.10
ns3.google.com.          172800  IN      A       216.239.36.10
ns4.google.com.          172800  IN      A       216.239.38.10

;; Query time: 15 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Apr 25 15:24:08 UTC 2023
;; MSG SIZE  rcvd: 204

同样,也可以使用一些在线工具来查看域名的主域名服务器 IP 地址,如 whatsmydns.netdnschecker.org等。只需输入域名,就可以查看该域名的主域名服务器及其 IP 地址。

无论是查看域名使用的 DNS 服务器地址还是查看域名的主域名服务器 IP 地址,使用 nslookup、dig 命令或在线工具都是非常有效的方法。掌握这些技能可以帮助我们更好地理解和管理域名相关的各种信息。