2020-03-27 20:49:51 +00:00
|
|
|
|
Rotate NTP servers
|
|
|
|
|
==================
|
|
|
|
|
|
|
|
|
|
[◀ Go back to main README](../README.md)
|
|
|
|
|
|
2022-02-12 12:05:56 +00:00
|
|
|
|
> ℹ️ **Info**: This script can not be used on its own but requires the base
|
2022-02-11 22:34:39 +00:00
|
|
|
|
> installation. See [main README](../README.md) for details.
|
2021-05-03 13:07:50 +00:00
|
|
|
|
|
2020-03-27 20:49:51 +00:00
|
|
|
|
Description
|
|
|
|
|
-----------
|
|
|
|
|
|
|
|
|
|
RouterOS requires NTP servers to be configured by IP address. Servers from a
|
|
|
|
|
pool may appear and disappear, leaving broken NTP configuration.
|
|
|
|
|
|
|
|
|
|
This script allows to rotate IP addresses from a given pool.
|
|
|
|
|
|
|
|
|
|
Requirements and installation
|
|
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
|
|
Just install the script:
|
|
|
|
|
|
|
|
|
|
$ScriptInstallUpdate rotate-ntp;
|
|
|
|
|
|
|
|
|
|
Configuration
|
|
|
|
|
-------------
|
|
|
|
|
|
|
|
|
|
The configuration goes to `global-config-overlay`, this is the parameter:
|
|
|
|
|
|
|
|
|
|
* `NtpPool`: dns name of ntp server pool
|
|
|
|
|
|
|
|
|
|
Usage and invocation
|
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
|
|
Just run the script to update the NTP configuration with actual IP
|
|
|
|
|
addresses from pool if required.
|
|
|
|
|
|
|
|
|
|
Alternatively a scheduler can be created:
|
|
|
|
|
|
|
|
|
|
/ system scheduler add interval=5d name=rotate-ntp on-event="/ system script run rotate-ntp;" start-time=startup;
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
[◀ Go back to main README](../README.md)
|
|
|
|
|
[▲ Go back to top](#top)
|