How can we help?

Command line - MikroTik router example

Follow

Log into the device with Telnet or SSH. Enter privileged mode by typing enable and entering your enable password.

Enable DNS lookup

Make sure DNS lookups are enabled on your device so it can be synced to an NTP server. Run the following command. Replace 8.8.8.8 8.8.4.4 with the DNS servers you’d like to use.

/ip dns set servers=8.8.8.8 8.8.4.4 

Set the clock, time zone. and NTP server

Substitute the correct date, time, and time zone for your location. A full list of the options for <time-zone-name> is available in the TZ database name column here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List.

/system clock set date=JAN/01/2019
/system clock set time=14:30:00
/system clock set time-zone-autodetect=no
/system clock set time-zone-name=America/New_York

# date=JAN/01/2019, must be set to the current date of configuration
# time=14:30:00, must be set to the current time
# time-zone-name=America/New_York, must be set to your time-zone
Confirm the clock settings

To make sure the settings took effect, run the following command:

/system clock print
Enable an NTP server

Enable the NTP client using NTP servers from pool.ntp.org by running the following command:

/system ntp client set enabled=yes primary-ntp=[:resolve 0.pool.ntp.org] secondary-ntp=[:resolve 1.pool.ntp.org]

 

Was this article helpful?
10 out of 13 found this helpful
Have more questions? Submit a request