windows下清空本机DNS缓存


firefox和ie在修改了本机的hosts文件后,必须重起一下ie才起作用,今天看到有人讨论这个问题,问有没有办法可以用命令行清空dns的cache,直接使修改过的hosts文件生效,而不需要重起ff或者ie。
方法很简单
ipconfig /flushdns
相应的还有
ipconfig/displaydns Display the contents of the DNS Resolver Cache.

显示dns cache的内容,包括hosts文件里的信息也会显示出来。
ipconfig这个命令经常用,常用的有:
/all Display full configuration information.
/release Release the IP address for the specified adapter.
/renew Renew the IP address for the specified adapter.

但是这个关于dns的功能很少用。还有
/registerdns Refreshes all DHCP leases and re-registers DNS names
/showclassid Displays all the dhcp class IDs allowed for adapter.
/setclassid Modifies the dhcp class id.


《 “windows下清空本机DNS缓存” 》 有 2 条评论

  1. 是啊!ie的dns 记录好像默认的是120s,过后就没了!但又找不到相关的介绍资料!

  2. ie本身好像还要一级DNS缓存.

    ipconfig /flushdns只是清空系统缓存.
    即使清空了系统的DNS缓存.

    本身IE,的DNS缓存还是没有清空.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据