Community discussions

MUM Europe 2020
 
CumulussIT
just joined
Topic Author
Posts: 10
Joined: Mon Dec 03, 2012 11:15 pm

[SOLVED] - NTP client failing to synch.

Mon Dec 03, 2012 11:45 pm

Hello all! I recently got a job for CumulussIT as a PC Technician. Turns out, they operate a WISP too! and my boss charged me with solving random reboot issues on our routers. So i started googling (Keep in mind that i didn't even know Routerboard existed a few weeks ago) and i started parsing the logs, but as everytime the router reboots, the date/time changes and it's very difficult to understand the meaning of the logs, because i can't see the relation between diverse events. So i googled some more and found the answer in the NTP client that is included with Mikrotik.

Then i set up the NTP client to synch with 2 Argentine servers i KNOW for a fact they work okay.
[admin@Cerro2] /system ntp client> print
          enabled: yes
             mode: unicast
      primary-ntp: 200.80.32.172
    secondary-ntp: 190.2.0.201
  dynamic-servers: 
           status: started
[admin@Cerro2] /system ntp client> 
But the clock doesn't synch :(

So i said " Just to try, let's use a PC as a NTP server"

So i followed this tutorial:

http://social.technet.microsoft.com/For ... a0c014266/

Then i set the IP of my router to be in the same range as the PC, and disabled Windows Firewall to let packets come thru and the NTP server synchs with my PC.

So i tought "Hey, maybe for some reason the router can't connect to an NTP server outside my local network"

So i tried this on my PC:
Microsoft Windows [Versión 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos.

C:\Users\oficina>ping 200.80.32.172

Haciendo ping a 200.80.32.172 con 32 bytes de datos:
Respuesta desde 200.80.32.172: bytes=32 tiempo=222ms TTL=53
Respuesta desde 200.80.32.172: bytes=32 tiempo=167ms TTL=53
Respuesta desde 200.80.32.172: bytes=32 tiempo=167ms TTL=53
Respuesta desde 200.80.32.172: bytes=32 tiempo=166ms TTL=53

Estadísticas de ping para 200.80.32.172:
    Paquetes: enviados = 4, recibidos = 4, perdidos = 0
    (0% perdidos),
Tiempos aproximados de ida y vuelta en milisegundos:
    Mínimo = 166ms, Máximo = 222ms, Media = 180ms

C:\Users\oficina>
So, from my PC i can reach the time synch server, but when I try that on the router, i get this:
[admin@Cerro2] > ping 
address: 200.80.32.172
HOST                                     SIZE TTL TIME  STATUS                   
                                                        no route to host         
                                                        no route to host         
                                                        no route to host         
                                                        no route to host         
                                                        no route to host         
                                                        no route to host         
    sent=6 received=0 packet-loss=100% 

[admin@Cerro2] > 
So, evidently, from the router, i can't reach the NTP server.

I have checked firewall, services, everything, seems okey, but still the router can't access the NTP server and can't find a solution to this problem. I have googled a lot but can't find a solution :(

I am sure that i am missing something that is pretty obvious lol.... so ANY help would be greatly appreciated, i am stuck and can't progress. But with a little pointing in the right direction i am confident i can learn more and become proficient ith Mikrotik routers.
Last edited by CumulussIT on Wed Dec 05, 2012 4:46 pm, edited 1 time in total.
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1122
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: NTP client failing to synch.

Tue Dec 04, 2012 3:05 pm

Post the output of "/ip route print"
Unimus - configuration management, automation and backup solution
Mass Config Push, network-wide RouterOS upgrades, and more!
 
CumulussIT
just joined
Topic Author
Posts: 10
Joined: Mon Dec 03, 2012 11:15 pm

Re: NTP client failing to synch.

Tue Dec 04, 2012 4:46 pm

Hello and thank you for your time! Here it is what you requested :) cheers
[admin@Cerro2] > ip
[admin@Cerro2] /ip> route
[admin@Cerro2] /ip route> print
Flags: X - disabled, A - active, D - dynamic, 
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADC  192.168.3.0/24     192.168.3.35    bridge1                   0
[admin@Cerro2] /ip route> 
 
CumulussIT
just joined
Topic Author
Posts: 10
Joined: Mon Dec 03, 2012 11:15 pm

Re: NTP client failing to synch.

Tue Dec 04, 2012 5:15 pm

Hey thank you for your time! here it is what you requested :)
[admin@Cerro2] > ip
[admin@Cerro2] /ip> route
[admin@Cerro2] /ip route> print
Flags: X - disabled, A - active, D - dynamic, 
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADC  192.168.3.0/24     192.168.3.35    bridge1                   0
[admin@Cerro2] /ip route> 
Thanks again for your time and patience with a n00b.
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1122
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: NTP client failing to synch.

