Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenNTPD doesn't work if there's packet loss #47

Open
fejesjoco opened this issue Jan 28, 2018 · 0 comments
Open

OpenNTPD doesn't work if there's packet loss #47

fejesjoco opened this issue Jan 28, 2018 · 0 comments

Comments

@fejesjoco
Copy link

I'm using Debian Buster. It appears that my network has a 20-40% packet loss on NTP UDP packets. This amount of NTP queries never get a response. I really don't know why. My ISP is upc.ch, I have a good connection otherwise. My machine is connected to their modem via UTP. I tried using various pool servers, all behave the same way.

Based on the source code, OpenNTPD has a counter for every server from 0 to 10, every response increments it by one, and a timeout (or a lost packet in my case) halves it. A server must have a score of at least 6 to be considered. Even in the best case, even just one failure is heavily penalized (10 to 5 invalid immediately).

In my network, this scoring algorithm basically never allows any server to reach a good state. The default Debian config gives me 20 servers, most of the time I see 0/20 valid, sometimes 1/20 or 2/20. When there are some valid servers, my clock becomes synchronized, but this doesn't last long.

As a comparison, I installed the ntp package. With that I can sync in 1-2 minutes. It doesn't seem to have any issues with the packet loss. It can be clearly seen from the reachability stats of ntpq that the packet loss is there and it's bad. But it just works.

Because UDP is unreliable by design, and ntp works perfectly with the same setup, I would expect OpenNTPD to work as well, and be more lenient towards packet loss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant