Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    StarLink as source for NTP

    Scheduled Pinned Locked Moved General pfSense Questions
    175 Posts 15 Posters 37.4k Views 16 Watching
    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.
    • D Offline
      davehart @tinfoilmatt
      last edited by

      @tinfoilmatt said in StarLink as source for NTP:

      Your comment piqued my curiosity only because this post seems to demonstrate that the StarLink NTP implementation does, in fact, reply with an REFID of ".XFAC."?

      That's actually generated by the client ntpd to indicate the local address/interface changed for the source since the last response was received. It happens as all prior results for that peer are flushed.

      1 Reply Last reply Reply Quote 3
      • stephenw10S Offline
        stephenw10 Netgate Administrator @davehart
        last edited by

        @davehart said in StarLink as source for NTP:

        It seems reasonable to do that for refids with only unprintable/invisible characters.

        You mean it could be expected to return .. if it doesn't have a printable ID value?

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          davehart @stephenw10
          last edited by

          @stephenw10 said in StarLink as source for NTP:

          @davehart said in StarLink as source for NTP:

          It seems reasonable to do that for refids with only unprintable/invisible characters.

          You mean it could be expected to return .. if it doesn't have a printable ID value?

          Exactly. I'd like to be scolding that instead of screen-scraping the peers billboard the web UI should be using a parsing-friendly version (which ntpq calls raw), but in fact there's no raw form of the billboards. It can be done with multiple raw queries to get the list of associations and query the raw peer variables for each association, though, which is what the billboard code in ntpq is doing. Given that lots of folks have resorted to scraping it, making sure there's something in the refid field seems wise.

          1 Reply Last reply Reply Quote 2
          • D Offline
            davehart @davehart
            last edited by

            @davehart said in StarLink as source for NTP:

            I can crank out a fixed x64 binary with that info and post it.

            https://www.davehart.net/ntp/test/ntp-stable-dlh-260328.tar.gz is a private test release of mine which includes the bug 3877 fix for rejecting responses with a zero ppoll in the packet.

            The issue with the empty refid is a display issue in ntpq. That has not yet been fixed. So this will allow the Starlink to be used as a NTP source, but the column-shifting may still appear.

            1 Reply Last reply Reply Quote 0
            • D Offline
              davehart @davehart
              last edited by

              @davehart said in StarLink as source for NTP:

              @cmcdonald said in StarLink as source for NTP:

              pfSense expects refid to not be empty, so it ends up shifting all other columns over.

              Is there ever a legit condition where refid is indeed empty?

              ntpd displays text refids bracketed by periods. It seems reasonable to do that for refids with only unprintable/invisible characters. Stratum 1 sources have text refids like .GPS.

              Feel free to file a bug report at https://bugs.ntp.org/

              It's actually ntpq which brackets text refids with periods. Refids are always 32 bits, either up to 4 characters or a dotted-quad a la IPv4. However, an empty refid is displayed as an empty string. To give screen-scrapers a better chance, ".." would be preferable.

              I've filed https://bugs.ntp.org/4019 to track that change. For those interested, there are two lines in doprintpeers under the line:

              	} else if (!strcmp("refid", name)) {
              

              to update from:

              				dstadr_refid = "";
              

              to:

              				dstadr_refid = "..";
              
              R 1 Reply Last reply Reply Quote 2
              • R Offline
                Ramosel @davehart
                last edited by

                @davehart Thanks for keep us current on this.

                Rick

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

                  For those of you interested, I've created a Chrony package for pfSense.

                  1 Reply Last reply Reply Quote 2
                  • M Offline
                    me21
                    last edited by me21

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      me21
                      last edited by me21

                      The NTPd behaviour seems to be caused by this bug and seems to be included in a future version:
                      https://bugs.ntp.org/show_bug.cgi?id=3870

                      1 Reply Last reply Reply Quote 2
                      • GertjanG Offline
                        Gertjan
                        last edited by Gertjan

                        I'm looking at this thread for a couple of months now.
                        I'm not a Starlink user myself, so I don't know much about them.

                        Not this morning.

                        StarLink as source for NTP

                        By definition, a starlink 'disk' points to the open sky.
                        So, it should be able / must 'see' many satellites ... 😊
                        For me, that means is also sees GPS satellites.

                        Knowing that every two digit dollar hand hold device has a GPS receiver built in today, I asked myself : why doesn't the starlink disk include a sub one dollar GPS receiver chip ??
                        It would make the starlink disk a stratum 2 (1 ?) GSP device right out of the box - no more NTP traffic needed.
                        Afaik, these starlink satellites all have an atomic clock(or comparable) build in, needed for their exact positing and all that, so that would be a second totally free source of time.

                        Anyway, that's how I see the title "StarLink as source for NTP".
                        It could be "Starlink == real time" thus a very accurate time source.

                        edit : this thread is pretty long. Maybe this was already suggested.

                        No "help me" PM's please. Use the forum, the community will thank you.

                        M dennypageD R 3 Replies Last reply Reply Quote 0
                        • M Offline
                          Mission-Ghost @Gertjan
                          last edited by

                          @Gertjan Starlink dishes do have gps receivers in them, and they do serve GPS time to the network.

                          The issue is the NTP client in pfsense doesn’t work properly to read that time. Chronyd does work but it’s an unsupported add-on at this point. I’m getting my network time from my Starlink dish gps receiver right now and it’s very accurate as expected.

                          1 Reply Last reply Reply Quote 1
                          • dennypageD Offline
                            dennypage @Gertjan
                            last edited by

                            @Gertjan The StarLink receiver being a stratum 1 NTP time server is in the first post of the thread.

                            1 Reply Last reply Reply Quote 1
                            • R Offline
                              Ramosel @Gertjan
                              last edited by

                              @Gertjan

                              The Starlink dish itself a Stratum 1 time source. But it's operating in "the new world of GPS time" and pfSense is yet to catch up. I'm sure they will. The gent from NTP posted the issue if you read enough of this thread.

                              Here is the output when using the local dish through the Galleon utility.

                              84169ab8-1feb-4b52-a4fc-f051ee34c9f4-Galleon10-03-2026.jpg

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

                                @Ramosel said in StarLink as source for NTP:

                                operating in "the new world of GPS time"

                                I believe the ntpd issue has to do with nuances of newer versions of the NTP protocol rather than GPS.

                                FWIW, the Galleon test app looks to be pretty broken. A precision of 2.26156424291633E+74 is clearly wrong.

                                If you are running chrony, you can ask it directly what the advertised precision of a source is. Try chronyc ntpdata 192.168.100.1 and look for Precision. I would expect to see something in the range of -14 (61us) to -24 (61ns).

                                johnpozJ M R 3 Replies Last reply Reply Quote 1
                                • johnpozJ Online
                                  johnpoz LAYER 8 Global Moderator @dennypage
                                  last edited by

                                  @dennypage mine is

                                  Precision : -25 (0.000000030 seconds)

                                  Well shoot clearly my clocks are going to be way out ;)

                                  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 26.07 | Lab VMs 2.9.0, 26.07

                                  dennypageD 1 Reply Last reply Reply Quote 2
                                  • M Offline
                                    Mission-Ghost @dennypage
                                    last edited by

                                    @dennypage

                                    Not that amazing here; from my Starlink I get, via chronyc ntpdata using the command page on pfSense:

                                    Precision       : -9 (0.001953125 seconds)
                                    

                                    Interesting. I wonder why it's so different that what you expect or what Johnpoz reported.

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

                                      @johnpoz said in StarLink as source for NTP:

                                      Precision : -25 (0.000000030 seconds)

                                      Interesting -- what is the source?

                                      Some people (companies) use -25 and justify it because the GNSS chip they are using says <= 30ns. However, the precision statement should be about the entire system rather than just the GNSS. To really be -25, you really need to have <= 20ns on the GNSS chip itself, and a very deterministic microcode implementation or high resolution hardware timestamping on each step of the process.

                                      I have a few real -24s and -25s, and one -26. I'd really like to have a -27, but am not sure I'll get there. I have a reference timing chip that is reliable <= 5ns, but don't have the hardware to put with it. Sad, sad, sad. 🙄

                                      johnpozJ 1 Reply Last reply Reply Quote 0
                                      • dennypageD Offline
                                        dennypage @Mission-Ghost
                                        last edited by

                                        @Mission-Ghost said in StarLink as source for NTP:

                                        @dennypage
                                        Not that amazing here; from my Starlink I get, via chronyc ntpdata using the command page on pfSense:

                                        Precision       : -9 (0.001953125 seconds)
                                        

                                        Interesting. I wonder why it's so different that what you expect or what Johnpoz reported.

                                        To me that indicates unexpected honesty on the part of StarLink. Based on the number I'm guessing that they are using their carrier signal to communicate time rather than some form of embedded GNSS.

                                        And to be honest, I expect 2ms is sufficient for 99% of home users.

                                        chpalmerC M 2 Replies Last reply Reply Quote 0
                                        • chpalmerC Offline
                                          chpalmer @dennypage
                                          last edited by chpalmer

                                          @dennypage said in StarLink as source for NTP:

                                          And to be honest, I expect 2ms is sufficient for 99% of home users.

                                          LOL.. most home user oven clocks are >5 minutes off.. 😝

                                          Triggering snowflakes one by one..
                                          Primary- Intel(R) Pentium(R) CPU G4400 @ 3.30GHz on an M470 WG box. pfSense CE 2.8.1
                                          Lab Unit- Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box. pfSense+

                                          1 Reply Last reply Reply Quote 0
                                          • stephenw10S Offline
                                            stephenw10 Netgate Administrator
                                            last edited by

                                            If they included ntp in the oven you wouldn't have these issues. Accuracy baked in. 😉

                                            dennypageD 1 Reply Last reply Reply Quote 3
                                            • First post
                                              Last post
                                            Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                                            Privacy Policy · Cookie Policy