Skip to content

Feature Request: Support for Source Prioritization/Weighting #2305

Description

@upmcplanetracker

I use ntpd-rs on a mobile laptop running Ubuntu 26.04 that toggles between a home network that runs NTP intercept via a Firewalla Gold Plus router (with a local server at 192.168.1.1) and public Wi-Fi (where I rely on nts servers).

Currently, the daemon treats all configured sources as equal candidates for synchronization once they are reachable. This means that even when I am at home, the daemon might occasionally prefer the external NTS sources or spend time balancing between them, rather than strictly pinning to the local, low-latency Firewalla source.

Requested Feature:
It would be ideal to have a priority or weight field in the [[source]] configuration.

High priority sources would be used exclusively if reachable.

If high priority sources are unreachable, the daemon would fall back to lower priority/secondary sources.

This would ensure my mobile device maintains the most consistent time-sync behavior based on the network environment it is currently in.

I have currently found a way around this with my laptop config as such:

# NTS Servers - These will "fail" at home due to Firewalla Intercept
[[source]]
mode = "nts"
address = "[time.cloudflare.com](http://time.cloudflare.com/)"

[[source]]
mode = "nts"
address = "[ntppool1.time.nl](http://ntppool1.time.nl/)"

[[source]]
mode = "nts"
address = "[ptbtime1.ptb.de](http://ptbtime1.ptb.de/)"

# Home Source
[[source]]
mode = "server"
address = "192.168.1.1"

[synchronization]
minimum-agreeing-sources = 1

but I'm wondering if there's a more elegant way than that.

thank you for all the hard work.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions