CompTIA Security+ Exam Notes

CompTIA Security+ Exam Notes
Let Us Help You Pass

Thursday, October 9, 2025

The NTP Slew Method: Smooth and Safe Time Correction for Critical Systems

 NTP Slew Method

What Is the NTP Slew Method?
The NTP slew method is one of two primary ways the Network Time Protocol (NTP) adjusts a computer's system clock to synchronize with a reference time source. The slew method gradually adjusts the clock without causing abrupt jumps, making it ideal for systems where time continuity is critical.

Background: NTP and Time Synchronization
NTP is a protocol used to synchronize computer clocks over a network. When a system's clock drifts from the correct time, NTP can correct it using one of two methods:
1. Step (AKA Slam: Instantly sets the system clock to the correct time (used for large offsets).
2. Slew: Gradually adjusts the clock speed to bring it in sync over time (used for small offsets).

How the Slew Method Works
  • Instead of jumping the clock forward or backward, the slew method gradually slows or speeds up the system clock.
  • The maximum rate of adjustment is typically 500 parts per million (ppm), or 0.5 milliseconds per second.
  • This means it can correct a maximum offset of about 30 minutes per day.
Example:
If your system clock is 5 seconds fast, NTP will gradually slow it down until the system time matches the reference time. This process may take several minutes or hours, depending on the offset.

Why Use Slewing?
Avoids time jumps: Critical for applications that rely on continuous time (e.g., databases, logging systems, financial systems).
Maintains monotonicity: Time always moves forward, avoiding the issue of time "backward."
Safe for production systems: Prevents disruptions in time-sensitive operations.

When Is Slew Used?
  • Small time offsets (typically <128 ms by default).
  • When the system has been running continuously and doesn't require a hard reset of the clock.
  • Configured explicitly in some systems using options like -x with ntpd.
Configuration Example
To force NTP to always use slewing (even for large offsets), you can start ntpd with the -x option:

This tells NTP to never step the clock, even if the offset is large.

Slew vs. Step (Slam): Quick Comparison



No comments:

Post a Comment