Understanding NTP Server Stratum Levels: Hierarchy and Significance

NTP server stratum levels indicate how many network hops a time server is from an authoritative reference clock, with stratum 1 representing direct connection to atomic clocks or GPS and higher numbers signifying progressively less precise but more distributed time sources.

The jauderho/nts-servers repository maintains a curated list of Network Time Security (NTS) enabled NTP servers, organizing them by stratum to help users select appropriate time sources. Understanding these stratum levels is essential for configuring accurate, reliable time synchronization across distributed systems and ensuring your infrastructure maintains tight clock consensus.

What Are NTP Stratum Levels?

The Network Time Protocol (NTP) organizes time-keeping infrastructure into a stratum hierarchy—a numerical scale from 0 to 16 that quantifies the distance between a given server and the ultimate source of truth. This classification system enables clients to make intelligent decisions about which servers provide the best balance of accuracy, reliability, and network proximity.

The Stratum Hierarchy Explained

Stratum 0: The Reference Clock

Stratum 0 represents the physical hardware itself—atomic clocks, GPS satellites, or radio time sources. These devices do not operate as NTP servers on the network; instead, they provide the foundational time signal that stratum 1 servers consume directly via serial interfaces or pulse-per-second (PPS) signals.

Stratum 1: Primary Time Servers

Stratum 1 servers maintain a direct hardware connection to a stratum 0 reference clock. According to the nts-sources.yml file in the repository, entries such as a.st1.ntp.br (Brazil) and ntp3.fau.de (Germany) are designated as stratum: 1 (see lines 44-45). These servers offer the highest accuracy and lowest jitter available over the network, typically maintaining precision within microseconds of UTC.

Stratum 2: Secondary Servers

Stratum 2 servers synchronize against one or more stratum 1 peers via the network. While introducing minimal additional latency through network stack processing, they remain highly reliable for enterprise and consumer applications. The Ubuntu pool servers (1.ntp.ubuntu.com, etc.) listed at lines 10-12 of nts-sources.yml operate at stratum 2.

Stratum 3-15: Tertiary Levels

Each increment represents another layer of network distance from the primary source. For example, time.cloudflare.com (line 3) and time.xargs.org (line 95) both operate at stratum 3. These servers provide excellent availability and geographic distribution, though with slightly increased propagation delay and potential for accumulated jitter.

Stratum 16: Unsynchronized

A stratum value of 16 indicates the server is unreachable, malfunctioning, or not synchronized to any valid time source. The jauderho/nts-servers repository excludes such entries from its curated lists to ensure users only receive recommendations for healthy, synchronized infrastructure.

Why Stratum Levels Matter for NTP Infrastructure

Accuracy and Precision

Lower stratum numbers correlate with reduced time offset and network jitter. Stratum 1 servers minimize the accumulation of timing errors that occurs with each additional network hop, making them essential for financial trading platforms, scientific instrumentation, and distributed databases requiring tight clock consensus.

Reliability and Redundancy

NTP clients automatically prefer the lowest stratum reachable server during the selection algorithm. If a stratum 1 server becomes unavailable due to network partitioning or maintenance, clients seamlessly fail over to stratum 2 alternatives without manual intervention, maintaining continuous synchronization.

Load Distribution

By exposing the stratum field in nts-sources.yml, the repository enables users to distribute query load across the hierarchy rather than overwhelming primary servers with unnecessary requests. This prevents the "thundering herd" problem that can degrade stratum 1 server performance.

Security Considerations

Lower-stratum servers often represent better-maintained infrastructure and are more likely to support authenticated NTS (Network Time Security). The repository's README.md (lines 10-15) specifically highlights virtualized servers that may present accuracy concerns due to clock drift in guest environments, allowing security-conscious users to filter appropriately for bare-metal stratum 1 sources.

Practical Implementation with nts-servers

Filtering Servers by Stratum Level

You can analyze the repository's YAML data to group servers by their stratum classification:


# list_by_stratum.py – quick helper script

import yaml, pathlib

data = yaml.safe_load(pathlib.Path("nts-sources.yml").read_text())

# Group by stratum

by_stratum = {}
for srv in data["servers"]:
    # Strip markdown links to get plain hostname

    hostname = srv["hostname"]
    if "[" in hostname:
        hostname = hostname.split("[")[1].split("]")[0]
    by_stratum.setdefault(srv["stratum"], []).append(hostname)

for s in sorted(by_stratum):
    print(f"Stratum {s}:")
    for h in by_stratum[s]:
        print(f"  - {h}")

This script processes nts-sources.yml to extract the stratum field and organize hostnames by their hierarchical level, making it easy to identify all stratum 1 or stratum 2 options in specific geographic regions.

Verifying Server Stratum

To confirm a specific server's stratum level from the command line using the repository's validation tooling:


# Using the repository's verification script

./scripts/verifyNTSServers.py nts-sources.yml --hostname a.st1.ntp.br

The verifyNTSServers.py implementation (lines 22-34) executes chronyd -Q against the target hostname, returning reachability status and confirming the reported stratum value in the NTP packet response matches the metadata stored in the YAML file.

Configuring Client Preferences

When configuring chrony or ntpd, you can enforce stratum limits to ensure your system maintains high-quality time synchronization:


# /etc/chrony.conf snippet

# Prefer any server with stratum ≤ 2

server a.st1.ntp.br iburst maxstratum 2
server time.cloudflare.com iburst maxstratum 2

# Fallback to higher strata if needed

server time.xargs.org iburst

The maxstratum directive restricts the client to servers at or below the specified level unless no lower-stratum alternatives are reachable, ensuring your clock discipline algorithm only accepts high-quality time samples.

Key Repository Files for Stratum Management

Several files in the jauderho/nts-servers repository manage and validate stratum information:

Summary

  • NTP server stratum levels quantify distance from authoritative time sources, ranging from stratum 0 (reference clocks) to stratum 16 (unsynchronized).
  • Stratum 1 servers like a.st1.ntp.br and ntp3.fau.de offer the highest precision by connecting directly to GPS or atomic clocks.
  • The nts-sources.yml file explicitly marks each server's stratum, enabling users to filter by accuracy requirements and geographic location.
  • Chrony and ntpd clients can use maxstratum constraints to prefer lower-stratum, more accurate time sources automatically.
  • Stratum hierarchy supports load distribution and automatic failover when primary servers become unavailable.

Frequently Asked Questions

What is the difference between stratum 1 and stratum 2 NTP servers?

Stratum 1 servers connect directly to reference clocks (GPS, atomic) via hardware interfaces and represent the most accurate network time available, typically within microseconds of UTC. Stratum 2 servers synchronize against stratum 1 peers over the network, introducing minimal additional latency (usually under 10 milliseconds) while remaining highly accurate for general enterprise use.

Can I use stratum 3 or higher servers for production environments?

Yes, stratum 3 servers provide adequate accuracy for most applications, typically maintaining precision within single-digit milliseconds. However, for financial trading, scientific research, or distributed databases requiring microsecond or sub-millisecond precision, prefer stratum 1 or 2 sources listed in nts-sources.yml.

How does the nts-servers repository verify stratum levels?

The repository uses scripts/verifyNTSServers.py to execute chronyd -Q queries against listed servers, confirming reachability and validating the stratum value reported in NTP packets against the metadata stored in nts-sources.yml. This ensures the documented stratum levels remain accurate as server configurations change.

Why would a server show stratum 16?

Stratum 16 indicates the server is unsynchronized or unreachable, often due to network partitioning, configuration errors, upstream server failures, or excessive clock drift. The nts-servers repository excludes such entries from its curated lists to ensure only valid, synchronized servers appear in the recommendations.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →