Community discussions

MikroTik App
 
matthew
just joined
Topic Author
Posts: 10
Joined: Sat Sep 22, 2007 12:43 am
Location: Minneapolis, MN

GPS NTP Stratum (6 vs. 2)

Sat Sep 22, 2007 12:51 am

I am curious if anyone knows why when the time is set via GPS (using a serial connection), the stratum reported by the NTP server is 6. (I would presume if we're getting our time from a stratum 1 source such as GPS, it would be serving out stratum 2 time).
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: GPS NTP Stratum (6 vs. 2)

Sat Sep 22, 2007 2:26 am

I've ran into this same issue many times and emailed support about it many times. Never got a good resolution on it. They told me that it was because it hadn't been GPS synced for enough time, however I never saw anything other than 6 ... and windows won't sync with something larger than 2, so it's useless for windows most of the time.

Sam
 
keefe007
Member Candidate
Member Candidate
Posts: 125
Joined: Sun Jun 25, 2006 3:01 am

Re: GPS NTP Stratum (6 vs. 2)

Thu Dec 06, 2007 8:25 am

Its suppose to be 0, maybe 0 isn't an option.
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: GPS NTP Stratum (6 vs. 2)

Thu Dec 06, 2007 8:02 pm

MT - please fix this in the next RC. If GPS is used the stratum should be 1. Please please please with sugar on top. I'd like to quit using 3rd party NTP since I do have a GPS sitting here syncing time on the mikrotik. It's useless with a stratum 6 - no one will use it but other Mikrotik devices.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26321
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: GPS NTP Stratum (6 vs. 2)

Fri Dec 07, 2007 2:03 pm

we have changed it to 4, which windows supports (tested with the new setting). this number indicates how close you are to the time source. as GPS is connected over serial, the precision is not so high, so 0 is out of question.
 
fcwireless
newbie
Posts: 26
Joined: Mon Nov 26, 2007 6:38 am

Re: GPS NTP Stratum (6 vs. 2)

Thu Jan 31, 2008 7:06 am

First of all, stratum 0 IS the time source itself so unless you have a cesium clock or satellite counting pulsar bursts or something you should never be stratum 0.

Stratum 1 is a device connected directly to a stratum 0 device. For stratum 1 it should be perfectly acceptable to use rs232 for GPS communication of time data. Connecting a GPS to a computer and pulling time off of it makes the box the GPS is connected to a stratum 1 device.
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: GPS NTP Stratum (6 vs. 2)

Thu Jan 31, 2008 7:54 pm

Thanks for at least making it 4 ... however, it should be 1 if its coming from a GPS device. I know 4800 baud isn't that fast, but its fast enough for time sync. I don't have it handy but there is an RFC on this.

Anyhow - 4 is okay for most windows systems, however I believe there are times when windows adds a stratum to each hop and if youre using AD I believe downstream systems still won't believe it. Somewhere I read that windows will mostly need a 2 stratum or higher for things to work smoothly.
 
User avatar
stephenpatrick
Forum Veteran
Forum Veteran
Posts: 702
Joined: Fri Aug 20, 2004 12:26 pm
Location: UK
Contact:

Re: GPS NTP Stratum (6 vs. 2)

Thu Jan 31, 2008 9:20 pm

... however, it should be 1 if its coming from a GPS device.
This is related to a previous debate, "GPS wireless sync". To crudely summarise (I am not a developer) as I understand:
- Low cost GPS devices have RS232 interface
- RS232 interface has latency, and add drivers+OS, is hard to determing precisely the timings across the interface
- Some "clever code" is needed to calibrate timings across RS232 interface, and a "timing loop" to average-out "per reading" variations in latencies across the interface, to derive "true time" compared to the router's internal clock.
- This HAS been done by other software companies, I guess mostly the ones who sell GPS systems.
- There might be some open-source code to do this, I don't know.

If MT people can work out how to do this, which I guess is "measuring timing across the RS232 interface, time-averaging responses, and measuring against local router-time-clock" there could be major benefits.
A major one being, "GPS wireless sync" -
(note: WiMax base stations use similar GPS devices, Linux OS, and manage this. It can be done. Also, the Moto Canopy system has GPS sync, but not sure how it's implemented in hardware/software.)

Am sure more people more knowledgable on this topic can comment more -

Regards
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: GPS NTP Stratum (6 vs. 2)

Fri Feb 01, 2008 1:02 am

apart from wireless sync, I'm just interested in NTP stratums here ; )

http://www.mikrotik.com/testdocs/ros/2.9/

The manual even says the following:

GPS Synchronization
Stratum 1 NTP time source and location retrieval from GPS
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: GPS NTP Stratum (6 vs. 2)

Mon Aug 17, 2009 11:18 pm

Mikrotik, can you please make a GPS synced clock be a stratum 1? Active Directory won't believe anything higher than 2. Is there a reason that it can't be 1 when it has a GPS fix?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26321
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: GPS NTP Stratum (6 vs. 2)

Tue Aug 18, 2009 8:55 am

1. RouterOS clock doesn't support that kind of precision, so it would be incorrect to make it stratum 1
2. RouterBOARD serial port doesn't have the pins that are required for increased precision time from GPS.
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: GPS NTP Stratum (6 vs. 2)

Tue Aug 18, 2009 10:46 am

okay, i understand. I guess in my case I dont care about millisecond precision, only that all of my clocks are sychronized. I am having to run a windows service on another box to provide this now because my RouterOS GPS isn't trusted by anything. Maybe you could just include a warning about 'its not all that accurate but provided anyways' or something.

thanks for your reply however : )

Sam
 
ayufan
Member
Member
Posts: 334
Joined: Sun Jun 03, 2007 9:35 pm
Contact:

Re: GPS NTP Stratum (6 vs. 2)

Tue Aug 18, 2009 2:59 pm

or maybe add an option to select desired stratum?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26321
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: GPS NTP Stratum (6 vs. 2)

Tue Aug 18, 2009 3:13 pm

lately on this forum, all you want to do is break standards :)
 