Wed Dec 05, 2012 12:28 pm

You dont have a default route, so this router doesnt know how to get to any other IP then 192.168.3.0/24.

The computer you were pinging 200.80.32.172 from does not have this router as its gateway either then.
Unimus - configuration management, automation and backup solution
Mass Config Push, network-wide RouterOS upgrades, and more!
 
CumulussIT
just joined
Topic Author
Posts: 10
Joined: Mon Dec 03, 2012 11:15 pm

Re: NTP client failing to synch.

Wed Dec 05, 2012 2:10 pm

Yeah, i was connecting from our LAN, the routers are in towers in a nearby mountain. So, i should add a route that tells the router what to do for EVERY ip i want it to connect to? or it's more like some sort of generic path???

I am sorry if this question is stupid, i don't even truly uderstand how a routerboard works nor how's our network designed/implemented, and still here i am, tryin to solve a problem on a routerboard lol... Corporations :D
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1122
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: NTP client failing to synch.

Wed Dec 05, 2012 3:45 pm

You need to learn basic TCP/IP if you want to do networking :D

The routing table tells the router what to do with packets. You only have a route for the 192.168.3.0/24 subnet. So IPs other then that subnet, the router doesnt know where to send packets. So you get the "no route to host" error.

Add a default route: "/ip route add distance=1 dst-address=0.0.0.0/0 gateway=[GW IP]"
Change the [GW IP] for an IP address of the gateway you want to use.
Unimus - configuration management, automation and backup solution
Mass Config Push, network-wide RouterOS upgrades, and more!
 
CumulussIT
just joined
Topic Author
Posts: 10
Joined: Mon Dec 03, 2012 11:15 pm

Re: NTP client failing to synch.

Wed Dec 05, 2012 4:31 pm

I get it now! i should add a route TO MY GATEWAY!!! It was pretty obvious after you explained it :D
[admin@Cerro2] > ping http://www.google.com
HOST SIZE TTL TIME STATUS
173.194.42.16 56 56 42ms
173.194.42.16 56 56 65ms
173.194.42.16 56 56 74ms
173.194.42.16 56 56 60ms
173.194.42.16 56 56 36ms
173.194.42.16 56 56 40ms
sent=6 received=6 packet-loss=0% min-rtt=36ms avg-rtt=52ms max-rtt=74ms

[admin@Cerro2] >
It works!!!!!!!!! cheers! you are awesome! thank you for your time!

Ntp synched automatically :)

I just needed a little push (well to be honest a big shove :P) on the right direcion.
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1122
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: NTP client failing to synch.

Wed Dec 05, 2012 4:35 pm

Actually, you are adding a route to 0.0.0.0/0 (which is every single IP there is, since its a /0 subnet)
And you are then telling the router to send packets for those IPs, to the gateway.
The 192.168.3.0/24 has priority, since its a smaller IP segment, so those packets, since that subnet is directly connected to the RB, will be sent derectly to the interface (bridge1 in your case)

So you communicate with the 192.168.3.0/24 directly on the bridge1 interface, but for the rest of the IP space, you communicate through the gateway.
Unimus - configuration management, automation and backup solution
Mass Config Push, network-wide RouterOS upgrades, and more!
 
CumulussIT
just joined
Topic Author
Posts: 10
Joined: Mon Dec 03, 2012 11:15 pm

Re: [SOLVED] - NTP client failing to synch.

Wed Dec 05, 2012 4:50 pm

Yes it makes sense... i even can understand it when you put it that way lol! Downloading Cisco CCNA as we speak... Networking was never my forte, time to correct that :) thanks again
 
faaw
just joined
Posts: 13
Joined: Mon Jul 22, 2013 3:56 am

Re: [SOLVED] - NTP client failing to synch.

Mon Aug 19, 2013 3:03 am

I was have the same problem with RB750 GL
and this way solve it
thanks alot

Who is online

Users browsing this forum: alanpatx, barracuda, BartoszP, MSN [Bot] and 110 guests