VMware ESXi and vSphere Cluster Management
Configure a Cisco Router as an NTP Client
Learn how to configure a Cisco IOS router as an NTP client, use UDP 123, and verify synchronization with show ntp status.
Network Time Protocol (NTP) synchronizes device clocks across an IP network. A Cisco router can operate as an NTP client: it obtains time from an NTP server, which provides time information to clients.
This lesson configures router R1 to use the internal NTP server at 10.0.0.200 and verifies that synchronization succeeds.
Why NTP matters
Consistent time is important across routers, servers, switches, firewalls, and other network devices. Without synchronized clocks, the same event may appear to occur at different times on different systems.
- Reliable logs: Syslog and security events can be ordered accurately.
- Troubleshooting: Engineers can build a dependable timeline across multiple devices.
- Monitoring: Alerts and performance measurements use consistent timestamps.
- Authentication: Some time-dependent authentication mechanisms require clocks to be reasonably accurate.
- Security auditing: Investigators can correlate configuration changes, login attempts, and other events.
NTP client and server relationship
An NTP client requests or receives time information from an NTP server. In this example, R1 is the client and 10.0.0.200 is the server. The router uses the configured server as a possible time source and selects it when the source is reachable and provides usable NTP information.
The server address must be reachable from R1. A configuration command alone does not guarantee synchronization. Routing, interfaces, access control lists, firewalls, and server availability all affect whether NTP can operate.
NTP transport and connectivity requirements
NTP uses UDP port 123. R1 therefore needs IP connectivity to the NTP server, and filtering devices must permit the relevant NTP traffic. An incorrect route, a down interface, an ACL, or a firewall blocking UDP 123 can prevent synchronization.
Configure R1 as an NTP client
Enter privileged EXEC mode, then enter global configuration mode. Use the ntp server command followed by the server's IPv4 address.
R1> enable
R1# configure terminal
R1(config)# ntp server 10.0.0.200
R1(config)# endThe command configures 10.0.0.200 as R1's NTP server. Replace this example address with the actual approved NTP server address in your environment.
| Task | Cisco IOS command | Expected purpose or result |
|---|---|---|
| Configure NTP server | ntp server 10.0.0.200 | Sets 10.0.0.200 as the router's time source. |
| Verify synchronization | show ntp status | Shows whether the router clock is synchronized and identifies time-source status. |
Verify NTP synchronization
After returning to privileged EXEC mode, run show ntp status.
R1# show ntp status
Clock is synchronized, stratum 2, reference is 10.0.0.200
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**18
reference time is 1234567890.0000000000 UTC
clock offset is 0.2500 msec, root delay is 2.00 msec
root dispersion is 1.50 msec, peer dispersion is 0.75 msecThe exact formatting and numerical values can vary by Cisco IOS release and network conditions. The key result is the synchronized clock state. In this example, R1 reports a valid stratum of 2 and identifies 10.0.0.200 as the reference source.
Important NTP status fields
| Field | Meaning | What to look for |
|---|---|---|
| Clock state | Whether the local clock has synchronized. | A synchronized state indicates successful NTP operation. |
| Stratum | The distance from an authoritative reference clock. Lower valid values generally indicate a source closer to the reference. | A valid nonzero stratum confirms that an upstream source is being used. |
| Reference | The currently selected time source. | It should identify the intended NTP server, such as 10.0.0.200. |
| Clock offset | The measured difference between the local clock and the selected NTP source. | A small value indicates close agreement. |
| Root delay | The cumulative network delay to the primary time reference. | Use it as an indication of timing-path delay. |
| Root dispersion | An estimate of the maximum error relative to the primary time reference. | Lower values generally indicate less estimated uncertainty. |
| Peer dispersion | An estimate of uncertainty associated with the NTP server relationship. | Review it with offset and delay when assessing source quality. |
| Reference time | The time when the NTP source was last updated or referenced. | It should represent a recent, meaningful update after synchronization. |
| Precision | An indication of the clock's measurement or operating precision. | Interpret it as additional timing detail rather than as the synchronization result by itself. |
Allow time for synchronization
Synchronization may not be immediate after entering the command. The router may need time to reach the server, exchange NTP information, and adjust or discipline its clock. Run show ntp status again after network reachability is established and enough time has passed.
Troubleshoot an unsynchronized clock
Clock does not report synchronization
If the status does not show a synchronized clock, check the following:
- Confirm that the configured server address is correct.
- Verify that R1 has a route and IP connectivity to
10.0.0.200. - Check that interfaces and the relevant routing path are operational.
- Confirm that ACLs and firewalls permit NTP traffic using UDP port 123.
- Verify that the server is available and is providing NTP service.
- Wait for synchronization to complete, then run
show ntp statusagain.
Unexpected reference source
If the status identifies an unexpected source or does not identify the intended server, the intended server may be unreachable, the address may be incorrect, or the server may not be a valid selectable time source. Validate the configured IP address, check reachability and UDP 123 filtering, and use show ntp status to identify the active reference.
Configuration outcome
R1 is correctly synchronized when show ntp status reports a synchronized clock, displays a valid stratum, and identifies the intended NTP server as the reference source. Offset, delay, dispersion, reference time, and precision provide additional information about the quality and details of the time relationship.
For this procedure, the complete command sequence is:
R1> enable
R1# configure terminal
R1(config)# ntp server 10.0.0.200
R1(config)# end
R1# show ntp status