查看 LDNS IP 和设备的外网 IP,可以使用阿里的昆仑镜或者腾讯的华佗。
一个 DNS 服务器既可以作为递归 DNS,又可以作为权威 DNS。
$ORIGIN example.com. ; designates the start of this zone file in the namespace
$TTL 1h ; default expiration time of all resource records without their own TTL value
example.com. IN SOA ns.example.com. username.example.com. ( 2007120710 1d 2h 4w 1h )
example.com. IN NS ns ; ns.example.com is a nameserver for example.com
example.com. IN MX 10 mail.example.com. ; mail.example.com is the mailserver for example.com
@ IN MX 20 mail2.example.com. ; equivalent to above line, "@" represents zone origin
example.com. IN A 192.0.2.1 ; IPv4 address for example.com
IN AAAA 2001:db8:10::1 ; IPv6 address for example.com
ns IN A 192.0.2.2 ; IPv4 address for ns.example.com
IN AAAA 2001:db8:10::2 ; IPv6 address for ns.example.com
www IN CNAME example.com. ; www.example.com is an alias for example.com
wwwtest IN CNAME www ; wwwtest.example.com is another alias for www.example.com
mail IN A 192.0.2.3 ; IPv4 address for mail.example.com
mail2 IN A 192.0.2.4 ; IPv4 address for mail2.example.com
mail3 IN A 192.0.2.5 ; IPv4 address for mail3.example.com
资源记录(Resource Record)类型:
dig(Domain Information Groper): 域名解析工具。
执行 "dig +trace taobao.com" 的输出:
; <<>> DiG 9.8.3-P1 <<>> +trace taobao.com
;; global options: +cmd
. 84725 IN NS l.root-servers.net.
. 84725 IN NS j.root-servers.net.
. 84725 IN NS c.root-servers.net.
. 84725 IN NS f.root-servers.net.
. 84725 IN NS i.root-servers.net.
. 84725 IN NS k.root-servers.net.
. 84725 IN NS h.root-servers.net.
. 84725 IN NS e.root-servers.net.
. 84725 IN NS m.root-servers.net.
. 84725 IN NS a.root-servers.net.
. 84725 IN NS g.root-servers.net.
. 84725 IN NS b.root-servers.net.
. 84725 IN NS d.root-servers.net.
;; Received 505 bytes from 10.65.0.1#53(10.65.0.1) in 159 ms
;上面这些数据是从 /etc/resolv.conf 中指定的 DNS 服务器(IP 地址为 10.65.0.1)获得的13个根域名服务器的 IP 地址和名称。
com. 172800 IN NS a.gtld-servers.net.
com. 172800 IN NS b.gtld-servers.net.
com. 172800 IN NS c.gtld-servers.net.
com. 172800 IN NS d.gtld-servers.net.
com. 172800 IN NS e.gtld-servers.net.
com. 172800 IN NS f.gtld-servers.net.
com. 172800 IN NS g.gtld-servers.net.
com. 172800 IN NS h.gtld-servers.net.
com. 172800 IN NS i.gtld-servers.net.
com. 172800 IN NS j.gtld-servers.net.
com. 172800 IN NS k.gtld-servers.net.
com. 172800 IN NS l.gtld-servers.net.
com. 172800 IN NS m.gtld-servers.net.
;; Received 488 bytes from 128.63.2.53#53(128.63.2.53) in 275 ms
;上面这些数据是从13个根域名服务器的其中一个(IP 地址 128.63.2.53)获得 ".com" 的 DNS 服务器的 IP 地址和名称。
taobao.com. 172800 IN NS ns4.taobao.com.
taobao.com. 172800 IN NS ns5.taobao.com.
taobao.com. 172800 IN NS ns6.taobao.com.
taobao.com. 172800 IN NS ns7.taobao.com.
;; Received 180 bytes from 192.26.92.30#53(192.26.92.30) in 279 ms
;上面这些数据是从13个".com" DNS 服务器的其中一个(IP 地址 192.26.92.30)获得 "taobao.com" 的 DNS 服务器的 IP 地址和名称。
taobao.com. 1800 IN A 110.75.115.70
taobao.com. 10800 IN NS ns7.taobao.com.
taobao.com. 10800 IN NS ns5.taobao.com.
taobao.com. 10800 IN NS ns4.taobao.com.
taobao.com. 10800 IN NS ns6.taobao.com.
;; Received 196 bytes from 110.75.38.29#53(110.75.38.29) in 3 ms
;上面这些数据是从4个"taobao.com"的 DNS 服务器的其中一个(IP 地址为 110.75.38.29)获得 "taobao.com" 的 IP 地址:110.75.115.70。
详见:http://weibo.com/p/1001603858043396881002
HttpDNS(IP直连):