DNS解析过程

C:\Users\lvshi>nslookup  #表示进入dns cilent程序
> set type=ns  # 设置查询类型为ns(name server),
> . 			#查询根(.)服务器的域名
> com.
> bilibili.com.
> www.bilibili.com
> host  
>
>set type=a 	#查询ipv4地址
Non-authenritative answer: 非权威结果
Authenritative answer: 权威结果

下面为演示步骤:
提示:可以从根、顶级、权威或者本地直接获取网址的ip地址。如果从顶级获取不到就需要一次依次往下一级域名服务器查询。

1.查询根域名服务器地址(.)

set type=ns
.
Server: dns.google
Address: 8.8.8.8

Non-authoritative answer:
(root) nameserver = l.root-servers.net
(root) nameserver = b.root-servers.net
(root) nameserver = c.root-servers.net
(root) nameserver = e.root-servers.net
(root) nameserver = k.root-servers.net
(root) nameserver = m.root-servers.net
(root) nameserver = i.root-servers.net
(root) nameserver = j.root-servers.net
(root) nameserver = h.root-servers.net
(root) nameserver = g.root-servers.net
(root) nameserver = a.root-servers.net
(root) nameserver = f.root-servers.net
(root) nameserver = d.root-servers.net

set type=a #进行地址解析
b.root-servers.net
Server: dns.google
Address: 8.8.8.8 #地址为8.8.8.8

Non-authoritative answer:
Name: b.root-servers.net
Address: 170.247.170.2 #这里解析出根服务器地址

2.从根服务器查询顶级域名地址(com.)

server 170.247.170.2
Default Server: b.root-servers.net
Address: 170.247.170.2
set type=ns
com.
Server: b.root-servers.net
Address: 170.247.170.2

com nameserver = a.gtld-servers.net
com nameserver = m.gtld-servers.net
com nameserver = d.gtld-servers.net
com nameserver = k.gtld-servers.net
com nameserver = j.gtld-servers.net
com nameserver = i.gtld-servers.net
com nameserver = f.gtld-servers.net
com nameserver = b.gtld-servers.net
com nameserver = c.gtld-servers.net
com nameserver = h.gtld-servers.net
com nameserver = e.gtld-servers.net
com nameserver = g.gtld-servers.net
com nameserver = l.gtld-servers.net
m.gtld-servers.net internet address = 192.55.83.30
l.gtld-servers.net internet address = 192.41.162.30
k.gtld-servers.net internet address = 192.52.178.30
j.gtld-servers.net internet address = 192.48.79.30
i.gtld-servers.net internet address = 192.43.172.30
h.gtld-servers.net internet address = 192.54.112.30
g.gtld-servers.net internet address = 192.42.93.30
f.gtld-servers.net internet address = 192.35.51.30
e.gtld-servers.net internet address = 192.12.94.30
d.gtld-servers.net internet address = 192.31.80.30
c.gtld-servers.net internet address = 192.26.92.30
b.gtld-servers.net internet address = 192.33.14.30
a.gtld-servers.net internet address = 192.5.6.30
m.gtld-servers.net AAAA IPv6 address = 2001:501:b1f9::30
l.gtld-servers.net AAAA IPv6 address = 2001:500:d937::30

3从顶级域查询权威域名服务器(bilibili.com.)

server 192.41.162.30
in-addr.arpa nameserver = b.in-addr-servers.arpa
in-addr.arpa nameserver = a.in-addr-servers.arpa
in-addr.arpa nameserver = f.in-addr-servers.arpa
in-addr.arpa nameserver = e.in-addr-servers.arpa
in-addr.arpa nameserver = c.in-addr-servers.arpa
in-addr.arpa nameserver = d.in-addr-servers.arpa
f.in-addr-servers.arpa internet address = 193.0.9.1
e.in-addr-servers.arpa internet address = 203.119.86.101
d.in-addr-servers.arpa internet address = 200.10.60.53
c.in-addr-servers.arpa internet address = 196.216.169.10
b.in-addr-servers.arpa internet address = 199.253.183.183
a.in-addr-servers.arpa internet address = 199.180.182.53
f.in-addr-servers.arpa AAAA IPv6 address = 2001:67c:e0::1
e.in-addr-servers.arpa AAAA IPv6 address = 2001:dd8:6::101
d.in-addr-servers.arpa AAAA IPv6 address = 2001:13c7:7010::53
c.in-addr-servers.arpa AAAA IPv6 address = 2001:43f8:110::10
b.in-addr-servers.arpa AAAA IPv6 address = 2001:500:87::87
a.in-addr-servers.arpa AAAA IPv6 address = 2620:37:e000::53
Default Server: [192.41.162.30]
Address: 192.41.162.30

