The following topics were covered in this article: what an NTP server is, how it work, its purpose and importance, the NTP stratum hierarchy, its features and characteristics, how NTP was developed, and ntp server configuration.
What is NTP server?

A computer system called an NTP (Network Time Protocol) server is made expressly to synchronize other networked devices’ clocks with a very precise and dependable time source. It serves as a trustworthy source of time, guaranteeing that the precise and constant time is maintained by all linked systems.
Purpose and Importance
- Goal and Significance For many network tasks, it is essential that all devices on a network agree at the same time.
- Professor David Mills created this device to synchronise computer clocks with a common time source, usually an atomic clock.
- Essential for precise timestamps in logs and documents, which facilitate troubleshooting and enable event correlation among various devices.
- Prevents serious database problems in the case that servers are merely a few seconds out of sync.
- Supports telecommunications networks and arranges financial transactions.
- Preserves clock-synchronized authentication systems, such as Kerberos.
- Facilitates distributed systems, including servers, databases, and Internet of Things devices. Important for data consistency, communication, and security.
How does NTP server work
A client and a server communicate continuously during the time synchronisation procedure.
- An NTP server receives a request from a client that includes the local timestamp (t1).
- The server sends a response back, including both t2 and its timestamp for sending the response (t3), after receiving the request at its own timestamp (t2).
- The response is sent to the client at the timestamp (t4).
- The client then determines the exact time by computing the time offset and the network latency.
- A constant adjustment called “slewing” is made to the client’s local clock by using the offset. To avoid sudden time jumps that can interfere with system functionality, this is done gradually.
- To compensate for network latency (jitter), smooth out clock modifications, and guarantee precise synchronisation, NTP employs complex algorithms.
Also Read About Network Print Server, How It Works & Types Of Print Servers
The NTP Stratum Hierarchy

To ensure that time is disseminated effectively and precisely from the most exact sources down to end-user devices, NTP employs a hierarchical structure known as “stratum” to classify time sources. A more precise time source is indicated by a lower stratum number.
Stratum 0: Not included in the network, these are the main reference clocks. They are the ultimate source of truth and are high-precision timepieces, such as GPS receivers or atomic clocks.
Stratum 1: A Stratum 0 clock is directly connected to these servers. They distribute time to lower-stratum servers and are the network’s most accurate time servers.
Stratum 2: The servers in this stratum align their time with those in stratum 1. By acting as backup time sources, they lessen the strain on Stratum 1 servers.
Stratum 3: The hierarchy keeps going, with the level directly above each succeeding stratum receiving its time. The amount of “hops” a device has from a Stratum 1 server determines its stratum. The stratum level rises with each “NTP hop” from the original clock source since an NTP client adds 1 to the stratum level it learns from an NTP server.
A stratum 16 device is deemed unsynchronised, which indicates that no clocking is being received and that the time data is useless.
Also Read About What is Application server and How Application Server Works
Key Features and Characteristics
Time synchronisation: Maintains the same time on all network devices.
Accuracy: Often within milliseconds of the reference time, it can synchronize with extremely precise sources such as atomic clocks or GPS.
Hierarchy (Stratum Levels): Defines time server accuracy and separation from a reference time source using stratum levels.
Redundancy: Several servers offer dependability and backup.
Security: NTP Version 3 supports cryptographic authentication, which guards against time faking and guarantees safe synchronisation.
Protocols and Ports: By default, NTP synchronises time using UDP port 123. Although it is not commonly used, TCP/123 can be configured.
Reference Standard: The global standard time reference is Coordinated Universal Time (UTC).
Scalability and Fault Tolerance: Made to be robust and scalable, this system guarantees reliable time synchronisation over big networks.
The development of NTP
The evolution of NTP started in the middle of the 1980s. In order to avoid data corruption and errors, more precise timekeeping became essential as the internet’s size and complexity increased. In addition to improved functionality, such as error correction techniques for network delays, stratum levels were added to enable clients to prioritise updates from more trustworthy sources. The NTP (version 4) of today is an advanced protocol that tackles the intricacies of the contemporary digital environment.
Also Read About Advantages Of Network Address Translation NAT And Types
NTP server configuration

NTP server mode (ntp master {stratum-level}
command): In this mode, a device uses its internal clock to determine time and only functions as an NTP server. This command makes a router or switch trust its internal clock and configures it as an NTP server. Internal reference clock stratum levels on Cisco equipment can be configured from 1 to 15, with 8 being the default.
NTP client/server mode (ntp server {address | hostname}
command): In this mode, a device initially synchronises its time with an NTP server by acting as an NTP client. After synchronisation, it can serve as an NTP server to provide other NTP clients with time.
Redundant NTP Configuration: Businesses should use at least two external NTP servers for redundancy in order to provide a solid architecture. While most enterprise devices function as NTP clients, a small number can also function as servers. In the event that external NTP servers are unavailable, routers can be set up using ntp master to use their internal clock as a fallback. The Internet-based NTP servers should only be used as a backup, and the stratum level of the internal clock should be set higher (worse).
Increased Availability with Loopback Interfaces: An NTP source address can be set to a loopback interface to avoid a single point of failure. The NTP service is set up to use the IP address of the designated loopback interface as the source for NTP messages when the ntp source loopback 0 command is used.