有些時候, 我們會想要手動查詢 dns 上一些資料, 或者是要看看 dns 是否有問題, 此時我們最常用的工具就是 nslookup 了, 基本上 nslookup 會根據 /etc/resolv.conf 的內容去找到所要使用的 local dns server.
使用說明
打入 nslookup 命令後, 會看到 > 提示符號, 此時打 ? 就會出現 nslookup 說明
default server: ultra1.ndhu.edu.tw
address: 163.28.160.11
>?
$id: nslookup.help,v 8.4 1996/10/25 18:09:41 vixie exp $
commands: (identifiers are shown in uppercase, [] means optional)
name - print info about the host/domain name using default server
name1 name2 - as above, but use name2 as server
help or ? - print info on common commands; see nslookup(1) for details
set option - set an option
all - print options, current server and host
[no]debug - print debugging information
[no]d2 - print exhaustive debugging information
[no]defname - append domain name to each query
[no]recurse - ask for recursive answer to query
[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
querytype=x - set query type, e.g., a,any,cname,hinfo,mx,px,ns,ptr,soa,txt,wks,srv,naptr
port=x - set port number to send query on
type=x - synonym for querytype
class=x - set query class to one of in (internet), chaos, hesiod or any
server name - set default server ... 下一页