To set the current time on your MikroTik device running RouterOS 7.18.2 using NTP (Network Time Protocol), follow these steps:
1. Configure NTP Client
You can configure your MikroTik device to synchronize its time with an NTP server automatically.
Via WinBox/WebFig:
- Open WinBox or WebFig and connect to your MikroTik device.
- Go to System → NTP Client.
- Enable the NTP client by checking the Enabled box.
- In the Server field, enter an NTP server address (e.g.,
pool.ntp.org, time.google.com, or your local NTP server).
- (Optional) If you want to use multiple NTP servers, add them in the Servers list.
- Click Apply and then OK.
Via CLI (Terminal):
/system ntp client set enabled=yes primary-ntp=pool.ntp.org secondary-ntp=time.google.com
2. Verify NTP Synchronization
To check if the time is synchronized correctly:
- WinBox/WebFig:
Go to System → Clock and verify the time.
- CLI:
Run:
/system ntp client print
Check the status field—it should say synchronized.
3. (Optional) Configure Time Zone
If your time zone is incorrect, set it manually:
4. (Optional) Force Time Sync
If the time is not updating immediately, you can manually force a sync:
/system ntp client set enabled=no
/system ntp client set enabled=yes
5. (Optional) Use Local NTP Server
If you have a local NTP server (e.g., on your network), replace the public NTP server with your local one:
/system ntp client set primary-ntp=192.168.1.100
Troubleshooting
- If NTP fails, check firewall rules to ensure UDP port 123 is allowed.
- Verify internet connectivity (
ping pool.ntp.org).
- If using a local NTP server, ensure it is reachable.
This should keep your MikroTik device's time synchronized automatically.