ipconfig(windows)
直接看wikihttp://zh.wikipedia.org/wiki/Ipconfig
ipconfig[編輯]
ipconfig是微軟的作業系統的電腦上用來控制網路連線的一個命令列工具。它的主要功用,包括用來顯示現時網路連線的設定(/all參數),或透過/release參數來釋放取得的ip位置,和透過 /renew 來重新獲取ip位置的分配。
參數表[編輯]
- /?
- 顯示幫助資訊
- /all
- 顯示現時所有網路連線的設定
- /release
- 釋放某一個網路上的IP位置
- /renew
- 更新某一個網路上的IP位置
- /flushdns
- 把DNS解析器的暫存內容全數刪除
ping
http://www.thegeekstuff.com/2009/11/ping-tutorial-13-effective-ping-command-examples/
幾個有用的例子可以看一下
Ping Example 3. Send N packets and stop
$ ping -c 5 google.com
Ping Example 8. Print Only Ping Command Summary Statistics
$ ping -c 5 -q 127.0.0.1
可以再搭配轉存記事本檔案 供查詢
tracert(windows)
在 cmd 執行 tracert 指令
- 在 cmd 程式中輸入:tracert 要查詢的網址或 IP 位置。
- 開始執行 tracert 查詢,這個時候會花上一點時間,接著就可以看到封包在網路結點的時間。
- 透過 tracert 的回傳結果,檢查網路狀況或與某網站的連結間的問題。
若有的時候需要將 tracert 指令的執行結果存成 txt 文字檔案,可以在輸入指令的時候同時下達儲存的命令。
- 在 cmd 程式中輸入:tracert 要查詢的網址或 IP 位置 > desktop\tracert.txt。
- 開始執行 tracert 查詢,這個時候會花上一點時間,接著就可以在桌面上看到 tracert.txt 文字檔案。
- 透過 tracert 的回傳結果,檢查網路狀況或與某網站的連結間的問題。
以上總的來講可以看一下cisco
http://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-121-mainline/12778-ping-traceroute.html
nslookup
請參考看別人寫的>> http://herolin.twbbs.org/entry/dnschecknslookup/
C:\>nslookup
Default Server: dns.bles.tp.edu.tw
Address: 163.21.102.231
Default Server: dns.bles.tp.edu.tw
Address: 163.21.102.231
C:\>nslookup
預設伺服器: UnKnown
Address: 192.168.1.254
預設伺服器: UnKnown
Address: 192.168.1.254
>
可以下server 切換你要查詢的DNS Server
> server 168.95.1.1
預設伺服器: dns.hinet.net
Address: 168.95.1.1
預設伺服器: dns.hinet.net
Address: 168.95.1.1
打上你的domain,會以你指定的DNS Server 進行查詢是否解析正常
> herolin.twbbs.org
伺服器: dns.hinet.net
Address: 168.95.1.1
伺服器: dns.hinet.net
Address: 168.95.1.1
名稱: herolin.twbbs.org
Address: 220.133.82.171
Address: 220.133.82.171
我們可以設定查詢MX就好,以yahoo.com.tw為例
> set type=MX
> yahoo.com.tw
伺服器: dns.hinet.net
Address: 168.95.1.1
> yahoo.com.tw
伺服器: dns.hinet.net
Address: 168.95.1.1
未經授權的回答:
yahoo.com.tw MX preference = 5, mail exchanger = mx1.mail.tw.yahoo.com
yahoo.com.tw MX preference = 5, mail exchanger = mx2.mail.tw.yahoo.com
yahoo.com.tw MX preference = 5, mail exchanger = mx1.mail.tw.yahoo.com
yahoo.com.tw MX preference = 5, mail exchanger = mx2.mail.tw.yahoo.com
yahoo.com.tw nameserver = ns1.yahoo.com
yahoo.com.tw nameserver = ns2.yahoo.com
yahoo.com.tw nameserver = ns3.yahoo.com
yahoo.com.tw nameserver = ns4.yahoo.com
yahoo.com.tw nameserver = ns5.yahoo.com
mx1.mail.tw.yahoo.com internet address = 203.188.197.9
mx2.mail.tw.yahoo.com internet address = 203.188.197.10
ns1.yahoo.com internet address = 68.180.131.16
ns2.yahoo.com internet address = 68.142.255.16
ns3.yahoo.com internet address = 217.12.4.104
ns4.yahoo.com internet address = 68.142.196.63
ns5.yahoo.com internet address = 119.160.247.124
yahoo.com.tw nameserver = ns2.yahoo.com
yahoo.com.tw nameserver = ns3.yahoo.com
yahoo.com.tw nameserver = ns4.yahoo.com
yahoo.com.tw nameserver = ns5.yahoo.com
mx1.mail.tw.yahoo.com internet address = 203.188.197.9
mx2.mail.tw.yahoo.com internet address = 203.188.197.10
ns1.yahoo.com internet address = 68.180.131.16
ns2.yahoo.com internet address = 68.142.255.16
ns3.yahoo.com internet address = 217.12.4.104
ns4.yahoo.com internet address = 68.142.196.63
ns5.yahoo.com internet address = 119.160.247.124
也可以全列出來,只要設定type=any
> set type=any
> yahoo.com.tw
伺服器: dns.hinet.net
Address: 168.95.1.1
> yahoo.com.tw
伺服器: dns.hinet.net
Address: 168.95.1.1
未經授權的回答:
yahoo.com.tw nameserver = ns1.yahoo.com
yahoo.com.tw nameserver = ns2.yahoo.com
yahoo.com.tw nameserver = ns3.yahoo.com
yahoo.com.tw nameserver = ns4.yahoo.com
yahoo.com.tw nameserver = ns5.yahoo.com
yahoo.com.tw
primary name server = hidden-master.yahoo.com
responsible mail addr = hostmaster.yahoo-inc.com
serial = 2008120201
refresh = 3600 (1 hour)
retry = 900 (15 mins)
expire = 604800 (7 days)
default TTL = 600 (10 mins)
yahoo.com.tw MX preference = 5, mail exchanger = mx1.mail.tw.yahoo.com
yahoo.com.tw MX preference = 5, mail exchanger = mx2.mail.tw.yahoo.com
yahoo.com.tw internet address = 202.43.195.13
yahoo.com.tw text =
yahoo.com.tw nameserver = ns1.yahoo.com
yahoo.com.tw nameserver = ns2.yahoo.com
yahoo.com.tw nameserver = ns3.yahoo.com
yahoo.com.tw nameserver = ns4.yahoo.com
yahoo.com.tw nameserver = ns5.yahoo.com
yahoo.com.tw
primary name server = hidden-master.yahoo.com
responsible mail addr = hostmaster.yahoo-inc.com
serial = 2008120201
refresh = 3600 (1 hour)
retry = 900 (15 mins)
expire = 604800 (7 days)
default TTL = 600 (10 mins)
yahoo.com.tw MX preference = 5, mail exchanger = mx1.mail.tw.yahoo.com
yahoo.com.tw MX preference = 5, mail exchanger = mx2.mail.tw.yahoo.com
yahoo.com.tw internet address = 202.43.195.13
yahoo.com.tw text =
“Yahoo! Inc."
yahoo.com.tw nameserver = ns1.yahoo.com
yahoo.com.tw nameserver = ns2.yahoo.com
yahoo.com.tw nameserver = ns3.yahoo.com
yahoo.com.tw nameserver = ns4.yahoo.com
yahoo.com.tw nameserver = ns5.yahoo.com
ns1.yahoo.com internet address = 68.180.131.16
ns2.yahoo.com internet address = 68.142.255.16
ns3.yahoo.com internet address = 217.12.4.104
ns4.yahoo.com internet address = 68.142.196.63
ns5.yahoo.com internet address = 119.160.247.124
mx1.mail.tw.yahoo.com internet address = 203.188.197.9
mx2.mail.tw.yahoo.com internet address = 203.188.197.10
>
yahoo.com.tw nameserver = ns2.yahoo.com
yahoo.com.tw nameserver = ns3.yahoo.com
yahoo.com.tw nameserver = ns4.yahoo.com
yahoo.com.tw nameserver = ns5.yahoo.com
ns1.yahoo.com internet address = 68.180.131.16
ns2.yahoo.com internet address = 68.142.255.16
ns3.yahoo.com internet address = 217.12.4.104
ns4.yahoo.com internet address = 68.142.196.63
ns5.yahoo.com internet address = 119.160.247.124
mx1.mail.tw.yahoo.com internet address = 203.188.197.9
mx2.mail.tw.yahoo.com internet address = 203.188.197.10
>
如果想知道nslookup還有什麼其它指令,請打?就可以列出完整指令
> ?
命令: (識別元會以大寫字元顯示,[] 表示選用)
NAME – 列印使用預設伺服器之主機/網域 NAME 的資訊
NAME1 NAME2 – 與上述相同,但使用 NAME2 做為伺服器
help or ? – 列印常用命令的資訊
set OPTION – 設定選項
all – 列印選項 (目前伺服器及主機)
[no]debug – 列印偵錯資訊
[no]d2 – 列印詳盡的偵錯資訊
[no]defname – 將網域名稱附加到每個查詢
[no]recurse – 要求遞迴回答查詢
[no]search – 使用網域搜尋清單
[no]vc – 一律使用虛擬電路
domain=NAME – 將預設網域名稱設定為 NAME
srchlist=N1[/N2/.../N6] – 將網域設定為 N1,而將搜尋清單設定為 N1,N2 等
root=NAME – 將根伺服器設定為 NAME
retry=X – 將重試次數設定為 X
timeout=X – 將初始逾時間隔設定為 X 秒
type=X – 設定查詢類型 (例如,A,AAAA,A+AAAA,ANY,CNAME,MX,
NS,PTR,SOA,SRV)
querytype=X – 與 type 相同
class=X – 設定查詢類別 (例如,IN (Internet), ANY)
[no]msxfr – 使用 MS 快速區域轉送
ixfrver=X – 用於 IXFR 轉送要求的目前版本
server NAME – 使用目前的預設伺服器,將預設伺服器設定為 NAME
lserver NAME – 使用初始伺服器,將預設伺服器設定為 NAME
finger [USER] – 在目前預設主機上 finger 選用 NAME
root – 將目前預設伺服器設定為根伺服器
ls [opt] DOMAIN [> FILE] – 列出 DOMAIN 中的位址 (選用: 輸出至 FILE)
-a - 列出正式名稱及別名
-d - 列出所有記錄
-t TYPE - 列出所給定 RFC 記錄類型的記錄 (例如,A,CNAME,MX,NS,PTR 等)
view FILE – 排序 'ls' 輸出檔並使用 pg 予以檢視
exit – 結束程式
命令: (識別元會以大寫字元顯示,[] 表示選用)
NAME – 列印使用預設伺服器之主機/網域 NAME 的資訊
NAME1 NAME2 – 與上述相同,但使用 NAME2 做為伺服器
help or ? – 列印常用命令的資訊
set OPTION – 設定選項
all – 列印選項 (目前伺服器及主機)
[no]debug – 列印偵錯資訊
[no]d2 – 列印詳盡的偵錯資訊
[no]defname – 將網域名稱附加到每個查詢
[no]recurse – 要求遞迴回答查詢
[no]search – 使用網域搜尋清單
[no]vc – 一律使用虛擬電路
domain=NAME – 將預設網域名稱設定為 NAME
srchlist=N1[/N2/.../N6] – 將網域設定為 N1,而將搜尋清單設定為 N1,N2 等
root=NAME – 將根伺服器設定為 NAME
retry=X – 將重試次數設定為 X
timeout=X – 將初始逾時間隔設定為 X 秒
type=X – 設定查詢類型 (例如,A,AAAA,A+AAAA,ANY,CNAME,MX,
NS,PTR,SOA,SRV)
querytype=X – 與 type 相同
class=X – 設定查詢類別 (例如,IN (Internet), ANY)
[no]msxfr – 使用 MS 快速區域轉送
ixfrver=X – 用於 IXFR 轉送要求的目前版本
server NAME – 使用目前的預設伺服器,將預設伺服器設定為 NAME
lserver NAME – 使用初始伺服器,將預設伺服器設定為 NAME
finger [USER] – 在目前預設主機上 finger 選用 NAME
root – 將目前預設伺服器設定為根伺服器
ls [opt] DOMAIN [> FILE] – 列出 DOMAIN 中的位址 (選用: 輸出至 FILE)
-a - 列出正式名稱及別名
-d - 列出所有記錄
-t TYPE - 列出所給定 RFC 記錄類型的記錄 (例如,A,CNAME,MX,NS,PTR 等)
view FILE – 排序 'ls' 輸出檔並使用 pg 予以檢視
exit – 結束程式
>

沒有留言:
張貼留言