Use it when NTP should only accept time from trusted servers, or authenticated servers are rejected.
NTP Authentication
NTP authentication uses shared keys (ntp authentication-key, ntp trusted-key, ntp authenticate) so a device only accepts time from servers that prove they know the key.
1. NTP authentication uses keys (MD5 or SHA in newer releases).
2. ntp authenticate + trusted-key + server key.
3. Prevents spoofed time.
4. Keys must match the server.
5. Verify 'authenticated' in associations.
keyed NTP packets → key verified → time accepted
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification & troubleshooting Narrow the fault
1. Verify clock/time zone intent.
2. Verify association reachability and source.
3. Inspect selected peer, stratum, offset and jitter.
4. Confirm authentication state.
5. Correlate log timestamps after convergence.
Step 2 Common mistakes Narrow the fault
- Key configured but
ntp trusted-keyorntp authenticatemissing. - Different key numbers on client and server.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
show clockis observation, not proof of synchronization- NTP association, selection and synchronized system state are separate
- Offset, delay, dispersion and jitter explain source quality
- PTP depends on domain, grandmaster selection and clock role
- ACL/CoPP, VRF/source, UDP 123, one-way delay and hardware support can be the first boundary.
show ntp associations detail— authenticated statusshow running-config | include ntp authenticat|ntp trusted-key— config
ReferenceWhat it is1 section · depth on demand
How it works
NTP authentication lets a client accept time only from servers that know a shared key, preventing spoofed time. On Cisco: ntp authentication-key 1 sha1 <key> (or md5 on older releases), ntp trusted-key 1, ntp authenticate, and key 1 on the server line. show ntp associations detail shows whether the peer is authenticated. NTS (Network Time Security) is the modern standard where supported.
ReferenceImportant terms & boundaries2 sections · depth on demand
Key operational limits
- Association does not equal synchronization
- Authentication validates the configured source; it does not encrypt NTP.
In depth
All three pieces are required on the client
ntp authentication-key 1 md5 <key-string>
ntp trusted-key 1
ntp authenticate
ntp server 192.0.2.10 key 1
| Command | Role | Missing → result |
|---|---|---|
ntp authentication-key | Defines key number, algorithm and secret | Nothing to verify with |
ntp trusted-key | Marks the key as acceptable | Packets with that key are rejected |
ntp authenticate | Enables authentication checking | Time accepted without checking |
key 1 on ntp server | Ties the server to the key | Association unauthenticated |
The server needs the same key number and secret. Key numbers are part of the check: key 1 on one side and key 2 with the same secret does not work.
Verify
R1# show ntp associations detail | include 192.0.2.10|authenticated|sane
192.0.2.10 configured, ipv4, authenticated, our_master, sane, valid, stratum 1
An association stuck at .INIT. with reach 0 after enabling authentication usually means a key mismatch.
Algorithm choice
RFC 8573 deprecates MD5 for NTP authentication and specifies AES-128-CMAC instead. Many IOS deployments still only offer MD5; check ntp authentication-key 1 ? on the release in use and prefer a stronger algorithm where both ends support it. Symmetric keys authenticate the source but do not encrypt time — and every client shares the same secret. Network Time Security (RFC 8915) solves key distribution with TLS-based key exchange where supported.
Operational notes
- Rotate keys by adding the new key as trusted on clients first, then changing the server.
- Authentication does not protect against delay attacks; multiple independent sources still matter.
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IP Services → Time Synchronization → NTP → Authentication. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc5905.html · confidence 94%