show clock
Displays the current system date, time, timezone, and whether the time is synchronized via NTP or manually set, used to verify system time accuracy for logging, authentication, and scheduled tasks.
show clockWhen to Use This Command
- Verify NTP synchronization after configuring an NTP server to ensure accurate timestamps in logs.
- Check system time before troubleshooting time-sensitive protocols like OSPF or EIGRP that require time synchronization.
- Confirm manual time setting after a router reboot when NTP is not available.
- Audit time drift by comparing system time with an external reference during maintenance.
Command Examples
Basic show clock output with NTP sync
show clock*14:25:30.123 UTC Mon Mar 4 2024
The asterisk (*) indicates the time is authoritative (synchronized via NTP or manually set). '14:25:30.123' is the current time in HH:MM:SS.mmm format. 'UTC' is the timezone. 'Mon Mar 4 2024' is the day, date, and year.
show clock with no NTP sync
show clock14:25:30.123 UTC Mon Mar 4 2024
No asterisk means the time is not synchronized (no NTP or manually set without authority). The time may be inaccurate. Same fields as above but without the leading asterisk.
Understanding the Output
The output shows the current system time in 24-hour format with milliseconds. The leading asterisk (*) indicates the time source is considered reliable (NTP synchronized or manually set with the 'clock set' command). Without the asterisk, the time is not authoritative and may drift. The timezone is displayed (e.g., UTC, EST). The day of week, month, day, and year are shown. In a real network, a missing asterisk could indicate NTP failure, leading to log timestamp inaccuracies and potential authentication issues (e.g., OSPF MD5 keys). Always ensure the asterisk is present for production devices.
CCNA Exam Tips
CCNA exam tip: The asterisk (*) in 'show clock' output indicates the time is authoritative (NTP synchronized or manually set with 'clock set').
CCNA exam tip: If the asterisk is missing, the time is not synchronized; this can cause OSPF neighbor issues if authentication is used.
CCNA exam tip: 'show clock detail' provides additional info like time source (NTP, calendar, user) and last update.
CCNA exam tip: NTP synchronization is required for accurate logging and some routing protocols; know how to verify with 'show ntp status'.
Common Mistakes
Mistake 1: Assuming the time is accurate without checking for the asterisk; consequence: log timestamps may be wrong, causing troubleshooting confusion.
Mistake 2: Confusing 'show clock' with 'show calendar'; the calendar is a separate hardware clock that may differ from the system clock.
Mistake 3: Forgetting to set the timezone correctly; consequence: logs show incorrect local time even if NTP is synced.
Related Commands
clock set [hh:mm:ss] [day] [month] [year]
Sets the system clock on a Cisco IOS device from the privileged EXEC mode, used to manually configure the router's time when NTP is not available.
ntp server [ip]
Configures the router to synchronize its system clock with an NTP server, ensuring accurate time for logging, authentication, and network protocols.
show ntp status
Displays the current NTP synchronization status, including clock stratum, reference clock, and synchronization state, used to verify NTP operation and clock accuracy.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions