NTP client time sync

My current CPE configuration gives internet access only when a PPPoE session is established, when the PPPoE client on the CPE is disabled internet access ceases and this results in no clock time sync?
I use this on scheduler to keep the clock in sync
/system ntp client set enabled=yes primary-ntp=[:resolve 0.ie.pool.ntp.org] secondary-ntp=[:resolve 1.ie.pool.ntp.org];

Is there any way that I could just retain the clock time sync ?

NTP stands gor Network Time Protocol. So when there’s no network connectivity, you don’t have precise time.

Apart from that: router’s internal clock keeps running even without internet, it’s just not very precise any more. Such devices loose or gain up to a few seconds a day (most are better than that). I don’t think that kind of inaccuracy should break anything if device gets internet access at least once a week.
The only problem is that after reboot (could be any reboot or only after power failure, I’m not sure) time starts ticking from 1st of January 1970 and router needs internet access to get current time.

I have a lot of customers who have the PPPoE client on their WiFi Router for port forwarding ( etc…) trying to run scheduled tasks on the CPE’s overnight is a challenge as I have to manually correct the time on the CPE’s that have incorrect clock times that could be several many days out ?

If only I could setup that only the primary-ntp and secondary-ntp ip’s would be able to time sync on those CPE’s

I’ll qoute myself:

Now … you might fing some way of giving routers a tiny connectivity towards some NTP server (DHCP serving private IP address should do the trick) while still requiring PPPoE to offer full internet connectivity.

But then … I’ve always thought that internet connectivity on router should be established at all times (unless there’s something seriously wrong) which means NTP servers should be available at all times as well. If things are set like this then router gets precise time within seconds after boot.
If, OTOH, PPPoE client is not set to be connected at all times, then you may have to reconsider the policy …

How do I add NTP package to ROS versions 6.45.7, 6.46.3 ?

You don’t have to install ntp package if you only want to set time on the router itself, ROS includes sntp client in system package. If you want to set up router as NTP server, then install ntp package from extra packages (available as ZIP file from download.mikrotik.com)

I am trying to add NTP package to the AP’s so that the AP will serve as NTP server for CPE clients but so far by simply adding NTP to files and reboot does not work?

The add-on package has to match ROS architecture and version (to the last digit). Anything in log after reboot? It should have some information about package - either that it was installed or some complaint about how the package was inappropriate.

I updated a AP to 6.46.6 added ntp-6.46.6-mipsbe.npk to files - rebooted but no NTP server ? I am really confused

Just checked packages and now Calea has been added, I am sure it was NTP and not Calea package I had in files but will try again

I managed to add NTP package to the AP’s, The AP uses DHCP server to assign management ip ( 10.100.X.X) to the CPE DHCP clients
but so far selecting on the CPE DHCP client “Use Peer NTP” does not sync time

/ip dhcp-server network
add address=10.100.10.0/24 dns-none=yes gateway=10.100.10.1 netmask=24 ntp-server=162.159.200.123

As you probably know, you can check status of NTP client using /system ntp client print … the DHCP-asigned NTP server IP address should appear in the output. If it’s not, then the use-peer-ntp option doesn’t work (I don’t use DHCP assigned addresses for vital network appliances so I don’t have experience in this field). Even if it does, it’ll take quite some time (could be half an hour or even more) for NTP client to settle down and set the time … after that’s done, the first command I wrote should return status: synchronized. If there’s NTP server address in the print out and the status doesn’t change to synchronized in an hour, then you should check firewall(s) if it allows outgoing UDP connections with dst-port 123 …