Setting Router Clocks in Cisco Devices
Nerd Caf
In this lesson, I'll guide you step by step on how to set the clock on a Cisco router. This is an essential task in networking, as an incorrect time setting can impact logging, authentication protocols, and network synchronization.
Step 1: Understand the Importance of Router Clock
Before we start configuring, let's understand why setting the correct time on a router is important:
Accurate Logging: Ensures that logs have the correct timestamps.
Security Protocols: Some authentication mechanisms depend on synchronized clocks.
Network Management: Helps in troubleshooting and performance monitoring.
Cisco routers do not have a built-in battery-backed clock like computers. They lose their time setting when rebooted unless a Network Time Protocol (NTP) server is used.
Step 2: Check the Current Clock Setting
To check the router's current date and time, use:
Router# show clock
Router#show clock
*14:30:33.211 UTC Mon Mar 31 2025
Router#
The asterisk (*
) indicates the clock is not set.
Step 3: Manually Set the Clock
You can manually set the clock using the following command:
Router#clock set ?
hh:mm:ss Current Time
Router#clock set 18:01:00 ?
<1-31> Day of the month
MONTH Month of the year
Router#clock set 18:01:00 31 ?
MONTH Month of the year
Router#clock set 18:01:00 31 March ?
<1993-2035> Year
Router#clock set 18:01:00 31 March 2025
Router#
*Mar 31 18:01:00.000: %SYS-6-CLOCKUPDATE: System clock has been updated from 14:32:20 UTC Mon Mar 31 2025 to 18:01:00 UTC Mon Mar 31 2025, configured from console by console.
Router#
Breakdown of the command:
14:30:00
→ Time in 24-hour format.31
→ Day of the month.Mar
→ Three-letter abbreviation for the month.2025
→ Year.
Step 4: Verify the Clock
After setting the clock, verify it using:
Router#show clock
18:02:27.855 UTC Mon Mar 31 2025
Router#
Step 5: Set the Time Zone
By default, the router uses UTC (Coordinated Universal Time). To set your local time zone, use:
Router(config)#clock timezone ?
WORD name of time zone
Router(config)#clock timezone IRST ?
<-23 - 23> Hours offset from UTC
Router(config)#clock timezone IRST 3 ?
<0-59> Minutes offset from UTC
<cr>
Router(config)#clock timezone IRST 3 30 ?
<cr>
Router(config)#clock timezone IRST 3 30
Router(config)#
Mar 31 18:05:10.123: %SYS-6-CLOCKUPDATE: System clock has been updated from 18:05:10 UTC Mon Mar 31 2025 to 21:35:10 IRST Mon Mar 31 2025, configured from console by console.
Router(config)#
Step 6: Save the Configuration
Since Cisco routers lose time when rebooted, you need to configure NTP or manually reset the clock after every restart.
To save the configuration:
Router#write memory
Warning: Attempting to overwrite an NVRAM configuration previously written
by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm]
Building configuration...
[OK]
Router#
Keywords
router clock
, Cisco router time
, set router time
, Cisco clock set
, configure router clock
, clock timezone
, NTP synchronization
, router time zone
, daylight saving time
, show clock
, IRST timezone
, Iran router time
, IRDT daylight saving
, network time protocol
, Cisco clock configuration
, clock summer-time
, router time settings
, UTC offset
, set router timezone
, save router time
, سیسکو
Last updated