NTP Client on CHR

Hi,

Enabling the NTP Server on CHR requires installing the adittional [ntp] package.
After installing this package, the NTP Client is missing some of the features available in the basic package.

NTP servers cannot be choosed by name, only by IP address. On the Winbox GUI all the diagnostic information is lost.

With extra package enabled:

/system ntp client> print
enabled: yes
mode: unicast
primary-ntp: 64.142.54.22
secondary-ntp: 0.0.0.0
dynamic-servers:
status: started

With base package:

/system ntp client> print
enabled: yes
primary-ntp: 64.142.54.22
secondary-ntp: 0.0.0.0
server-dns-names:
mode: unicast
poll-interval: 16s
active-server: 64.142.54.22

Anyone knoes a workaround for this behaviour?

Either upgrade to v7 (where NTP package is built-in, it has both client and server, and client supports hostnames) or if you stay with v6, you could use script to update address for client. Long-term solution is v7, but not everyone believes that it’s ready for prime time yet. Depends on your needs and/or bravery. Script for v6 can be e.g. this in scheduler:

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

Hi - I tried to set an NTP server in 7.2.3 like this and it won’t take it, either on the terminal or WebFig. Is this still supported?

In v7 the commands are a bit different:

/system ntp client
set enabled=yes
/system ntp client servers
add address=1.2.3.4
add address=0.pool.ntp.org

So you can use both literal addresses and DNS names without using :resolve.
You can also use more than 2 servers.

OK I did this through the terminal and it worked great, and printed the following:

 0    address=0.pool.ntp.org resolved-address=147.135.201.182 min-poll=6 max-poll=10 iburst=yes auth-key=none 
 1    address=1.pool.ntp.org resolved-address=217.182.229.90 min-poll=6 max-poll=10 iburst=yes auth-key=none 
 2    address=2.pool.ntp.org resolved-address=51.38.81.135 min-poll=6 max-poll=10 iburst=yes auth-key=none 
 3    address=3.pool.ntp.org resolved-address=163.172.93.85 min-poll=6 max-poll=10 iburst=yes auth-key=none

However in WebFig, it shows up as empty boxes, and that can mess things up. Hopefully they fix this later.

Great you got it working! Please, do us all a favour and report this to Mikrotik. Thanks in advance! :smiley:

It works OK here… maybe you need to update winbox or try with a new session file?

If I’m not mistaken, in this specific case it applies only to WebFig (ie the web interface) and not WinBox. I haven’t tested it myself though.

Ok it was webfig, I misread it. WebFig has not worked at all anymore here after I installed v7 so I have not looked there anymore.