Configuring NTP

The date and time are set in privileged EXEC mode and only have to be configured once per device because the value is written to nonvolatile memory. After the basic time information is set up, an NTP server is configured to allow the local time to be synchronized across the network.
  1. Set the current date and time in the UTC timezone for the device.
    Note

    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
  2. Access global configuration mode.
    device# configure terminal
  3. Set the time zone for the device.
    device(config)# clock timezone America/Los_Angeles
  4. Return to privileged EXEC mode.
    device(config)# exit
  5. Display the local date, time, and time zone for the device.
    device# show clock
    2017-02-09 12:15:00 America/Los_Angeles
  6. Enter global configuration mode.
    device# configure terminal
  7. Synchronize the local time with an external source accessible from a user-specified VRF named myvrf.
    device(config)# ntp server 192.168.10.1 use-vrf myvrf
  8. Exit to global configuration mode.
    device(config)# exit
    
  9. Exit to privileged EXEC mode.
    device(config)# exit
  10. Display the active NTP server IP address.
    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

    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