Hello I am trying to use a RBM11G as an NTP time server for some remoate Siemens PLC’s, I know that the time supplied will not be exact but it will be close enough for this application
I have configured the RBM with no firewall, DHCP is turned on to serve addresses in the range 178.118.85.1~50
I have attached a GPS to the RBM which is receiving the time and correctly setting the RBM clock to this.
My problem appears to be getting this time served out on the local Lan, NTP server setting below
None of the attached PLC’s can see an NTP server at 178.118.85.2 or have I miss understood how to setup the NTP server. I have tried using NTP-Check which confirms there is no server at the address.
Any help in correctly configuring this would be appreciated.
Most devices allow only unicast NTP server use, so try to use the address of the router as the NTP time server IP for test.
Also try to define accept rule in Ip Firewall Filter, input chain, protocol UDP, destination-port 123, and in-interface to whichever is router LAN interface.
This should make things work but you could use this to test it easily: https://www.ntp-time-server.com/ntp-software/ntp-check.html
Further advice is to avoid using local clock on the Mikrotik router, as it doesn’t have a battery to keep clock when turned off.
So Mikrotik clock resets to 1970 after each power on, until rotuer’s sntp client is syncronized to the external ntp clock source (you can see this in the log).
Could be better if you use CHR on a virtual server having real-time quartz clock supported by the battery, though with virtualization jitter is bigger and it has some of it’s own issues.
Depending on how reliable is your Internet connection on site, and if the actual time is more important or basic device event-time syncronization…
you could use this script in scheduler on startup, which would eliminate Mikrotik providing bad time to it’s ntp clients immediately after reboot.
Not my script, so credits are due but I hope you find this useful.
{
Assure no stale time served after router reboot until synced
/system ntp server set enabled=no
:log info “System time not synchronized after Boot, disabling ntp server”
:global SMTPstatus [/system ntp client get status]
while condition=($SMTPstatus!=“synchronized”) do={
delay 60s;
:global SMTPstatus [/system ntp client get status]
}
:log info “System time synchronized after Boot, enabling ntp server”
/system ntp server set enabled=yes;
}
I just tried: if you set broadcast=yes without specifying any broadcast-addresses, nothing happens. It doesn’t work with 255.255.255.255. My local subnet is 192.168.2.0/24, so I also tried 192.168.255.255 without success - it has to be 192.168.2.255.
/ip/firewall/nat/print where dst-port~“123”
Flags: X - disabled, I - invalid; D - dynamic
5 chain=dstnat action=dst-nat to-addresses=192.168.88.254 to-ports=123 protocol=udp src-address=!192.168.88.254 in-interface=bridge dst-port=123 log=no log-prefix=“”
root@gk41 ~ [255]# ip a show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 4096
link/ether 84:47:09:1c:09:90 brd ff:ff:ff:ff:ff:ff
inet 192.168.88.254/24 scope global eth0
valid_lft forever preferred_lft forever
root@gk41 ~# chronyc -n clients | wc -l
44
\
Chrony has great details/information if you are having issues..