NTP: Network Time Protocol
A network whose devices disagree on the time cannot bill correctly, correlate logs, or renew certificates on schedule. NTP (Network Time Protocol) keeps every router, switch, and server on the same clock — within milliseconds of each other and of the global time sources. This lesson covers why time matters, the stratum hierarchy, the UDP 123 operation, and the IOS configuration and verification commands the exam expects.
- Explain why accurate, synchronised time is essential across network devices.
- Describe the stratum hierarchy (0–15) and how authoritative sources are ranked.
- State that NTP runs over UDP port 123 and works as a client–server protocol.
- Configure a device as an NTP client (ntp server) and as an NTP master (ntp master).
- Verify synchronisation with show ntp status and show ntp associations.
- Secure NTP with authentication keys.
Why time synchronisation matters
Almost everything an engineer does on a network eventually depends on a clock. Consider the small everyday consequences of drifted clocks:
- Log analysis and troubleshooting. If each router has a different idea of the time, the "same" incident appears at different timestamps on every device, and event correlation becomes guesswork. Syslog (Lesson 12) is only as good as the clocks behind it.
- Authentication and certificates. Kerberos tickets and TLS certificates carry a validity window. A device whose clock is minutes fast or slow sees certificates as expired or not-yet-valid and refuses connections.
- Billing and accounting. Usage metering, prepaid sessions, and service-level agreements all charge by the second.
- Forensics and compliance. Investigators and auditors need a single, defensible timeline across every device involved.
A router’s clock is a 32-bit counter that ticks from its internal clock; even a correctly set
architecture-grade router drifts seconds per day without NTP. Continuous small adjustment is what makes
NTP precise — a single "set the clock" action would introduce jumps, which is why NTP slews rather
than steps (and why you should only clock set a router that has no peer among the sources).
How NTP works
NTP is a symmetric request/response protocol carried over UDP port 123. The client sends a packet bearing its current timestamp; the server replies with timestamps covering when it received and when it sent its answer; the client computes offset (how far its clock is wrong) and round-trip delay, then nudges its clock by a fraction of the offset so it converges smoothly.
- Offset — the difference between the client’s time and the server’s time. The client applies a fraction of it on every poll.
- Delay — the round-trip time measured from the four timestamps.
- Poll — the interval between requests. IOS uses exponential back-off so it polls rarely once well synchronised (typically every 64–1024 seconds).
Because NTP runs over UDP, there is no connection to tear down and no delivery guarantee — a lost reply is simply replaced by the next poll. Multiple servers can be configured and the client picks from them based on which promises the best (lowest-stratum, most reliable) time, ignoring outliers that disagree wildly.
Configuring an NTP client
Point the device at one or more time servers in global configuration mode. Using two servers (even one from a different vendor) protects against a single wrong source:
R1(config)# ntp server 192.0.2.10 R1(config)# ntp server 198.51.100.20 prefer
The optional prefer keyword tells IOS to prefer that server when several are equal in
stratum. A few companion commands that tie NTP to the rest of the network:
R1(config)# ntp source gigabitEthernet 0/0 R1(config)# ntp update-calendar
ntp source forces NTP packets to originate from a stable interface address (so access
lists and NAT see a predictable source — remember it if your NTP server sits on the NATed side
from Lesson 9). ntp update-calendar copies the NTP-adjusted software clock onto the
hardware calendar so the time survives a reload.
Running a local time source
When no external server is reachable, one device can act as the source for the whole organisation by assuming a stratum level and serving other routers:
R2(config)# ntp master 5
This tells R2 to act as an NTP server at stratum 5 even though it has no external reference — it will serve time to any client that asks, and report itself as stratum 5. The argument (1–15) is the stratum the device will claim. Use a higher number than your real external servers so that, if the external server later becomes reachable and the same device is both master and client, the real server still wins.
ntp master without any real reference clock means everyone in your network is
synchronised to each other but wrong relative to the world — certificates,
billing, and inter-company work will eventually break. Use it for isolated labs, for a device that
also has an external reference, or as the campus-wide distribution point in a hierarchy. NTP
ntp server on all your routers from a trusted public source is the normal answer.
Verifying NTP
Two commands answer every NTP question on the exam:
R1# show ntp status Clock is synchronized, stratum 3, reference is 192.0.2.10 nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**19 reference time is E8ADB3E1.3C25D480 (09:27:33.234 UTC Fri Oct 11 2026) clock offset is 0.2 msec, root delay is 1.3 msec root dispersion is 5.8 msec, peer dispersion is 2.9 msec
R1# show ntp associations address ref clock st when poll reach delay offset disp *~192.0.2.10 192.5.5.250 2 22 64 377 1.300 0.200 2.900 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured
show ntp associations is worth memorising. * = the selected
synchronisation source (the one your clock follows), ~ = a configured server, + = candidate
(good but not selected), - = outlyer, x = falseticker (discarded as wrong). And in
show ntp status, the first phrase is everything: Clock is synchronized with
a stratum and a reference versus Clock is unsynchronized with nothing trustworthy. If
the exam shows the latter, suspect reachability, UDP 123, auth, or time-source reachability.
The columns read: st is the server’s stratum, when is how many seconds since the last successful poll, poll is the current poll interval in seconds, reach is an octal success history (377 = all eight last polls succeeded), delay the round trip, offset the clock error estimate, and disp the dispersion (an estimate of source unreliability). A reach value of 377 is a healthy, continuously synchronising source.
Authentication
An attacker who can impersonate your NTP server can push your clocks anywhere — enough to break security sessions or corrupt logs. NTP authentication uses symmetric keys shared between client and server:
R1(config)# ntp authentication-key 1 md5 CCNPTime2026 R1(config)# ntp trusted-key 1 R1(config)# ntp authenticate R1(config)# ntp server 192.0.2.10 key 1
Four pieces: a key (number + shared secret) on both devices, the key declared trusted,
ntp authenticate globally enabling the requirement, and the server command pinned to key 1.
If authentication is enabled but a source has no matching trusted key, the source is ignored — the
typical symptom being a permanently unsynchronized clock, which is precisely what a quiz
question about “auth configured but no synchronisation” is pointing at.
ntp master 5 on one router and
ntp server <that-router> with matching authentication on the others gives you a
fully working, exam-shaped configuration you can verify with show ntp status and
show ntp associations without any Internet access.
The vocabulary you need
Every term below appears in the lesson text above. Select one to read its definition, then use the quiz at the end to check what stuck.
Review
Check what you have learned with these review questions.
Sources & references
- Cisco. CCNA (200-301) Exam Topics. cisco.com.
- IETF. Request for Comments (RFCs). rfc-editor.org.
- IANA. Internet Assigned Numbers Authority registries. iana.org.
Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.