What is a network time protocol (NTP)?

Why Interviewers Ask This

This is a differentiating question used for senior and lead roles. Interviewers want to see if you can explain not just what happens, but why — and what the trade-offs are in different approaches.

Answer

NTP (Network Time Protocol) synchronizes clocks across network devices to a reference time source. Accurate time is critical for: log correlation (correlating events across devices, security forensics), certificate validation (TLS certificates have validity periods), authentication protocols (Kerberos requires clocks within 5 minutes), distributed databases, and financial transactions. NTP uses a hierarchical structure of time sources called strata: Stratum 0 — highly accurate reference clocks (GPS, atomic clocks). Stratum 1 — servers directly connected to Stratum 0 sources. Stratum 2 — servers synchronized to Stratum 1, and so on. NTP uses UDP port 123. PTP (Precision Time Protocol, IEEE 1588) achieves sub-microsecond accuracy for financial trading and telecom. SNTP is a simplified NTP for devices that do not need full NTP precision. Configure NTP on all network devices — clock skew causes hard-to-diagnose problems. Use at least two NTP sources for redundancy. NTPsec and Chrony are modern replacements for the legacy ntpd daemon.

Pro Tip

Demonstrate both theoretical understanding and practical experience. Say what it is, then give an example of how you actually used it in a Networking codebase.