■digとnslookupの使い方
■Bind9用digの使い方
dig [@global-server] [domain] [q-type] [q-class] {q-opt}
{global-d-opt} host [@local-server] {local-d-opt}
[ host [@local-server] {local-d-opt} [...]] .
■Windows用nslookupの使い方
nslookup NAME1 -set type=mx
set OPTION - set an option
all - print options, current server and host
domain=NAME - set default domain name to NAME
retry=X - set number of retries to X
timeout=X - set initial time-out interval to X seconds
type=X - set query type (ex. A,ANY,CNAME,MX,NS,PTR,SOA,SRV)
querytype=X - same as type
class=X - set query class (ex. IN (Internet), ANY)
server NAME - set default server to NAME, using current default server
■query type を検索するには? (SOA や A や SRV 等も同様)
# dig example.local mx
> nslookup www.example.local
> nslookup
> set type=mx
> example.local
■再帰をオフにするには?
# dig www.example.local +norec (オンにするには、+rec)
> nslookup
> set norecuse
■問い合わせるネームサーバーを指定するには?
# dig @[サーバー名] www.example.local A +norec
> nslookup www.example.local [DNSサーバー]
> nslookup
> server [DNSサーバー]
> www.example.local
■再起問い合わせの状況を全部見るには
dig +trace www.example.local
■whoisの使い方
whoisの基本書式
$ whois -h WHOIS_SERVER DOMAIN
WHOIS_SERVER whoisサーバーを指定する。
DOMAIN 調べたいドメイン名を指定する。
ドメイン別whoisサーバーの一覧
http://www.domaininformation.de/whoisserver_list.html
jp whois.jp
kr whois.krnic.net
アジア whois.apnic.net
ヨーロッパ whois.ripe.net
アメリカ rs.internic.net
・com、net、org、eduドメインの場合の検索例
多分、whoisサーバーを指定しなくても検索できる。
下記のコマンドを実行するとaol.comの情報を検索する。
$ whois aol.com
・jpドメインの場合の検索例
下記のコマンドを実行するとexample.jpの情報を検索する。
$ whois -h whois.jp example.jp
■Windowsでdigを使う
※参照
http://pigtail.net/LRP/dig/
windows用のbindを全部インストールする必要はない。
1.C:\windows\system32 に
host.exe
dig.exe
libdns.dll
libeay32.dll
libisc.dll
libbind9.dll
libisccfg.dll
liblwres.dll
を置く。
ダウンロードするところはここ
ftp://ftp.isc.org/isc/bind/contrib/
2.C:\WINDOWS\system32\drivers\etc\
resolv.confを作成し、
nameserver 192.168.0.1
など、所定の記述をする。
3.コマンドラインから、digが使えるようになっているはず。
C:\Documents and Settings\kuwa.BUG_HQ>dig --help
Invalid option: --help
Usage: dig [@global-server] [domain] [q-type] [q-class] {q-opt}
{global-d-opt} host [@local-server] {local-d-opt}
[ host [@local-server] {local-d-opt} [...]]
Use "dig -h" (or "dig -h | more") for complete list of options
+traceとかが使えないのは痛い。。。