免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1634 | 回复: 1
打印 上一主题 下一主题

[DNS] 请教roundtrip的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-03-15 16:26 |只看该作者 |倒序浏览
在dns & bind的书中,介绍了Choosing Between Authoritative Name Servers的方法。有一点不太明白,如果有2台dns server ,那是不是逻辑上距离client端远(或者线路质量差)的dns server就不会轮询到,或者轮询到了,也会从线路好的dns server取值?另外,如何看到这个roundtrip值?

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
2 [报告]
发表于 2006-03-15 17:24 |只看该作者
前幾天有談到,我想就是 named 用時間來計算選擇那一部 NS,
至於 RTT 值如可看到我也不知道,根據某一篇 RFC DNS MIB 的說明有這個 OID,
但是 ISC BIND 或 NET-SNMP 都沒有做這個 mib agent

RTT 相關資料供你參考

  1. Given a choice of servers, which one is queried?
  2. Based on a question by Mark A. Dohm <mark.dohm@teldta.com> and answer by Paul A Vixie <paul@vix.com>

  3. Every recursive BIND name server (that is, one which is willing to go out and find something if asked something it doesn't know) will remember the measured round trip time (RTT) to each server it sends queries to. If it has a choice of several servers for some domain (like "." for example) it will use the one whose measured RTT is lowest.

  4. Since the measured RTT of all NS RRs starts at zero (0), every one is tried once. Once all have responded, all RTT's will be nonzero, and the "fastest server" will get all queries henceforth, until it slows down for some reason.

  5. To promote dispersion and good recordkeeping, BIND will penalize the RTT by a little bit each time a server is reused, and it will penalize the RTT a _lot_ if it ever has to retransmit a query. For a server to stay "#1", it has to keep on answering quickly and consistently.

  6. Note that this is something BIND does that the DNS Specification does not mention at all. So other servers, those not based on BIND, might behave very differently.
  7. Transferring
复制代码

rfc1122
rfc1612
rfc1794
rfc4339


最後,你如果真的想知道 RTT 怎麼算怎麼看,
請詳讀  lib/dns/adb.c 下的 source code
裏面的 comment 有很好的說明,尤其是
dns_adb_adjustsrtt 這個 function , 他決定了 NS 的 RTT 值調整及最終的 NS 取用順序
lib/dns/resolver.c 則說明了計算方法

我沒有整理過,而且講 RTT 實在也太泠門
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP