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).
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.
Step 2. To display the current configuration settings of the port or ports that you want to configure, enter the following:
SG350X#show clock [detail]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:
SG350X#configure terminalStep 2. To configure an external time source, enter the following:
SG350X(config)#clock source [sntp|browser]The options are:
Step 3. (Optional) To display the configured system time settings, enter the following:
SG350X#show clock detailStep 4. (Optional) In the Privileged EXEC mode of the switch, save the configured settings to the startup configuration file, by entering the following:
SG350X#copy running-config startup-configStep 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:
SG350X#clock set [hh:mm:ss] [month] [day] [year]The options are:
- hh - 0 to 23
- mm - 0 to 59
- ss - 0 to 59
Step 2. In the Privileged EXEC mode of the switch, enter the Global Configuration context by entering the following:
SG350X#configure terminalStep 3. To disable the SNTP as the time source for the system clock, enter the following:
SG350X(config)#no clock source sntpStep 4. (Optional) To set the time zone for display purposes, enter the following:
SG350X(config)#clock timezone [zone] [hours-offset] [minutes-offset]The options are:
Step 5. (Optional) To restore the default time zone configuration settings, enter the following:
SG350X(config)#no clock timezoneStep 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:
SG350X(config)#clock dhcp timezoneUpon 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:
SG350X(config)#no clock dhcp timezoneStep 8. (Optional) To configure the system to automatically switch to Summer Time (DST), enter one of following:
SG350X(config)#clock summer-time [zone] recurring {usa | eu | {week day hh:mm week day hh:mm}} [offset] SG350X(config)#clock summer-time zone recurring {usa | eu | {[day month year hh:mm] [day month year hh:mm]}} [offset] SG350X(config)#clock summer-time [zone] date [month day year hh:mm] [month day year hh:mm] [offset]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
Step 9. Enter the exit command to go back to the Privileged EXEC mode:
SG350X#exitStep 10. (Optional) To display the configured system time settings, enter the following:
SG350X#show clock detailStep 11. (Optional) In the Privileged EXEC mode of the switch, save the configured settings to the startup configuration file, by entering the following:
SG350X#copy running-config startup-configStep 12. (Optional) Press Y for Yes or N for No on your keyboard once the Overwrite file [startup-config]… prompt appears.
You have now successfully manually configured the system time settings on your switch through the CLI.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
13-Dec-2018 |
Initial Release |