ntp server: Server dropped: strata too high

I have RouterOS v6.48.3 on a hAP ac^3 with an uplink is via PPPoE WAN, and a DHCP server handing out network config on the LAN side.

As part of the DHCP server network parameters, the router points to itself as the NTP server.

/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1 next-server=192.168.88.1 ntp-server=192.168.88.1

Unfortunately, it seems that something’s wrong with the stratum, and time updates from the router are refused by Linux clients and other embedded devices.

$ sudo ntpdate -q4vd _gateway
14 Nov 15:35:27 ntpdate[434331]: ntpdate 4.2.8p15@1.3728-o Tue Sep  7 12:46:55 UTC 2021 (1)
Looking for host _gateway and service ntp
192.168.88.1 reversed to _gateway
host found : _gateway
transmit(192.168.88.1)
receive(192.168.88.1)
192.168.88.1: Server dropped: strata too high

server 192.168.88.1, port 123
stratum 16, precision -18, leap 11, trust 000
refid [INIT], root delay 0.000000, root dispersion 0.000153
reference time:      (no time)
originate timestamp: e53b102d.56cc9ffa  Sun, Nov 14 2021 15:33:49.339
transmit timestamp:  e53b108f.646421b1  Sun, Nov 14 2021 15:35:27.392
delay 0.03883, dispersion 0.00000, offset -98.060273

14 Nov 15:35:27 ntpdate[434331]: no server suitable for synchronization found

Note that the stratum here is 16.

The ntp package is installed and enabled.

[admin@hapac3] > /system ntp client print  
          enabled: yes
             mode: broadcast
      primary-ntp: 139.99.222.72
    secondary-ntp: 27.124.125.251
  dynamic-servers: 
           status: started
           [admin@hapac3] > /system ntp server print  
              enabled: yes
            broadcast: no
            multicast: yes
             manycast: yes
  broadcast-addresses:

The primary and secondary NTPs are set by a script that resolves pool.ntp.org from https://wiki.mikrotik.com/wiki/Manual:Scripting-examples#Allow_use_of_ntp.org_pool_service_for_NTP. The script is scheduled to run every minute.

/system scheduler
add comment="Check and set NTP servers" interval=1m name=setntppool on-event=setntppool policy=read,write,test start-date=sep/05/2021 start-time=17:13:30

I can successfully get the time from the upstream dynamic servers.

$ sudo ntpdate -q4vd 139.99.222.72
14 Nov 15:52:59 ntpdate[436395]: ntpdate 4.2.8p15@1.3728-o Tue Sep  7 12:46:55 UTC 2021 (1)
Looking for host 139.99.222.72 and service ntp
139.99.222.72 reversed to ntp.seby.io
host found : ntp.seby.io
transmit(139.99.222.72)
receive(139.99.222.72)

server 139.99.222.72, port 123
stratum 2, precision -25, leap 00, trust 000
refid [17.253.66.125], root delay 0.000275, root dispersion 0.000168
reference time:      e53b1495.864981ad  Sun, Nov 14 2021 15:52:37.524
originate timestamp: e53b14ac.06d19911  Sun, Nov 14 2021 15:53:00.026
transmit timestamp:  e53b14ac.04daf6dc  Sun, Nov 14 2021 15:53:00.018
delay 0.10497, dispersion 0.00000, offset -0.032047

14 Nov 15:53:00 ntpdate[436395]: adjust time server 139.99.222.72 offset -0.032047 sec
$ sudo ntpdate -q4vd  27.124.125.251
14 Nov 15:53:05 ntpdate[436482]: ntpdate 4.2.8p15@1.3728-o Tue Sep  7 12:46:55 UTC 2021 (1)
Looking for host 27.124.125.251 and service ntp
27.124.125.251 reversed to ntp2.ds.network
host found : ntp2.ds.network
transmit(27.124.125.251)
receive(27.124.125.251)

server 27.124.125.251, port 123
stratum 4, precision -25, leap 00, trust 000
refid [162.159.200.123], root delay 0.003357, root dispersion 0.001312
reference time:      e53b1172.cac3b689  Sun, Nov 14 2021 15:39:14.792
originate timestamp: e53b14b1.d9892dc7  Sun, Nov 14 2021 15:53:05.849
transmit timestamp:  e53b14b1.d5dc30a5  Sun, Nov 14 2021 15:53:05.835
delay 0.12556, dispersion 0.00000, offset -0.035636

14 Nov 15:53:05 ntpdate[436482]: adjust time server 27.124.125.251 offset -0.035636 sec

Note that they are stratum 2 and 4.

I would expect the stratum of the router to be 3, or 5, but not 16. What could be the issue?

[As I was writing this, I had a hunch that the scheduled script is changing the servers too often. I am going to reduce the frequency now, and report here in case anyone faces the issue too.]

Status says “started”, should be “synchronized” if NTP server is to be performing up to expectations.

Ah, yep… I first thought it was a firewall issue, but the problem was the mode. For the SNTP client, it is read-only and switches to unicast when servers are configured. This is not the case with the client from the ntp package. Setting it the mode to unicast has the router get synchronised pretty quickly, and shortly after, local clients sync, too.