Table of Contents
How to Configure System Clock
It is very important to configure the correct clock for network devices such as routers and switches. If the clock is not configured correctly, it will be difficult to analyze the logs generated by the network devices. It can also cause problems such as not being able to properly determine the expiration date of certificates.
There are two ways to configure the clock for Cisco devices.
- Manual Configuration
- NTP(Network Time Protocol)
Configure Time Zone
When configuring the clock, you will also need to configure the appropriate time zone. The default is UTC. Specify the appropriate time zone according to the region where the device will be used. In global configuration mode, enter the following command
(config)#clock timezone <name-of-timezone> <hours-offset> [<minutes-offset>]
<name-of-timezone> : Timezone name
<hours-offset> : time difference(hours)
<minutes-offset> : time difference(minitues)
is a string used to identify the time zone. You don’t have to use a specific string, but in Japan, it is usually “JST”. After that, specify as the time difference in hours, plus if it is ahead of UTC, minus if it is behind. If necessary, you can also specify the time difference in minutes using . In Japan time, the time difference is 9 hours ahead of UTC. Therefore, the time zone configuration for Japan time is usually as follows.
clock timezone JST 9
You can manually configure the clock on Cisco devices. To configure the clock, use the following command in privileged EXEC mode.
#clock set <hh:mm:ss> <day> <month> <year>
<hh:mm:ss> : time:minite:second
<day> : day
<month> : month
<year> : year
Note that the clock configured manually by the clock set command will be lost when the device is rebooted.
Manually configuring the clock with the clock set command every time the device is rebooted is tedious. Even if you keep running the system without rebooting, the clock will gradually become out of sync. With NTP, you don’t need to reconfigure the clock every time you reboot. And NTP can also compensate for clock deviations.
To configure as an NTP client to synchronize the clock with an NTP server, enter the following command in global configuration mode.
(config)#ntp server <ip-address>
<ip-address> : IP address of NTP server
Verify the clock.
To verify the clock, run the show clock command.
R1#show clock 15:12:02.291 JST Wed Feb 17 2021
To verify that the clock is synchronized properly with the NTP server, execute the show ntp association command.
R1#show ntp associations address ref clock st when poll reach delay offset disp *~192.168.0.1 127.127.7.1 5 8 64 377 36.2 -18.15 5.2 * master (synced), # master (unsynced), + selected, - candidate, ~ configured
If there is a “*”, the clock has been successfully synchronized with the NTP server.
- Preparing for Cisco devices configuration
- Configuration files for Cisco devices
- The configuration steps for Cisco devices
- Basic knowledge of the Cisco CLI: Command types and modes
- Cisco device’s interface
- CLI help and completion
- The main error messages in CLI
- Cisco Deleting a configuration command
- default interface command -Initialize the interface settings-
- Entering commands in batches
- do command – Execute EXEC command from configuration mode –
- interface range command -Batch configuration of multiple interfaces-
- Filtering the display of the show command – displaying only the information you want to see –
- terminal length command : configuration of the number of lines displayed in the command output
- debug command to check real-time operation
- Automatically enter privileged EXEC mode upon CLI login
- Saving and managing configuration files
- Configure System Clock
- IOS File System Operations
- Managing Cisco Catalyst Switches :What it means to set an IP address on a switch.
- Remote management by VTY access (Telnet/SSH)
- terminal monitor command to display the log of Telnet/SSH login destination
- Multi-step Telnet Session Suspensions
- Set the minimum number of characters in the password [Cisco]
- Cisco Initial Configuration Example
- CDP – What are the connected devices? –
- Password recovery for Cisco routers
- Password Recovery for Catalyst Switches