FreeBSD 9.3 RELEASE - unbound・nsd - nslookup → drill

 クラウディア
1. 概要
2. アドレスの引き方

1. 概要

 FreeBSD 10.0 RELEASE 以降、BIND が標準インストールされなくなったのに伴い、nslookup もなくなっています。  代わりに drill を使用します。10.x 以前でも unbound をインストールすると drill が同時にインストールされます。

2. アドレスの引き方

 「drill」のコマンド形式は、基本的に「nslookup」と同じと考えてよいです。  www.google.co.jp を例にして nslookupdrill の出力を比べてみます。  nslookup 正引き

> nslookup www.google.co.jp
Server:         DNSキャッシュサーバ名
Address:        DNSキャッシュサーバIPアドレス#53

Non-authoritative answer:
Name:   www.google.co.jp
Address: 74.125.235.239
Name:   www.google.co.jp
Address: 74.125.235.248
Name:   www.google.co.jp
Address: 74.125.235.247
 3行目の #53 はポート番号です。  drill 正引き

> drill www.google.co.jp
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 27985
;; flags: qr rd ra ; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; www.google.co.jp.    IN      A

;; ANSWER SECTION:
www.google.co.jp.       226     IN      A       74.125.235.239
www.google.co.jp.       226     IN      A       74.125.235.248
www.google.co.jp.       226     IN      A       74.125.235.247

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 2 msec   ← 実行時間
;; SERVER: DNSキャッシュサーバ名
;; WHEN: 実行した日時
;; MSG SIZE  rcvd: 82   ← メッセージサイズ
 nslookup 逆引き

> nslookup 74.125.235.239
Server:         DNSキャッシュサーバ名
Address:        DNSキャッシュサーバIPアドレス #53

Non-authoritative answer:
239.235.125.74.in-addr.arpa     name = kix01s02-in-f15.1e100.net.

Authoritative answers can be found from:
125.74.in-addr.arpa     nameserver = ns3.google.com.
125.74.in-addr.arpa     nameserver = ns4.google.com.
125.74.in-addr.arpa     nameserver = ns2.google.com.
125.74.in-addr.arpa     nameserver = ns1.google.com.
ns1.google.com  internet address = 216.239.32.10
ns2.google.com  internet address = 216.239.34.10
ns3.google.com  internet address = 216.239.36.10
ns4.google.com  internet address = 216.239.38.10
 drill 逆引き

> drill -x 74.125.235.239    ← 逆引きの場合オプションに -x をつけることに注意!
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 51080
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; 239.235.125.74.in-addr.arpa. IN      PTR

;; ANSWER SECTION:
239.235.125.74.in-addr.arpa.    7200    IN      PTR     kix01s02-in-f15.1e100.net.

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 3689 msec    ← 実行時間
;; SERVER: DNSキャッシュサーバ名
;; WHEN: 実行した日時
;; MSG SIZE  rcvd: メッセージサイズ
earthcar(アースカー)