SystemPrivileged EXEC

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.

Syntax·Privileged EXEC
show clock

When 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 clock
14: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

1.

CCNA exam tip: The asterisk (*) in 'show clock' output indicates the time is authoritative (NTP synchronized or manually set with 'clock set').

2.

CCNA exam tip: If the asterisk is missing, the time is not synchronized; this can cause OSPF neighbor issues if authentication is used.

3.

CCNA exam tip: 'show clock detail' provides additional info like time source (NTP, calendar, user) and last update.

4.

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

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions