網管必須熟練掌握的“殺手剪”命令,你會用嗎?

write by 洱海月  QQ:254034704
http://blog.csdn.net/networkcrazy
ipconfig命令是用來查看網絡配置基本信息的最有用的命令,可堪稱網絡命令的“殺手剪”。它一出招,能幫助廣大網管解決60%不能上網的原因。下面給出此命令的詳細手法,希望能讓你如虎添翼。

1 命令幫助查看

C:/Documents and Settings/Administrator>ipconfig /?

Windows 2000 IP Configuration


USAGE:
   ipconfig [/? | /all | /release [adapter] | /renew [adapter]
            | /flushdns | /registerdns
            | /showclassid adapter
            | /setclassid adapter [classidtoset] ]

   adapter    Full name or pattern with '*' and '?' to 'match',
              * matches any character, ? matches one character.
   Options
       /?           Display this help message.
       /all         Display full configuration information.
       /release     Release the IP address for the specified adapter.
       /renew       Renew the IP address for the specified adapter.
       /flushdns    Purges the DNS Resolver cache.
       /registerdns Refreshes all DHCP leases and re-registers DNS names
       /displaydns  Display the contents of the DNS Resolver Cache.
       /showclassid Displays all the dhcp class IDs allowed for adapter.
       /setclassid  Modifies the dhcp class id.

The default is to display only the IP address, subnet mask and
default gateway for each adapter bound to TCP/IP.

For Release and Renew, if no adapter name is specified, then the IP address
leases for all adapters bound to TCP/IP will be released or renewed.

For SetClassID, if no class id is specified, then the classid is removed.

Examples:
    > ipconfig                       ... Show information.
    > ipconfig /all                  ... Show detailed information
    > ipconfig /renew                ... renew all adapaters
    > ipconfig /renew EL*            ... renew adapters named EL....
    > ipconfig /release *ELINK?21*   ... release all matching adapters,
                                         eg. ELINK-21, myELELINKi21adapter.

真沒有想到這個命令還有這麼多的參數。這些參數非常有用哦。下面進行詳細講解。

2 命令使用實例

(1)、查看所有接口的網絡配置信息

ipconfig /all( 不用詳說了吧,大家一定很常用。)

(2)釋放“本地連接”的IP地址(只對動態獲得IP地址的接口有效)

C:/Documents and Settings/Administrator>ipconfig /release 本地連接----可以省略(省略則表則釋放所有動態接口的IP地址。)

Windows 2000 IP Configuration

IP address successfully released for adapter "本地連接"

(3)、重獲“本地連接”的IP地址(只對動態獲得IP地址的接口有效)

C:/Documents and Settings/Administrator>ipconfig /renew 本地連接----可以省略(省略則表則重獲所有動態接口的IP地址。)

注意:(2)、(3)兩條命令常常是搭配使用的,可是經典中的經典哦。對於ARP欺騙攻擊,它們也一定效果的哦。值得推薦。。。

下面的命令就是非常有用,但大家並不常用的哦。注意看啊!

(4)、查看DNS解析器緩存

DNS解析器就是我們電腦向DNS服務器進行解析IP地址的客戶端軟件,沒有它,我們將無法解釋IP地址,這樣一來,我們在地址欄裏面輸入網址時,也就打不開網頁了哦。(注意:有些打不開網頁的情況就是DNS解析器出現了問題。)。DNS解析器是系統集成的工具,我們不需要另外安裝。

當我們電腦向DNS服務器進行解析時,DNS會把解析的結果返回給客戶端,這樣我們就知道了網址和IP地址的對就關係。但是,DNS解析器會這個解析的結果保存一定的時間,以免得重複解析,浪費資源。這就構成了DNS解析器緩存。

具體命令如下:

C:/Documents and Settings/Administrator>ipconfig /displaydns

Windows 2000 IP Configuration

   localhost.
   ------------------------------------------------------
     Record Name . . . . . : localhost
     Record Type . . . . . : 1
     Time To Live  . . . . : 31397166
     Data Length . . . . . : 4
     Section . . . . . . . : Answer
     A (Host) Record . . . :
                       127.0.0.1


   1.0.0.127.in-addr.arpa.
   ------------------------------------------------------
     Record Name . . . . . : 1.0.0.127.in-addr.arpa
     Record Type . . . . . : 12
     Time To Live  . . . . : 31397166
     Data Length . . . . . : 4
     Section . . . . . . . : Answer
     PTR Record  . . . . . :
                       localhost


(5)、清空DNS解析器緩存(注意:用此命令也解新決一些莫名其妙不能打開網頁的問題。)

C:/Documents and Settings/Administrator>ipconfig /flushdns

Windows 2000 IP Configuration

Successfully flushed the DNS Resolver Cache.

注意:(4)、(5)兩條命令也是一對好搭檔哦。

(6)、刷新所有DHCP租約,重新註冊DNS名字

C:/Documents and Settings/Administrator>ipconfig /registerdns

Windows 2000 IP Configuration

Registration of the DNS resource records for all adapters of this computer has b
een initiated. Any errors will be reported in the Event Viewer in 15 minutes.

(7)、查看"本地連接"的DHCP classes ID

C:/Documents and Settings/Administrator>ipconfig /showclassid 本地連接----不可省略

Windows 2000 IP Configuration

There are no DHCP classes for adapter "本地連接".

(8)、修改"本地連接"的DHCP classes ID

ipconfig /setclassid

注意:(7)、(8)兩條命令也是一對好搭檔哦。



 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章