facebook twitter hatena line google mixi email

Linux/コマンドメモ/dig

提供: 初心者エンジニアの簡易メモ
移動: 案内検索

fqdnからipアドレス

$ dig hp.nonip.info

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> hp.nonip.info
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61969
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;hp.nonip.info.                 IN      A

;; ANSWER SECTION:
hp.nonip.info.          300     IN      A       180.235.228.144

;; Query time: 253 msec
;; SERVER: 192.168.225.13#53(192.168.225.13)
;; WHEN: Fri Nov  9 16:29:33 2012
;; MSG SIZE  rcvd: 47

ipアドレスからhost名

$ dig -x 180.235.228.144

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> -x 180.235.228.144
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17102
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;144.228.235.180.in-addr.arpa.  IN      PTR

;; ANSWER SECTION:
144.228.235.180.in-addr.arpa. 85775 IN  PTR     kvps-180-235-228-144.secure.ne.jp.

;; Query time: 1 msec
;; SERVER: 192.168.225.13#53(192.168.225.13)
;; WHEN: Fri Nov  9 16:28:04 2012
;; MSG SIZE  rcvd: 93


メールエクスチェンジを調べる

dig www.google.com mx