Windows Time Server


RFC 1305
Previous  Top  Next

Network Working Group
Request for Comments: 1305
Obsoletes RFC-1119, RFC-1059, RFC-958         


David L. Mills
University of Delaware
March 1992



Network Time Protocol (Version 3)
Specification, Implementation and Analysis




Note: This document consists of an approximate rendering in ASCII of the PostScript document of the same name. It is provided for convenience and for use in searches, etc. However, most tables, figures, equations and captions have not been rendered and the pagination and section headings are not available.

Abstract

This document describes the Network Time Protocol (NTP), specifies its formal structure and summarizes information useful for its implementation. NTP provides the mechanisms to synchronize time and coordinate time distribution in a large, diverse internet operating at rates from mundane to lightwave. It uses a returnable-time design in which a distributed subnet of time servers operating in a self-organizing, hierarchical-master-slave configuration synchronizes local clocks within the subnet and to national time standards via wire or radio. The servers can also redistribute reference time via local routing algorithms and time daemons.

Status of this Memo

This RFC specifies an IAB standards track protocol for the Internet community and requests discussion and suggestions for improvements. Please refer to the current edition of the <169>IAB Official Protocol
Standards<170> for the standardization state and status of this protocol. Distribution of this memo is unlimited.

Keywords: network clock synchronization, standard time distribution, fault-tolerant architecture, maximum-likelihood estimation, disciplined oscillator, internet protocol, high-speed networks, formal specification.

Preface

This document describes Version 3 of the Network Time Protocol (NTP). It supersedes Version 2 of the protocol described in RFC-1119 dated September 1989. However, it neither changes the protocol in any significant way nor obsoletes previous versions or existing implementations. The main motivation for the new version is to refine
the analysis and implementation models for new applications at much higher network speeds to the gigabit-per-second regime and to provide for the enhanced stability, accuracy and precision required at such speeds. In particular, the sources of time and frequency errors have been rigorously examined and error bounds established in order to improve performance, provide a model for correctness assertions and indicate timekeeping quality to the user. The revision also incorporates two new optional features, (1) an algorithm to combine the offsets of a
number of peer time servers in order to enhance accuracy and (2) improved local-clock algorithms which allow the poll intervals on all synchronization paths to be substantially increased in order to reduce network overhead. An overview of the changes, which are described in detail in Appendix D, follows:

· 1. In Version 3 The local-clock algorithm has been overhauled to improve stability and accuracy. Appendix G presents a detailed mathematical model and design example which has been refined with the aid of feedback-control analysis and extensive simulation using data collected over ordinary Internet paths. Section 5 of RFC-1119 on the NTP local clock has been completely rewritten to describe the new algorithm. Since the new algorithm can result in message rates far below the old ones, it is highly recommended that they be used in new implementations. Note that use of the new algorithm does not affect interoperability with previous versions or existing implementations.  

· 2. In Version 3 a new algorithm to combine the offsets of a number of peer time servers is presented in Appendix F. This algorithm is modelled on those used by national standards laboratories to combine the weighted offsets from a number of standard clocks to construct a synthetic laboratory time scale more accurate than that of any clock separately. It can be used in an NTP implementation to improve accuracy and stability and reduce errors due to asymmetric paths in the Internet. The new algorithm has been simulated using data collected over ordinary Internet paths and, along with the new local-clock algorithm, implemented and tested in the Fuzzball time servers now running in the Internet. Note that use of the new algorithm does not affect interoperability with previous versions or existing implementations.  

· 3. Several inconsistencies and minor errors in previous versions have been corrected in Version 3. The description of the procedures has been rewritten in pseudo-code augmented by English commentary for clarity and to avoid ambiguity. Appendix I has been added to illustrate C-language implementations of the various filtering and selection algorithms suggested for NTP. Additional information is included in Section 5 and in Appendix E, which includes the tutorial material formerly included in Section 2 of RFC-1119, as well as much new material clarifying the interpretation of time scales and leap seconds.  

· 4. Minor changes have been made in the Version-3 local-clock algorithms to avoid problems observed when leap seconds are introduced in the UTC time scale and also to support an auxiliary precision oscillator, such as a cesium clock or timing receiver, as a precision time base. In addition, changes were made to some procedures described in Section 3 and in the clock-filter and clock-selection procedures described in Section 4. While these changes were made to correct minor bugs found as the result of experience and are recommended for new implementations, they do not affect interoperability with previous versions or existing implementations in other than minor ways (at least until the next leap second).  

· 5. In Version 3 changes were made to the way delay, offset and dispersion are defined, calculated and processed in order to reliably bound the errors inherent in the time-transfer procedures. In particular, the error accumulations were moved from the delay computation to the dispersion computation and both included in the clock filter and selection procedures. The clock-selection procedure was modified to remove the first of the two sorting/discarding steps and replace with an algorithm first proposed by Marzullo and later incorporated in the Digital Time Service. These changes do not significantly affect the ordinary operation of or compatibility with various versions of NTP, but they do provide the basis for formal statements of correctness as described in Appendix H.  


Table of Contents

