~$ --> dig taobao.com @8.8.8.8
; <<>> DiG 9.10.6 <<>> taobao.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14798
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 4, ADDITIONAL: 8
;; QUESTION SECTION:
;taobao.com. IN A
;; ANSWER SECTION:
taobao.com. 600 IN A 140.205.94.189
taobao.com. 600 IN A 140.205.220.96
;; AUTHORITY SECTION: ---->权威域名部分,回应都是NS记录(Name Server),NS记录从左到右各部分意义。
taobao.com. 20711 IN NS ns4.taobao.com.
taobao.com. 20711 IN NS ns7.taobao.com.
taobao.com. 20711 IN NS ns6.taobao.com.
taobao.com. 20711 IN NS ns5.taobao.com.
;; ADDITIONAL SECTION:---->额外记录部分,这里都是A记录,A记录从左到右各部分意义。(当存在NS时,因为NS记录的域名是主域名的二级域名,所以会导致需要额外增加IP地址解析结果)
ns7.taobao.com. 9940 IN A 106.11.35.25
ns7.taobao.com. 9940 IN A 106.11.35.26
ns6.taobao.com. 2125 IN A 140.205.122.36
ns6.taobao.com. 2125 IN A 140.205.122.35
ns5.taobao.com. 7736 IN A 140.205.122.34
ns5.taobao.com. 7736 IN A 140.205.122.33
ns4.taobao.com. 9940 IN A 198.11.138.249
ns4.taobao.com. 9940 IN A 198.11.138.245
;; Query time: 3 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Jun 17 21:53:29 CST 2019
;; MSG SIZE rcvd: 260
~$ --> dig taobao.com @ns7.taobao.com---->当再次从这个NS服务器dig时,可获取到最终的真实的业务IP。
; <<>> DiG 9.10.6 <<>> taobao.com @ns7.taobao.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15025
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;taobao.com. IN A
;; ANSWER SECTION:
taobao.com. 300 IN A 140.205.220.96
taobao.com. 300 IN A 140.205.94.189
;; Query time: 70 msec
;; SERVER: 106.11.35.26#53(106.11.35.26)
;; WHEN: Mon Jun 17 22:04:58 CST 2019
;; MSG SIZE rcvd: 71
DNS一共有以下几种记录:
A:IPV4地址
AAAA:IPV6地址
CNAME:指向一个新域名(往往是CDN使用的)
NS:指定某个新的域名服务器来提供解析结果
SOA记录: 当存在多个NS记录的时,标记哪一台是主服务器
https://blog.csdn.net/charleslei/article/details/51226741
https://docstore.mik.ua/orelly/networking_2ndEd/dns/ch12_09.htm
https://bobcares.com/blog/understanding-soa-records/
https://blog.hackroad.com/operations-engineer/basics/13255.html
https://blog.51cto.com/chenshengsheng/2093977
afxr请求
https://blog.csdn.net/qq_25562325/article/details/85003813
https://my.oschina.net/u/1382972/blog/340197