ayufan
Member
Member
Posts: 334
Joined: Sun Jun 03, 2007 9:35 pm
Contact:

Re: GPS NTP Stratum (6 vs. 2)

Tue Aug 18, 2009 3:50 pm

i opt that person who uses RouterOS knows what it does :) it may be a "hidden" option only available through console... :)
 
brotherdust
Member Candidate
Member Candidate
Posts: 130
Joined: Tue Jun 05, 2007 1:31 am

Re: GPS NTP Stratum (6 vs. 2)

Thu Aug 27, 2009 5:24 pm

Thanks for answering this, normis!
 
jadx
just joined
Posts: 3
Joined: Tue Mar 16, 2010 6:22 am

Re: GPS NTP Stratum (6 vs. 2)

Tue Mar 16, 2010 7:13 am

however, it should be 1 if its coming from a GPS device. .
No. A GPS device should only be Stratum 1 if its sending PPS (Pulse Per Second) and from what I've read so far the RouterOS does not support PPS.

Mikrotik only uses NMEA so even though its from a GPS, Stratum 4 is probably as high as it should go. If you want a Stratum 1 time server you really should build your own dedicated Linux/ntpd time server with PPS.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26321
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: GPS NTP Stratum (6 vs. 2)

Tue Mar 16, 2010 8:35 am

Thanks for clarification. It's what I meant.
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: GPS NTP Stratum (6 vs. 2)

Tue Mar 16, 2010 9:18 am

"Typical GPS Performance

Since the deactivation of the Selective Availability program on May 2, 2000, most GPS receivers now produce a 1 pps output with a standard deviation of 10 ns or less. Many receivers produce frequency with an uncertainty of < 1 x 10-12 when averaged for one day. Two key factors that contribute to receiver performance are the quality of the receiver's internal oscillator, and the quality of the software algorithms that process data acquired from the satellites."

I can handle a 10ns delay... so just let me override the stratum manually if I trust it.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26321
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: GPS NTP Stratum (6 vs. 2)

Tue Mar 16, 2010 9:20 am

it's not about the GPS, it's about RouterOS clock
 
jadx
just joined
Posts: 3
Joined: Tue Mar 16, 2010 6:22 am

Re: GPS NTP Stratum (6 vs. 2)

Tue Mar 16, 2010 9:38 am

"Typical GPS Performance

Since the deactivation of the Selective Availability program on May 2, 2000, most GPS receivers now produce a 1 pps output with a standard deviation of 10 ns or less. Many receivers produce frequency with an uncertainty of < 1 x 10-12 when averaged for one day. Two key factors that contribute to receiver performance are the quality of the receiver's internal oscillator, and the quality of the software algorithms that process data acquired from the satellites."

I can handle a 10ns delay... so just let me override the stratum manually if I trust it.
Yes thats correct but the Mikrotik RouterOS does not do PPS and without PPS you will not get 10ns regardless of the quality of your GPS.

NMEA through rs232 which is what it does do can have jitter & delay of 50ms or even higher depending on hardware.

Your quote from http://tf.nist.gov/service/gpscal.htm is refering to the accuracy of the GPS clock not the clock on your router. To transfer sub 1ms time from your GPS to your NTP client/server the GPS needs to create a timestamp about 0.5sec (500ms) before the second and then generate a "Pulse" on the second. The NTP client/server then sets the time on the "pulse" which is commonly received through the DCD pin on the serial port.

Your GPS may be doing this but the RouterOS does not have any means of processing the "Pulse" (PPS) also DCD is not connected on my RB600A.

This leaves NMEA strings which due to IO delays can result in the time taking 50ms or more in transfering from the GPS to the NTP client/server. This is not suitable for a Stratum 1 time server, Stratum 2 possibly, Stratum 3 OK.
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Re: GPS NTP Stratum (6 vs. 2)

Tue Mar 16, 2010 6:12 pm

RouterOS clock, or RouterBoard clock? What about a $2,000 SuperMicro server (X86)?
 
jadx
just joined
Posts: 3
Joined: Tue Mar 16, 2010 6:22 am

Re: GPS NTP Stratum (6 vs. 2)

Tue Mar 16, 2010 9:36 pm

RouterOS clock, or RouterBoard clock? What about a $2,000 SuperMicro server (X86)?
Still the same. The Mikrotik RouterOS does not handle PPS.

Who is online

Users browsing this forum: dcavni and 29 guests