美文网首页网络linux
【DNS】Windows & Linux 上 DNS 缓存清理

【DNS】Windows & Linux 上 DNS 缓存清理

作者: 放纵不基 | 来源:发表于2022-06-20 00:29 被阅读0次

Windows

ipconfig    /displaydns
ipconfig    /flushdns 

公网上,dns解析变更,一般需要10分钟才生效。

如图所示,基本逻辑为:
客户端 - 本机器dns解析器(如host,dnsmasq)- 本地dns服务器(比如家庭路由器)- 网络dns服务器

为了加速查询,在解析器和服务器上都有缓存在,一般而言我们要清理的是本机器上的dns缓存

Linux

image.png

在Linux上,除非已安装并运行诸如systemd-resolved,dnsmasq或nscd之类的缓存服务,否则没有操作系统级DNS缓存。

根据Linux发行版和所使用的缓存服务,清除DNS缓存的过程有所不同。

参考

Linux上DNS缓存的开启和清理
https://blog.csdn.net/michaelwoshi/article/details/121388113

相关文章

网友评论

    本文标题:【DNS】Windows & Linux 上 DNS 缓存清理

    本文链接:https://www.haomeiwen.com/subject/wyyemrtx.html