set type=ns
bilibili.com.
Server: [192.41.162.30]
Address: 192.41.162.30

bilibili.com nameserver = ns3.dnsv5.com
bilibili.com nameserver = ns4.dnsv5.com
ns3.dnsv5.com internet address = 1.12.0.17
ns3.dnsv5.com internet address = 1.12.0.18
ns3.dnsv5.com internet address = 1.12.14.17
ns3.dnsv5.com internet address = 1.12.14.18
ns3.dnsv5.com internet address = 108.136.87.44
ns3.dnsv5.com internet address = 125.94.59.200
ns3.dnsv5.com internet address = 163.177.5.75
ns3.dnsv5.com AAAA IPv6 address = 2402:4e00:1430:1102:0:9136:2b2b:ba61
ns3.dnsv5.com internet address = 35.165.107.227
ns4.dnsv5.com internet address = 1.12.0.16
ns4.dnsv5.com internet address = 1.12.0.19
ns4.dnsv5.com internet address = 1.12.14.16
ns4.dnsv5.com internet address = 1.12.14.19
ns4.dnsv5.com internet address = 106.55.82.76
ns4.dnsv5.com internet address = 112.80.181.106
ns4.dnsv5.com internet address = 13.37.58.163
ns4.dnsv5.com internet address = 183.47.126.155
ns4.dnsv5.com AAAA IPv6 address = 2402:4e00:111:fff::8

4.从权威服务器查询www.bilibili.com.的地址

server 1.12.0.17
set type=a
www.bilibili.com.
服务器: [1.12.0.17]
Address: 1.12.0.17

名称: www.bilibili.com
Served by:

  • ns4.dnsv5.com

        bilibili.com
    
  • ns3.dnsv5.com

        bilibili.com
    

5 查询本地DNS服务器地址

set type=a
ns4.dnsv5.com.
服务器: [1.12.0.17]
Address: 1.12.0.17

名称: ns4.dnsv5.com
Addresses: 112.80.181.106
117.89.178.200
120.241.130.93
183.47.126.155
1.12.14.16
1.12.14.19
106.55.82.76

6获取最终需要解析的网址的canonical地址

Canonical:正式收录的,标准的,经典的。

server 112.80.181.106
set type=ns
www.bilibili.com.
服务器: [1.12.0.17]
Address: 1.12.0.17

www.bilibili.com canonical name = a.w.bilicdn1.com
bilibili.com nameserver = ns3.dnsv5.com
bilibili.com nameserver = ns4.dnsv5.com

7获取最终解析地地址

set type=a
a.w.bilicdn1.com.
服务器: [1.12.0.17]
Address: 1.12.0.17

名称: a.w.bilicdn1.com
Addresses: 183.232.239.21
183.232.239.22
183.232.239.18
183.232.239.19
183.232.239.20

相关推荐

  1. DNS解析过程

    2024-07-20 16:46:04       37 阅读
  2. DNS域名解析过程

    2024-07-20 16:46:04       24 阅读
  3. DNS解析过程

    2024-07-20 16:46:04       21 阅读
  4. 常见DNS故障和问题解决过程

    2024-07-20 16:46:04       32 阅读
  5. 解析 DNS 域名:了解其结构与解析过程

    2024-07-20 16:46:04       51 阅读
  6. 什么是DNS解析DNS解析过程是什么样的?

    2024-07-20 16:46:04       74 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-20 16:46:04       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-20 16:46:04       101 阅读
  3. 在Django里面运行非项目文件

    2024-07-20 16:46:04       82 阅读
  4. Python语言-面向对象

    2024-07-20 16:46:04       92 阅读

热门阅读

  1. axios

    axios

    2024-07-20 16:46:04      30 阅读
  2. 使用Spring Boot和RabbitMQ实现消息驱动微服务

    2024-07-20 16:46:04       26 阅读
  3. postgresql 大于当前时间升序,小于当前时间降序

    2024-07-20 16:46:04       23 阅读
  4. 在 C# .NET 中丢弃变量

    2024-07-20 16:46:04       26 阅读
  5. 基于深度学习的故障检测

    2024-07-20 16:46:04       24 阅读
  6. 【Spring Boot 自定义配置项详解】

    2024-07-20 16:46:04       23 阅读
  7. 13、.Net相关的书籍 - .Net循序渐进系列文章

    2024-07-20 16:46:04       27 阅读
  8. OpenWrt安装快速入门指南

    2024-07-20 16:46:04       27 阅读