NTP - Network Time Protocol

What is NTP?

  • NTP stands for Network Time Protocol. It’s a protocol used to synchronize the clocks of computers and other devices over a network to a precise time source, like an atomic clock or GPS.

Why is NTP useful?

  • Without NTP, devices would have different system times, which can cause problems in: * Logging and auditing * Scheduled tasks * Security protocols * Time-sensitive applications (e.g., financial transactions)

  • NTP ensures that all devices on a network agree on the correct time, improving coordination and reliability.

How it works?

  • Device requests time – A device sends a request to an NTP server asking for the current time.

  • NTP server responds – The server replies with the accurate time.

  • Device adjusts its clock – The device calculates the time difference and updates its system clock.

  • Periodic updates – Devices regularly check in with NTP servers to stay in sync.

Where is NTP used?

  • Home devices – Computers, phones, and routers use NTP to keep accurate time.

  • Enterprise networks – Servers and workstations synchronize time for logging, backups, and security.

  • Data centers – Precise time is critical for coordinating distributed systems.

  • Financial systems – Accurate timestamps are essential for transactions and compliance.

Which OSI Layer Does NTP Belong To?

  • NTP belongs to the Application Layer (Layer 7) of the OSI model because: * It provides a time synchronization service directly to applications and users. * Uses UDP (typically port 123) to exchange time information. * Involves high-level communication between client and server, characteristic of Layer 7 protocols.

  • In this section, you are going to learn

  • Terminology

  • Version Info

NTP Version

NTP Number

Year

Core Idea / Contribution

NTPv1

RFC 958

1985

First formal version of NTP; introduced basic time synchronization over the Internet.

NTPv2

RFC 1119

1989

Improved synchronization algorithms; added peer-to-peer communication and control messages.

NTPv3

RFC 1305

1992

Enhanced precision and stability; introduced clock filtering, selection algorithms, and improved error handling.

NTPv4

RFC 5905

2010

Added IPv6 support, improved accuracy, dynamic server discovery, and security extensions.

NTPv4 Security (Autokey)

RFC 5906

2010

Introduced cryptographic authentication using public key infrastructure.

NTPv4 MIBs

RFC 5907

2010

Defined SNMP MIBs for managing NTPv4 systems.

NTPv4 Updates

RFC 7822, RFC 8573

2016-2019

Updated packet formats and added MAC authentication improvements.

NTPv4 with NTS (Network Time Security)

RFC 8915

2020

Introduced modern security framework using TLS and AEAD encryption for secure time synchronization.

NTP Server Availability Test Case

  • To ensure that the NTP server (e.g.,pool.ntp.org) is reachable and responding to time synchronization requests. This confirms the availability and responsiveness of the server for time services.

  • Step-1: Ping the NTP Server.

    test:~$ping -c 5 pool.ntp.org
    PING pool.ntp.org (95.216.192.15) 56(84) bytes of data.
    64 bytes from ntp1.ggsrv.de (95.216.192.15): icmp_seq=1 ttl=40 time=205 ms
    64 bytes from ntp1.ggsrv.de (95.216.192.15): icmp_seq=2 ttl=40 time=228 ms
    64 bytes from ntp1.ggsrv.de (95.216.192.15): icmp_seq=3 ttl=40 time=251 ms
    64 bytes from ntp1.ggsrv.de (95.216.192.15): icmp_seq=4 ttl=40 time=275 ms
    64 bytes from ntp1.ggsrv.de (95.216.192.15): icmp_seq=5 ttl=40 time=197 ms
    
    --- pool.ntp.org ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4002ms
    rtt min/avg/max/mdev = 196.561/231.214/274.950/29.027 ms
    
  • Step-2: (Optional) Query the NTP Server using an NTP Client. This sends an NTP request and receives a time response.

    test:~$ntpdate -q pool.ntp.org
    2025-07-25 10:43:47.396384 (+0530) +0.479906 +/- 0.618937 pool.ntp.org 95.216.192.15 s2 no-leap
    
  • Step-3: Capture and analyze packets in Wireshark.

  • Expected result:

    • Ping Response - The server should respond to ICMP echo requests with no or minimal packet loss.

    • NTP Packet Exchange - Client request and Server response Packets.

  • Step-4: Wireshark Capture

    Download wireshark capture

NTP Server Response Verification

  • To ensure that the NTP server responds correctly to time synchronization requests from an NTP client, and client can successfully update its system time using the received data.

  • Step-1: Install and Start NTP Services.

    test:~$sudo apt update
    test:~$sudo apt install ntp
    test:~$sudo systemctl start ntp
    test:~$sudo systemctl status ntp
    
  • Step-2: Install NTPSEC Utility for direct query.

    test:~$sudo apt install ntpsec-ntpdig
    
  • Step-3: Query NTP Server Using ntpdig. This queries multiple NTP servers in the pool for accurate time data.

    test:~$ntpdig pool.ntp.org
    2025-07-25 11:02:44.193688 (+0530) +2.337326 +/- 2.750659 pool.ntp.org 95.216.144.226 s2 no-leap
    
  • Expected result:

    • The client should receive valid time responses from the NTP server.

    • System time should be updated or synchronized based on the received data.

  • Step-4: Wireshark Capture

    Download wireshark capture

Multiple NTP Server Responses Test Case

  • To verify that the NTP client can communicate with multiple NTP servers for redundancy and select the most accurate server based on synchronization metrics such as delay, offset, and jitter.

  • Step-1: Configure Multiple NTP servers.

    test:~$sudo nano /etc/ntp.conf
    #Add the following lines and save, exit the file
    server pool.ntp.org
    server time.google.com
    server time.windows.com
    
  • Step-2: Restart NTP service.

    test:~$sudo systemctl restart ntp
    
  • Step-3: Verify Server Communication.

    test:~$ntpq -p
          remote                                   refid      st t when poll reach   delay   offset   jitter
          =======================================================================================================
          0.ubuntu.pool.ntp.org                   .POOL.          16 p    -   64    0   0.0000   0.0000   0.0005
          1.ubuntu.pool.ntp.org                   .POOL.          16 p    -   64    0   0.0000   0.0000   0.0005
          2.ubuntu.pool.ntp.org                   .POOL.          16 p    -   64    0   0.0000   0.0000   0.0005
          3.ubuntu.pool.ntp.org                   .POOL.          16 p    -   64    0   0.0000   0.0000   0.0005
          prod-ntp-4.ntp1.ps5.canonical.com       .STEP.          16 u    - 1024    0   0.0000   0.0000   0.0005
          +160.250.111.68                          15.207.248.194   5 u  380  512   77  33.8858  -7.1772  23.2023
          +www.time.nplindia.org                   .PPS.            1 u  404 1024   77 109.4294 -34.2470  29.5893
          +ec2-65-0-119-56.ap-south-1.compute.amaz 169.254.169.123  4 u  383  512   77  24.4830  -0.3120  67.3801
          +ntp-pool.time.4v1.in                    139.59.15.185    6 u  441 1024   77  29.7021  -4.0310  37.7688
          #ntp6.mum-in.hosts.301-moved.de          129.69.253.1     2 u  352  512   77 127.7853 -44.4622  44.2995
          +160.250.111.199                         14.139.60.106    2 u  440 1024   77  48.6330 -14.7381  34.4310
          +40.81.94.65                             10.0.6.21        3 u  387  512   77  26.2339  -0.9031  31.8296
          +keralavisionisp-dynamic-31.84.59.137.ke 160.250.111.68   6 u  355  512   77  28.0111  -7.9955  25.7496
          #ntp1.ggsrv.de                           134.71.66.21     2 u  518 1024   77 286.5653 -57.9884  28.9191
          +ec2-13-126-27-131.ap-south-1.compute.am 14.139.60.103    2 u  384  512   77  24.3805  -0.4415  39.7327
          +ntp1.blr.in.hojmark.net                 14.139.60.107    2 u  388  512   77   9.0280  -1.9096  62.2897
          +ntp2.ggsrv.de                           134.71.66.21     2 u  435 1024   77 227.1993 -24.6891  30.3548
          * www.time.nplindia.org                   .PPS.            1 u  403  512   77  42.1376  -7.4883  69.0713
          #ntp5.mum-in.hosts.301-moved.de          193.190.230.65   2 u  407 1024   77 106.3636 -38.4540  86.0079
          +ec2-13-200-20-166.ap-south-1.compute.am 169.254.169.123  4 u  430 1024   77  39.6717 -10.6077  46.2089
          #mail.nplindia.org                       .PPS.            1 u  482 1024   75 149.3471 -49.0882  22.6066
          #103.189.191.15                          14.139.60.103    2 u  565 1024   77  66.9174   4.4967 303.3041
          #ec2-15-207-248-194.ap-south-1.compute.a 169.254.169.123  4 u  466 1024   77 112.4516 -42.9446  54.6964
          +inbom5-ntp-002.aaplimg.com              17.253.60.253    2 u  378  512   77  28.3553  -0.1714  59.8335
    

    Note

    This command displays the list of NTP servers the client is communicating with, including server address, synchronization status, delay, offset, jitter.

  • Step-4: Capture and analyze packets in wireshark.

  • Expected result:

    • The client should send requests to all configured servers.

    • The client should select the best server for synchronization based on accuracy metrics.

  • Step-5 : Wireshark Capture

NTP Request Response Delay under Network Latency Test Case

  • To verify that the NTP client can handle delayed responses from the NTP server due to simulated network latency, and still synchronize time within accetable limits.

  • Step-1: Query NTP server Under normal conditions.

    test:~$sudo ntpdate pool.ntp.org
    2025-07-25 13:08:02.214230 (+0530) -0.411155 +/- 0.137221 pool.ntp.org 95.216.192.15 s2 no-leap
    
  • Step-2: Simulate Network Delay.

    test:~$sudo tc qdisc add dev <interface_name> root netem delay 100ms
    

    Note

    Replace <interface-name> with actual network interface(e.g.,eth0,wlp2s0,enp0s3)

  • Step-3: Query the NTP server again.

    test:~$sudo ntpdate pool.ntp.org
    2025-07-25 13:08:10.906238 (+0530) -0.372080 +/- 0.170808 pool.ntp.org 95.216.192.15 s2 no-leap
    
  • Step-4: Remove Network delay.

    test:~$sudo tc qdisc del dev <interface-name> root
    
  • Step-5: Capture and analyze packets in wireshark.

  • Expected result:

    • Normal Conditions- NTP request and response should occur with minimal delay. Time synchronization should complete quickly.

    • With Simulated delay- NTP response should be delayed by approximately the condigured latency (e.g., 100ms). Time synchronization should still succeed, with slightly increased offset and delay values.

  • Step-6 : Wireshark Capture

NTP Client Behaviour During Time Zone Change Test Case

  • To verify that the NTP client continues to function correctly and maintains accurate system time when the system time zone is changed manually.

  • Step-1: Synchronize Time with NTP server.

    test:~$sudo ntpdate time.google.com
    2025-07-25 14:01:12.331256 (+0530) -0.028377 +/- 0.065796 time.google.com 216.239.35.0 s1 no-leap
    
  • Step-2: Change System time zone.

    test:~$sudo timedatectl set-timezone America/New_York
    
  • Step-3: Resynchronize with NTP server.

    test:~$sudo ntpdate time.google.com
    2025-07-25 04:31:26.294259 (-0400) +0.017640 +/- 0.153789 time.google.com 216.239.35.4 s1 no-leap
    

    Note

    To revert to Original Time zone - sudo timedatectl set-timezone Asia/Kolkata

  • Step-4: Capture and analyze packets in wireshark.

  • Expected result:

    • NTP client should succesfully synchronize time before and after the time zone change.

    • Wireshark NTP packets will show consistent UTC timestamps. Time zone changes are not visible in packet data (handled at the OS level).

  • Step-5: Wireshark Capture

NTP Verify Leap Second Handling Test Case

  • To verify that the NTP server correctly handles leap second events and that the NTP client can interpret and respond to leap second indicators appropriately.

  • Step-1: Query the NTP server. Thsi sends a query to the NTP server and displays the time along with leap second status.

    test:~$ntpdate -q time.nist.gov
    2025-07-25 14:11:02.761912 (+0530) +0.011392 +/- 0.135807 time.nist.gov 132.163.97.4 s1 no-leap
    
  • Step-2: Capture and analyze packets in wireshark.

  • Expected result:

    • NTP client should successfully query the NTP server and receive a valid response, including leap second status.

    • The Leap Indicator (LI) field in the NTP response should be correctly set:
      • 0 → No leap second pending (normal case)

      • 1 → Leap second scheduled (rare, only shortly before an official event)

    • Wireshark should display:
      • NTP packet with Leap Indicator field under “Flags”

      • A value of no warning (0) in most cases

      • last minute has 61 seconds (1) only if a leap second is scheduled

  • Step-3: Wireshark Capture

NTP Verify Time zone Handling Test Case

  • To verify that the NTP client Synchronizes time in UTC from the NTP server, adjusts and displays the correct local time based on the system’s configured time zone.

  • Step-1: Set time zone to UTC (Coordinated Universal Time)

    test:~$sudo timedatectl set-timezone UTC
    test:~$timedatectl | grep "Time zone"
     Time zone: UTC (UTC, +0000)
    
  • Step-2: Sync with NTP Server

    test:~$sudo ntpdate time.google.com
    2025-07-25 09:10:17.384603 (+0000) +0.035151 +/- 0.085497 time.google.com 216.239.35.4 s1 no-leap
    test:~$date -u  #UTC time
    Fri Jul 25 09:10:41 AM UTC 2025
    test:~$date     #Local time (should match UTC)
    Fri Jul 25 09:10:41 AM UTC 2025
    
  • Step-3: Change Time Zone to America/New_York

    test:~$sudo timedatectl set-timezone America/New_York
    test:~$date -u  #Should remian unchanged (still UTC)
    Fri Jul 25 09:11:07 AM UTC 2025
    test:~$date     #Should reflect New York local time
    Fri Jul 25 05:11:10 AM EDT 2025
    
  • Step-4: Capture and analyze packets in wireshark.

  • Expected result:

    • The system time is synchronized in UTC.

    • Changing the timezone affects only the displayed local time, not the underlying UTC time.

    • Wireshark captures show NTP packets but not time zone conversions (as they are handled at the OS level).

  • Step-5: Wireshark Capture

NTP Verify Time Synchronization Test Case

  • To verify that the NTP client correctly synchronizes its system time with the NTP server, even when the local time is manually set to an incorrect value.

  • Step-1: Set Incorrect System time.

    test:~$sudo date --set="2025-01-01 00:00:00"
    Wed Jan  1 12:00:00 AM IST 2025
    
  • Step-2: Synchronize time with NTP server

    test:~$sudo ntpdate pool.ntp.org
    2025-07-25 14:52:38.376695 (+0530) +17765495.955948 +/- 0.101456 pool.ntp.org 192.46.211.253 s2 no-leap
    CLOCK: time stepped by 17765495.955948
    CLOCK: time changed from 2025-01-01 to 2025-07-25
    
  • Step-3: Verify Updated system time.

    test:~$date
    Fri Jul 25 02:53:06 PM IST 2025
    
  • Step-4: Capture and analyze packets in wireshark.

  • Expected result:

    • The system time should be corrected to match the time provided by the NTP server.

    • Wireshark shows NTP client and server packets. Actual time correction is handled at the system level and not visible in packet captures.

  • Step-5: Wireshark Capture

