Re: [Ntp] NTP over PTP

Miroslav Lichvar <> Tue, 29 June 2021 09:39 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 9402B3A2D21 for <>; Tue, 29 Jun 2021 02:39:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.996
X-Spam-Status: No, score=-2.996 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.198, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id XMNLtIK5cHKn for <>; Tue, 29 Jun 2021 02:39:45 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id DC6DC3A2D1E for <>; Tue, 29 Jun 2021 02:39:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=mimecast20190719; t=1624959583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LBwoiISz6FCuvpqslPkBRzygWHj9SwXEh4/gzcVTsVY=; b=ilgD2e0VDDiBTrlKOnriX497DNmvyD6ZqMDnyHphq4U3PlDoYf0W7olV7gMFTpv5shnMVP /i4jjfCZq81ExpQ3piG76BI6lUPnQWqA+i9Bs1x6mI8FbnipDsjyxBVOi+xPvuJu1Ap5Sn cjyOm7fY1FZZWuzMRdQ+YfPfBtuNhT0=
Received: from ( []) (Using TLS) by with ESMTP id us-mta-327-YzaPe-FuNUSttZGo_5DxLw-1; Tue, 29 Jun 2021 05:39:42 -0400
X-MC-Unique: YzaPe-FuNUSttZGo_5DxLw-1
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 07FC11019983; Tue, 29 Jun 2021 09:39:41 +0000 (UTC)
Received: from localhost ( []) by (Postfix) with ESMTPS id 50D025C1D1; Tue, 29 Jun 2021 09:39:40 +0000 (UTC)
Date: Tue, 29 Jun 2021 11:39:38 +0200
From: Miroslav Lichvar <>
To: Heiko Gerstung <>
Cc: "" <>
Message-ID: <YNrqWjHPtC7ToAL8@localhost>
References: <YNRtXhduDjU4/0T9@localhost> <> <YNnSj8eXSyJ89Hwv@localhost> <> <YNrDGy2M2hpLz9zc@localhost> <>
MIME-Version: 1.0
In-Reply-To: <>
X-Scanned-By: MIMEDefang 2.79 on
Authentication-Results:; auth=pass smtp.auth=CUSA124A263
X-Mimecast-Spam-Score: 0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
Archived-At: <>
Subject: Re: [Ntp] NTP over PTP
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Time Protocol <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 29 Jun 2021 09:39:48 -0000

On Tue, Jun 29, 2021 at 09:15:22AM +0200, Heiko Gerstung wrote:
> > On Mon, Jun 28, 2021 at 05:02:43PM +0200, Heiko Gerstung wrote:
> >> > The unicast mode seems to be intended for networks with partial
> >> > on-path hardware support, where requirements on accuracy are less
> >> > strict, and I think this might already be better supported by NTP.
> >> They might be less strict but that does not mean they are worse/equal
> >> compared to NTP.
> > 
> > How so?
> Because of the removal of jitter/delay variation in the network stack and OS layer (kernel) of the server and the client. 

That jitter/delay has no impact on PTP or NTP measurements when using
hardware timestamping. Even with software timestamps they can be
eliminated if the timestamp can be captured in the network driver
right before passing the packet to hardware, as most drivers on Linux
can do.

> > You said unicast transparent clocks don't really exist. That would be
> > the only advantage of unicast PTP. Boundary clocks could fully support
> > hardware-timestamped NTP if someone was actually interested in
> > implementing that.
> I was wrong, or better: my knowledge was outdated. Arista for example supports unicast in their switches now.

Ok, I could extend the NTP-over-PTP draft to take advantage of that
if the support is expected to spread.

> > Without full on-path support NTP should generally perform better than
> > PTP as it doesn't assume network has a constant delay.
> Why do you think PTP assumes a constant network delay? PTP is measuring the delay constantly in both directions and calculates the round trip.

Yes, it does, but it is separate from the offset calculation.

The calculation is described in section 11.2 of 1588-2019. It uses
<meanDelay> and there is only the TX and RX timestamp of the sync
message like in the NTP broadcast mode. If the distribution of the
actual delay is not symmetric, as is common without full on-path
support, the average error of the measurements will not even get close
to zero. PTP relies on full hardware support. Without that, it
generally cannot perform as well as NTP.

Another issue with using PTP in network without PTP support is RX
timestamping fixed to the beginning of the message. If the server is
on a 1Gb/s link and the PTP client is on a faster link, there will be
an asymmetry of hundreds of nanoseconds due to the asymmetric delay
in forwarding of messages between different link speeds.

> > In the context of the drafts we are discussing here, I think it might
> > be easier for an existing PTP implementation to add support for
> > NTP+NTS than add NTS4UPTP.
> We are maintaining three different PTP implementations here at Meinberg and I can tell you that this is not true. 

I don't know what implementations are those, but at least for the
well-known open-source implementations I think it would be.

> I did not say that hardware is not timestamping PTP event messages that carry a TLV. I just pointed out that some of the hardware timestampers might look at the length of a packet and do not timestamp anything that is longer then X bytes. A sync message is 44 bytes plus maybe 26 bytes for the AUTENTICATION_TLV.  If you remove the requirement for the AUTHENTICATION_TLV because you want to run NTS over PTP, your PTP "header" is 44 bytes + 48 bytes for the NTP header + anything that NTS adds (Unique Identifier EF, NTS Authentication and Encrypted Extension Fields EF, at least one NTS Cookie EF). It is a bit complicated (for me) to calculate the total maximum size of such an NTS over PTP packet, but I am guessing that you will end up with more than 128 bytes, which might be a limit packet matching algorithms have for quickly identifying if this can be a PTP event message. 

Ok, so it's not about the message having a fixed length, but a maximum
length. That looks like a very odd quirk. Do you have a specific
example of such a hardware?

Miroslav Lichvar