Red_Hat Linux
指令名稱: | nslookup |
指令路徑: | /usr/bin/nslookup |
所使用的 shared | library: libc.so.6 => /lib/libc.so.6 (0x4002f000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) |
主要用途: | 用於查詢網路上ip對應之Domain name與Domain name對應的ip |
參數: nslookup [-option ...] [host-to-find | -[server]]
範例:
nslookup有兩種模式
一種為interactive(交談) mode
另一種即為 non-interactive(非交談) modeInteractive mode:(在console下直接輸入nslookup)
$ nslookup
Default Server: operator.csie.nctu.edu.tw
Address: 140.113.209.1
>
>server 140.113.1.1此時就進入了交談模式並顯示預設的DNS server
若鍵入server [IP]則可以改變Default Server
>Default Server: ns1.NCTU.edu.tw
Address: 140.113.1.1
此時若直接鍵入ip或是domain name則以Default server反查
>Server: ns1.NCTU.edu.tw
Address: 140.113.1.1
Name: Pharos.Dorm13.NCTU.edu.tw
Address: 140.113.139.193
此時若再鍵入finger就會去query finger的port並傳回該機器給的值 (這個結果是特例,因為140.113.139.193是淒美燈塔bbs站)
>finger
[Pharos.Dorm13.NCTU.edu.tw] | |||
ID | Nick | From | Mode |
|
|
|
|
Jerr | Zivv.Dorm13.NCTU.edu.tw | 中四個冷笑話 | |
bird | 140.113.140.118 | 使用者名單 | |
FROZENN | 找不到那種感覺@@ | Zivv.Dorm13.NCTU.edu.tw | 使用者名單 |
airmax | 喵∼ | swsh232-225.adsl.seed.net.tw | 閱讀文章 |
Ashley | sophist.Dorm-F2.NCTU.edu.tw | 使用者名單 | |
maverick | 使用者名單 | ||
YoungJ | 就讓我懦弱的死吧 | J.Dorm13.NCTU.edu.tw | 中六個冷笑話 |
MarkR | 淒美蠟燭台~ | Mark.Dorm8.NCTU.edu.tw | 中一個冷笑話 |
WDMC | 豬頭 | 61-224-39-171.HINET-IP.hinet. | 閱讀文章 |
guest | is not "guast" | 140.129.33.246 | 閱讀文章 |
Goblin | 讓他企吧~~ | 140.115.213.8 | 使用者名單 |
ssnk | 豬瓜永遠愛蝸豬 | chchao.Dorm13.NCTU.edu.tw | 閱讀文章 |
ssnk | 豬瓜永遠愛蝸豬 | chchao.Dorm13.NCTU.edu.tw | 閱讀文章 |
Jonathan | 大喵 | 61-217-151-62.HINET-IP.hinet. | 閱讀文章 |
ppost | 搶救學分 | ppost.Dorm13.NCTU.edu.tw | 閱讀文章 |
sillyman | 時機不好 >< | plum.cs.nccu.edu.tw | 使用者名單 |
Blook | 我就是愛妳!! | 140.116.103.19 | 閱讀文章 |
Zivv | 死大洋 | Zivv.Dorm13.NCTU.edu.tw | 閱讀文章 |
CORINA | 誰踢我啦 | 140.122.204.109 | 主選單 |
|
|
|
|
【淒美燈塔】 | Total users = 19 |
>
若輸入help則會有所有的參數提示,用法
exit則離開此modNon-interactive mode
$nslookup 140.113.139.193
Server: operator.csie.nctu.edu.tw
Address: 140.113.209.1
Name: Pharos.Dorm13.NCTU.edu.tw
Address: 140.113.139.193
在ip後可指定DNS server進行反察的工作
$nslookup 140.113.139.193 140.113.1.1
Server: ns1.NCTU.edu.tw
Address: 140.113.1.1
Name: Pharos.Dorm13.NCTU.edu.tw
Address: 140.113.139.193
$