NTP C Packet Generation Code (Symmetric Active and Passive)

  • This C program demonstrates how to craft and send custom NTP packets in symmetric mode:
    • Symmetric Active (mode 1)** — typically used by peers to initiate communication.

    • Symmetric Passive (mode 2)** — sent in response to a symmetric active packet.

  • The code manually constructs an NTP packet, sets essential fields like transmit timestamp and mode, and sends it over UDP to a specified peer IP.

  • This low-level interaction is useful for simulating peer-to-peer NTP behavior, testing NTP firewalls, or understanding packet structures beyond client-server models.

  • Replace the IP address (192.168.1.100) in the code with your actual NTP peer before running.

  • Step-1: Download C source code for symmetric active and passive packet generation.

    Download C source code

  • Step-2: Convert c code to executable file.

    test:~$gcc NTP_Symmetric_Active_Passive_Code.c -o NTP_Symmetric_Active_Passive_Code
    test:~$./NTP_Symmetric_Active_Passive_Code
    NTP packet sent (mode 1) to 192.168.1.100
    NTP packet sent (mode 2) to 192.168.1.100
    
  • Step-3: Wireshark Capture

NTP Control Packet Generation Code

  • This C program demonstrates how to manually craft and send an NTP control message** using Mode 6 (Control) with Opcode 2 (Read Status).

  • It directly interacts with an NTP server over UDP port 123 and requests status information (assoc ID 0 for system peer).

  • Useful for inspecting NTP server behavior, debugging peer states, or learning about the control message format.

  • The packet structure strictly follows NTP’s control message format and uses #pragma pack(1) to avoid padding.

  • Replace the IP address argument with the target NTP server before execution.

  • Step-1: Download C source code for control packet generation.

    Download C source code

  • Step-2: Compile and run the program with an NTP server IP as argument.

    test:~$ gcc NTP_Control_Packet_Read_Status.c -o NTP_Control_Packet
    test:~$ ./NTP_Control_Packet 192.168.1.100
    Sent 12 bytes to 192.168.1.100 (NTP Control Message, Opcode 2)
    

NTP Broadcast Packet Generation Code (Mode 5)

  • This C program constructs and sends an NTP broadcast packet using Mode 5, intended for automatic time synchronization in a LAN.

  • It sets up a UDP socket with broadcast capability and sends the NTP packet to a specified broadcast IP (e.g., 192.168.1.255).

  • The packet includes standard fields such as reference timestamp, stratum, root delay, and transmit timestamp, formatted per NTP standards.

  • Useful for simulating NTP servers broadcasting time to multiple clients in a local network.

  • The code handles endianness for 64-bit timestamps to ensure compatibility across platforms.

  • Replace the broadcast IP with your network’s broadcast address before running.

  • Step-1: Download C source code for broadcast packet generation.

    Download C source code

  • Step-2: Compile and run the program with a broadcast IP as argument.

    test:~$ gcc NTP_Broadcast_Packet_Code.c -o NTP_Broadcast_Packet
    test:~$ ./NTP_Broadcast_Packet 192.168.1.255
    Broadcast NTP packet sent to 192.168.1.255 (48 bytes)
    
  • Step-3: Wireshark Capture

    Download wireshark capture

  • Setup

Symmetric Active Packet

#

Protocol Packets

Description

Size(bytes)

1

Symmetric Active

A peer initiates the connection and sends requests.

48

LI (Leap Indicator)

Warns of an impending leap second.

2(bits)

VN (Version Number)

NTP version (e.g., 4 for NTPv4).

3(bits)

Mode

Set to 1 for symmetric active.

3(bits)

Stratum

Indicates the distance from the reference clock.

1

Poll

Maximum interval between messages (in log2 seconds).

1

Precision

Precision of the system clock (in log2 seconds).

1

Root Delay

Total round-trip delay to the reference clock.

4

Root Dispersion

Maximum error relative to the reference clock.

4

Reference ID

Identifier of the reference clock.

4

Reference Timestamp

Time when the system clock was last set or corrected.

8

Originate Timestamp

Time at which the request departed the client.

8

Receive Timestamp

Time at which the request arrived at the server.

8

Transmit Timestamp

Time at which the reply left the server.

8

Symmetric Passive Packet

#

Protocol Packets

Description

Size(bytes)

2

Symmetric Passive

A peer listens and responds to symmetric active requests.

48

LI (Leap Indicator)

Indicates if a leap second is to be inserted or deleted.

2(bits)

VN (Version Number)

NTP version number (e.g., 4 for NTPv4).

3(bits)

Mode

Set to 2 for symmetric passive.

3(bits)

Stratum

Indicates the distance from the reference clock.

1

Poll

Maximum interval between messages (log2 seconds).

1

Precision

Precision of the system clock (log2 seconds).

1

Root Delay

Total round-trip delay to the reference clock.

4

Root Dispersion

Maximum error relative to the reference clock.

4

Reference ID

Identifier of the reference clock.

4

Reference Timestamp

Time when the system clock was last set or corrected.

8

Originate Timestamp

Time at which the request left the client (copied from the request).

8

Receive Timestamp

Time at which the request was received by the server.

8

Transmit Timestamp

Time at which the reply left the server.

8

Client Packet

#

Protocol Packets

Description

Size(bytes)

3

Client

used when a device (the client) sends a request to a time server to synchronize its clock.

48

LI (Leap Indicator)

Warns of an upcoming leap second. Usually set to 0 by the client.

2(bits)

VN (Version Number)

NTP version number (e.g., 4 for NTPv4).

3(bits)

Mode

Set to 3 for client mode.

3(bits)

Stratum

Set to 0 by the client (server fills this in the response).

1

Poll

Maximum interval between messages (log2 seconds).

1

Precision

Precision of the client clock (log2 seconds).

1

Root Delay

Set to 0 by the client (server fills this in the response).

4

Root Dispersion

Set to 0 by the client (server fills this in the response).

4

Reference ID

Set to 0 by the client (server fills this in the response).

4

Reference Timestamp

Set to 0 by the client (server fills this in the response).

8

Originate Timestamp

Time when the client sent the request.

8

Receive Timestamp

Set to 0 by the client (server fills this in the response).

8

Transmit Timestamp

Time when the client sends the request .

8

Server Packet

#

Protocol Packets

Description

Size(bytes)

4

Server

used when a time server responds to a client’s request.

48

LI (Leap Indicator)

Indicates if a leap second is to be added or subtracted.

2(bits)

VN (Version Number)

NTP version number (e.g., 4 for NTPv4).

3(bits)

Mode

Set to 4 for server mode.

3(bits)

Stratum

Indicates the server’s distance from the reference clock (1 = primary server).

1

Poll

Maximum interval between successive messages (log2 seconds).

1

Precision

Precision of the server clock (log2 seconds).

1

Root Delay

Total round-trip delay to the reference clock.

4

Root Dispersion

Maximum error relative to the reference clock.

4

Reference ID

Identifier of the reference clock (e.g., IP address or ASCII code).

4

Reference Timestamp

Time when the server clock was last set or corrected.

8

Originate Timestamp

Copied from the client’s transmit timestamp (when the request was sent).

8

Receive Timestamp

Time when the server received the client’s request.

8

Transmit Timestamp

Time when the server sent the response back to the client.

8

Broadcast Packet

#

Protocol Packets

Description

Size(bytes)

5

Broadcast

The server sends time updates to a broadcast address.

48

LI (Leap Indicator)

Indicates if a leap second is to be inserted or deleted.

2(bits)

VN (Version Number)

NTP version number (e.g., 4 for NTPv4).

3(bits)

Mode

Set to 5 for broadcast mode.

3(bits)

Stratum

Indicates the servers distance from the reference clock.

1

Poll

Maximum interval between messages (log2 seconds).

1

Precision

Precision of the server clock (log2 seconds).

1

Root Delay

Total round-trip delay to the reference clock.

4

Root Dispersion

Maximum error relative to the reference clock.

4

Reference ID

Identifier of the reference clock.

4

Reference Timestamp

Time when the server clock was last set or corrected.

8

Originate Timestamp

Set to 0 in broadcast mode (no client request).

8

Receive Timestamp

Set to 0 in broadcast mode (no client request).

8

Transmit Timestamp

Time when the server sends the broadcast packet.

8

NTP Control Message Packet

#

Protocol Packets

Description

Size(bytes)

6

NTP Control Message

used for monitoring, configuration, and control of NTP servers and peers

~24

LI (Leap Indicator)

Same as in standard NTP packets.

2(bits)

VN (Version Number)

NTP version number.

3(bits)

Mode

Set to 6 for control messages.

3(bits)

Response Bit (R)

Set to 1 if the message is a response.

1(bit)

Error Bit (E)

Set to 1 if an error occurred.

1(bit)

More Bit (M)

Set to 1 if more data follows in additional packets.

1(bit) Remaining 5 bits are reserved

Operation Code (OpCode)

Specifies the type of control operation (e.g., read status, write variables).

1

Sequence Number

Used to match requests and responses.

2

Status

Server status word (e.g., stratum, leap indicator, etc.).

2

Association ID

Identifies the peer association (0 for system variables).

2

Offset

Offset into the data field (for fragmented messages).

2

count

Number of octets in the data field.

2

S.no

Use Case

Description

1

Server Time Synchronization

Ensures all servers in a network maintain consistent and accurate time, critical for logs, backups, and coordination.

2

Security Protocols

Accurate time is essential for time-sensitive security mechanisms like Kerberos, certificates, and log auditing.

3

Financial Transactions

Banking and trading systems rely on precise timestamps to validate and sequence transactions.

4

Distributed Systems Coordination

In cloud and distributed computing, synchronized clocks are vital for consistency and coordination across nodes.

5

Telecommunications

Telecom networks use NTP to synchronize switches and routers for call timing and data integrity.

6

Industrial Automation

Time synchronization is used in SCADA and industrial control systems for event sequencing and fault analysis.

7

Network Monitoring and Logging

Accurate timestamps are crucial for correlating logs across devices and detecting anomalies.

8

IoT Device Coordination

IoT ecosystems use NTP to ensure devices operate in sync, especially for time-triggered actions

9

Legal and Compliance Auditing

Regulatory standards often require accurate timekeeping for audit trails and compliance reporting.

10

Backup and Restore Operations

Ensures backup timestamps are accurate, preventing data corruption and enabling reliable recovery.

S.no

Feature

Description

1

Time Synchronization

NTP synchronizes clocks of networked devices to a reference time source, ensuring consistency across systems.

2

Hierarchical Architecture

Uses a layered system of stratum levels, where stratum 0 is the most accurate (e.g., atomic clocks) and higher strata synchronize from lower ones.

3

High Accuracy

Provides time accuracy typically within milliseconds over the internet and microseconds in LAN environments.

4

Fault Tolerance

Supports multiple time sources and selects the best one using algorithms to avoid single points of failure.

5

Clock Filtering and Selection

Uses statistical algorithms to filter out inaccurate time sources and select the most reliable one.

6

Security Support (NTPv4)

Includes support for authentication and encryption (e.g., Autokey, NTS) to prevent spoofing and tampering.

7

IPv4 and IPv6 Support

NTPv4 supports both IPv4 and IPv6, ensuring compatibility with modern networks.

8

Dynamic Server Discovery

Can automatically discover and switch to better time servers without manual reconfiguration.

9

Cross-Platform Compatibility

Works across various operating systems and hardware platforms.

10

Low Bandwidth Usage

NTP messages are lightweight, making it efficient even over slow or congested networks.

Time Synchronization - Testcases

#

Test Case

Description

Expected Result

1

Sync with public NTP server

Use pool.ntp.org

Time synchronized

2

Sync with local NTP server

Internal server

Time synchronized

3

Sync with stratum 1 server

High-precision source

Time synchronized

4

Sync with stratum 2 server

Intermediate source

Time synchronized

5

Sync with unreachable server

Server offline

Sync fails

6

Sync with invalid server address

Malformed hostname

Sync fails

7

Sync with multiple servers

Redundancy

Best source selected

8

Sync with GPS-based NTP server

Hardware time source

Time synchronized

9

Sync with radio clock

WWVB or DCF77

Time synchronized

10

Sync with atomic clock

High-accuracy

Time synchronized

11

Sync with peer NTP server

Symmetric mode

Time synchronized

12

Sync with broadcast mode

Server broadcasts time

Time synchronized

13

Sync with multicast mode

Multicast group

Time synchronized

14

Sync with unicast mode

Direct query

Time synchronized

15

Sync with authentication enabled

Key-based auth

Time synchronized

16

Sync with authentication disabled

No security

Time synchronized

17

Sync with wrong authentication key

Invalid key

Sync fails

18

Sync with firewall blocking NTP

Port 123 blocked

Sync fails

19

Sync with firewall allowing NTP

Port 123 open

Time synchronized

20

Sync with high network latency

Delayed packets

Time adjusted with offset

21

Sync with jitter

Variable delay

Time adjusted with smoothing

22

Sync with packet loss

Intermittent connectivity

Time synchronized with retries

23

Sync with leap second

Leap second announced

Time adjusted correctly

24

Sync with daylight saving time

DST change

Time adjusted

25

Sync with time zone change

Location updated

Time zone adjusted

26

Sync after system reboot

NTP service starts

Time synchronized

27

Sync after network reconnect

Interface up

Time synchronized

28

Sync after long offline period

Clock drifted

Time corrected

29

Sync with system clock drift

Hardware inaccuracy

Time corrected

30

Sync with virtual machine

VM guest

Time synchronized

31

Sync with container

Docker or LXC

Time synchronized

32

Sync with mobile device

Smartphone

Time synchronized

33

Sync with IoT device

Embedded system

Time synchronized

34

Sync with Windows client

Windows Time Service

Time synchronized

35

Sync with Linux client

ntpd or chronyd

Time synchronized

36

Sync with macOS client

ntpd or systemd-timesyncd

Time synchronized

37

Sync with SNTP client

Simple NTP

Time synchronized

38

Sync with NTPsec

Secure NTP implementation

Time synchronized

39

Sync with Chrony

Lightweight NTP daemon

Time synchronized

40

Sync with systemd-timesyncd

Systemd-based sync

Time synchronized

41

Sync with incorrect system time

Large offset

Time corrected

42

Sync with correct system time

Small offset

Minor adjustment

43

Sync with logging enabled

Log NTP activity

Logs recorded

44

Sync with monitoring tool

NTP monitored

Status visible

45

Sync with SNMP trap

NTP event

Trap sent

46

Sync with audit logging

Compliance tracking

Logs recorded

47

Sync with time server failover

Primary fails

Secondary used

48

Sync with scheduled sync

Periodic update

Time synchronized

49

Sync with manual trigger

Admin initiates

Time synchronized

50

Sync with automatic startup

Boot-time sync

Time synchronized

Hierarchical Architecture - Testcases

#

Test Case

Description

Expected Result

1

Sync from stratum 1 server

Directly connected to stratum 0

Time synchronized

2

Sync from stratum 2 server

Syncs from stratum 1

Time synchronized

3

Sync from stratum 3 server

Syncs from stratum 2

Time synchronized

4

Sync from stratum 0 source

Atomic/GPS clock

Time synchronized

5

Sync from multiple strata

Mixed sources

Lowest stratum preferred

6

Sync with unreachable stratum 1

