[root @test root]# dig [@server] [FQDN] [type]
參數說明:
@server 如果不想以 /etc/resolv.conf 來作為 DNS 主機,則可在此填入其他的 IP
type 預設是查詢 A 標誌,你可以在這裡入其他的標誌,如 mx, ns 等。此功能亦可使用 [-t type] 來處理。
原来这个server是这个意义呀。表示使用其它的DNS主机进行查询~
示例:
[root@localhost ~]# dig @202.106.0.20
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> @202.106.0.20
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29446
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;. IN A
;; ANSWER SECTION:
. 321 IN CNAME
322 IN A 61.135.169.125
322 IN A 61.135.169.105
;; Query time: 4 msec
;; SERVER: 202.106.0.20#53(202.106.0.20)
;; WHEN: Tue May 3 01:56:20 2011
;; MSG SIZE rcvd: 90
查询baidu.com的CNAME记录
[root@localhost ~]# dig @202.106.0.20 cname
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> @202.106.0.20 cname
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29973
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;. IN CNAME
;; ANSWER SECTION:
. 734 IN CNAME
;; Query time: 4 msec
;; SERVER: 202.106.0.20#53(202.106.0.20)
;; WHEN: Tue May 3 01:58:16 2011
;; MSG SIZE rcvd: 58
阅读(856) | 评论(0) | 转发(0) |