ponedeljek, 29. december 2014

Setting up correct time on your Mikrotik router

For every router and some of the router services it is important that the router has exact time. This part is very simple and is easiest to configure from the terminal window inside WinBox.
So what you have to do is to log in to your router, or even connect to it via SSH or telnet, if you would like to use that option.
And run this commands from terminal:
/system ntp client set enabled=yes primary-ntp= secondary-ntp=

This will setup those 2 servers ( and as valid sources for getting the correct time. I used IP addresses of NTP servers from our country in this case, but you can use any reliable NTP server anywhere, it does not matter. The only rule is to use their IP addresses, not their DNS name like pool.ntp.org in this case.

After that is done you need to set up the time zone you are in with this command:

/system clock set time-zone-name=CET
If you don't know out time zone you can make use of the TAB key to get the
right one. After the = press TAB and the Router will display time zones like 
in the picture below:

 If you are in Europe like me, then you just type Eur+TAB, followed by another TAB, to
 give you the option to choose the city you are in. 
 Followed by ENTER to confirm. To recap. For my example as I live in Europe/Ljubljana
 the 2 commands to setup the router, to get the correct time from NTP server, would be: 

/system ntp client set enabled=yes primary-ntp= secondary-ntp=
/system clock set time-zone-name=Europe/Ljubljana  

The other option you have is to set it without terminal. But I think you need to have at least version 6.21.1 on your router to have this option in the menu. But I may be wrong.

So in the menu SYSTEM click CLOCK. As you see in the bottom picture set up the Time zone from drop down menu (don’t bother setting up time and date here since the first reboot of the device will reset the time)
Apply and close this window.
Then click on the SYSTEM and find SNTP Client and click it. Here you can set the NTP server name, that you find here : http://www.pool.ntp.org/ Just paste NTP’s DNS name in primary and secondary NTP server and it will automagicaly resolve to IP.
Apply and close this window.
That is all I hope that was clear enough. For any questions feel free to post them in the comment section below. May the force be with you all :D


Ni komentarjev:

Objavite komentar