After setting the date and time on a device, the local time on a device can be synchronized with an Network Time Protocol (NTP) server.
Note
This MUST be done in the UTC timezone. Otherwise issues will arise as NTP attempts to sync to the upstream servers and peers, and the clock timezone command will incorrectly adjust the time.device# clock set 2016-08-06T12:15:00
device# configure terminal
device(config)# clock timezone America/Los_Angeles
device(config)# exit
device# show clock 2017-02-09 12:15:00 America/Los_Angeles
device# configure terminal
device(config)# ntp server 192.168.10.1 use-vrf myvrf
device(config)# exit
device(config)# exit
device# show ntp status Clock is synchronized, stratum 3, reference clock is 192.168.128.5 precision is 2**24 reference time is CC38EC6A.8FCCA1C4 (10:10:02.561 JST Fri Jan 20 2017 ) clock offset is -1.051 msec, root delay is 174.060 msec root dispersion is 172.37 msec, peer dispersion is 0.10 msec system poll interval is 32, last update was 19 sec ago NTP server mode is enabled, NTP client mode is enabled NTP master mode is disabled, NTP master stratum is 8
Note
After upgrading to SLX-OS 20.1.x, a downgrade to a previous version of the SLX-OS which does not provide support for an NTP source interface will remove the NTP server configuration. This will require you to reconfigure the NTP server command after the downgrade.In the following example, the date, time and time zone are set on a device and verified. The local device is configured to synchronize the local time with an external NTP server at a specific IP address, accessible from a user-specified VRF named myvrf.
device# clock set 2017-02-09 12:15:00 device# configure terminal device(config)# clock timezone America/Los_Angeles device(config)# exit device# show clock 2017-02-09 12:15:00 America/Los_Angeles device# configure terminal device(config)# ntp server 192.168.10.1 use-vrf myvrf device(config)# exit device(config)# exit device# show ntp status Clock is synchronized, stratum 3, reference clock is 192.168.128.5 precision is 2**24 reference time is CC38EC6A.8FCCA1C4 (10:10:02.561 JST Fri Jan 20 2017 ) clock offset is -1.051 msec, root delay is 174.060 msec root dispersion is 172.37 msec, peer dispersion is 0.10 msec system poll interval is 32, last update was 19 sec ago NTP server mode is enabled, NTP client mode is enabled NTP master mode is disabled, NTP master stratum is 8