OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: MartB on September 08, 2021, 12:10:35 PM

Title: NTPd: Unreliable replies
Post by: MartB on September 08, 2021, 12:10:35 PM
Hey there,
i am troubleshooting slow ntp replies on my local network and i wonder if anyone could help me here.

10.0.1.1 wird verfolgt [10.0.1.1:123].
Es ist 08.09.2021 12:04:08.
12:04:08, d:+00.0001919s o:+00.7763822s  [                           | *                         ]
12:04:10, d:+00.0001735s o:+00.7764153s  [                           | *                         ]
12:04:12, d:+00.0001587s o:+00.7764470s  [                           | *                         ]
12:04:14, d:+00.0002067s o:+00.7764750s  [                           | *                         ]
12:04:16, d:+00.0008436s o:+00.7762094s  [                           | *                         ]
12:04:18, d:+00.0008367s o:+00.7762080s  [                           | *                         ]
12:04:20, d:+00.0001780s o:+00.7765668s  [                           | *                         ]
12:04:22, d:+00.0001812s o:+00.7765997s  [                           | *                         ]
12:04:24, d:+00.0001821s o:+00.7766274s  [                           | *                         ]
12:04:26, d:+00.0001996s o:+00.7766657s  [                           | *                         ]
12:04:28, d:+00.0002470s o:+00.7766922s  [                           | *                         ]
12:04:30, d:+00.0010592s o:+00.7763176s  [                           | *                         ]
12:04:32, d:+00.0002674s o:-00.0001337s  [                           *                           ]
12:04:34, Fehler: 0x800705B4
12:04:37, Fehler: 0x800705B4
12:04:40, Fehler: 0x800705B4
12:04:43, d:+00.0002189s o:-00.0001094s  [                           *                           ]
12:04:45, Fehler: 0x800705B4
12:04:48, Fehler: 0x800705B4
12:04:51, Fehler: 0x800705B4
12:04:54, d:+00.0002664s o:-00.0001332s  [                           *                           ]
12:04:56, Fehler: 0x800705B4
12:04:59, Fehler: 0x800705B4
12:05:02, Fehler: 0x800705B4
12:05:05, d:+00.0001802s o:-00.0000901s  [                           *                           ]
12:05:07, Fehler: 0x800705B4
12:05:10, Fehler: 0x800705B4
12:05:13, Fehler: 0x800705B4
12:05:16, Fehler: 0x800705B4
12:05:19, Fehler: 0x800705B4
12:05:22, Fehler: 0x800705B4
12:05:25, d:+00.0009073s o:-00.0004536s  [                           *                           ]


Not sure whats going on here, but ntpd does not seem to reply in the required manner.
No errors are logged in the ntpd syslog.

Command used to test:
w32tm /stripchart /computer:10.0.1.1
Title: Re: NTPd: Unreliable replies
Post by: gpb on September 09, 2021, 02:16:27 AM
I remember something like this happening when I was using ntp...I believe there's a setting that limits abuse from a client and starts rejecting requests...check the settings.

If not that, as a test you could try using chrony instead to see if it provides better consistency...I found it better overall (mainly I can see what hosts are requesting time most often) and it supports NTS if you have a local server (cloudflare and some servers in europe).  To disable ntpd just remove the interface selections and enable chrony after installing the plugin.
Title: Re: NTPd: Unreliable replies
Post by: MartB on September 12, 2021, 01:50:45 AM
Thanks a lot @gpb

That fixed it, behaves perfectly now!
Title: Re: NTPd: Unreliable replies
Post by: hloiter on September 12, 2021, 09:04:48 AM
Quote from: MartB on September 12, 2021, 01:50:45 AM
That fixed it, behaves perfectly now!

What solved the problem? The installation of chrony?
Title: Re: NTPd: Unreliable replies
Post by: sorano on September 12, 2021, 10:35:52 AM
Quote from: gpb on September 09, 2021, 02:16:27 AM
(mainly I can see what hosts are requesting time most often)

Where do you see that?

Answering my own question for anyone else wondering, it's not visible in the webui.

chronyc clients via cli.
Title: Re: NTPd: Unreliable replies
Post by: MartB on September 12, 2021, 01:18:22 PM
Quote from: hloiter on September 12, 2021, 09:04:48 AM
Quote from: MartB on September 12, 2021, 01:50:45 AM
That fixed it, behaves perfectly now!

What solved the problem? The installation of chrony?

Yup removed the peers from ntpd installed chrony added 4 upstream servers, changed the port to 123 and added the allowed ips. Now my hp business printer also time syncs correctly it never did that before with ntpd, for some reason.