08-18-2017 07:13 PM - edited 03-20-2019 11:55 PM
Article ID:5584
System time configuration is of great importance in a network. Synchronized system clocks provide a frame of reference between all devices on the network. Network time synchronization is critical because every aspect of managing, securing, planning, and debugging a network involves determining when events occur. Without synchronized clocks, accurately correlating log files between devices when tracking security breaches or network usage is impossible.
Synchronized time also reduces confusion in shared file systems, as it is important for the modification times to be consistent, regardless of the machine on which the file systems reside. The Cisco Small Business Switches support Simple Network Time Protocol (SNTP), and when enabled, the switch dynamically synchronizes the device time with time from an SNTP server.
You can manage the system time and date settings on your switch using automatic configuration, such as the SNTP, or manual configuration methods. The switch operates only as an SNTP client, and cannot provide time services to other devices.
This article provides instructions on how to configure the system time settings on your switch through the Command Line Interface (CLI).
Note: To configure the system time settings on your switch through the web-based utility, click here.
By default, there is no configured network policy on the switch. The default LLDP-MED global and interface settings are the following:
Feature |
Default Setting |
Clock Source |
SNTP |
Time from Browser |
Disabled |
Time Zone (Static) |
Offset is UTC+0 |
DHCP Time zone |
Disabled |
Summer Time (DST) |
Disabled |
Step 1. Log in to the switch console. The default username and password is cisco/cisco. If you have configured a new username or password, enter the credentials instead.
Note: The commands may vary depending on the exact model of your switch. In this example, the SG350X switch is accessed through Telnet.
Step 2. To display the current configuration settings of the port or ports that you want to configure, enter the following:
The following information are displayed:
Step 3. Choose your preferred system time configuration:
Step 1. In the Privileged EXEC mode of the switch, enter the Global Configuration context by entering the following:
Step 2. To configure an external time source, enter the following:
The options are:
Note: In this example, sntp is configured as the main clock source and the browser as the alternate clock source.
Step 3. (Optional) To display the configured system time settings, enter the following:
Step 4. (Optional) In the Privileged EXEC mode of the switch, save the configured settings to the startup configuration file, by entering the following:
Step 5. (Optional) Press Y for Yes or N for No on your keyboard once the Overwrite file [startup-config]… prompt appears.
You should now have automatically configured the system time settings on your switch through the CLI.
If no other source of time is available, you can manually configure the time and date after the system is restarted. The time remains accurate until the next system restart. It is recommended that you use manual configuration only as a last resort. If you have an outside source to which the switch can synchronize, you do not need to manually set the system clock.
Important: If you have an outside source on the network that provides time services such as an SNTP server, you do not need to manually set the system clock.
To manually configure the system time settings on your switch, follow these steps:
Step 1. In the Privileged EXEC mode of the switch, enter the following:
The options are:
- hh — 0 to 23
- mm — 0 to 59
- ss — 0 to 59
Note: After reboot, the system clock is set to the time of the image creation. In this example, the clock time is set to 12:15:30 with the clock date of May 12, 2017.
Step 2. In the Privileged EXEC mode of the switch, enter the Global Configuration context by entering the following:
Step 3. To disable the SNTP as the time source for the system clock, enter the following:
Step 4. (Optional) To set the time zone for display purposes, enter the following:
The options are:
Note: The system internally keeps time in UTC, so this command is used only for display purposes and when the time is manually set.
Step 5. (Optional) To restore the default time zone configuration settings, enter the following:
Step 6. (Optional) To specify that the time zone and the Summer Time (DST) of the system can be taken from the DHCP time zone option, enter the following:
Upon configuring the DHCP time zone, check the following guidelines:
- The information received from DHCPv6 precedes information received from DHCPv4
- The information received from DHCP client running on lower interface precedes information received from DHCP client running on higher interface
Step 7. (Optional) To restore the default DHCP time zone configuration, enter the following:
Step 8. (Optional) To configure the system to automatically switch to Summer Time (DST), enter one of following:
The options are:
- Start — Second Sunday in March
- End — First Sunday in November
- Time 2 a.m. local time
- Start — Last Sunday in March
- End — Last Sunday in October
- Time 1 a.m. local time
- hh — 0 to 23
- mm — 0 to 59
- ss — 0 to 59
Note: In this example, a recurring DST is configured with PST time zone. It starts every 00:00 on the first Sunday of March, and ends every second Sunday of November. The offset time is 60 minutes.
Step 9. Enter the exit command to go back to the Privileged EXEC mode:
Step 10. (Optional) To display the configured system time settings, enter the following:
Step 11. (Optional) In the Privileged EXEC mode of the switch, save the configured settings to the startup configuration file, by entering the following:
Step 12. (Optional) Press Y for Yes or N for No on your keyboard once the Overwrite file [startup-config]… prompt appears.
You should now have successfully manually configured the system time settings on your switch through the CLI.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: