设为首页 收藏本站
查看: 839|回复: 0

[经验分享] Windows客户端DNS工作原理

[复制链接]

尚未签到

发表于 2019-2-19 11:33:30 | 显示全部楼层 |阅读模式
  通常大家对Windows客户端DNS的配置存在多个误区。
  误区一,配置1个内网DNS,1个外网DNS。解析内网的时候用内网DNS,解析外网的时候用外网。
  电脑怎么知道哪个是内网?哪个是外网?我们内部的DNS服务器里就有10+个DNS区域。
  误区二,第一个DNS服务器解析不到的地址,会继续找第二个DNS服务器查询。
  话分两说,超时了查不到会找第二个DNS服务器的。但是返回确定结果查无此人的话,是不会继续查询的。需要注意,查不到也是查询结果。
  误区三,服务器上同一个DNS区域中,有些域名解析成内部,剩余的想解析成外部地址,我就不填了。查不到会自动向公网转发
  此误区是没有理解DNS解析原理造成的。权威DNS服务器查不到了,它是不会像任何其他DNS服务器再查询的。
  误区四,每次查询都会从网卡属性中的第一个DNS服务器开始查。
  此误区和通常第一个误区一起结合。以为先配置内网DNS服务器,就能确保内网地址都能解析了。但是谁也没法保证内网查询永远不会出现超时。当内网服务器出现超时无返回结果,它在客户端DNS列表中的查询顺序会降低。以后再查询的时候就不会先查它了。所以,你填的DNS列表中的顺序并没有太大意义,运行了一段时间后,他们的顺序也会变得不同。
  Important note: the DNS servers list is kept in memory by the dnscache service. The next best server is determined based on a priority. All the servers start with the same priority and they are sorted for each adapter based on the precedence in which they were configured. Each time a server times-out its priority is reduced and when a server answers its priority is boosted (error conditions also modify the priority of a server). The next best server for an adapter is the one with the higher priority that is higher in the precedence list (if more than one server have the same priority then the next best is the one that is higher in the precedence list).
It is important to note that this prioritized list is kept across different queries; this means that the priorities are not reset after each query, but they are reused. The idea is that if a server timed-out a recent query then the next query will go to another server with a higher priority first. The effect of this is that the preferred DNS server might not be the first to get the next query if it recently timed-out.
These priorities are reset to the initial default values after an interval named ServerPriorityTimeLimit defined in registry. See http://support.microsoft.com/kb/320760 for more information about this value.
https://blogs.technet.microsoft.com/stdqry/2011/12/14/dns-clients-and-timeouts-part-2/
  If at any point the resolver receives a negative response from a server, it removes every server on that adapter from consideration during this search. For example, if in step 2, the first server on Alternate Adapter A gave a negative response, the resolver would not send the query to any other server on the list for Alternate Adapter A.
http://i2.运维网.com/images/blog/201809/30/d6b9a4c609cf2b5711fa1621c9b64580.png
  https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc961411(v=technet.10)




运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-674387-1-1.html 上篇帖子: Compare Windows 10 editions 下篇帖子: Mysql从Windows迁移到Linux,遇到的坑
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表