返回列表 發帖

【RouterOS】——SNTP (NTP) Time Client

本帖最後由 角色 於 2013-3-9 21:36 編輯

How to configure the MT built-in SNTP client:

Ref: http://wiki.mikrotik.com/wiki/Ma ... _zone_configuration

member link: http://www.hkepc.com/forum/redir ... 69&pid=28922482

1. print the current clock
  1. [admin@MikroTik] > /system clock print
  2.             time: 13:03:54
  3.             date: jan/02/1970
  4.   time-zone-name: manual
  5.       gmt-offset: +00:00
複製代碼
2. Add the NTP servers for MT SNTP
  1. /system ntp client
  2. set enabled=yes primary-ntp=210.0.235.14 secondary-ntp=203.129.68.14
複製代碼
3. Check the system ntp client
  1. [admin@MikroTik] > /system ntp client print
  2.         enabled: yes
  3.            mode: broadcast
  4.     primary-ntp: 210.0.235.14
  5.   secondary-ntp: 203.129.68.14
複製代碼
4. When mode: broadcast, it waits for the ntp server to send the time information to RouterBoard. We need to set mode=unicast that means that we send a request to NTP server.
  1. [admin@MikroTik] /system ntp client set mode=unicast
複製代碼
5.  Print the time again, which shows more environment variables
  1. [admin@MikroTik] /system ntp client print
  2.              enabled: yes
  3.                 mode: unicast
  4.          primary-ntp: 210.0.235.14
  5.        secondary-ntp: 203.129.68.14
  6.        poll-interval: 32s
  7.        active-server: 203.129.68.14
  8.     last-update-from: 203.129.68.14
  9.   last-update-before: 5s640ms
  10.      last-adjustment: 2239w16h52m53s407ms960us
複製代碼
6. Show the time again, it indicates that the time is revised  but the time-zone if incorrect.
  1. [admin@MikroTik] /system ntp client> /system clock print
  2.             time: 13:26:30
  3.             date: jan/01/2013
  4.   time-zone-name: manual
  5.       gmt-offset: +00:00
複製代碼
7. Change the time-zone of Hong Kong
  1. [admin@MikroTik]  /system clock manual set time-zone=+08:00
複製代碼
8. Check the time again.
  1. [admin@MikroTik] /system ntp client> /system clock print
  2.             time: 21:28:27
  3.             date: jan/01/2013
  4.   time-zone-name: manual
  5.       gmt-offset: +08:00
複製代碼

用winbox,



附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

TOP

刚才用winbox,几下动作就把时间搞定。

TOP

本帖最後由 角色 於 2018-10-11 07:23 編輯

在大陆,NTP servers可以输入
server1:cn.ntp.org.cn
server2: edu.ntp.org.cn
系统会自动更换对应的IP address。

在香港,就用
server1: stdtime.gov.hk
server2: hk.pool.ntp.org

TOP

这下设置好了。谢谢!

TOP

返回列表