http://www.windowsnetworking.com/articles_tutorials/Using-NSLOOKUP-DNS-Server-diagnosis.html
另一參考網頁 http://turtle.ee.ncku.edu.tw/~tung/dns/nslookup.html
nslookup在UNIX和windows上都有,雖然有些微的不同
但基本操作都是讓你在本機上執行query,預設都是在所屬網域中
你可以用他查外部網域,但他會從本地網域先查起
設定伺服器的指令是 server 127.0.0.1(使用你要的DNS伺服器IP)
Commands: (identifiers are shown in uppercase, [] means optional)
大寫字母代表識別元,[]內是選項
NAME - print info about the host/domain NAME using default server
列出預設DNS伺服器的主機、網域資訊
NAME1 NAME2 - as above, but use NAME2 as server
使用NAME2做為預設DNS伺服器
help or ? - print info on common commands
set OPTION - set an option
all - print options, current server and host
列出所有選項,以及目前使用的伺服器、目前主機
[no]debug - print debugging information
設定除錯模式 set debug
[no]d2 - print exhaustive debugging information
set d2,
[no]defname - append domain name to each query
[no]recurse - ask for recursive answer to query
[no]search - use domain search list
[no]vc - always use a virtual circuit
domain=NAME - set default domain name to NAME
srchlist=N1[/N2/.../N6] - set domain to N1 and search list to N1,N2, etc.
root=NAME - set root server 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)
[no]msxfr - use MS fast zone transfer
ixfrver=X - current version to use in IXFR transfer request
server NAME - set default server to NAME, using current default server
lserver NAME - set default server to NAME, using initial server
finger [USER] - finger the optional NAME at the current default host
root - set current default server to the root
ls [opt] DOMAIN [> FILE] - list addresses in DOMAIN (optional: output to FILE)
-a - list canonical names and aliases
-d - list all records
-t TYPE - list records of the given type (e.g. A,CNAME,MX,NS,PTR etc.)
view FILE - sort an 'ls' output file and view it with pg
exit - exit the program