Create a script to check Stratum 0/1 NTP servers with lower ping

Hello,

If possible this to be implemented in Mikrotik itself. The task will be:

  • Make a list with all free Stratum 0/1 servers
  • From that list pick up the 3 servers with lower ping and show to you.
  • To show stratum status in column (is it a 0 or 1 or whatever).

Example below with the servers (This is for Europe)
Mikrotik-NTP-Servers.PNG

Kind of but not really, it won’t show in a Winbox window though.

You will never see a stratum 0 server. Also, lower stratum doesn’t mean better.

Making a list of all free stratum 1 servers is an issue too.. Many of the public ones have restrictions on who is allowed to use them, so the list of acceptable servers for you will be different than the acceptable list for me.

Lowest ping doesn’t matter either, NTP takes latency into account.

Often using country.pool.ntp.org gives very acceptable results. country is 2-letter ISO country code (e.g. de for Germany). Most of servers are stratum 1 or stratum 2 and have to be open for use by everybody (that’s policy to get server onto the list).

To help with configuring a few servers it’s possible to prefix the name with N., where N is digit, usually between 0 and 3.

For example: to configure 3 distinct server, use

0.de.pool.ntp.org
1.de.pool.ntp.org
2.de.pool.ntp.org



Indeed. What bothers NTP client is asymmetrical latency (i.e. when latency between client and server is signifficantly different than latency between server and client).