電訊茶室's Archiver

角色 發表於 2013-1-1 21:31

【RouterOS】——SNTP (NTP) Time Client

[i=s] 本帖最後由 角色 於 2013-3-9 21:36 編輯 [/i]

How to configure the MT built-in SNTP client:

Ref: [url]http://wiki.mikrotik.com/wiki/Manual:System/Time#Manual_time_zone_configuration[/url]

member link: [url]http://www.hkepc.com/forum/redirect.php?goto=findpost&ptid=1887469&pid=28922482[/url]

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

角色 發表於 2013-3-30 00:32

用winbox,

[attach]2364[/attach]

[attach]2363[/attach]

角色 發表於 2013-9-1 16:08

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

角色 發表於 2018-10-4 17:14

[i=s] 本帖最後由 角色 於 2018-10-11 07:23 編輯 [/i]

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

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

Skypeus 發表於 2018-11-29 14:50

这下设置好了。谢谢!

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.