Page 1 of 1
NTP on Mikrotik
Posted: Wed Sep 30, 2009 4:52 pm
by directlogic
Dear All,
I have Mikrotik RB333 and RB411 routers and i connected these routers with private ip's(192.168.0.0/24) on wlan and live ip's on ethernet.
I m unable to setup NTP client on there router's these router not sync with NTP server's
how can i sync there router with private ip to sync with NTP server.
Thanx.
Re: NTP on Mikrotik
Posted: Wed Sep 30, 2009 5:04 pm
by Chupaka
what NTP server do you use? can you ping it?
Re: NTP on Mikrotik
Posted: Wed Sep 30, 2009 5:07 pm
by mrz
also make sure that mode=unicast
by default it is set to broadcast
Re: NTP on Mikrotik
Posted: Wed Sep 30, 2009 5:16 pm
by directlogic
Dear Chupaka
I m using 120.88.47.10 server.
which is pinging from Rb which have live ip but unable to ping from Rb which have private ip.
That ntp server working fine on RB1000.
My Question is how to sync ntp from RB which have following ips:-
Wlan = 192.168.1.1/30 (private)
Ethernet =204.56.x.x/30 (public)
ntp mode =unicast
Re: NTP on Mikrotik
Posted: Wed Sep 30, 2009 5:20 pm
by Chupaka
you either need to give RBs access to internet via RB1000, or just setup NTP server on RB1000 (by installing 'ntp' package) and then sync RBs with RB1000
Re: NTP on Mikrotik
Posted: Thu Oct 01, 2009 1:12 pm
by directlogic
Each RB has the internet access on ehternet port but not on wlan
i m not able to ping ntp server directly and only ping by giving source address(ehternet that is live) in advanced tab.
Re: NTP on Mikrotik
Posted: Thu Oct 01, 2009 6:01 pm
by fewi
Can you post the output of "/ip route print"?
Re: NTP on Mikrotik
Posted: Thu Oct 01, 2009 7:15 pm
by directlogic
Following is my route detail:-
# DST-ADDRESS PREF-SRC GATEWAY-STATE GATEWAY DISTANCE INTERFACE
0 A S 0.0.0.0/0 reachable 10.10.1.1 1 wlan1
1 ADC 10.10.1.0/29 10.10.1.2 0 wlan1
2 ADC 120.120.X.X/29 120.120.X.X 0 ether1
Re: NTP on Mikrotik
Posted: Thu Oct 01, 2009 7:25 pm
by fewi
Set a default route that allows the devices to reach the NTP server, or implement a specific route for the NTP server IP.
Re: NTP on Mikrotik
Posted: Fri Oct 02, 2009 6:29 pm
by directlogic
Thanx fewi
Its works . But when Rb reboot and come back it display jan/01/1970 and after that it display the correct time. I think when rebooted it lost the NTP connection and when it connect with AP it got sync with NTP server.
Any ways thanx for suggestion.
Re: NTP on Mikrotik
Posted: Fri Oct 02, 2009 7:31 pm
by fewi
Yes, that is expected behavior.
Re: NTP on Mikrotik
Posted: Wed Oct 07, 2009 4:50 pm
by marioclep
Each RB has the internet access on ehternet port ...
If you have internet access, then why don't you try to sync with a public ntp server (such as: 0.pool.ntp.org) just to find out if the problem persist?
Re: NTP on Mikrotik
Posted: Wed Oct 07, 2009 8:36 pm
by directlogic
Mario
it is sycn with ntp server .but the problem is that when it rebooted it show the 1970 date and time, so i can't get the date and time of reboot or power failure .
Re: NTP on Mikrotik
Posted: Wed Oct 07, 2009 9:01 pm
by changeip
RouterBoards still do not have batteries in them so they dont keep time on a reboot.
Sam
Re: NTP on Mikrotik
Posted: Sun Oct 11, 2009 11:14 pm
by samsung172
also make sure that mode=unicast
by default it is set to broadcast
btw... why broadcast as default? whos has an broadcasting NTP server as default at the broadcast domain?
Re: NTP on Mikrotik
Posted: Sun Oct 11, 2009 11:26 pm
by roc-noc.com
Mario
it is sycn with ntp server .but the problem is that when it rebooted it show the 1970 date and time, so i can't get the date and time of reboot or power failure .
Use a syslog server. That will at least show you the time and date when the RouterBoard starts back up. If power failures are a big problem then get a smart UPS with ethernet interface and log alarms from that.
Tom
Re: NTP on Mikrotik
Posted: Tue Oct 13, 2009 2:53 am
by marioclep
Mario
it is sycn with ntp server .but the problem is that when it rebooted it show the 1970 date and time, so i can't get the date and time of reboot or power failure .
When I said that, my idea was to find out if the RB could get the time again after reboot from a public ntp server. Also check if you have the "invalid packets" rule in your input-chain.