Fallback to stratum 2

Time synchronized

7

Sync with invalid stratum

Out-of-range value

Sync fails

8

Sync with looped stratum

Circular reference

Loop detected and avoided

9

Sync with stratum 16

Unsynchronized server

Sync rejected

10

Sync with stratum 1 and 3

Both available

Stratum 1 selected

11

Sync with stratum 2 and 2

Equal strata

Best delay/jitter selected

12

Sync with stratum 0 via GPS

Hardware clock

Time synchronized

13

Sync with stratum 0 via radio

WWVB or DCF77

Time synchronized

14

Sync with stratum 0 via atomic clock

Cesium/Rubidium

Time synchronized

15

Sync with stratum 1 via LAN

Local server

Time synchronized

16

Sync with stratum 2 via WAN

Remote server

Time synchronized

17

Sync with stratum 3 via VPN

Encrypted path

Time synchronized

18

Sync with stratum 1 and fallback to 2

Primary fails

Secondary used

19

Sync with stratum 2 and fallback to 3

Primary fails

Secondary used

20

Sync with stratum 1 and 2 with jitter

Compare stability

Most stable selected

21

Sync with stratum 1 and 2 with delay

Compare latency

Lowest delay selected

22

Sync with stratum 1 and 2 with offset

Compare accuracy

Closest offset selected

23

Sync with stratum 1 server offline

No fallback

Sync fails

24

Sync with stratum 2 server offline

Fallback to stratum 3

Time synchronized

25

Sync with stratum 1 server misconfigured

Wrong time

Sync rejected

26

Sync with stratum 2 server misconfigured

Wrong time

Sync rejected

27

Sync with stratum 1 server with authentication

Secure sync

Time synchronized

28

Sync with stratum 2 server with no authentication

Insecure sync

Time synchronized

29

Sync with stratum 1 server with firewall

Port 123 open

Time synchronized

30

Sync with stratum 1 server with port blocked

Port 123 closed

Sync fails

31

Sync with stratum 1 server with SNMP monitoring

Track stratum level

Logs recorded

32

Sync with stratum 2 server with logging

Log stratum source

Logs recorded

33

Sync with stratum 1 server with audit logging

Compliance tracking

Logs recorded

34

Sync with stratum 1 server with failover

Redundant servers

Failover successful

35

Sync with stratum 1 server with load balancing

Multiple clients

Balanced load

36

Sync with stratum 1 server with broadcast mode

LAN-wide sync

Time synchronized

37

Sync with stratum 2 server with multicast mode

Group sync

Time synchronized

38

Sync with stratum 1 server with unicast mode

Direct query

Time synchronized

39

Sync with stratum 1 server with symmetric mode

Peer sync

Time synchronized

40

Sync with stratum 1 server with orphan mode

No upstream

Local sync maintained

41

Sync with stratum 1 server with drift file

Clock drift correction

Time adjusted

42

Sync with stratum 1 server with leap second

Time update

Leap second handled

43

Sync with stratum 1 server with time zone change

Location updated

Time adjusted

44

Sync with stratum 1 server with daylight saving

DST applied

Time adjusted

45

Sync with stratum 1 server with VM guest

Virtualized environment

Time synchronized

46

Sync with stratum 1 server with container

Docker/LXC

Time synchronized

47

Sync with stratum 1 server with mobile device

Smartphone

Time synchronized

48

Sync with stratum 1 server with IoT device

Embedded system

Time synchronized

49

Sync with stratum 1 server with Windows client

Windows Time Service

Time synchronized

50

Sync with stratum 1 server with Linux client

ntpd or chronyd

Time synchronized

High Accuracy - Testcases

#

Test Case

Description

Expected Result

1

Sync over LAN

Low latency

Accuracy within microseconds

2

Sync over WAN

Moderate latency

Accuracy within milliseconds

3

Sync over internet

Public NTP server

Accuracy within 10100 ms

4

Sync with GPS-based server

Stratum 0 source

Accuracy within microseconds

5

Sync with atomic clock

High-precision source

Accuracy within microseconds

6

Sync with radio clock

WWVB or DCF77

Accuracy within milliseconds

7

Sync with stratum 1 server

Direct connection

High accuracy

8

Sync with stratum 2 server

One hop away

Slightly reduced accuracy

9

Sync with stratum 3 server

Two hops away

Accuracy within tens of ms

10

Sync with symmetric mode

Peer-to-peer

Accuracy maintained

11

Sync with broadcast mode

LAN-wide

Accuracy within milliseconds

12

Sync with multicast mode

Group sync

Accuracy within milliseconds

13

Sync with unicast mode

Direct query

High accuracy

14

Sync with jitter present

Variable delay

Accuracy adjusted using filtering

15

Sync with high latency

Long-distance server

Accuracy reduced

16

Sync with packet loss

Intermittent network

Accuracy degraded

17

Sync with stable network

Consistent delay

High accuracy

18

Sync with unstable network

Fluctuating delay

Accuracy fluctuates

19

Sync with firewall enabled

Port 123 open

Accuracy maintained

20

Sync with firewall blocking NTP

Port 123 closed

Sync fails

21

Sync with authentication

Secure sync

Accuracy unaffected

22

Sync with no authentication

Open sync

Accuracy maintained

23

Sync with drift file

Clock drift corrected

Accuracy improved

24

Sync with leap second

Time adjusted

Accuracy preserved

25

Sync with daylight saving

DST applied

Accurate local time

26

Sync with time zone change

Location updated

Accurate local time

27

Sync after reboot

System restart

Time corrected accurately

28

Sync after network reconnect

Interface up

Time corrected

29

Sync after long offline period

Clock drifted

Time corrected

30

Sync with VM guest

Virtualized environment

Accuracy within milliseconds

31

Sync with container

Docker/LXC

Accuracy within milliseconds

32

Sync with mobile device

Smartphone

Accuracy within milliseconds

33

Sync with IoT device

Embedded system

Accuracy within milliseconds

34

Sync with Windows client

Windows Time Service

Accuracy within 110 ms

35

Sync with Linux client

ntpd or chronyd

Accuracy within microseconds

36

Sync with macOS client

System time service

Accuracy within milliseconds

37

Sync with SNTP client

Simple NTP

Accuracy within tens of ms

38

Sync with Chrony

High-precision daemon

Accuracy within microseconds

39

Sync with NTPsec

Secure and accurate

Accuracy within microseconds

40

Sync with systemd-timesyncd

Lightweight sync

Accuracy within milliseconds

41

Sync with high CPU load

System under stress

Accuracy may degrade

42

Sync with low CPU load

Idle system

Accuracy maintained

43

Sync with high network traffic

Congestion

Accuracy may degrade

44

Sync with low network traffic

Quiet network

Accuracy improved

45

Sync with monitoring tool

Track offset and jitter

Accuracy verified

46

Sync with SNMP monitoring

NTP stats tracked

Accuracy logged

47

Sync with audit logging

Compliance tracking

Accuracy documented

48

Sync with time server failover

Primary fails

Accuracy maintained via backup

49

Sync with scheduled sync

Periodic updates

Accuracy maintained

50

Sync with manual trigger

Admin initiates

Time corrected accurately

Fault Tolerance - Testcases

#

Test Case

Description

Expected Result

1

Configure multiple NTP servers

Redundant sources

Best source selected

2

Primary server offline

Failover to secondary

Time synchronized

3

All servers online

Multiple sources available

Most accurate selected

4

One server with high delay

Poor quality

Lower preference

5

One server with high jitter

Unstable source

Lower preference

6

One server with large offset

Inaccurate time

Rejected

7

One server with invalid time

Malfunctioning

Rejected

8

One server unreachable

Network issue

Ignored

9

One server with authentication failure

Invalid key

Rejected

10

One server with valid authentication

