Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd)

    Scheduled Pinned Locked Moved General pfSense Questions
    136 Posts 14 Posters 32.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JKnottJ
      JKnott @stephenw10
      last edited by

      @stephenw10 said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

      @dennypage said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

      There's a 37 second difference.

      Gah. 😵 indeed!

      That's already adjusted for with UTC.

      PfSense running on Qotom mini PC
      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
      UniFi AC-Lite access point

      I haven't lost my mind. It's around here...somewhere...

      1 Reply Last reply Reply Quote 0
      • dennypageD
        dennypage @JKnott
        last edited by

        @JKnott While UTC uses TAI as the basis for Top Of Second (TOS), TAI does not have any concept of leap. UTC, which does have leap, is the basis for NTP.

        1 Reply Last reply Reply Quote 0
        • Sergei_ShablovskyS
          Sergei_Shablovsky @JKnott
          last edited by Sergei_Shablovsky

          @JKnott said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

          @Sergei_Shablovsky said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

          If I understand all ā€œtime cardā€ docs and specifications, bulky and proprietary rack time-servers would be replaced by tiny 1CPU server with 2xPSU and this ā€œtime cardā€ (and a little bit antennas from server room to rooftop;)

          BTW, I cannot read anything about how to resolving radio interference on antennas in server room… Looks like developers are focused more on electronics and less on radio/antennas-related things. Am I wrong?

          I'm not sure what you're getting at, but if that's a concern just put the receiver someplace other than the server room. In fact, GPS might not work at all in a server room simply because the signal is blocked by reinforced concrete.

          I say You more: even ordinary green leafs may blocking the GPS signal from satellite…:)

          Maximum shielded wire connection to GPS satellite (!!!, no GSM-source from cellular base station nearby!) antenna to small electrical scheme and than for motherboard’s DB-9 of RS-232 MUST BE LESS than ~15m.

          This also mean that You need place the GPS satellite antenna to rooftop where are 180 degrees on both X and Y axes of clear sky view to receive signals from no less than 3 satellite. And no any skyscrapers nearby, no any big trees or hi-powered (3-5-20kWA electrical lines) on a distance 50-200m.

          So, back to the server room, as a result You have only 2-3m of this shielded wire from hole in the wall to DB-9 of RS-232 in server.

          But anyway, it’s not ā€œjust put the GPS antenna somewhere out of the server roomā€. Definitely not.

          —
          CLOSE SKY FOR UKRAINE https://youtu.be/_tU1i8VAdCo !
          Help Ukraine to resist, save civilians people’s lives !
          (Take an active part in public protests, push on Your country’s politics, congressmans, mass media, leaders of opinion.)

          RobbieTTR JKnottJ 2 Replies Last reply Reply Quote 1
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            I have found it surprising how well GPS works with a restricted view of the sky. Of course when you look into GPS it's amazing it works at all. šŸ˜‰

            1 Reply Last reply Reply Quote 1
            • RobbieTTR
              RobbieTT @Sergei_Shablovsky
              last edited by

              @Sergei_Shablovsky said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

              Maximum shielded wire connection to GPS satellite (!!!, no GSM-source from cellular base station nearby!) antenna to small electrical scheme and than for motherboard’s DB-9 of RS-232 MUST BE LESS than ~15m.

              This also mean that You need place the GPS satellite antenna to rooftop where are 180 degrees on both X and Y axes of clear sky view to receive signals from no less than 3 satellite. And no any skyscrapers nearby, no any big trees or hi-powered (3-5-20kWA electrical lines) on a distance 50-200m.

              So, back to the server room, as a result You have only 2-3m of this shielded wire from hole in the wall to DB-9 of RS-232 in server.

              But anyway, it’s not ā€œjust put the GPS antenna somewhere out of the server roomā€. Definitely not.

              I scratching my head a little at what you are aiming at but little of what you say here is true. I can help to resolve these errors though.

              You don't need an antenna from a roof to a server; indeed, in many situations this would be a bad idea. GPS time source equipment can be colocated with, close to or even combined with the antenna. This time source can then be distributed by the network cabling - it is a network time after all.

              You don't need 180Āŗ X & Y view of a clear sky - far from it. With that kind of view you would, at times, exceed 12 satellites. Additionally, GPS orbits are far from geostationary. The rip around our planet pretty quickly in predictable patterns for the GPS almanac to form a dynamic lattice that, from a receiver's perspective, will provide suitable sources with only a limited amount of LoS available. It is a far cry from where we started, when we had a limited constellation and warfare cognisant of GPS-dawn and sunset.

              Regarding satellites needed, for a meaningful position you really need 4 satellites, dropping to 3 if a known or predictable height is available. But yes, if you are driving your server room and roof around Manhattan then having more satellites available would help. If your building is more known for being immovable and even surveyed as such then you only need a view of 1 GPS satellite at a time to use GPS timing.

              Of course, GPS is not for everyone and even it it was the usual redundancy and diversity considerations would see it augmented by dedicated fibre, ToD receivers, GSM, ToD beacons plus atomic clocks et al. Whilst my experience is more at the strategic scale of GPS management I do have a Veracity Timenet GPS unit on my home network. My network rack is surrounded by concrete and below any achievable LoS and I would never run an external antenna directly to it.

              I do have an external pole-mount antenna in a box but waiting for the next round of roof work to fit it. I'm in no hurry as the network GPS receiver has a simple patch antenna on an upstairs window with a short cable to the receiver, which is plugged into the nearby ethernet socket. Even In this 'terrible' location it has at least 8 satellites to work with.

              Not everything is difficult.

              ā˜•ļø

              RobbieTTR johnpozJ JKnottJ 3 Replies Last reply Reply Quote 3
              • RobbieTTR
                RobbieTT @RobbieTT
                last edited by RobbieTT

                This is how craptostic a timing reference can be located - at the rarely photographed arse-end of my network. The blue arrows are the GPS/PPS network timing box, stuck on the backside of a bedroom TV and the patch antenna sitting on a window sill:

                alt text

                The secret to comedy.

                ā˜•ļø

                stephenw10S 1 Reply Last reply Reply Quote 2
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator @RobbieTT
                  last edited by johnpoz

                  @RobbieTT yeah I use to have the antenna just sitting on the top of my desk in my office and would work.. I did move it to the garage a while back and the antenna sits on top of the garage door railing.. Can see more sats from there. I believe my problems in the office started after we added way more insulation in the attic.. There is no insulation above it where its at in the garage.

                  sats.jpg

                  The pi sits behind my TV in living room, where the cable runs through the wall into the garage..

                  I am not a guru when it comes to the stuff, but it is fascinating to me. From my understanding the time from the sats to be accurate you need to work out some math and set a fudge, etc. to account for stuff. I was just more after the pps signal the gpshat provides once it can see enough sats.. I never bothered to work out the correct fudge factor

                  pps8.jpg

                  While I might be off by a few ms of "true" time.. It was a fun project to setup, and for sure is close enough for me.. My little pi ntp server also polls just ntp servers out on the internet. From the output of ntpq the gps time on shm (0) is not even a candidate, if the pps source would go away.

                  Which was my problem I was seeing, couldn't see enough sats to get sync I believe and so pps was never kicking in. Once I moved the antenna to the garage that started working again.. From the output of cgps shows I can see a lot of sats.

                  But it for sure worked before just with the antenna in my office.. Not even near a window, etc.

                  I think the total cost, with the pi was under a hundred bucks total.. The pi, the hat, the little antenna, everything. And I already had the pi so cost of the project was just the hat, the antenna to be honest.. ntp and talking to sats is for sure a fun little project, if this sort of stuff interests you.. And can be done for very reasonable "hobby" money if you will.

                  Is my little ntp server providing "true" time that you would need in some scientific setting - prob not.. But it very stable, ie it doesn't drift much and I like having it running it on my network and syncing all my devices too it.. Even if its off by a few ms from "true"..

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                  1 Reply Last reply Reply Quote 1
                  • stephenw10S
                    stephenw10 Netgate Administrator @RobbieTT
                    last edited by

                    @RobbieTT said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

                    The secret to comedy.

                    Ha šŸ˜‚

                    1 Reply Last reply Reply Quote 0
                    • JKnottJ
                      JKnott @Sergei_Shablovsky
                      last edited by

                      @Sergei_Shablovsky said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

                      But anyway, it’s not ā€œjust put the GPS antenna somewhere out of the server roomā€. Definitely not.

                      You put the receiver and NTP server elsewhere, where there is a signal. Nothing new here. Often, both devices are in the same box. Here is one example.

                      PfSense running on Qotom mini PC
                      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                      UniFi AC-Lite access point

                      I haven't lost my mind. It's around here...somewhere...

                      dennypageD 1 Reply Last reply Reply Quote 0
                      • JKnottJ
                        JKnott @RobbieTT
                        last edited by

                        @RobbieTT said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

                        GSM

                        GSM is dying, if not already dead in most areas. These days, a 4G or 5G network can provide 1.5 µS accuracy. It will likely work better than GPS in many locations.

                        PfSense running on Qotom mini PC
                        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                        UniFi AC-Lite access point

                        I haven't lost my mind. It's around here...somewhere...

                        RobbieTTR 1 Reply Last reply Reply Quote 0
                        • RobbieTTR
                          RobbieTT @JKnott
                          last edited by

                          @JKnott said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

                          @RobbieTT said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

                          GSM

                          GSM is dying, if not already dead in most areas. These days, a 4G or 5G network can provide 1.5 µS accuracy. It will likely work better than GPS in many locations.

                          Not sure why you picked-out GSM time reference from the list but the world is a big place and GSM-based time reference systems are out there in use for everything from military, police, ATC, banking, PoS, trading, networking, power networks, gas network, train signal & monitoring... and the list goes on.

                          I happen to live on a bit of the planet that is more advanced than other areas and we have a desire is to cease GSM use by 2033 (IIRC) but given that there are still major infrastructure elements that are not on track to meet that deadline some slippage will probably occur.

                          Again, we are talking timing reference use, not using a phone to call your kids. Most of the population of any given country does not have a clue about RF spectrum management let alone any idea* as to what uses or depends on GSM.

                          ā˜•ļø

                          [* Ok, this bit varies by country. Here in the UK there is growing public awareness that the typical domestic gas and electric meter will become 'dumb' soon and that medical service providers for home equipment (dialysis, CPAP, respirators etc) have quite a problem. But the average punter has no idea about substations, sewage, hydroelectrics or indeed all the other infra held together on obsolescent tech.]

                          JKnottJ 1 Reply Last reply Reply Quote 1
                          • JKnottJ
                            JKnott @RobbieTT
                            last edited by

                            @RobbieTT

                            In many areas, GSM is gone. On my carrier, it's already been reduced to 1 band from 2. Also, spectrum costs the cell companies a lot of money. Do you think they're going to leave some spectrum they already have to sit almost unused and then spend on more spectrum? Already we're hearing about things like security systems and more not working because 2G & 3G are being discontinued. The world moves on and sticking with obsolete tech is not the way to go, even if there still is some GSM in your area. A few years ago, a friend received a free 4G phone because the company he was with was in the process of shutting down 2G & 3G.

                            So, hang onto your GPS time source for as long as you can, but don't be surprised if it stops working some day.

                            Another source which you didn't mention was NTSC TV signals. Some stations transmitted the time during the horizontal blanking interval and the colour burst oscillator was an excellent stable signal. Are those stations supposed to keep broadcasting, even though NTSC is rarely used these days?

                            PfSense running on Qotom mini PC
                            i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                            UniFi AC-Lite access point

                            I haven't lost my mind. It's around here...somewhere...

                            RobbieTTR 1 Reply Last reply Reply Quote 0
                            • dennypageD
                              dennypage @JKnott
                              last edited by

                              @JKnott said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

                              Here is one example.

                              TM1000A. I have one of those in a box somewhere as well, along with a TM2000A. The TM1000A NTP implementation was written in microcode, and was one of the very few to have implemented the broadcast mode of NTP. The TM2000A was focused on PTP, which it was reasonably good at, but instead of a microcode implementation for NTP it used busybox which made it a very poor NTP server.

                              1 Reply Last reply Reply Quote 0
                              • RobbieTTR
                                RobbieTT @JKnott
                                last edited by

                                @JKnott said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

                                @RobbieTT

                                Do you think they're going to leave some spectrum they already have to sit almost unused and then spend on more spectrum? The world moves on and sticking with obsolete tech is not the way to go, even if there still is some GSM in your area.

                                Whilst I was a member of the UK Frequency Allocation Committee we did cooperate with other national and international bodies (FCC, WRC etc) - otherwise how would we know, for example, that Tajikistan (amongst others) uses 25 kHz for time signals. It's been a few years since I left that role but the RF spectrum remains stubbornly fixed.

                                Again, please don't confuse the GSM you used to use for phone calls with the use of GSM time references or other industrial uses.

                                ā˜•ļø

                                JKnottJ 1 Reply Last reply Reply Quote 1
                                • JKnottJ
                                  JKnott @RobbieTT
                                  last edited by

                                  @RobbieTT

                                  There are a lot of time signals, on a variety of frequencies, around the world. They are broadcast stations and not likely to go away. Is there some other GSM out there, beyond the cell phone network? Also, CDMA was the 2G tech used for accurate time keeping, not GSM, which uses TDMA.

                                  If it is the GSM cell network you're referring to then yeah, it's going away in the not too distant future. My friend's phone that had to be replaced was 2G CDMA.

                                  BTW, I have a clock that's supposed to set itself with the 60 KHz WWVB signal. However, it hasn't worked in years and didn't very well when it did. I have also used WWV as a frequency standard and it & CHU for time of day. As I said, lots of time signals around the world.

                                  PfSense running on Qotom mini PC
                                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                  UniFi AC-Lite access point

                                  I haven't lost my mind. It's around here...somewhere...

                                  1 Reply Last reply Reply Quote 0
                                  • Sergei_ShablovskyS
                                    Sergei_Shablovsky @johnpoz
                                    last edited by Sergei_Shablovsky

                                    @johnpoz said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

                                    @sergei_shablovsky said in Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

                                    You have separate machine especially for timeserver?

                                    Yeah I have a raspberry pi with a gps hat that I use as my networks stratum 1 server, and also serve this up to the ntp pool via both ipv4 and IPv6 ;)

                                    pool.jpg

                                    BTW, why You have so much distortion in offsets? (Probably Pi not sufficient horsepower to keep many requests? What is loading of CPU/RAM/SSD?)

                                    This is our recent
                                    8E1853B2-6320-48C8-B959-A8D087DBBA9F.jpeg

                                    —
                                    CLOSE SKY FOR UKRAINE https://youtu.be/_tU1i8VAdCo !
                                    Help Ukraine to resist, save civilians people’s lives !
                                    (Take an active part in public protests, push on Your country’s politics, congressmans, mass media, leaders of opinion.)

                                    1 Reply Last reply Reply Quote 0
                                    • NollipfSenseN
                                      NollipfSense @RobbieTT
                                      last edited by

                                      @RobbieTT said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

                                      Dedicated NTP time sources don't have to be expensive or be a hacky DIY job on a RPi.

                                      I am watching this reasonable priced one on eBay: https://www.ebay.com/itm/385524217975

                                      pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
                                      pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

                                      dennypageD 1 Reply Last reply Reply Quote 0
                                      • dennypageD
                                        dennypage @NollipfSense
                                        last edited by

                                        @NollipfSense Haven't tested one of those myself, but more information can be found here: https://fc-ntp-100.toimii.fi.

                                        FWIW, at 0.5-2ms the advertised accuracy for NTP on the LAN is low. This implies a simplistic NTP implementation without hardware timesamping.

                                        For around the same price, you could do a Pi.

                                        NollipfSenseN 1 Reply Last reply Reply Quote 0
                                        • NollipfSenseN
                                          NollipfSense @dennypage
                                          last edited by

                                          @dennypage said in Chrony, PTP, Network Time Security (NTS, NTPsec) to replace unsecure/old NTP (ntpd):

                                          here: https://fc-ntp-100.toimii.fi.

                                          Cool...thank you for sharing.

                                          pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
                                          pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.