dig @server domain name
#用dig 查看区传送.
dig @server domain name AXFR
[root@gnu123 root]# dig @192.168.1.103 localhost AXFR
; <<>> DiG 9.2.1 <<>> @192.168.1.103 localhost AXFR
;; global options: printcmd
localhost. 86400 IN SOA localhost. root.localhost. 20050
10400 10800 900 604800 86400
localhost. 86400 IN NS localhost.
localhost. 86400 IN A 127.0.0.1
localhost. 86400 IN SOA localhost. root.localhost. 20050
10400 10800 900 604800 86400
;; Query time: 154 msec
;; SERVER: 192.168.1.103#53(192.168.1.103)
;; WHEN: Thu Mar 3 17:32:08 2005
;; XFR size: 5 records]
# 用 dig 查看反向解析
dig -x 210.52.83.228 @server [root@gnu123 root]# dig sohu.com +nssearch
SOA dns.sohu.com. jjzhang.sohu-inc.com. 2005030302 1800 600 1209600 1800 from se
rver ns2.sohu.com in 29 ms.
SOA dns.sohu.com. jjzhang.sohu-inc.com. 2005030302 1800 600 1209600 1800 from se
rver ns1.sohu.com in 12 ms.
SOA dns.sohu.com. jjzhang.sohu-inc.com. 2005030302 1800 600 1209600 1800 from se
rver dns.sohu.com in 39 ms.
# 查找一个域的授权 dns 服务器
dig sohu.com +nssearch# 从根服务器开始追踪一个域名的解析过程
dig sohu.com + trace
[root@gnu123 root]# dig sohu.com + trace
;; Invalid option
; <<>> DiG 9.2.1 <<>> sohu.com + trace
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23658
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 3, ADDITIONAL: 3
;; QUESTION SECTION:
;sohu.com. IN A
;; ANSWER SECTION:
sohu.com. 19 IN A 61.135.133.104
sohu.com. 19 IN A 61.135.133.103
;; AUTHORITY SECTION:
sohu.com. 463 IN NS ns2.sohu.com.
sohu.com. 463 IN NS dns.sohu.com.
sohu.com. 463 IN NS ns1.sohu.com.
;; ADDITIONAL SECTION:
dns.sohu.com. 90811 IN A 61.135.131.86
ns1.sohu.com. 87397 IN A 61.135.131.1
ns2.sohu.com. 88784 IN A 61.135.132.1
;; Query time: 10 msec
;; SERVER: 202.99.96.68#53(202.99.96.68)
;; WHEN: Thu Mar 3 17:47:54 2005
;; MSG SIZE rcvd: 160
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 55773
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;trace. IN A
;; AUTHORITY SECTION:
. 10800 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISI
GN-GRS.COM. 2005030201 1800 900 604800 86400
;; Query time: 39 msec
;; SERVER: 202.99.96.68#53(202.99.96.68)
;; WHEN: Thu Mar 3 17:47:54 2005
;; MSG SIZE rcvd: 98
# 查看你使用的是哪个 F root dns server
dig +norec @F.ROOT-SERVERS.NET HOSTNAME.BIND CHAOS TXT