System Clock and Simple SNTP Client
|Document revision:||.NaN (January 23, 2008, 14:30 GMT)|
System clock allows router to track current date and time.
SpecificationsLicense required: Level1
Submenu level: /system clock
Property Descriptiondate (text) - date in format "mm/DD/YYY"gmt-offset (read-only: text) - UTC timezone in format "+HH:MM" or "-HH:MM"time (time) - time in format "HH:MM:SS"time-zone-name (text; default: manual) - name of the timezone (usually, identified by a major city or a country). UTC offset and DST information of the selected location is used
It is recommended that you reboot the router after time change to obviate the possible errors in time measurments and logging.
Date and time settings become permanent and effect BIOS settings.
If NTP update gives time shifted by 1 hour, although the time zone is set correctly, you may want to adjust the DST setting in /system clock manual menu.
To view the current date and time settings:
[admin@Local] system clock> print time: 09:08:37 date: nov/18/2007 time-zone-name: "manual" gmt-offset: +00:00 [admin@Local] system clock>
To set the system date and time to EET:
[admin@Local] system clock> set date=nov/22/2022 time=11:10:21 time-zone-name=EET [admin@Local] system clock> print time: 11:10:25 date: nov/18/2007 time-zone-name: "EET" gmt-offset: +02:00 [admin@Local] system clock>
Manual Time Zone SettingsSubmenu level: /system clock manual
Usually the time zone and associated DST activation/deactivation time is properly configured when the major nearby location is specified in the time-zone-name parameter. In most countries, a Daylight Saving Time regime is activated in spring and deactivated in autumn. This configuration menu provides UTC timezone and DST adjustment facility, to set and drift the timezone according to your local legislation and practice if it is not set correctly by selecting an appropriate time zone name.
Property Descriptiondst-delta (text; default: +01:00) - UTC timezone drift in format "+HH:MM" or "-HH:MM" to be added to the local timezone during DST perioddst-end (date time) - date and time when DST ends (when the delta is to be dropped).dst-start (date time) - date and time when DST begins (when the delta is to be applied).time-zone (text) - UTC offset of the desired time zone in format "+HH:MM" or "-HH:MM"
For EET timezone and DST zonechange active from mar/27/2005 03:00:00 till oct/30/2005 03:00:00:
[admin@MikroTik] system clock> set time-zone-name=manual [admin@MikroTik] system clock> manual set time-zone=+02:00 dst-delta=+01:00 \ \... dst-start="mar/27/2005 03:00:00" dst-end="oct/30/2005 03:00:00" [admin@MikroTik] system clock> manual print time-zone: +02:00 dst-delta: +01:00 dst-start: mar/27/2005 03:00:00 dst-end: oct/30/2005 03:00:00 [admin@MikroTik] system clock dst>
SpecificationsSubmenu level: /system ntp client
Standards and Technologies: SNTP version 4 (RFC 2030)
NTP protocol allows synchronizing time among computers in network. It is good if there is an internet connection available and local NTP server is synchronized to correct time source. List of public NTP servers is available at http://www.eecis.udel.edu/~mills/ntp/servers.html. SNTP is a simplified version of NTP, compatible with virtually all internet NTP servers, but lacks somevery high precision internal algorithms (and thus have significantly lower requirements and smaller memory footprint). There is also a full NTP client and server implementation for RouterOS available in a separate package (ntp package is available for download from www.mikrotik.com) with higher system requirements and more features, but the small SNTP client included in the system package is sufficient in most cases. Note that the software included in the ntp uses the same configuration menu, so you cannot use both NTP and SNTP at the same time.
Property Descriptionactive-server (read-only: IP address) - server, the client is communicating with (unicast only)enabled (yes | no; default: no) - whether the SNTP client is enabled or notlast-adjustment (read-only: time) - last time adjustment delta (difference between the local clock state and the received time during the last update)last-bad-packet-before (read-only: time) - time since the last unaccepted NTP message has been receivedlast-bad-packet-from (read-only: IP address) - server address, which sent the last unaccepted messagelast-bad-packet-reason (read-only: text) - reason that states why has the last unaccepted message been discardedlast-update-before (read-only: time) - time past since the last clock updatelast-update-from (read-only: IP address) - IP address of the3 server that sent last accepted message, that was used to adjust clockmode (unicast | broadcast; default: broadcast) - NTP client mode
unicast - NTP client connects to the specified NTP server. IP address of NTP server must be set in ntp-server and/or second-ntp-server parameters. At first client synchronizes to NTP server. Afterwards client periodically (64..1024s) sends time requests to NTP server
CAUTION! Using broadcast mode is dangerous! Intruder (or simple user) can set up his/her own NTP server. If this new server will be chosen as time source for your router, it will be possible for this user to change time on your router at his/her will.
To enable the NTP client to synchronize with the 188.8.131.52 server:
[admin@MikroTik] system ntp client> set enabled=yes primary-ntp=184.108.40.206 \ \... mode=unicast [admin@MikroTik] system ntp client> print enabled: yes mode: unicast primary-ntp: 220.127.116.11 secondary-ntp: 0.0.0.0 poll-interval: 8m32s active-server: 18.104.22.168 last-update-from: 22.214.171.124 last-update-before: 1m38s120ms last-adjustment: 2ms562us [admin@MikroTik] system ntp client>