Re: [chrony-dev] [RFC PATCH 0/9] Allow sources with same IP address and different port

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Thu, Nov 12, 2026 at 05:22:29PM +0100, Wojtek Wasko wrote:
> That makes NTP over PTP harder to roll out in an existing network.
> Enabling it incrementally next to NTP, with NTP still available as a
> fallback, typically means giving every server a second IP address.

Is it not possible to split the migration to NTP over PTP into two
phases, first configure all servers to listen on both ports and only
then start migrating the clients?

> Logs, dump file names, and chronyc output include the port when it
> isn't the NTP port, e.g. 192.0.2.1:319 or [2001:db8::1]:319, and
> chronyc accepts the same forms, plus name:port, in commands that take
> a source. Without a port, a command picks the source on the NTP port
> if there is one, so existing usage keeps working. The command protocol
> carries the port in the padding field of IPAddr, which older clients
> leave zero and ignore in reports.

This looks like a quite invasive change. I think adding the port
number to sources using a non-default port would break existing
scripts parsing chronyc output and expecting an IP address.

> There's one problem I haven't solved yet. Older daemons ignore the
> padding field in requests too, and pick the source by address only. So
> with a new chronyc and an older chronyd, "delete 192.0.2.1:319" can end
> up deleting 192.0.2.1:123 instead. I can see three ways to fix it:

The older chronyd could not have two sources with the same IP address,
so that delete command either works or fails, but doesn't delete an
unexpected source?

Anyway, this might be going against the general NTP principle that no
source should be used more than once to avoid giving it more weight in
the source selection and combining. With NTPv5 we will be able to
detect duplicated sources even with different IP addresses.

A different idea would be to support sources configured with a second
port and try switching between them. This could work with the PTP port
too. There was this idea of an alternative NTP port proposed in IETF
to get around the blocking of longer NTP packets that some ISPs have
as a mitigation for the old amplification attacks (now impacting
mostly NTS but it will impact also NTPv5), but the port allocation was
rejected by IANA (no second chances).

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/