1.   Introduction
1.1.      Related Technology
2.   System Architecture
2.1.      Implementation Model
2.2.      Network Configurations
3.   Network Time Protocol
3.1.      Data Formats
3.2.      State Variables and Parameters
3.2.1.       Common Variables
3.2.2.       System Variables
3.2.3.       Peer Variables
3.2.4.       Packet Variables
3.2.5.       Clock-Filter Variables
3.2.6.       Authentication Variables
3.2.7.       Parameters
3.3.      Modes of Operation
3.4.      Event Processing
3.4.1.         Notation Conventions
3.4.2.         Transmit Procedure
3.4.3.         Receive Procedure
3.4.4.         Packet Procedure
3.4.5.         Clock-Update Procedure
3.4.6.         Primary-Clock Procedure
3.4.7.         Initialization Procedures
3.4.7.1.         Initialization Procedure
3.4.7.2.         Initialization-Instantiation Procedure
3.4.7.3.         Receive-Instantiation Procedure
3.4.7.4.         Primary Clock-Instantiation Procedure
3.4.8.         Clear Procedure
3.4.9.         Poll-Update Procedure
3.5.      Synchronization Distance Procedure
3.6.      Access Control Issues
4.   Filtering and Selection Algorithms
4.1.      Clock-Filter Procedure
4.2.      Clock-Selection Procedure
4.2.1.         Intersection Algorithm
4.2.2.         Clustering Algorithm
5.   Local Clocks
5.1.      Fuzzball Implementation
5.2.      Gradual Phase Adjustments
5.3.      Step Phase Adjustments
5.4.      Implementation Issues
6. Acknowledgments
7. References

A.   Appendix A. NTP Data Format - Version 3
B.   Appendix B. NTP Control Messages
      NTP Control Message Format
      Status Words
         System Status Word
         Peer Status Word
         Clock Status Word
         Error Status Word
      Commands
C.   Appendix C. Authentication Issues
      NTP Authentication Mechanism
      NTP Authentication Procedures
         Encrypt Procedure
         Decrypt Procedure
         Control-Message Procedures
D.   Appendix D. Differences from Previous Versions.
E.   Appendix E. The NTP Timescale and its Chronometry
      Introduction
      Primary Frequency and Time Standards
      Time and Frequency Dissemination
      Calendar Systems
      The Modified Julian Day System
      Determination of Frequency
      Determination of Time and Leap Seconds
      The NTP Timescale and Reckoning with UTC
F.   Appendix F. The NTP Clock-Combining Algorithm
      Introduction
      Determining Time and Frequency
      Clock Modelling
      Development of a Composite Timescale
      Application to NTP
      Clock-Combining Procedure
G.   Appendix G. Computer Clock Modelling and Analysis
      Computer Clock Models
         The Fuzzball Clock Model
         The Unix Clock Model
      Mathematical Model of the NTP Logical Clock
      Parameter Management
      Adjusting VCO Gain (<$Ebold alpha>)
      Adjusting PLL Bandwidth (<$Ebold tau>)
      The NTP Clock Model
H.   Appendix H. Analysis of Errors and Correctness Principles
      Introduction
      Timestamp Errors
      Measurement Errors
      Network Errors
      Inherited Errors
      Correctness Principles
I.   Appendix I. Selected C-Language Program Listings
      Common Definitions and Variables
      Clock Filter Algorithm
      Interval Intersection Algorithm
      Clock Selection Algorithm
      Clock Combining Procedure
      Subroutine to Compute Synchronization Distance

List of Figures

Figure 1. Implementation Model
Figure 2. Calculating Delay and Offset
Figure 3. Clock Registers
Figure 4. NTP Message Header
Figure 5. NTP Control Message Header
Figure 6. Status Word Formats
Figure 7. Authenticator Format
Figure 8. Comparison of UTC and NTP Timescales at Leap
Figure 9. Network Time Protocol
Figure 10. Hardware Clock Models
Figure 11. Clock Adjustment Process
Figure 12. NTP Phase-Lock Loop (PLL) Model
Figure 13. Timing Intervals
Figure 14. Measuring Delay and Offset
Figure 15. Error Accumulations
Figure 16. Confidence Intervals and Intersections

List of Tables

Table 1. System Variables
Table 2. Peer Variables
Table 3. Packet Variables
Table 4. Parameters
Table 5. Modes and Actions
Table 6. Clock Parameters
Table 7. Characteristics of Standard Oscillators
Table 8. Table of Leap-Second Insertions
Table 9. Notation Used in PLL Analysis
Table 10. PLL Parameters
Table 11. Notation Used in PLL Analysis
Table 12. Notation Used in Error Analysis



Author's address
David L. Mills
Electrical Engineering Department
University of Delaware
Newark, DE 19716
Phone (302) 451<196>8247
EMail mills@udel.edu




Bytefusion Software Prices Site Map Purchase This Product Online
How to Order GPS Master Clock Time Client for Windows
Windows Time Server Secure Shell Client Windows Time Products
Secure Email with OpenPGP Support USB GPS Windows Telnet Server
Products
Download
Order
Support
GPS Sales
Contact
News
Home