第一范文网 - 专业文章范例文档资料分享平台

NTP同步过程

来源:用户分享 时间:2025/7/21 0:12:24 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

roundtrip 延迟和时钟补偿计算如下:

Ti?3,Ti?2,Ti?1,Ti分别表示pkt.org , ptk.rec , pkt.xmt和peer.rec,主机相对于peer的时钟补偿

?,roundtrip延迟?和散布?表示如下

??(Ti?Ti-3)(-Ti-1?Ti-2) ??(Ti-2?Ti-3)?(Ti-1?Ti)

2??(1??sys.precision)??(Ti?Ti-3)6.5 Clock-Update Procedure

当有效的时钟补偿,延迟和散布数据被clock-filter鉴别后,由receive procedure呼叫clock-update过程。

begin clock-update procedure

call clock-select; /* select clock source */ if(sys.peer ≠ peer) exit;

当本地时钟被重置后,clear procedure进程被呼叫用来清除每个peer的clock filter,重置poll interval和重新选择同步源。

Note that the local-clock procedure sets the leap bits sys.leap to “unsynchronized” 112in this case, so that no other peer will attempt to synchronize to the host until the host once again selects a peer for synchronization.

根据上文计算的root延迟、散布、root 同步距离,会进行判断,若计算得到的距离大于NTP.MAXDISTANCE,那么主机就不会与这个选定的peer进行时钟同步。

?andistance(peer); /* update system variables */

if(Λ ≥ NTP.MAXDISTANCE) exit; sys.leap ←peer.leap;

sys.stratum ←peer.stratum +1; sys.refid ←peer.peeraddr; call local-clock;

if(local clock reset) begin /* if reset, clear state variables */ sys.leap ←112;

for(all peers) call clear; endif

else begin

sys.peer ← peer; /* if not, adjust local clock */ sys.rootdelay ← ?;

sys.rootdispersion ← Ε+max(????, NTP.MINDISPERSE);

endif

sys.reftime ←sys.clock; endclock-update procedure;

NTP的精度受到本地硬件时钟固有的框架的影响;

由于时钟速率间的微小差别和peers间精度的差异都会给时间同步的计算带来误差;

NTP itself is described in Section 3. It provides the protocol mechanisms to synchronize time in principle to precisions in the order of nanoseconds while preserving a non-ambiguous date well into the next century.

Since most host time servers will synchronize via another peer time server, there are two

components in each of these three products,those determined by the peer relative to the primary reference source of standard time and those measured by the host relative to the peer. Each of these components are maintained separately in the protocol in order to facilitate error control and management of the subnet itself. They provide not only precision measurements of offset and delay, but also definitive maximum error bounds, so that the user interface can determine not only the time, but the quality of the time as well.

搜索更多关于: NTP同步过程 的文档
NTP同步过程.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c8ak1l4afip9f98j84o08_4.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top