Secure source

Used if accurate

11

All servers unreachable

No sync possible

Time not updated

12

All servers reachable

Normal operation

Best selected

13

Server with lowest stratum

Stratum 1 vs 2

Stratum 1 preferred

14

Server with best delay

Multiple stratum 2

Lowest delay selected

15

Server with best stability

Low jitter

Preferred

16

Server with best offset

Closest to system time

Preferred

17

Server with inconsistent time

Fluctuating offset

Rejected

18

Server with consistent time

Stable offset

Used

19

Server with leap second support

Leap second announced

Used

20

Server without leap second support

Incomplete data

Lower preference

21

Server with SNMP monitoring

Faults tracked

Alerts generated

22

Server with logging enabled

Faults logged

Logs recorded

23

Server with audit logging

Compliance tracking

Logs recorded

24

Server with firewall blocking

Port 123 closed

Server unreachable

25

Server with firewall open

Port 123 open

Server reachable

26

Server with DNS failure

Name resolution fails

Server unreachable

27

Server with IP address

No DNS needed

Server reachable

28

Server with IPv6

Dual-stack support

Server reachable

29

Server with IPv4

Standard support

Server reachable

30

Server with broadcast mode

LAN-wide sync

Used if accurate

31

Server with unicast mode

Direct query

Used if accurate

32

Server with symmetric mode

Peer sync

Used if accurate

33

Server with multicast mode

Group sync

Used if accurate

34

Server with orphan mode

No upstream

Used if isolated

35

Server with drift file

Clock correction

Accuracy improved

36

Server with high CPU load

Delayed response

Lower preference

37

Server with low CPU load

Fast response

Higher preference

38

Server with high network traffic

Congestion

Delay increases

39

Server with low network traffic

Fast response

Preferred

40

Server with VM guest

Virtualized source

Used if stable

41

Server with container

Docker/LXC

Used if stable

42

Server with mobile device

Smartphone

Used if reachable

43

Server with IoT device

Embedded NTP

Used if accurate

44

Server with Windows OS

Windows Time Service

Used if accurate

45

Server with Linux OS

ntpd or chronyd

Used if accurate

46

Server with macOS

System time service

Used if accurate

47

Server with NTPsec

Secure implementation

Used if accurate

48

Server with Chrony

High-precision daemon

Used if accurate

49

Server with systemd-timesyncd

Lightweight sync

Used if accurate

50

Server with fallback configuration

Priority list

Failover works correctly

Clock Filtering and Selection - Testcases

#

Test Case

Description

Expected Result

1

Multiple servers with varying offsets

Compare offsets

Best offset selected

2

Server with high jitter

Unstable time

Filtered out

3

Server with low jitter

Stable time

Preferred

4

Server with high delay

Long round-trip

Lower preference

5

Server with low delay

Fast response

Higher preference

6

Server with consistent offset

Reliable time

Selected

7

Server with fluctuating offset

Inconsistent time

Filtered out

8

Server with leap second support

Accurate time

Selected

9

Server with incorrect time

Large offset

Rejected

10

Server with stratum 1

High accuracy

Preferred

11

Server with stratum 3

Lower accuracy

Less preferred

12

Server with symmetric mode

Peer sync

Evaluated equally

13

Server with broadcast mode

LAN-wide

Evaluated for accuracy

14

Server with multicast mode

Group sync

Evaluated for accuracy

15

Server with unicast mode

Direct query

Evaluated for accuracy

16

Server with authentication

Secure source

Evaluated normally

17

Server with invalid authentication

Rejected

Not selected

18

Server with high packet loss

Unreliable

Filtered out

19

Server with stable network

Reliable

Preferred

20

Server with high CPU load

Delayed response

Lower preference

21

Server with low CPU load

Fast response

Higher preference

22

Server with high network congestion

Delay/jitter increases

Filtered out

23

Server with low network congestion

Stable timing

Preferred

24

Server with drift correction

Accurate over time

Selected

25

Server with no drift correction

Inaccurate

Filtered out

26

Server with consistent polling

Regular updates

Preferred

27

Server with irregular polling

Inconsistent updates

Lower preference

28

Server with SNMP monitoring

Offset/jitter tracked

Logs confirm selection

29

Server with audit logging

Clock selection logged

Logs recorded

30

Server with fallback configuration

Primary fails

Best alternate selected

31

Server with looped time source

Circular sync

Detected and avoided

32

Server with orphan mode

No upstream

Used if stable

33

Server with leap second event

Time adjusted

Accuracy maintained

34

Server with time zone change

Offset adjusted

Accuracy maintained

35

Server with daylight saving change

DST applied

Accuracy maintained

36

Server with VM guest

Virtualized source

Evaluated for stability

37

Server with container

Docker/LXC

Evaluated for stability

38

Server with mobile device

Smartphone

Evaluated for accuracy

39

Server with IoT device

Embedded NTP

Evaluated for accuracy

40

Server with Windows OS

Windows Time Service

Evaluated for accuracy

41

Server with Linux OS

ntpd or chronyd

Evaluated for accuracy

42

Server with macOS

System time service

Evaluated for accuracy

43

Server with NTPsec

Secure and accurate

Preferred

44

Server with Chrony

High-precision daemon

Preferred

45

Server with systemd-timesyncd

Lightweight sync

Evaluated for accuracy

46

Server with high stratum but stable

Stratum 3, low jitter

May be selected

47

Server with low stratum but unstable

Stratum 1, high jitter

May be filtered out

48

Server with offset spike

Sudden time jump

Filtered out

49

Server with offset smoothing

Gradual correction

Preferred

50

Server with selection algorithm logging

Clock stats recorded

Logs confirm selection logic

Security Support (NTPv4) - Testcases

#

Test Case

Description

Expected Result

1

Enable Autokey authentication

Configure Autokey

Secure sync established

2

Enable NTS (Network Time Security)

Use NTS-enabled server

Secure sync established

3

Use NTP without authentication

Default config

Sync works, insecure

4

Use NTP with invalid Autokey

Wrong key

Sync fails

5

Use NTP with valid Autokey

Correct key

Sync succeeds

6

Use NTP with expired Autokey

Key expired

Sync fails

7

Use NTP with revoked Autokey

Key revoked

Sync fails

8

Use NTP with NTS and TLS

Encrypted channel

Secure sync

9

Use NTP with NTS and invalid cert

TLS handshake fails

Sync fails

10

Use NTP with NTS and expired cert

Certificate expired

Sync fails

11

Use NTP with NTS and valid cert

Certificate trusted

Sync succeeds

12

Use NTP with NTS and self-signed cert

Untrusted cert

Warning or failure

13

Use NTP with NTS and CA-signed cert

Trusted cert

Secure sync

14

Use NTP with NTS and firewall

Port 4460 open

Sync succeeds

15

Use NTP with NTS and blocked port

Port 4460 closed

Sync fails

16

Use NTP with symmetric key auth

Shared secret

Sync succeeds

17

Use NTP with wrong symmetric key

Key mismatch

Sync fails

18

Use NTP with key rotation

Periodic key update

Sync continues securely

19

Use NTP with key ID mismatch

Wrong key ID

Sync fails

20

Use NTP with key file missing

Config error

Sync fails

21

Use NTP with key file permissions error

Inaccessible file

Sync fails

22

Use NTP with secure key storage

Encrypted key file

Sync succeeds

23

Use NTP with insecure key storage

Plaintext key file

Security warning

24

Use NTP with logging enabled

Monitor auth events

Logs recorded

25

Use NTP with SNMP monitoring

Track auth failures

Alerts generated

26

Use NTP with audit logging

Compliance tracking

Logs recorded

27

Use NTP with IDS/IPS

Detect spoofing

Alerts triggered

28

Use NTP with MITM attack attempt

Tampered packets

Sync fails

29

Use NTP with replay attack attempt

Reused packets

Sync fails

30

Use NTP with packet integrity check

MAC validation

Tampering detected

31

Use NTP with packet encryption

NTS enabled

Data encrypted

32

Use NTP with TLS 1.3

Secure transport

Sync succeeds

33

Use NTP with TLS 1.2

Secure transport

Sync succeeds

34

Use NTP with deprecated TLS version

TLS 1.0/1.1

Sync fails or warning

35

Use NTP with DoS attack

Flooded requests

Rate limiting triggered

36

Use NTP with spoofed server

Fake source

Sync fails

37

Use NTP with spoofed client

Fake client

Sync rejected

38

Use NTP with DNS spoofing

Redirect to attacker

Sync fails or alert

39

Use NTP with DNSSEC

Secure DNS resolution

Trusted server used

40

Use NTP with VPN

Encrypted tunnel

Secure sync

41

Use NTP with proxy

Intermediary server

Auth still validated

42

Use NTP with NAT

Behind firewall

Auth works if ports open

43

Use NTP with IPv6

Secure sync over IPv6

Auth works

44

Use NTP with IPv4

Secure sync over IPv4

Auth works

45

Use NTP with mobile device

Smartphone sync

Secure if NTS supported

46

Use NTP with IoT device

Embedded sync

Secure if NTS supported

47

Use NTP with VM

Virtualized environment

Secure sync

48

Use NTP with container

Docker/LXC

Secure sync

49

Use NTP with Windows client

Secure sync via NTS

Works if supported

50

Use NTP with Linux client

Secure sync via NTS or Autokey

Works if configured

Support - Testcases

#

Test Case

Description

Expected Result

1

Sync using IPv4 address

Connect to IPv4 server

Time synchronized

2

Sync using IPv6 address

Connect to IPv6 server

Time synchronized

3

Sync using dual-stack server

Supports both IP versions

Time synchronized

4

Sync using IPv4-only client

No IPv6 support

IPv4 sync successful

5

Sync using IPv6-only client

No IPv4 support

IPv6 sync successful

6

Sync using IPv4 over LAN

Local IPv4 network

Time synchronized

7

Sync using IPv6 over LAN

Local IPv6 network

Time synchronized

8

Sync using IPv4 over WAN

Remote IPv4 server

Time synchronized

9

Sync using IPv6 over WAN

Remote IPv6 server

Time synchronized

10

Sync using IPv4 with NAT

Behind firewall

Time synchronized

11

Sync using IPv6 with NAT64

IPv6 to IPv4 translation

Time synchronized

12

Sync using IPv6 with firewall

Port 123 open

Time synchronized

13

Sync using IPv6 with blocked port

Port 123 closed

Sync fails

14

Sync using IPv4 with firewall

Port 123 open

Time synchronized

15

Sync using IPv4 with blocked port

Port 123 closed

Sync fails

16

Sync using IPv6 with DNS resolution

AAAA record used

Time synchronized

17

Sync using IPv4 with DNS resolution

A record used

Time synchronized

18

Sync using IPv6 with static IP

Manual config

Time synchronized

19

Sync using IPv4 with static IP

Manual config

Time synchronized

20

Sync using IPv6 with DHCPv6

Dynamic config

Time synchronized

21

Sync using IPv4 with DHCP

Dynamic config

Time synchronized

22

Sync using IPv6 with SLAAC

Stateless config

Time synchronized

23

Sync using IPv6 with link-local address

Local-only sync

Time synchronized

24

Sync using IPv6 with global address

Internet sync

Time synchronized

25

Sync using IPv4 with public address

Internet sync

Time synchronized

26

Sync using IPv6 with loopback address

::1

No sync

27

Sync using IPv4 with loopback address

127.0.0.1

No sync

28

Sync using IPv6 with multicast

FF0E::101

Time synchronized

29

Sync using IPv4 with broadcast

255.255.255.255

Time synchronized

30

Sync using IPv6 with unicast

Direct server

Time synchronized

31

Sync using IPv4 with unicast

Direct server

Time synchronized

32

Sync using IPv6 with NTS

Secure sync

Time synchronized

33

Sync using IPv4 with NTS

Secure sync

Time synchronized

34

Sync using IPv6 with Autokey

Authenticated sync

Time synchronized

35

Sync using IPv4 with Autokey

Authenticated sync

Time synchronized

36

Sync using IPv6 with SNMP monitoring

IPv6 stats tracked

Logs recorded

37

Sync using IPv4 with SNMP monitoring

IPv4 stats tracked

Logs recorded

38

Sync using IPv6 with audit logging

IPv6 events logged

Logs recorded

39

Sync using IPv4 with audit logging

IPv4 events logged

Logs recorded

40

Sync using IPv6 with VM guest

Virtualized sync

Time synchronized

41

Sync using IPv4 with VM guest

Virtualized sync

Time synchronized

42

Sync using IPv6 with container

Docker/LXC

Time synchronized

43

Sync using IPv4 with container

Docker/LXC

Time synchronized

44

Sync using IPv6 with mobile device

Smartphone

Time synchronized

45

Sync using IPv4 with mobile device

Smartphone

Time synchronized

46

Sync using IPv6 with IoT device

Embedded system

Time synchronized

47

Sync using IPv4 with IoT device

Embedded system

Time synchronized

48

Sync using IPv6 with Windows client

Windows Time Service

Time synchronized

49

Sync using IPv4 with Linux client

ntpd or chronyd

Time synchronized

50

Sync using IPv6 with Linux client

ntpd or chronyd

Time synchronized

Dynamic Server Discovery - Testcases

#

Test Case

Description

Expected Result

1

Enable dynamic server discovery

Client config updated

Discovery enabled

2

Discover new server via DNS

Use pool.ntp.org

Server list updated

3

Discover new server via DHCP

DHCP option 42

Server list updated

4

Discover new server via multicast

LAN broadcast

Server discovered

5

Discover new server via broadcast

Server announces

Client syncs

6

Discover new server via config reload

Runtime config change

New servers added

7

Discover new server via NTS-KE

Secure discovery

Server list updated

8

Discover server with lowest stratum

Multiple options

Best stratum selected

9

Discover server with lowest delay

Multiple options

Best delay selected

10

Discover server with lowest jitter

Multiple options

Most stable selected

11

Discover server with best offset

Closest time match

Selected

12

Discover server with valid authentication

Secure source

Selected

13

Discover server with invalid authentication

Rejected

Not selected

14

Discover server with expired certificate

NTS

Rejected

15

Discover server with valid certificate

NTS

Accepted

16

Discover server with DNS failure

Name resolution fails

Discovery fails

17

Discover server with DNSSEC

Secure DNS

Server accepted

18

Discover server with IPv4

Legacy support

Server accepted

19

Discover server with IPv6

Modern support

Server accepted

20

Discover server with firewall open

Port 123 reachable

Server accepted

21

Discover server with firewall blocked

Port 123 closed

Server rejected

22

Discover server with high load

Server overloaded

Lower preference

23

Discover server with low load

Responsive

Higher preference

24

Discover server with SNMP monitoring

Discovery logged

Logs recorded

25

Discover server with audit logging

Compliance tracking

Logs recorded

26

Discover server with fallback config

Primary fails

Alternate discovered

27

Discover server with pool rotation

DNS pool changes

New server selected

28

Discover server with DHCP renewal

New server offered

Client switches

29

Discover server with network reconnect

Interface up

Discovery triggered

30

Discover server after reboot

System restart

Discovery triggered

31

Discover server after timeout

No response

New server selected

32

Discover server after sync failure

Server unreachable

Alternate selected

33

Discover server with Autokey

Authenticated discovery

Server accepted

34

Discover server with NTS

Secure discovery

Server accepted

35

