ntp server
Instructs the Cisco device to synchronize its internal hardware clock with an external Network Time Protocol (NTP) server. Consistent time across the enterprise is mandatory for correlating syslog error messages, validating cryptographic certificates, and logging security events.
Quick Reference
Router(config)#no ntp server [ip-address]Syntax & Architecture Logic
NTP relies on a hierarchical system of Stratum Levels to determine the most accurate time source. Stratum 1 servers are directly connected to atomic clocks or GPS satellites. A Stratum 2 server gets its time from a Stratum 1 server, and so on.
- [ip-address]: The target NTP server. Enterprise routers rarely point directly to the internet; they usually point to an internal core switch or a local Windows Domain Controller.
- [prefer]: If you configure multiple
ntp serverstatements for redundancy, thepreferkeyword forces the router to trust a specific server over the others, overriding standard stratum-based selection logic.
CLI Deployment Scenarios
Scenario 1: Standard NTP Client Configuration
You want your edge router to pull time from two internal core servers for redundancy, but you strictly want it to prioritize Core Server A (10.1.1.1).
Scenario 2: The "ntp master" Fallback
If your enterprise is completely air-gapped and disconnected from the internet, you can force a central Cisco router to act as the authoritative Stratum 1 time source for your entire network using the ntp master command.
CCNA Exam Gotchas
NTP UTC vs Local Time
A classic troubleshooting scenario: You successfully configure an NTP server, verify the sync, but your log timestamps are off by 5 hours.
The Cause: NTP distributes time exclusively in Coordinated Universal Time (UTC). It never sends timezone data. If you want your logs to reflect local time, you must manually offset the router's internal clock using the global command: clock timezone EST -5.
Stratum 16 is Dead
The valid Stratum range is 1 through 15. If you run show ntp status and see that your router is at Stratum 16, that is Cisco's code indicating the clock is unsynchronized. The NTP traffic is either being blocked by an ACL, or the target server is unreachable.