Community discussions

MikroTik App
 
rnoguera
just joined
Topic Author
Posts: 11
Joined: Thu Nov 19, 2009 12:23 pm

NTP Client on CHR

Thu Apr 21, 2022 12:00 pm

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?
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: NTP Client on CHR

Thu Apr 21, 2022 4:40 pm

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]
 
rsalmar
newbie
Posts: 30
Joined: Mon Oct 23, 2017 6:22 am

Re: NTP Client on CHR

Tue May 10, 2022 4:37 pm

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?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10186
Joined: Mon Jun 08, 2015 12:09 pm

Re: NTP Client on CHR

Tue May 10, 2022 4:58 pm

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.
 
rsalmar
newbie
Posts: 30
Joined: Mon Oct 23, 2017 6:22 am

Re: NTP Client on CHR

Wed May 11, 2022 5:50 pm

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.
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1025
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: NTP Client on CHR

Wed May 11, 2022 5:56 pm

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! :-D
 
pe1chl
Forum Guru
Forum Guru
Posts: 10186
Joined: Mon Jun 08, 2015 12:09 pm

Re: NTP Client on CHR

Wed May 11, 2022 6:56 pm

It works OK here... maybe you need to update winbox or try with a new session file?
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1025
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: NTP Client on CHR

Wed May 11, 2022 7:28 pm

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.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10186
Joined: Mon Jun 08, 2015 12:09 pm

Re: NTP Client on CHR

Wed May 11, 2022 8:22 pm

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.

Who is online

Users browsing this forum: No registered users and 13 guests