清除DNS快取資訊方法

itscrambler發表於2011-09-14

當計算機對域名訪問時並不是每次訪問都需要向DNS伺服器尋求幫助的,一般來說當解析工作完成一次後,該解析條目會儲存在計算機的DNS快取列表中,如果這時DNS解析出現更改變動的話,由於DNS快取列表資訊沒有改變,在計算機對該域名訪問時仍然不會連線DNS伺服器獲取最新解析資訊,會根據自己計算機上儲存的快取對應關係來解析,這樣就會出現DNS解析故障。這時我們應該透過清除DNS快取的命令來解決故障。   
第一步:透過“開始->執行->輸入CMD”進入命令列模式。   
第二步:在命令列模式中我們可以看到在ipconfig /?中有一個名為/flushdns的引數,這個就是清除DNS快取資訊的命令。   
第三步:執行ipconfig /flushdns命令,當出現“successfully flushed the dns resolver cache”的提示時就說明當前計算機的快取資訊已經被成功清除。   
第四步:接下來我們再訪問域名時,就會到DNS伺服器上獲取最新解析地址,再也不會出現因為以前的快取造成解析錯誤故障了。

執行命令示例如下:

[@more@]

C:Documents and SettingsAdministrator>ipconfig /?

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

where
adapter Connection name
(wildcard characters * and ? allowed, see examples)

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 ClassId is specified, then the ClassId is removed.

Examples:
> ipconfig ... Show information.
> ipconfig /all ... Show detailed information
> ipconfig /renew ... renew all adapters
> ipconfig /renew EL* ... renew any connection that has its
name starting with EL
> ipconfig /release *Con* ... release all matching connections,
eg. "Local Area Connection 1" or
"Local Area Connection 2"

C:Documents and SettingsAdministrator>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

C:Documents and SettingsAdministrator>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26273052/viewspace-1055043/,如需轉載,請註明出處,否則將追究法律責任。

相關文章