Time Synchronization ==================== This section explores the core protocols used to synchronize clocks across networked systems. Accurate timekeeping is essential for logging, event correlation, encryption, and distributed computing. .. toctree:: :maxdepth: 1 :hidden: :includehidden: NTP PTP SNTP .. list-table:: :widths: 20 60 20 :header-rows: 1 * - Protocol - Description - Use Case * - NTP (Network Time Protocol) - Synchronizes system clocks to within milliseconds. *Uses hierarchical stratum levels and tolerates network jitter.* - Server sync, log timestamps, certificate validation * - PTP (Precision Time Protocol) - Offers sub-microsecond synchronization using hardware timestamping. *Ideal for real-time and deterministic systems.* - Telecom, stock exchanges, automation networks * - SNTP (Simple Network Time Protocol) - A simplified, lightweight version of NTP. *Lower precision but easy to implement.* - IoT devices, consumer electronics .. tab-set:: .. tab-item:: NTP (Network Time Protocol) **RFC:** RFC 5905 **Main Features:** - Synchronizes clocks across devices to millisecond accuracy - Hierarchical model (stratum levels 1–15) - Compensates for latency and jitter - Secure with NTS (NTP over TLS) **Use Cases:** - Server synchronization in data centers - Accurate timestamps for logs and security - Time-based certificate verification **Alternative Protocols:** - SNTP – Simpler, for embedded systems - PTP – For sub-microsecond precision in real-time networks .. panels:: :container: container pb-4 :column: col-lg-12 p-2 **Let us learn more about NTP:** * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`NTP Version&RFC Details ` * :ref:`NTP Basic Setup on Ubuntu using IPv4 ` * :ref:`NTP Basic Setup on Ubuntu using IPv6 ` * :ref:`NTP Protocol Packet Details ` * :ref:`NTP Usecases ` * :ref:`NTP Basic Features ` * :ref:`NTP Feature : Time Synchronization ` * :ref:`NTP Feature : Hierarchical Architecture ` * :ref:`NTP Feature : High Accuracy ` * :ref:`NTP Feature : Fault Tolerance ` * :ref:`NTP Feature : Clock Filtering and Selection ` * :ref:`NTP Feature : Security Support (NTPv4) ` * :ref:`NTP Feature : Support ` * :ref:`NTP Feature : Dynamic Server Discovery ` * :ref:`NTP Feature : Cross-Platform Compatibility ` * :ref:`NTP Feature : Low Bandwidth Usage ` * :ref:`Reference links ` .. button-link:: ./NTP.html :color: primary :shadow: :expand: Jump to "NTP" .. tab-set:: .. tab-item:: PTP (Precision Time Protocol) **RFC:** IEEE 1588 **Main Features:** - Achieves microsecond to sub-microsecond synchronization - Uses hardware timestamping for precision - Operates in master-slave hierarchy - Designed for LANs and deterministic environments **Use Cases:** - Time-critical networks (e.g., industrial automation) - Telecom synchronization - Financial market timing **Alternative Protocols:** - NTP – Suitable for broader, less precise applications - GPS – External time source for grandmasters .. panels:: :container: container pb-4 :column: col-lg-12 p-2 **Let us learn more about PTP:** * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`PTP Version&RFC Details ` * :ref:`PTP Basic Setup on Ubuntu using IPv4 ` * :ref:`PTP Basic Setup on Ubuntu using IPv6 ` * :ref:`PTP Protocol Packet Details ` * :ref:`PTP Usecases ` * :ref:`PTP Basic Features ` * :ref:`PTP Feature : High Precision Time Sync ` * :ref:`PTP Feature : Master-Slave Architecture ` * :ref:`PTP Feature : Hardware Timestamping ` * :ref:`PTP Feature : Event and General Messages ` * :ref:`PTP Feature : Loopback Testing Support ` * :ref:`PTP Feature : Delay Measurement and Mechanism ` * :ref:`PTP Feature : Best Master Clock Algorithm ` * :ref:`PTP Feature : Multicast and Unicast Support ` * :ref:`PTP Feature : Profile-Based Configuration ` * :ref:`PTP Feature : Scalability ` * :ref:`Reference links ` .. button-link:: ./PTP.html :color: primary :shadow: :expand: Jump to "PTP" .. tab-set:: .. tab-item:: SNTP (Simple Network Time Protocol) **RFC:** RFC 4330, RFC 5905 **Main Features:** - Lightweight implementation of NTP - Suitable for simple or embedded systems - Limited error handling and jitter correction - Easy to integrate into devices **Use Cases:** - Time sync on IoT sensors and smart appliances - Consumer electronics (TVs, clocks) - Low-power or limited-resource systems **Alternative Protocols:** - NTP – For full-featured, secure synchronization - PTP – For microsecond-level accuracy in deterministic networks .. panels:: :container: container pb-4 :column: col-lg-12 p-2 **Let us learn more about SNTP:** * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`SNTP Version&RFC Details ` * :ref:`SNTP Basic Setup on Ubuntu using IPv4 ` * :ref:`SNTP Basic Setup on Ubuntu using IPv6 ` * :ref:`SNTP Protocol Packet Details ` * :ref:`SNTP Usecases ` * :ref:`SNTP Basic Features ` * :ref:`SNTP Feature : Simplicity ` * :ref:`SNTP Feature : Time Synchronization ` * :ref:`SNTP Feature : UDP-Based Communication ` * :ref:`SNTP Feature : Low Overhead ` * :ref:`SNTP Feature : Compatibility with NTP servers ` * :ref:`SNTP Feature : Support for IPv4 and IPv6 ` * :ref:`SNTP Feature : One-Way Communication ` * :ref:`SNTP Feature : Periodic Updates ` * :ref:`Reference links ` .. button-link:: ./SNTP.html :color: primary :shadow: :expand: Jump to "SNTP"