📄 rfc1305.txt
字号:
Network Working Group David L. MillsRequest for Comments: 1305 University of DelawareObsoletes RFC-1119, RFC-1059, RFC-958 March 1992 Network Time Protocol (Version 3) Specification, Implementation and AnalysisNote: This document consists of an approximate rendering in ASCII of thePostScript document of the same name. It is provided for convenience andfor use in searches, etc. However, most tables, figures, equations andcaptions have not been rendered and the pagination and section headingsare not available.AbstractThis document describes the Network Time Protocol (NTP), specifies itsformal structure and summarizes information useful for itsimplementation. NTP provides the mechanisms to synchronize time andcoordinate time distribution in a large, diverse internet operating atrates from mundane to lightwave. It uses a returnable-time design inwhich a distributed subnet of time servers operating in a self-organizing, hierarchical-master-slave configuration synchronizes localclocks within the subnet and to national time standards via wire orradio. The servers can also redistribute reference time via localrouting algorithms and time daemons.Status of this MemoThis RFC specifies an IAB standards track protocol for the Internetcommunity and requests discussion and suggestions for improvements.Please refer to the current edition of the <169>IAB Official ProtocolStandards<170> for the standardization state and status of thisprotocol. Distribution of this memo is unlimited.Keywords: network clock synchronization, standard time distribution,fault-tolerant architecture, maximum-likelihood estimation, disciplinedoscillator, internet protocol, high-speed networks, formalspecification.PrefaceThis document describes Version 3 of the Network Time Protocol (NTP). Itsupersedes Version 2 of the protocol described in RFC-1119 datedSeptember 1989. However, it neither changes the protocol in anysignificant way nor obsoletes previous versions or existingimplementations. The main motivation for the new version is to refinethe analysis and implementation models for new applications at muchhigher network speeds to the gigabit-per-second regime and to providefor the enhanced stability, accuracy and precision required at suchspeeds. In particular, the sources of time and frequency errors havebeen rigorously examined and error bounds established in order toimprove performance, provide a model for correctness assertions andindicate timekeeping quality to the user. The revision also incorporatestwo new optional features, (1) an algorithm to combine the offsets of anumber of peer time servers in order to enhance accuracy and (2)improved local-clock algorithms which allow the poll intervals on allsynchronization paths to be substantially increased in order to reducenetwork overhead. An overview of the changes, which are described indetail in Appendix D, follows:1.In Version 3 The local-clock algorithm has been overhauled to improvestability and accuracy. Appendix G presents a detailed mathematicalmodel and design example which has been refined with the aid offeedback-control analysis and extensive simulation using data collectedover ordinary Internet paths. Section 5 of RFC-1119 on the NTP localclock has been completely rewritten to describe the new algorithm. Sincethe new algorithm can result in message rates far below the old ones, itis highly recommended that they be used in new implementations. Notethat use of the new algorithm does not affect interoperability withprevious versions or existing implementations.2.In Version 3 a new algorithm to combine the offsets of a number of peertime servers is presented in Appendix F. This algorithm is modelled onthose used by national standards laboratories to combine the weightedoffsets from a number of standard clocks to construct a syntheticlaboratory timescale more accurate than that of any clock separately. Itcan be used in an NTP implementation to improve accuracy and stabilityand reduce errors due to asymmetric paths in the Internet. The newalgorithm has been simulated using data collected over ordinary Internetpaths and, along with the new local-clock algorithm, implemented andtested in the Fuzzball time servers now running in the Internet. Notethat use of the new algorithm does not affect interoperability withprevious versions or existing implementations.3.Several inconsistencies and minor errors in previous versions have beencorrected in Version 3. The description of the procedures has beenrewritten in pseudo-code augmented by English commentary for clarity andto avoid ambiguity. Appendix I has been added to illustrate C-languageimplementations of the various filtering and selection algorithmssuggested for NTP. Additional information is included in Section 5 andin Appendix E, which includes the tutorial material formerly included inSection 2 of RFC-1119, as well as much new material clarifying theinterpretation of timescales and leap seconds.4.Minor changes have been made in the Version-3 local-clock algorithms toavoid problems observed when leap seconds are introduced in the UTCtimescale and also to support an auxiliary precision oscillator, such asa cesium clock or timing receiver, as a precision timebase. In addition,changes were made to some procedures described in Section 3 and in theclock-filter and clock-selection procedures described in Section 4.While these changes were made to correct minor bugs found as the resultof experience and are recommended for new implementations, they do notaffect interoperability with previous versions or existingimplementations in other than minor ways (at least until the next leapsecond).5.In Version 3 changes were made to the way delay, offset and dispersionare defined, calculated and processed in order to reliably bound theerrors inherent in the time-transfer procedures. In particular, theerror accumulations were moved from the delay computation to thedispersion computation and both included in the clock filter andselection procedures. The clock-selection procedure was modified toremove the first of the two sorting/discarding steps and replace with analgorithm first proposed by Marzullo and later incorporated in theDigital Time Service. These changes do not significantly affect theordinary operation of or compatibility with various versions of NTP, butthey do provide the basis for formal statements of correctness asdescribed in Appendix H.Table of Contents1. Introduction 11.1. Related Technology 22. System Architecture 42.1. Implementation Model 62.2. Network Configurations 73. Network Time Protocol 83.1. Data Formats 83.2. State Variables and Parameters 93.2.1. Common Variables 93.2.2. System Variables 123.2.3. Peer Variables 123.2.4. Packet Variables 143.2.5. Clock-Filter Variables 143.2.6. Authentication Variables 153.2.7. Parameters 153.3. Modes of Operation 173.4. Event Processing 193.4.1. Notation Conventions 193.4.2. Transmit Procedure 203.4.3. Receive Procedure 223.4.4. Packet Procedure 243.4.5. Clock-Update Procedure 273.4.6. Primary-Clock Procedure 283.4.7. Initialization Procedures 283.4.7.1. Initialization Procedure 293.4.7.2. Initialization-Instantiation Procedure 293.4.7.3. Receive-Instantiation Procedure 303.4.7.4. Primary Clock-Instantiation Procedure 313.4.8. Clear Procedure 313.4.9. Poll-Update Procedure 323.5. Synchronization Distance Procedure 323.6. Access Control Issues 334. Filtering and Selection Algorithms 344.1. Clock-Filter Procedure 354.2. Clock-Selection Procedure 364.2.1. Intersection Algorithm 365. Local Clocks 405.1. Fuzzball Implementation 415.2. Gradual Phase Adjustments 425.3. Step Phase Adjustments 435.4. Implementation Issues 446. Acknowledgments 457. References 46A. Appendix A. NTP Data Format - Version 3 50B. Appendix B. NTP Control Messages 53B.1. NTP Control Message Format 54B.2. Status Words 56B.2.1. System Status Word 56B.2.2. Peer Status Word 57B.2.3. Clock Status Word 58B.2.4. Error Status Word 58B.3. Commands 59C. Appendix C. Authentication Issues 61C.1. NTP Authentication Mechanism 62C.2. NTP Authentication Procedures 63C.2.1. Encrypt Procedure 634.2.2. Clustering Algorithm 38C.2.2. Decrypt Procedure 64C.2.3. Control-Message Procedures 65D. Appendix D. Differences from Previous Versions. 66E. Appendix E. The NTP Timescale and its Chronometry 70E.1. Introduction 70E.2. Primary Frequency and Time Standards 70E.3. Time and Frequency Dissemination 72E.4. Calendar Systems 74E.5. The Modified Julian Day System 75E.6. Determination of Frequency 76E.7. Determination of Time and Leap Seconds 76E.8. The NTP Timescale and Reckoning with UTC 78F. Appendix F. The NTP Clock-Combining Algorithm 80F.1. Introduction 80F.2. Determining Time and Frequency 80F.3. Clock Modelling 81F.4. Development of a Composite Timescale 81F.5. Application to NTP 84
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -