1,域名访问,底层还是通过IP地址访问
2,
3,我们浏览器就是对应于DNS 客户端的一个应用程序。
4,
5,
6,递归查询
7,循环查询
8,
9,
10,
11,
12,
13,
14,
可以通过以下命令安装Bind:
[root@moban ~]# yum install -y bind bin-chroot bind-utils
DNS 默认使用UDP,TCP协议,使用端口为53,953(rndc)
15,
16,
[root@moban ~]#
[root@moban ~]# dig +trace www.linuxcast.net
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.37.rc1.el6 <<>> +trace www.linuxcast.net
;; global options: +cmd
. 154874 IN NS a.root-servers.net.
. 154874 IN NS b.root-servers.net.
. 154874 IN NS c.root-servers.net.
. 154874 IN NS d.root-servers.net.
. 154874 IN NS e.root-servers.net.
. 154874 IN NS f.root-servers.net.
. 154874 IN NS g.root-servers.net. (先去查询根服务器)
. 154874 IN NS h.root-servers.net.
. 154874 IN NS i.root-servers.net.
. 154874 IN NS j.root-servers.net.
. 154874 IN NS k.root-servers.net.
. 154874 IN NS l.root-servers.net.
. 154874 IN NS m.root-servers.net.
;; Received 228 bytes from 8.8.8.8#53(8.8.8.8) in 376 ms
net. 172800 IN NS f.gtld-servers.net.
net. 172800 IN NS i.gtld-servers.net.
net. 172800 IN NS d.gtld-servers.net.
net. 172800 IN NS h.gtld-servers.net.
net. 172800 IN NS m.gtld-servers.net.
net. 172800 IN NS e.gtld-servers.net.
net. 172800 IN NS a.gtld-servers.net. (再去查询.net DNS服务器)
net. 172800 IN NS c.gtld-servers.net.
net. 172800 IN NS g.gtld-servers.net.
net. 172800 IN NS b.gtld-servers.net.
net. 172800 IN NS j.gtld-servers.net.
net. 172800 IN NS k.gtld-servers.net.
net. 172800 IN NS l.gtld-servers.net.
;; Received 492 bytes from 202.12.27.33#53(202.12.27.33) in 505 ms
linuxcast.net. 172800 IN NS unsm1.4cun.com. (再去查询我们自己维护的DNS服务器)
linuxcast.net. 172800 IN NS unsm2.4cun.com.
;; Received 115 bytes from 192.41.162.30#53(192.41.162.30) in 549 ms
www.linuxcast.net. 3600 IN A 47.90.42.103 (最后得到对应的IP地址)
;; Received 51 bytes from 222.186.191.51#53(222.186.191.51) in 33 ms
[root@moban ~]#
原文:https://www.cnblogs.com/k8s-pod/p/13708609.html