Discover server with spoofed DNS

Malicious redirection

Server rejected

36

Discover server with DNS poisoning

Tampered response

Server rejected

37

Discover server with loop detection

Circular sync

Loop avoided

38

Discover server with duplicate IP

Same server twice

One instance used

39

Discover server with duplicate MAC

Same device

One instance used

40

Discover server with mobile client

Roaming device

Discovery adapts

41

Discover server with IoT device

Lightweight client

Discovery works

42

Discover server with VM

Virtualized environment

Discovery works

43

Discover server with container

Docker/LXC

Discovery works

44

Discover server with Windows client

Windows Time Service

Discovery works

45

Discover server with Linux client

ntpd, chronyd

Discovery works

46

Discover server with macOS client

System time service

Discovery works

47

Discover server with Chrony

Dynamic source support

Discovery works

48

Discover server with NTPsec

Secure discovery

Discovery works

49

Discover server with systemd-timesyncd

Lightweight client

Discovery works

50

Discover server with logging enabled

Track discovery events

Logs recorded

Cross-Platform Compatibility - Testcases

#

Test Case

Description

Expected Result

1

Sync on Windows 10

Use Windows Time Service

Time synchronized

2

Sync on Windows 11

Use Windows Time Service

Time synchronized

3

Sync on Linux (Ubuntu)

Use ntpd or chronyd

Time synchronized

4

Sync on Linux (CentOS)

Use chronyd

Time synchronized

5

Sync on Linux (Debian)

Use ntpd

Time synchronized

6

Sync on macOS

Use system time service

Time synchronized

7

Sync on Android

Use system time sync

Time synchronized

8

Sync on iOS

Use system time sync

Time synchronized

9

Sync on FreeBSD

Use ntpd

Time synchronized

10

Sync on OpenBSD

Use ntpd

Time synchronized

11

Sync on Solaris

Use ntpd

Time synchronized

12

Sync on AIX

Use xntpd

Time synchronized

13

Sync on Raspberry Pi

Raspbian OS

Time synchronized

14

Sync on Arduino with NTP client

Embedded sync

Time synchronized

15

Sync on ESP32

Microcontroller with NTP

Time synchronized

16

Sync on Cisco router

IOS NTP client

Time synchronized

17

Sync on Juniper router

Junos NTP client

Time synchronized

18

Sync on MikroTik router

RouterOS NTP client

Time synchronized

19

Sync on VMware ESXi

Hypervisor time sync

Time synchronized

20

Sync on Hyper-V

Host/guest sync

Time synchronized

21

Sync on VirtualBox

Guest OS sync

Time synchronized

22

Sync on Docker container

Linux container

Time synchronized

23

Sync on Kubernetes pod

Containerized app

Time synchronized

24

Sync on AWS EC2 instance

Cloud VM

Time synchronized

25

Sync on Azure VM

Cloud VM

Time synchronized

26

Sync on Google Cloud VM

Cloud VM

Time synchronized

27

Sync on Android TV

Smart device

Time synchronized

28

Sync on smart thermostat

IoT device

Time synchronized

29

Sync on smart speaker

IoT device

Time synchronized

30

Sync on smart watch

Wearable device

Time synchronized

31

Sync on automotive system

In-vehicle OS

Time synchronized

32

Sync on industrial controller

PLC or SCADA

Time synchronized

33

Sync on POS terminal

Retail system

Time synchronized

34

Sync on ATM

Banking system

Time synchronized

35

Sync on medical device

Hospital equipment

Time synchronized

36

Sync on satellite modem

Remote comms

Time synchronized

37

Sync on drone controller

Embedded system

Time synchronized

38

Sync on game console

Xbox/PlayStation

Time synchronized

39

Sync on smart fridge

IoT appliance

Time synchronized

40

Sync on smart camera

Surveillance system

Time synchronized

41

Sync on NAS device

Network storage

Time synchronized

42

Sync on firewall appliance

Security device

Time synchronized

43

Sync on load balancer

Network appliance

Time synchronized

44

Sync on printer

Network printer

Time synchronized

45

Sync on IP phone

VoIP device

Time synchronized

46

Sync on smart meter

Utility device

Time synchronized

47

Sync on smartwatch OS

Wear OS or watchOS

Time synchronized

48

Sync on e-reader

Kindle or similar

Time synchronized

49

Sync on smart display

Google Nest, Echo Show

Time synchronized

50

Sync on legacy system

Older OS (e.g., XP)

Time synchronized if supported

Low Bandwidth Usage - Testcases

#

Test Case

Description

Expected Result

1

Sync over dial-up connection

Very low bandwidth

Time synchronized

2

Sync over 2G mobile network

Slow mobile data

Time synchronized

3

Sync over congested Wi-Fi

High traffic

Time synchronized

4

Sync over satellite link

High latency

Time synchronized

5

Sync over VPN tunnel

Encrypted path

Time synchronized

6

Sync over metered connection

Limited data plan

Minimal data used

7

Sync over IoT network

Narrowband IoT

Time synchronized

8

Sync over LoRaWAN

Low-power wide-area

Time synchronized (if supported)

9

Sync over mesh network

Multi-hop routing

Time synchronized

10

Sync over Bluetooth tethering

Limited bandwidth

Time synchronized

11

Sync over Wi-Fi hotspot

Shared mobile data

Time synchronized

12

Sync over Ethernet

Wired LAN

Minimal bandwidth used

13

Sync over 3G/4G LTE

Mobile broadband

Time synchronized

14

Sync over 5G

High-speed mobile

Time synchronized

15

Sync with 1-second polling

Frequent updates

Low data usage

16

Sync with 64-second polling

Standard interval

Low data usage

17

Sync with 1024-second polling

Long interval

Very low data usage

18

Sync with burst mode disabled

No packet burst

Bandwidth conserved

19

Sync with burst mode enabled

Short burst

Minimal impact

20

Sync with broadcast mode

One-to-many

Efficient for LAN

21

Sync with multicast mode

Group sync

Bandwidth-efficient

22

Sync with unicast mode

Direct query

Low data usage

23

Sync with symmetric mode

Peer-to-peer

Low data usage

24

Sync with NTS enabled

Encrypted packets

Slightly higher usage

25

Sync with Autokey enabled

Authenticated packets

Slightly higher usage

26

Sync with packet loss

Retransmissions

Still low bandwidth

27

Sync with jitter

Variable delay

No extra bandwidth used

28

Sync with high latency

Long round-trip

No extra bandwidth used

29

Sync with low latency

Fast response

Minimal data used

30

Sync with firewall

Port 123 open

Time synchronized

31

Sync with SNMP monitoring

Track usage

Low traffic logged

32

Sync with audit logging

Log sync events

Logs show low usage

33

Sync with mobile device

Smartphone

Low data usage

34

Sync with IoT device

Embedded system

Low data usage

35

Sync with VM

Virtualized environment

Low data usage

36

Sync with container

Docker/LXC

Low data usage

37

Sync with Windows client

Windows Time Service

Low data usage

38

Sync with Linux client

ntpd, chronyd

Low data usage

39

Sync with macOS client

System time service

Low data usage

40

Sync with Raspberry Pi

Lightweight device

Low data usage

41

Sync with Arduino

Microcontroller

Low data usage

42

Sync with ESP32

Wi-Fi microcontroller

Low data usage

43

Sync with smart TV

Consumer device

Low data usage

44

Sync with smart speaker

IoT device

Low data usage

45

Sync with smart thermostat

IoT device

Low data usage

46

Sync with smart meter

Utility device

Low data usage

47

Sync with smart camera

Surveillance device

Low data usage

48

Sync with POS terminal

Retail system

Low data usage

49

Sync with ATM

Banking system

Low data usage

50

Sync with industrial controller

PLC or SCADA

Low data usage

  • Reference links