如何修复DNS?

最近众多人出现了能上QQ,不能上网页的问题,经过我调查,具有以下特征:
1. 网络正常;
2. 不能通过域名访问网站,但可以通过IP访问网站;
3. 网络程序无法解析域名;
4. 但nslookup可以正常解析域名;
5. 即使修改hosts文件,也无法解析;
6. QQ正常是因为有DNS缓存

故 我怀疑DNS客户端损坏,但dns客户端是windows的基础之一不知可否修复。
于是 我上网查了查,得到以下文章:

Manually repair Windows XP / 2000 DNS lookup properties

Doing this with Windows XP and 2000 is a little harder, due to the fact that TCP/IP cannot be removed, and if you delete the keys from the registry they will automatically be recreated, but empty.

First, you need to reset the TCP stack using Netsh. Click Start->Run and type in "netsh int ip reset resetlog.txt"

The default values for the reg keys are the same on all machines, so you can transplant them from a known good machine.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Winsock
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Winsock2

Here is an export of the good keys, although I have personally never used them. I take no responsibility if it crashes the system it is used on. (Set a restore point beforehand) Windows generally will not load networking when in safe mode, so boot to safe mode to replace the keys.

You'll now want to clear out your hosts file. The path to it is: Windows\system32\drivers\etc\Hosts. Simply open it in notepad and delete any entries you find in it. Save it, and you're done. It may be a good idea to save a backup of it beforehand, but I can't imagine you needing it.

Once that is done, reboot.


posted @ 2006-08-29 21:30  y9902  阅读(12747)  评论(14编辑  收藏  举报