Skip to main content

Appendix D. Differences from Previous Versions

This appendix summarizes the differences between NTP Version 3 and previous versions (Version 2 and Version 1). The changes were made to improve accuracy, stability and reliability, as well as to clarify ambiguities in the specification. Most changes are refinements and enhancements that do not affect interoperability with previous versions.

Version 3 Changes from Version 2

1. Local-Clock Algorithm

The local-clock algorithm has been completely redesigned to improve stability and accuracy. The new algorithm uses a phase-locked loop (PLL) design with adaptive bandwidth control. Key changes include:

  • Improved frequency compensation that can track oscillator drift more accurately
  • Adaptive time constant that automatically adjusts based on network conditions
  • Enhanced step/slew threshold logic to better handle large corrections
  • Watchdog timer to prevent stale offset data from affecting the clock

The new algorithm is described in detail in Section 5 and Appendix G. Implementations are strongly encouraged to adopt the new algorithm, although the old algorithm remains compatible.

2. Clock-Combining Algorithm

A new optional algorithm for combining offsets from multiple peers has been added (Appendix F). This algorithm:

  • Uses weighted averaging based on synchronization distance
  • Improves accuracy when multiple peers are available
  • Reduces the impact of outliers and asymmetric paths
  • Is based on techniques used by national standards laboratories

The clock-combining algorithm is optional and does not affect interoperability.

3. Error Budget Refinements

The way delay, offset, and dispersion are calculated has been refined:

  • Dispersion calculation now includes all error components (measurement error, skew accumulation, filter dispersion)
  • Delay calculation simplified by moving error terms to dispersion
  • Synchronization distance now properly accounts for all error sources
  • Error bounds can be formally proven under stated assumptions (see Appendix H)

These changes provide a more rigorous foundation for correctness assertions but do not significantly affect normal operation.

4. Clock-Selection Algorithm

The clock-selection procedure has been modified to improve reliability:

  • Intersection algorithm adopted from Digital Time Service (DTS) replaces the previous sorting step
  • Clustering algorithm refined to better handle multiple candidates
  • Falseticker detection improved using Marzullo's algorithm
  • Survivor selection now considers both stratum and synchronization distance

The new algorithm is more robust in detecting and rejecting faulty clocks while maintaining compatibility with previous versions.

5. Clock-Filter Algorithm

Minor refinements to the clock-filter algorithm:

  • Filter dispersion calculation improved to better represent sample variance
  • Shift register management refined for better performance
  • Dispersion aging now properly accounts for time since last update
  • Maximum dispersion clamping prevents numerical overflow

6. Leap Second Handling

Improvements to leap second management:

  • Leap indicator bits now properly propagated through the synchronization subnet
  • Local-clock procedure enhanced to correctly handle 61-second and 59-second minutes
  • Minimum step interval added to prevent premature step changes during leap events
  • Leap second tables can be updated without code changes

7. Poll Interval Management

The poll interval management has been refined:

  • Adaptive polling based on local clock compliance and stability
  • Minimum and maximum poll intervals now configurable
  • Poll interval clamping for selected synchronization source
  • Hysteresis to prevent rapid poll interval changes

8. State Variable Changes

Several state variables have been added or modified:

  • peer.valid counter added to track valid samples
  • peer.update timestamp added for dispersion aging
  • sys.poll added to control system-wide polling behavior
  • Various parameters renamed or reorganized for clarity

9. Packet Format

The packet format remains identical to Version 2, with one exception:

  • Reference Identifier field interpretation clarified for stratum 0 and 1
  • Precision field interpretation refined
  • Poll interval field now consistently interpreted as power of two

10. Authentication

The authentication mechanism remains unchanged from Version 2, but:

  • Key management procedures clarified
  • Performance considerations documented
  • Interaction with clock procedures specified more precisely

Version 2 Changes from Version 1

For completeness, the major changes from Version 1 to Version 2 are summarized:

1. Packet Format

  • Stratum field expanded from 2 to 8 bits
  • Precision field added to indicate clock precision
  • Root delay and root dispersion fields added
  • Reference identifier field modified to support ASCII strings

2. Synchronization Algorithm

  • Peer selection algorithm refined to use stratum and synchronization distance
  • Reachability mechanism added to detect connectivity failures
  • Clock filter algorithm added to smooth samples

3. Local Clock

  • Compliance register added to track local clock stability
  • Frequency compensation enhanced
  • Gradual phase adjustments refined

4. Modes of Operation

  • Broadcast mode added for LAN environments
  • Client/server mode distinction clarified
  • Symmetric modes refined

5. Control Messages

  • Optional control message facility added (Appendix B)

Interoperability Considerations

NTP Version 3 is designed to interoperate with previous versions:

  • Version 2 and Version 3 implementations can interoperate without restrictions
  • Version 1 implementations can interoperate but may not achieve the same accuracy
  • Mixed networks will operate correctly, with Version 3 implementations gaining benefits of new algorithms

Compatibility Guidelines

  1. Version field should be set to 3 in transmitted messages
  2. Messages with version 2 should be accepted and processed normally
  3. Messages with version 1 should be accepted with reduced functionality
  4. Control messages should only be sent to peers known to support them

Upgrade Path

Organizations can upgrade to Version 3 incrementally:

  1. Primary servers should be upgraded first to take advantage of improved algorithms
  2. Secondary servers can be upgraded as convenient
  3. Clients can be upgraded last, as they benefit from improved server accuracy
  4. Mixed versions can coexist indefinitely without problems

Implementation Notes

Implementations should:

  • Adopt new algorithms where possible for improved performance
  • Maintain compatibility with previous versions
  • Document extensions to the standard protocol
  • Provide configuration options to enable/disable optional features
  • Test interoperability with existing implementations

The changes in Version 3 represent the accumulated experience of several years of operation on the Internet. They provide significant improvements in accuracy, stability, and reliability while maintaining full backward compatibility.