From brian at innovationslab.net  Fri Jun  1 04:09:25 2007
From: brian at innovationslab.net (Brian Haberman)
Date: Fri, 01 Jun 2007 07:09:25 -0400
Subject: [ntpwg] [Fwd: I-D ACTION:draft-ietf-ntp-ntpv4-proto-06.txt]
Message-ID: <465FFE65.4010504@innovationslab.net>

All,
     This -06 version *should* be very close to complete.  Please
provide any feedback on issues found with it.  This version does not
contain the control and monitoring specification.  The chairs have
decided to provide that in a separate internet-draft.

Regards,
Brian


-------- Original Message --------
Subject: I-D ACTION:draft-ietf-ntp-ntpv4-proto-06.txt
Date: Thu, 31 May 2007 18:50:02 -0400
From: Internet-Drafts at ietf.org
Reply-To: internet-drafts at ietf.org
To: i-d-announce at ietf.org
CC: ntpwg at lists.ntp.isc.org

A New Internet-Draft is available from the on-line Internet-Drafts
directories.
This draft is a work item of the Network Time Protocol Working Group of
the IETF.

	Title		: Network Time Protocol Version 4 Protocol And Algorithms
Specification
	Author(s)	: J. Burbank, et al.
	Filename	: draft-ietf-ntp-ntpv4-proto-06.txt
	Pages		: 108
	Date		: 2007-5-31
	
The Network Time Protocol (NTP) is widely used to synchronize
   computer clocks in the Internet.  This document describes NTP Version
   4 (NTPv4), which is backwards compatible with NTP Version 3 (NTPv3)
   described in RFC 1305, as well as previous versions of the protocol.
   It includes a modified protocol header to accommodate the Internet
   Protocol Version 6 address family.  NTPv4 includes fundamental
   improvements in the mitigation and discipline algorithms which extend
   the potential accuracy to the tens of microseconds with modern
   workstations and fast LANs.  It includes a dynamic server discovery
   scheme, so that in many cases specific server configuration is not
   required.  It corrects certain errors in the NTPv3 design and
   implementation and includes an optional extension mechanism.

A URL for this Internet-Draft is:
http://www.ietf.org/internet-drafts/draft-ietf-ntp-ntpv4-proto-06.txt


From mayer at ntp.isc.org  Fri Jun  1 05:03:00 2007
From: mayer at ntp.isc.org (Danny Mayer)
Date: Fri, 01 Jun 2007 08:03:00 -0400
Subject: [ntpwg] [Fwd: I-D ACTION:draft-ietf-ntp-ntpv4-proto-06.txt]
In-Reply-To: <465FFE65.4010504@innovationslab.net>
References: <465FFE65.4010504@innovationslab.net>
Message-ID: <46600AF4.8010709@ntp.isc.org>

Brian Haberman wrote:
> All,
>      This -06 version *should* be very close to complete.  Please
> provide any feedback on issues found with it.  This version does not
> contain the control and monitoring specification.  The chairs have
> decided to provide that in a separate internet-draft.
> 
> Regards,
> Brian
> 

That's okay as long as the NTP packet modes are defined in this draft
unless you want the separate draft as extending this draft.

Danny

From brian at innovationslab.net  Fri Jun  1 05:43:16 2007
From: brian at innovationslab.net (Brian Haberman)
Date: Fri, 01 Jun 2007 08:43:16 -0400
Subject: [ntpwg] [Fwd: I-D ACTION:draft-ietf-ntp-ntpv4-proto-06.txt]
In-Reply-To: <46600AF4.8010709@ntp.isc.org>
References: <465FFE65.4010504@innovationslab.net>
	<46600AF4.8010709@ntp.isc.org>
Message-ID: <46601464.2020402@innovationslab.net>



Danny Mayer wrote:
> Brian Haberman wrote:
>> All,
>>      This -06 version *should* be very close to complete.  Please
>> provide any feedback on issues found with it.  This version does not
>> contain the control and monitoring specification.  The chairs have
>> decided to provide that in a separate internet-draft.
>>
>> Regards,
>> Brian
>>
> 
> That's okay as long as the NTP packet modes are defined in this draft
> unless you want the separate draft as extending this draft.
> 

My thought was to leave section 3 of the protocol spec as is and have
the new control/monitoring spec refer to this one.

If you know of any other referential issues with having the control spec
separate, please let me know.

Thanks,
Brian

From mills at udel.edu  Fri Jun  1 16:56:52 2007
From: mills at udel.edu (David L. Mills)
Date: Fri, 01 Jun 2007 23:56:52 +0000
Subject: [ntpwg] [Fwd: I-D ACTION:draft-ietf-ntp-ntpv4-proto-06.txt]
In-Reply-To: <46601464.2020402@innovationslab.net>
References: <465FFE65.4010504@innovationslab.net>	<46600AF4.8010709@ntp.isc.org>
	<46601464.2020402@innovationslab.net>
Message-ID: <4660B244.80000@udel.edu>

Brian,

You might insert a note that the C&M specification will be the subject 
of a companion document. THe idea is to let the reader know this issue 
has not been forgotten.

Dave

Brian Haberman wrote:

>
> Danny Mayer wrote:
>
>> Brian Haberman wrote:
>>
>>> All,
>>> This -06 version *should* be very close to complete. Please
>>> provide any feedback on issues found with it. This version does not
>>> contain the control and monitoring specification. The chairs have
>>> decided to provide that in a separate internet-draft.
>>>
>>> Regards,
>>> Brian
>>>
>> That's okay as long as the NTP packet modes are defined in this draft
>> unless you want the separate draft as extending this draft.
>>
>
> My thought was to leave section 3 of the protocol spec as is and have
> the new control/monitoring spec refer to this one.
>
> If you know of any other referential issues with having the control spec
> separate, please let me know.
>
> Thanks,
> Brian
> _______________________________________________
> ntpwg mailing list
> ntpwg at lists.ntp.isc.org
> https://lists.ntp.isc.org/mailman/listinfo/ntpwg


-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ntp.isc.org/pipermail/ntpwg/attachments/20070601/8ac25722/attachment.html 

From karen.odonoghue at navy.mil  Fri Jun  8 09:01:36 2007
From: karen.odonoghue at navy.mil (Odonoghue, Karen F CIV NSWCDD, W13)
Date: Fri, 8 Jun 2007 11:01:36 -0500
Subject: [ntpwg] WG LAST CALL: draft-ietf-ntp-ntpv4-proto-06.txt
References: <AC6455CDE5CB824496F752331DE8C2D00BCCB477@NAEAMILLEX01VA.nadsusea.nads.navy.mil>
Message-ID: <2E44C2268B59514C89AE2CB514D15ACAD2E2AA@NAEAMILLEX01VA.nadsusea.nads.navy.mil>

This message initiates a NTP working group last call on the document: 

     Title: Network Time Protocol Version 4 Protocol And 
        Algorithms Specification 
     Filename: <draft-ietf-ntp-ntpv4-proto-06.txt> 

The purpose of this WG last call is to ensure that this 
document is ready to be forwarded to the IESG for approval 
and publication as a Proposed Standard. 

As part of this last call process, we are asking that working 
group members do the following: 

1. Review the document for both technical and editorial 
errors.  Technical issues should be sent to the NTPWG mailing 
list (ntpwg at lists.ntp.org) for discussion and resolution. 
Editorial comments may be sent either to the mailing list or 
directly to the document editor (Jim Martin, jim at daedelus.com). 

2.  Post to the mailing list your position on whether or not 
this document is ready to be forwarded for publication. 

The last call period will last two weeks, ending on Friday,  22 June, 2007. 

Upon completion of the last call, the WG chair(s) will take 
action based upon the consensus of the WG. 

Regards, 
Karen O'Donoghue and Brian Haberman 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ntp.isc.org/pipermail/ntpwg/attachments/20070608/8ccaac84/attachment.html 

From sla at ucolick.org  Fri Jun  8 12:09:43 2007
From: sla at ucolick.org (Steve Allen)
Date: Fri, 8 Jun 2007 12:09:43 -0700
Subject: [ntpwg] Comments on draft-ietf-ntp-ntpv4-proto-06
In-Reply-To: <20070313223030.GA2809@ucolick.org>
References: <45F2243C.1030506@udel.edu>
	<2E44C2268B59514C89AE2CB514D15ACA03C2AC3B@NAEAMILLEX01VA.nadsusea.nads.navy.mil>
	<20070313223030.GA2809@ucolick.org>
Message-ID: <20070608190943.GA1968@ucolick.org>

I repeat my request for a change in the explanation of UTC
and the inclusion of two more references.

On Tue 2007-03-13T15:30:30 -0700, Steve Allen hath writ:
> Section 4, 1st paragraph
>
> The following text does not direct the reader to the definitive
> references:
>
>       The Coordinated Universal Time (UTC) timescale represents mean
>       solar time as disseminated by national standards laboratories.
>
> A better text would be
>
>       The Coordinated Universal Time (UTC) timescale is defined by
>       ITU-R TF.460.  Under the auspices of the Metre Convention of
>       1865, in 1975 the CGPM strongly endorsed the use of UTC as the
>       basis for civil time.
>
> This implies adding these to the section of Informative References
>
> International Telecommunications Union,
> "Standard-frequency and time-signal emissions",
> ITU-R TF.460,
> http://www.itu.int/rec/R-REC-TF.460/en
>
> General Conference on Weights and Measures,
> Resolution 5 of the 15th CGPM,
> Comptes Rendus de la 15e CGPM, 1976
> http://www1.bipm.org/jsp/en/ViewCGPMResolution.jsp?CGPM=15&RES=5

Section 4 is "Definitions".  I think it is relevant to make it clear
that UTC is defined externally to the NTP spec, and that definition no
longer includes any reference to mean solar time.  From a technical
standpoint NTP already incorporates the complexity necessary to handle
the current definition and any changes that those in control of the
external definition are likely to make.

--
Steve Allen                 <sla at ucolick.org>                WGS-84 (GPS)
UCO/Lick Observatory        Natural Sciences II, Room 165    Lat  +36.99855
University of California    Voice: +1 831 459 3046           Lng -122.06015
Santa Cruz, CA 95064        http://www.ucolick.org/~sla/     Hgt +250 m

From mayer at ntp.isc.org  Sat Jun  9 16:21:09 2007
From: mayer at ntp.isc.org (Danny Mayer)
Date: Sat, 09 Jun 2007 19:21:09 -0400
Subject: [ntpwg] Comments on draft-ietf-ntp-ntpv4-proto-06
In-Reply-To: <20070608190943.GA1968@ucolick.org>
References: <45F2243C.1030506@udel.edu>	<2E44C2268B59514C89AE2CB514D15ACA03C2AC3B@NAEAMILLEX01VA.nadsusea.nads.navy.mil>	<20070313223030.GA2809@ucolick.org>
	<20070608190943.GA1968@ucolick.org>
Message-ID: <466B35E5.3020106@ntp.isc.org>

I endorse this change.

Danny
Steve Allen wrote:
> I repeat my request for a change in the explanation of UTC
> and the inclusion of two more references.
> 
> On Tue 2007-03-13T15:30:30 -0700, Steve Allen hath writ:
>> Section 4, 1st paragraph
>>
>> The following text does not direct the reader to the definitive
>> references:
>>
>>       The Coordinated Universal Time (UTC) timescale represents mean
>>       solar time as disseminated by national standards laboratories.
>>
>> A better text would be
>>
>>       The Coordinated Universal Time (UTC) timescale is defined by
>>       ITU-R TF.460.  Under the auspices of the Metre Convention of
>>       1865, in 1975 the CGPM strongly endorsed the use of UTC as the
>>       basis for civil time.
>>
>> This implies adding these to the section of Informative References
>>
>> International Telecommunications Union,
>> "Standard-frequency and time-signal emissions",
>> ITU-R TF.460,
>> http://www.itu.int/rec/R-REC-TF.460/en
>>
>> General Conference on Weights and Measures,
>> Resolution 5 of the 15th CGPM,
>> Comptes Rendus de la 15e CGPM, 1976
>> http://www1.bipm.org/jsp/en/ViewCGPMResolution.jsp?CGPM=15&RES=5
> 
> Section 4 is "Definitions".  I think it is relevant to make it clear
> that UTC is defined externally to the NTP spec, and that definition no
> longer includes any reference to mean solar time.  From a technical
> standpoint NTP already incorporates the complexity necessary to handle
> the current definition and any changes that those in control of the
> external definition are likely to make.
> 
> --
> Steve Allen                 <sla at ucolick.org>                WGS-84 (GPS)
> UCO/Lick Observatory        Natural Sciences II, Room 165    Lat  +36.99855
> University of California    Voice: +1 831 459 3046           Lng -122.06015
> Santa Cruz, CA 95064        http://www.ucolick.org/~sla/     Hgt +250 m
> _______________________________________________
> ntpwg mailing list
> ntpwg at lists.ntp.isc.org
> https://lists.ntp.isc.org/mailman/listinfo/ntpwg
> 


From schen at rivulet.com  Tue Jun 12 13:00:39 2007
From: schen at rivulet.com (Steve Chen)
Date: Tue, 12 Jun 2007 16:00:39 -0400
Subject: [ntpwg]  WG LAST CALL: draft-ietf-ntp-ntpv4-proto-06.txt
Message-ID: <20070612200133.4AFDBA71FA8@rivulet.com>

Hi Karen,

 

I recommend that this document is ready to be forwarded to publication.

 

This revision was a pleasure to read and I could find only one error (E) and
one question (T):

 

1.	Section 4, paragraph 5, line 2

Change: . relative to the each server clock

To:         . relative to each server clock

2.	Section 5, paragraph 5

Comment: It is not intuitive why the poll interval should be the same as the
loop time constant. Shouldn't

                         Loop time constant >> poll interval

                for the filtering to work properly?

 

Regards,

Steve Chen

Rivulet Communications, Inc.

  _____  

From: ntpwg-bounces+schen=rivulet.com at lists.ntp.isc.org
[mailto:ntpwg-bounces+schen=rivulet.com at lists.ntp.isc.org] On Behalf Of
Odonoghue, Karen F CIV NSWCDD, W13
Sent: Friday, June 08, 2007 12:02 PM
To: ntpwg at lists.ntp.isc.org
Subject: [ntpwg] WG LAST CALL: draft-ietf-ntp-ntpv4-proto-06.txt

 

This message initiates a NTP working group last call on the document: 

     Title: Network Time Protocol Version 4 Protocol And 
        Algorithms Specification 
     Filename: <draft-ietf-ntp-ntpv4-proto-06.txt> 

The purpose of this WG last call is to ensure that this 
document is ready to be forwarded to the IESG for approval 
and publication as a Proposed Standard. 

As part of this last call process, we are asking that working 
group members do the following: 

1. Review the document for both technical and editorial 
errors.  Technical issues should be sent to the NTPWG mailing 
list (ntpwg at lists.ntp.org) for discussion and resolution. 
Editorial comments may be sent either to the mailing list or 
directly to the document editor (Jim Martin, jim at daedelus.com). 

2.  Post to the mailing list your position on whether or not 
this document is ready to be forwarded for publication. 

The last call period will last two weeks, ending on Friday,  22 June, 2007. 

Upon completion of the last call, the WG chair(s) will take 
action based upon the consensus of the WG. 

Regards, 
Karen O'Donoghue and Brian Haberman 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ntp.isc.org/pipermail/ntpwg/attachments/20070612/8d412f1e/attachment.html 

From mills at udel.edu  Wed Jun 13 07:51:11 2007
From: mills at udel.edu (David L. Mills)
Date: Wed, 13 Jun 2007 14:51:11 +0000
Subject: [ntpwg] WG LAST CALL: draft-ietf-ntp-ntpv4-proto-06.txt
In-Reply-To: <20070612200133.4AFDBA71FA8@rivulet.com>
References: <20070612200133.4AFDBA71FA8@rivulet.com>
Message-ID: <4670045F.5030406@udel.edu>

Steve,

The poll interval must be scaled according to the time constant in order 
to satisfy the mathematical constraints of the feedback loop. The loop 
parameters have been carefully chosen so that the scaling is directly 
proportional. To be convincing for the skeptical engineer, see the book 
and/or the briefing slides on the project page.

Dave

Steve Chen wrote:

> Hi Karen,
>
>
>
> I recommend that this document is ready to be forwarded to publication.
>
>
>
> This revision was a pleasure to read and I could find only one error 
> (E) and
> one question (T):
>
>
>
> 1. Section 4, paragraph 5, line 2
>
> Change: . relative to the each server clock
>
> To: . relative to each server clock
>
> 2. Section 5, paragraph 5
>
> Comment: It is not intuitive why the poll interval should be the same 
> as the
> loop time constant. Shouldn't
>
> Loop time constant >> poll interval
>
> for the filtering to work properly?
>
>
>
> Regards,
>
> Steve Chen
>
> Rivulet Communications, Inc.
>
> _____
>
> From: ntpwg-bounces+schen=rivulet.com at lists.ntp.isc.org
> [mailto:ntpwg-bounces+schen=rivulet.com at lists.ntp.isc.org] On Behalf Of
> Odonoghue, Karen F CIV NSWCDD, W13
> Sent: Friday, June 08, 2007 12:02 PM
> To: ntpwg at lists.ntp.isc.org
> Subject: [ntpwg] WG LAST CALL: draft-ietf-ntp-ntpv4-proto-06.txt
>
>
>
> This message initiates a NTP working group last call on the document:
>
> Title: Network Time Protocol Version 4 Protocol And
> Algorithms Specification
> Filename: <draft-ietf-ntp-ntpv4-proto-06.txt>
>
> The purpose of this WG last call is to ensure that this
> document is ready to be forwarded to the IESG for approval
> and publication as a Proposed Standard.
>
> As part of this last call process, we are asking that working
> group members do the following:
>
> 1. Review the document for both technical and editorial
> errors. Technical issues should be sent to the NTPWG mailing
> list (ntpwg at lists.ntp.org) for discussion and resolution.
> Editorial comments may be sent either to the mailing list or
> directly to the document editor (Jim Martin, jim at daedelus.com).
>
> 2. Post to the mailing list your position on whether or not
> this document is ready to be forwarded for publication.
>
> The last call period will last two weeks, ending on Friday, 22 June, 
> 2007.
>
> Upon completion of the last call, the WG chair(s) will take
> action based upon the consensus of the WG.
>
> Regards,
> Karen O'Donoghue and Brian Haberman
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ntpwg mailing list
> ntpwg at lists.ntp.isc.org
> https://lists.ntp.isc.org/mailman/listinfo/ntpwg


-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ntp.isc.org/pipermail/ntpwg/attachments/20070613/3a2e000d/attachment.html 

From karen.odonoghue at navy.mil  Wed Jun 13 10:40:33 2007
From: karen.odonoghue at navy.mil (Odonoghue, Karen F CIV NSWCDD, W13)
Date: Wed, 13 Jun 2007 12:40:33 -0500
Subject: [ntpwg] FW:  WG LAST CALL: draft-ietf-ntp-ntpv4-proto-06.txt
Message-ID: <2E44C2268B59514C89AE2CB514D15ACAD2E2B6@NAEAMILLEX01VA.nadsusea.nads.navy.mil>

Malcolm is having issues posting to the list so I am forwarding this for him.
 
Karen

________________________________

From: Airst, Malcolm J. [mailto:mairst at mitre.org]
Sent: Mon 6/11/2007 6:55 PM
To: ntpwg at lists.ntp.isc.org
Subject: RE: [ntpwg] WG LAST CALL: draft-ietf-ntp-ntpv4-proto-06.txt


As promised, I reviewed the latest draft of NTPv4 (draft 6). I think this document is ready to be forwarded to the IESG. 
 
Sincerely,
Malcolm Airst
 


________________________________

	From: ntpwg-bounces+mairst=cox.net at lists.ntp.isc.org [mailto:ntpwg-bounces+mairst=cox.net at lists.ntp.isc.org] On Behalf Of Odonoghue, Karen F CIV NSWCDD, W13
	Sent: Friday, June 08, 2007 9:02 AM
	To: ntpwg at lists.ntp.isc.org
	Subject: [ntpwg] WG LAST CALL: draft-ietf-ntp-ntpv4-proto-06.txt
	
	
	This message initiates a NTP working group last call on the document: 

	     Title: Network Time Protocol Version 4 Protocol And 
	        Algorithms Specification 
	     Filename: <draft-ietf-ntp-ntpv4-proto-06.txt> 

	The purpose of this WG last call is to ensure that this 
	document is ready to be forwarded to the IESG for approval 
	and publication as a Proposed Standard. 

	As part of this last call process, we are asking that working 
	group members do the following: 

	1. Review the document for both technical and editorial 
	errors.  Technical issues should be sent to the NTPWG mailing 
	list (ntpwg at lists.ntp.org) for discussion and resolution. 
	Editorial comments may be sent either to the mailing list or 
	directly to the document editor (Jim Martin, jim at daedelus.com). 

	2.  Post to the mailing list your position on whether or not 
	this document is ready to be forwarded for publication. 

	The last call period will last two weeks, ending on Friday,  22 June, 2007. 

	Upon completion of the last call, the WG chair(s) will take 
	action based upon the consensus of the WG. 

	Regards, 
	Karen O'Donoghue and Brian Haberman 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ntp.isc.org/pipermail/ntpwg/attachments/20070613/ecfbccad/attachment.html 

From mills at udel.edu  Wed Jun 13 14:08:40 2007
From: mills at udel.edu (David L. Mills)
Date: Wed, 13 Jun 2007 21:08:40 +0000
Subject: [ntpwg] FW:  WG LAST CALL: draft-ietf-ntp-ntpv4-proto-06.txt
In-Reply-To: <2E44C2268B59514C89AE2CB514D15ACAD2E2B6@NAEAMILLEX01VA.nadsusea.nads.navy.mil>
References: <2E44C2268B59514C89AE2CB514D15ACAD2E2B6@NAEAMILLEX01VA.nadsusea.nads.navy.mil>
Message-ID: <46705CD8.2050709@udel.edu>

Folks,

I think this pot is ready to stir and recommend it be forwarded up the IETF.

Dave

From brian at innovationslab.net  Sun Jun 17 01:28:41 2007
From: brian at innovationslab.net (Brian Haberman)
Date: Sat, 16 Jun 2007 21:28:41 -0400
Subject: [ntpwg] Call for NomCom Participation
Message-ID: <46748E49.4070105@innovationslab.net>

NTP WG Members,
     Please read the message below from the NomCom chair and consider
volunteering to serve.

Regards,
Brian

---

From: Lakshminath Dondeti
To: IETF Announcement
Date: June 4, 2007
Subject: Nomcom 2007-8: First Call for Volunteers

Folks,

If you have attended 3 out of the past 5 IETF meetings, you are eligible to
serve on Nomcom 2007-2008.  Please volunteer and you may become one of the
voting members of the committee that selects about half of the members
to the
IESG and IAB and one IAOC member.  RFC 3777 describes the process and the
responsibilities in detail.  Below is the list of people from the IESG,
IAB and
IAOC whose terms end during the March 2008 IETF meeting.

IAOC:

Ed Juskevicius

IAB:

Leslie Daigle
Elwyn Davies
Kevin Fall
Olaf Kolkman
David Oran
Eric Rescorla

IESG:

Lisa Dusseault -- Applications Area Director Jari Arkko -- Internet Area
Director Dan Romascanu -- Operations and Management Area Director Cullen
Jennings -- Real-time Applications and Infrastructure Area Director Ross
Callon
--- Routing Area Director Sam Hartman -- Security Area Director Magnus
Westerlund -- Transport Area Director

Before volunteering, please think about whether you want to be
considered for
one of those positions instead.  If you are already convinced, please
send an
email before 12:00 noon ET (16:00 UTC/GMT) on July 5, 2007 (otherwise,
please
read on)

To: ldondeti at qualcomm.com
Subject: Nomcom 2007-8 Volunteer
Body:

<Your Full Name>   // As you enter in the IETF Registration Form,
                           // First/Given name followed by Last/Family Name
<Current Primary Affiliation> // typically what goes in the Company field
                                          //  in the IETF Registration Form
[<all email addresses used to Register for the past 5 IETF meetings>]
<Preferred
email address>  //
<Telephone number>         // For confirmation if selected

Please expect an email response from me within 1-2 days stating whether
you are
qualified or not.  If you don't receive anything, please re-send your
email with
the tag (duplicate) in the subject line.

Not convinced yet?  Please consider that nomcom members play an
important role
in shaping the leadership of the IETF.  If you are a people person, you will
enjoy meeting many of the active contributors to the IETF.  If you prefer
instead to read a lot of email, well, we have that too.  Being a nomcom
member
is also an important responsibility: it requires adherence to
confidentiality
rules and some time commitment from the members.  The term begins just
prior to
the Chicago meeting and we expect most of the work to be completed by
January
2008.  During this period, the nomcom members

-- collect requirements from the community and interviews candidates
     during the Chicago and Vancouver IETF meetings
-- review candidates' statements and weighs community feedback
-- participate in candidate selection deliberations (weekly conferences
calls)

Nomcom members are selected following a publicly verifiable random selection
method specified in RFC 3797.

For the nomcom to work as it should, the pool from which the volunteers are
chosen should be as large as possible. The more people who volunteer,
the better
chance we have of choosing a random yet representative cross section of
the IETF
population.

Ensuring the leadership of the IETF is fair and balanced and comprised
of those
who can lead the IETF in the right direction is an important
responsibility that
rests on the IETF participants at large.  Volunteering for the nomcom is
a good
way of contributing in that direction.  So please volunteer!

thanks,
Lakshminath



From yaakov_s at rad.com  Wed Jun 20 13:42:22 2007
From: yaakov_s at rad.com (Yaakov Stein)
Date: Wed, 20 Jun 2007 16:42:22 +0300
Subject: [ntpwg] WG LAST CALL: draft-ietf-ntp-ntpv4-proto-06.txt
In-Reply-To: <2E44C2268B59514C89AE2CB514D15ACAD2E2AA@NAEAMILLEX01VA.nadsusea.nads.navy.mil>
Message-ID: <457D36D9D89B5B47BC06DA869B1C815D04537543@exrad3.ad.rad.co.il>

First, I would like to state that the readability has greatly improved
in this version 
and to say thanks for fixing the equation for T(t).
 
Although I have one remark and numerous editorial nits  (see below) 
I believe the present version is sufficiently mature
and I fully support this document being sent to the IESG.  
 
Y(J)S
 
 
 
My remark is regarding the units of frequency (this will be more
important in TICTOC).  The standard unit of frequency is the Hz
which is 1 / sec. Since NTP distributes time but does not directly 
distribute frequency, the only way frequency is used here is
via "fractional frequency offset", i.e. the difference between
a frequency and the nominal divided by the nominal. Since this
is the ratio of two frequencies in Hz, it is unitless.
Of course, if something is unitless you can call it sec/sec,
but I believe this to be missleading (actually, Hz/ Hz is better).
So I would prefer something like this -
In this document all time values are in seconds (s),
and all frequencies will be specified as fractional frequency offsets
(FFO)
(pure number). It is often convenient to express these FFOs in parts per
million (ppm).
 
NITS
====
The statement that UTC comes from a source "such as a GPS receiver 
or telephone modem service" still sounds too specific  (and perhaps
outdated)  to me. How about "a source traceable to UTC.  
One readily available source is GPS."   (Of course, Galileo, eLoran,
etc. are also fine).
 
Page 7  "can be mixed and matched"
I understand the "mixed". What has to be matched?
 
Figure 2 - should "Packet Variable" be "Header Variable" ?
 
Page 12  The selection algorithm uses Byzantine principles ... 
I don't think the algorithm is Byzantine, unless it was developed
in the capital of Turkey. I couldn't pull the Marzullo reference either.
Does this statement mean that the algorithm achieves what Lamport
calls "Byzantine agreement", or that it is robust against arbitrary
Byzantine faults?
 
Page 12   These terms are given precise interpretation in Section 11.2.
Can you show me where ?
 
I guess the use of the term "era" vs. the prime "epoch" is too hard
to change. But can we have "prime epoch" explained where it is first
used ? 
 
Figure 5  Year -> Date
 
Page 16  It is important to note that twos-complement arithmetic does
not know ...
I don't believe twos-complement arithmetic knows anything.
How about 
  It is important to note that twos-complement arithmetic does not
distinguish 
  between signed and unsigned values (although comparisons can take sign
into account).
  ... A perceived hazard ... might result in over-run ...
 
Page 16  log to the base 2  ->  log base 2
 
Page 19   The NTP packet header follows the UDP and IP headers and the
physical ...
I guess we have to process this statement in RPN.
How about "The NTP packet header follows the UDP header, 
which itself follows the IP header, which in turn follows a physical ...
 
Figure 9 "Message Digest" - the term MAC is used in all other places
 
Page 21  The header extends from the beginning  - should this be "The
basic header ..."
 
Page 22  conveniently mitigated using the same algorithms (see A.5.5.1)
...
 
Figure 13 - LORAN C 100 KHz -> any LORAN C station, 100 KHz
 
Page 23  and is intended to detect timing loops  - how about "can be
used to detect"
 
Page 28 "is interpreted to mean"  - either "is interpreted" or "taken to
mean"
 
Page 31 it is possible that the delay computation becomes negative ->
it is possible for the delay computation to become negative
 
Page 34  DSCRD. This is a nonfatal ...  ->  DSCRD. This indicates a
nonfatal ...
Or "This step is carried out following ..."
Similarly for the other steps.
 
Page 37  Appendix A.5.2"  - remove quote mark 
 
Page 38 was sent It -> was sent.  
 
Page 38   in the clock_filter() routine in Appendix ...   
can we avoid the double in, for example   in the clock_filter() routine
of Appendix ...
 
Page 42  "the clock discipline algorithm described in Appendix A.5.5.6"
Can we use "coded in Appendix A.5.5.6" or "for which code is provided in
Appendix A.5.5.6"
Similarly for the first line on page 45.
 
page 58  bitsand -> bits and
page 93  discipoine -> discipline
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ntp.isc.org/pipermail/ntpwg/attachments/20070620/eac36e6a/attachment.html 

From karen.odonoghue at navy.mil  Thu Jun 21 09:47:17 2007
From: karen.odonoghue at navy.mil (Odonoghue, Karen F CIV NSWCDD, W13)
Date: Thu, 21 Jun 2007 04:47:17 -0500
Subject: [ntpwg] wg last call reminder
Message-ID: <2E44C2268B59514C89AE2CB514D15ACA0691D1FA@NAEAMILLEX01VA.nadsusea.nads.navy.mil>

Folks,

This is a quick reminder that there is a WG Last Call under way for the
ntpv4 spec.
Please review, post any comments, and post your opinion on the maturity
to the wg mailing list. 
I would like to extend the last call through next Monday to accommodate
folks who wish to spend quality weekend time reviewing the document. 

Also, a reminder that the cut-off for new drafts for the Chicago meeting
is July 2 which is rapidly approaching. A number of folks have mentioned
specific items that they would like to see addressed. I strongly suggest
that you submit individual submission drafts for discussion at the
Chicago meeting.

Karen

************************************************************
Karen O'Donoghue
+1-540-653-1567 (voice)
+1-540-653-8673 (fax)
karen.odonoghue at navy.mil  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ntp.isc.org/pipermail/ntpwg/attachments/20070621/98756eee/attachment.html 

From heiko.gerstung at meinberg.de  Thu Jun 21 11:15:48 2007
From: heiko.gerstung at meinberg.de (Heiko Gerstung)
Date: Thu, 21 Jun 2007 13:15:48 +0200
Subject: [ntpwg] NTP Draft proto-06 ...
Message-ID: <467A5DE4.9090908@meinberg.de>

... is ready for last call IMHO ...

Any news on the MIB draft?


Regards,
Heiko

From mayer at gis.net  Fri Jun 22 16:29:14 2007
From: mayer at gis.net (Danny Mayer)
Date: Fri, 22 Jun 2007 12:29:14 -0400
Subject: [ntpwg] Issues with the NTP draft -06
Message-ID: <467BF8DA.80502@gis.net>

I finally managed to get through the draft and I have the following
feedback which I will divide into two parts: substantive and nits.
Overall I find the document to be in pretty good shape though I have
mostly ignored the Appendix A code skeleton.

Substantive:
1) P9 Section 3.2 Second Paragraph
There is no description or indication of what the maximum value of TTL
is or should be or how to decide on what it should be. Similarly there
is no indication of what the minimum number of associations is or how to
decide what it should be.

2) P22: Poll:
Should we allow polling of less than 1 second? We surely don't want to
encourage this.

3) P23:
   Above stratum 1 (secondary servers and clients) this is the reference
   identifier of the server and is intended to detect timing loops.  If
   using the IPv4 address family, the identifier is the four-octet IPv4
   address.  If using the IPv6 address family, it is the first four
   octets of the MD5 hash of the IPv6 address.  Note that, when using
   the IPv6 address family on an NTPv4 server with a NTPv3 client, the
   Reference Identifier field appears to be a random value and a timing
   loop might not be detected.

The problem here is that the refid is to be used to detect timing loops
but it can be any value that can do the job and should be unique for
each server and not interface address. Thus a server should have one and
only one refid irrespective of whether it is using IPv4 or IPv6
addresses. Tying it to an IP address is not really a good idea. Tying it
to a MAC address might be a better idea.

4) P24. Section 7.4 last sentence:
   Other than
   displaying the kiss code, KoD packets have no protocol significance
   and are discarded after inspection.

I'd like to see recipients of KISS codes take actions dependent on the
receipt of some of the codes. Practical experience has shown that the
operators of public servers need to be able to assert more control over
the clients that contact their servers. I'd like to therefore change
this sentence to read as follows:

   Recipients of kiss codes MUST inspect them and in the following cases
   take these actions:
   a) For kiss codes: DENY, RSTR the client MUST demobilize any
      associations to that server and stop sending packets to that
      server;
   b) For kiss code: RATE the client MUST immediately reduce its polling
      interval to that server and continue to reduce it each time it
      receives a RATE kiss code.
   c) Other than the above conditions, KoD packets have no protocol
      significance and are discarded after inspection.

5) P26: Extension Field Format
Shouldn't the Extension Field format be left to the implementation of
the extension field protocol with the exception of the first part which
consists of the field type and the length of the extension field and
it's overall alignment? I'm not clear why association ID, timestamp,
filestamp, etc. would be defined in this document.


Nits:
1) P.5:
   The on-wire protocol described
   in Section 8 is based on a returnable-time design which depends only
   on measured clock offsets, but does not require reliable message
   delivery.
Please add the following:
   Reliable message delivery such as TCP can actually make the delivered
   NTP packet less reliable since retries would increase the delay value
   and other errors.

2) P5:
   All servers and clients who are fully NTPv4 compliance MUST implement
Change to:
   All servers and clients who are fully NTPv4 compliant MUST implement

3) P6:
   of a symmetric active packet with matching no association.  That
Change to:
   of a symmetric active packet with no matching association.  That

4) p7:
   and sends the reply packet as described in Figure 2 of Section 9.2.
Change to:
   and sends the reply packet as described in Figure 2.

5) p9:
Remove the last sentence in the last paragraph in section 3.2
   The reference implementation includes
   intricate means to do this, but these are beyond the scope of this
   document.

This is not relevant here and is implementation dependent.

6) p9-10:
   Under definitions should noise be defined? It is used in the
   reference implementation but not in the document. Dave did send out
   a definition in a recent email message.

7) P22 Figure 12:
   should be change the last entry and make it look like this:
   16     unsynchronized
   17-255 reserved

8) P24: Add the following before Key Identifier in section 7.3:
   Extension Field n: See Section 7.5 for a description of the format of
   this field.

9) P26 and P56 Section 15: IANA allocations of addresses 224.0.1.1 and
:101 needs references to documents.

10) P32 top of page:
   The common names and formula names are interchangeable; formula names
   are intended for equations where space is important.

I have no idea what the reference to "space" means here. Can anyone explain?

11) P37: Figure 24
   4 access denied | The access controls have black
Change to:
   4 access denied | The access controls have blacklisted the source
                     address.

12) P56: Section 15
    Following the policies outlined in [11], new consensus.
Change to:
    Following the policies outlined in [11], new values are to be
    defined by IETF Consensus.

Danny

From brad at shub-internet.org  Sat Jun 23 07:29:20 2007
From: brad at shub-internet.org (Brad Knowles)
Date: Sat, 23 Jun 2007 02:29:20 -0500
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <467BF8DA.80502@gis.net>
References: <467BF8DA.80502@gis.net>
Message-ID: <p0624080fc2a279cac13c@[192.168.1.199]>

On 6/22/07, Danny Mayer wrote:

>  The problem here is that the refid is to be used to detect timing loops
>  but it can be any value that can do the job and should be unique for
>  each server and not interface address. Thus a server should have one and
>  only one refid irrespective of whether it is using IPv4 or IPv6
>  addresses. Tying it to an IP address is not really a good idea. Tying it
>  to a MAC address might be a better idea.

You've got a MAC address per interface, so if you want to avoid doing 
anything on a per-interface basis, then using the MAC address is just 
as bad as an IP address.  Moreover, with many high availability 
services, you can "steal" IP and MAC addresses from one machine to 
another, and you really don't want to base anything for NTP on 
something that could be moved from one machine to another on a 
moments notice.

You need to choose something else that is relatively guaranteed to be 
unique on a per-server basis, is guaranteed to stay on that server 
and not move anywhere else, and is guaranteed to be unique regardless 
of how many interfaces, IP addresses, MAC addresses, etc... that may 
be on the server.  For Suns, this might be hostid, but for other 
platforms I suspect you're going to need something else.


Note that this unique id could change between reboots of the server, 
or stop-and-restart operations of the NTP daemon, etc....

So, one potential solution would be for the NTP daemon to take all 
known MAC addresses, IP addresses, and other suitable information 
that is available at the time of the start of the NTP program and 
combine that with a suitably large pseudo-random number, and then 
generate an MD-5 or SHA-1 or SHA-2 hash of that number, extract the 
leftmost or rightmost four octets, and have that calculated value 
become the "refid".

I'm not saying that this is the only solution, or even that it is 
necessarily the best solution.  But it does seem to be a pretty good 
solution, and assuming you choose a "good enough" hash function, it 
should be sufficiently unique for the purpose of loop detection.

>  I'd like to see recipients of KISS codes take actions dependent on the
>  receipt of some of the codes.

Excellent idea.

-- 
Brad Knowles <brad at shub-internet.org>, Consultant & Author
LinkedIn Profile: <http://tinyurl.com/y8kpxu>
Slides from Invited Talks: <http://tinyurl.com/tj6q4>

09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

From tglassey at earthlink.net  Sat Jun 23 15:52:32 2007
From: tglassey at earthlink.net (TS Glassey)
Date: Sat, 23 Jun 2007 08:52:32 -0700
Subject: [ntpwg] Issues with the NTP draft -06
References: <467BF8DA.80502@gis.net> <p0624080fc2a279cac13c@[192.168.1.199]>
Message-ID: <004301c7b5af$8742e180$6501a8c0@tsg1>


----- Original Message ----- 
From: "Brad Knowles" <brad at shub-internet.org>
To: <mayer at gis.net>; "NTP Working Group" <ntpwg at lists.ntp.isc.org>
Sent: Saturday, June 23, 2007 12:29 AM
Subject: Re: [ntpwg] Issues with the NTP draft -06


> On 6/22/07, Danny Mayer wrote:
>
>>  The problem here is that the refid is to be used to detect timing loops
>>  but it can be any value that can do the job and should be unique for
>>  each server and not interface address. Thus a server should have one and
>>  only one refid irrespective of whether it is using IPv4 or IPv6
>>  addresses. Tying it to an IP address is not really a good idea. Tying it
>>  to a MAC address might be a better idea.
>
> You've got a MAC address per interface, so if you want to avoid doing
> anything on a per-interface basis, then using the MAC address is just
> as bad as an IP address.  Moreover, with many high availability
> services, you can "steal" IP and MAC addresses from one machine to
> another, and you really don't want to base anything for NTP on
> something that could be moved from one machine to another on a
> moments notice.

OK - lets jump up to 200000 feet and quantify this model - and the 
requirement... So then you are looking for a way to anchor the trust and 
integrity model for the NTP Server to a physical source or site.

>
> You need to choose something else that is relatively guaranteed to be
> unique on a per-server basis, is guaranteed to stay on that server
> and not move anywhere else, and is guaranteed to be unique regardless
> of how many interfaces, IP addresses, MAC addresses, etc... that may
> be on the server.


> For Suns, this might be hostid, but for other
> platforms I suspect you're going to need something else.

A system specific PKI Token is the way to go. And NTP can lead the way into 
this 'brave new world' of 'computing images with integrated integrity' - 
i.e. the identity that is unique and mechancially verifiable.

>
>
> Note that this unique id could change between reboots of the server,
> or stop-and-restart operations of the NTP daemon, etc....

Not if the ID is registered in the DNS services as part of the 'Well Known 
Service'

>
> So, one potential solution would be for the NTP daemon to take all
> known MAC addresses, IP addresses, and other suitable information
> that is available at the time of the start of the NTP program and
> combine that with a suitably large pseudo-random number, and then
> generate an MD-5 or SHA-1 or SHA-2 hash of that number, extract the
> leftmost or rightmost four octets, and have that calculated value
> become the "refid".

Yes, this has been proposed before as well. But it doesnt tie the NTP Server 
to the legal jurisdiction its operated in and that is the key from a 
commercial use standpoint from the NTP Audit Model...

>
> I'm not saying that this is the only solution, or even that it is
> necessarily the best solution.  But it does seem to be a pretty good
> solution, and assuming you choose a "good enough" hash function, it
> should be sufficiently unique for the purpose of loop detection.
>
>>  I'd like to see recipients of KISS codes take actions dependent on the
>>  receipt of some of the codes.
>
> Excellent idea.
>
> -- 
> Brad Knowles <brad at shub-internet.org>, Consultant & Author
> LinkedIn Profile: <http://tinyurl.com/y8kpxu>
> Slides from Invited Talks: <http://tinyurl.com/tj6q4>
>
> 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
> _______________________________________________
> ntpwg mailing list
> ntpwg at lists.ntp.isc.org
> https://lists.ntp.isc.org/mailman/listinfo/ntpwg 


From mills at udel.edu  Sat Jun 23 20:00:15 2007
From: mills at udel.edu (David L. Mills)
Date: Sat, 23 Jun 2007 20:00:15 +0000
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <p0624080fc2a279cac13c@[192.168.1.199]>
References: <467BF8DA.80502@gis.net> <p0624080fc2a279cac13c@[192.168.1.199]>
Message-ID: <467D7BCF.8020101@udel.edu>

Guys,

The refid issue has always been a tug between backward compatibility and 
word size. The method chosen is not perfect, but is a good compromise.

Dave

Brad Knowles wrote:

> On 6/22/07, Danny Mayer wrote:
>
>> The problem here is that the refid is to be used to detect timing loops
>> but it can be any value that can do the job and should be unique for
>> each server and not interface address. Thus a server should have one and
>> only one refid irrespective of whether it is using IPv4 or IPv6
>> addresses. Tying it to an IP address is not really a good idea. Tying it
>> to a MAC address might be a better idea.
>
>
> You've got a MAC address per interface, so if you want to avoid doing
> anything on a per-interface basis, then using the MAC address is just
> as bad as an IP address. Moreover, with many high availability
> services, you can "steal" IP and MAC addresses from one machine to
> another, and you really don't want to base anything for NTP on
> something that could be moved from one machine to another on a
> moments notice.
>
> You need to choose something else that is relatively guaranteed to be
> unique on a per-server basis, is guaranteed to stay on that server
> and not move anywhere else, and is guaranteed to be unique regardless
> of how many interfaces, IP addresses, MAC addresses, etc... that may
> be on the server. For Suns, this might be hostid, but for other
> platforms I suspect you're going to need something else.
>
>
> Note that this unique id could change between reboots of the server,
> or stop-and-restart operations of the NTP daemon, etc....
>
> So, one potential solution would be for the NTP daemon to take all
> known MAC addresses, IP addresses, and other suitable information
> that is available at the time of the start of the NTP program and
> combine that with a suitably large pseudo-random number, and then
> generate an MD-5 or SHA-1 or SHA-2 hash of that number, extract the
> leftmost or rightmost four octets, and have that calculated value
> become the "refid".
>
> I'm not saying that this is the only solution, or even that it is
> necessarily the best solution. But it does seem to be a pretty good
> solution, and assuming you choose a "good enough" hash function, it
> should be sufficiently unique for the purpose of loop detection.
>
>> I'd like to see recipients of KISS codes take actions dependent on the
>> receipt of some of the codes.
>
>
> Excellent idea.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ntp.isc.org/pipermail/ntpwg/attachments/20070623/8b9633dc/attachment.html 

From mayer at gis.net  Sun Jun 24 03:44:18 2007
From: mayer at gis.net (Danny Mayer)
Date: Sat, 23 Jun 2007 23:44:18 -0400
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <004301c7b5af$8742e180$6501a8c0@tsg1>
References: <467BF8DA.80502@gis.net> <p0624080fc2a279cac13c@[192.168.1.199]>
	<004301c7b5af$8742e180$6501a8c0@tsg1>
Message-ID: <467DE892.2000701@gis.net>

TS Glassey wrote:
>> On 6/22/07, Danny Mayer wrote:
>>
>>>  The problem here is that the refid is to be used to detect timing loops
>>>  but it can be any value that can do the job and should be unique for
>>>  each server and not interface address. Thus a server should have one
>>> and
>>>  only one refid irrespective of whether it is using IPv4 or IPv6
>>>  addresses. Tying it to an IP address is not really a good idea.
>>> Tying it
>>>  to a MAC address might be a better idea.
>>
>> You've got a MAC address per interface, so if you want to avoid doing
>> anything on a per-interface basis, then using the MAC address is just
>> as bad as an IP address.  Moreover, with many high availability
>> services, you can "steal" IP and MAC addresses from one machine to
>> another, and you really don't want to base anything for NTP on
>> something that could be moved from one machine to another on a
>> moments notice.
> 
> OK - lets jump up to 200000 feet and quantify this model - and the
> requirement... So then you are looking for a way to anchor the trust and
> integrity model for the NTP Server to a physical source or site.

No, the goal is to prevent timing loops. The value needs only to be
reasonably unique. This is not an authentication scheme. Autokey is used
for authentication.

Danny


From tglassey at earthlink.net  Sun Jun 24 04:55:57 2007
From: tglassey at earthlink.net (TS Glassey)
Date: Sat, 23 Jun 2007 21:55:57 -0700
Subject: [ntpwg] Issues with the NTP draft -06
References: <467BF8DA.80502@gis.net>
	<p0624080fc2a279cac13c@[192.168.1.199]><004301c7b5af$8742e180$6501a8c0@tsg1>
	<467DE892.2000701@gis.net>
Message-ID: <001301c7b61b$f79f1a40$6501a8c0@tsg1>

The same quality of integrity is required in the prevention of timing loops 
so that the logs of actions documented therein are believable.

T.
----- Original Message ----- 
From: "Danny Mayer" <mayer at gis.net>
To: "NTP Working Group" <>
Sent: Saturday, June 23, 2007 8:44 PM
Subject: Re: [ntpwg] Issues with the NTP draft -06


> TS Glassey wrote:
>>> On 6/22/07, Danny Mayer wrote:
>>>
>>>>  The problem here is that the refid is to be used to detect timing 
>>>> loops
>>>>  but it can be any value that can do the job and should be unique for
>>>>  each server and not interface address. Thus a server should have one
>>>> and
>>>>  only one refid irrespective of whether it is using IPv4 or IPv6
>>>>  addresses. Tying it to an IP address is not really a good idea.
>>>> Tying it
>>>>  to a MAC address might be a better idea.
>>>
>>> You've got a MAC address per interface, so if you want to avoid doing
>>> anything on a per-interface basis, then using the MAC address is just
>>> as bad as an IP address.  Moreover, with many high availability
>>> services, you can "steal" IP and MAC addresses from one machine to
>>> another, and you really don't want to base anything for NTP on
>>> something that could be moved from one machine to another on a
>>> moments notice.
>>
>> OK - lets jump up to 200000 feet and quantify this model - and the
>> requirement... So then you are looking for a way to anchor the trust and
>> integrity model for the NTP Server to a physical source or site.
>
> No, the goal is to prevent timing loops. The value needs only to be
> reasonably unique. This is not an authentication scheme. Autokey is used
> for authentication.
>
> Danny
>
> _______________________________________________
> ntpwg mailing list
> ntpwg at lists.ntp.isc.org
> https://lists.ntp.isc.org/mailman/listinfo/ntpwg 


From brad at shub-internet.org  Sun Jun 24 05:06:20 2007
From: brad at shub-internet.org (Brad Knowles)
Date: Sun, 24 Jun 2007 00:06:20 -0500
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <001301c7b61b$f79f1a40$6501a8c0@tsg1>
References: <467BF8DA.80502@gis.net>
	<p0624080fc2a279cac13c@[192.168.1.199]><004301c7b5af$8742e180$6501a8c0@tsg
	1>	<467DE892.2000701@gis.net> <001301c7b61b$f79f1a40$6501a8c0@tsg1>
Message-ID: <p06240802c2a3aa6425e7@[192.168.1.199]>

On 6/23/07, TS Glassey wrote:

>  The same quality of integrity is required in the prevention of timing loops
>  so that the logs of actions documented therein are believable.

The whole "Guaranteed Bet The Entire Budget Of The Entire World For 
The Entire History of Humanity Super Hyper Duper Nuclear Crypto 
Authenticated Audited Can't Be Broken In The Entire Lifespan of the 
Entire Universe No Matter How Many Advances There Are In Quantum 
Mathematics" type of solution is not one that we are trying to 
address at the moment.

At the moment, we're just trying to address the issue of a somewhat 
better way of selecting a refid that will help reduce the probability 
of a timing loop, based on what we know of current limitations on how 
the refid is generated from a single IP address and how current 
networking technology tends to cause single IP addresses to migrate 
from one machine to another or one site to another, or where a single 
machine might have more than a single IP address.


We'll solve that other problem at some other time.

All IMO, of course.

-- 
Brad Knowles <brad at shub-internet.org>

From heiko.gerstung at meinberg.de  Mon Jun 25 06:21:07 2007
From: heiko.gerstung at meinberg.de (Heiko Gerstung)
Date: Mon, 25 Jun 2007 08:21:07 +0200
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <p0624080fc2a279cac13c@[192.168.1.199]>
References: <467BF8DA.80502@gis.net> <p0624080fc2a279cac13c@[192.168.1.199]>
Message-ID: <467F5ED3.5070302@meinberg.de>

Brad Knowles schrieb:
> On 6/22/07, Danny Mayer wrote:
>
>   
>>  The problem here is that the refid is to be used to detect timing loops
>>  but it can be any value that can do the job and should be unique for
>>  each server and not interface address. Thus a server should have one and
>>  only one refid irrespective of whether it is using IPv4 or IPv6
>>  addresses. Tying it to an IP address is not really a good idea. Tying it
>>  to a MAC address might be a better idea.
>>     
>
>   
I think that the stratum level does a much better job in avoiding timing 
loops, we probably should abandon the idea that the refid is anything 
more than an informational value. Is the refid really checked in the 
code? If it is (probably in the peer handling stuff) then I would 
suspect that it only covers direct connections to the next upstream 
server and does not perform a full loop check (server A -> server B-> 
server C -> server A).
> You've got a MAC address per interface, so if you want to avoid doing 
> anything on a per-interface basis, then using the MAC address is just 
> as bad as an IP address.  Moreover, with many high availability 
> services, you can "steal" IP and MAC addresses from one machine to 
> another, and you really don't want to base anything for NTP on 
> something that could be moved from one machine to another on a 
> moments notice.
>   
I would say that the refid is no security related data object. I agree 
that the MAC address and IP can change, but I do not see any bad 
implications here, at least not for the operational status.

> You need to choose something else that is relatively guaranteed to be 
> unique on a per-server basis, is guaranteed to stay on that server 
> and not move anywhere else, and is guaranteed to be unique regardless 
> of how many interfaces, IP addresses, MAC addresses, etc... that may 
> be on the server.  For Suns, this might be hostid, but for other 
> platforms I suspect you're going to need something else.
>
>
> Note that this unique id could change between reboots of the server, 
> or stop-and-restart operations of the NTP daemon, etc....
>
> So, one potential solution would be for the NTP daemon to take all 
> known MAC addresses, IP addresses, and other suitable information 
> that is available at the time of the start of the NTP program and 
> combine that with a suitably large pseudo-random number, and then 
> generate an MD-5 or SHA-1 or SHA-2 hash of that number, extract the 
> leftmost or rightmost four octets, and have that calculated value 
> become the "refid".
>
> I'm not saying that this is the only solution, or even that it is 
> necessarily the best solution.  But it does seem to be a pretty good 
> solution, and assuming you choose a "good enough" hash function, it 
> should be sufficiently unique for the purpose of loop detection.
>   
Using a public host key of the server would work as well. But I do not 
see that this helps in preventing loops, the only benefit I could see is 
if a server would carry all those unique IDs of all servers between the 
stratum 0 source and itself around and pass that list on to its 
downstream servers/clients. That would enable us to provide a "time 
trail" or a solution to the "traceable" time" stuff.

Regards,
Heiko


>>  I'd like to see recipients of KISS codes take actions dependent on the
>>  receipt of some of the codes.
>>     
>
> Excellent idea



From brian.utterback at sun.com  Mon Jun 25 12:06:06 2007
From: brian.utterback at sun.com (Brian Utterback)
Date: Mon, 25 Jun 2007 08:06:06 -0400
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <467F5ED3.5070302@meinberg.de>
References: <467BF8DA.80502@gis.net> <p0624080fc2a279cac13c@[192.168.1.199]>
	<467F5ED3.5070302@meinberg.de>
Message-ID: <467FAFAE.8030508@sun.com>

One of the key pieces you need to remember is that the while the refid
should be unique, unless the data you want to use for the server's
refid is already in the data somewhere that arrives from the server,
the refid must be derivable from the client.

To answer Heiko's comment about the stratum level, the problem with
stratum level is the propagation delay when the level changes. However,
the reason having only two levels of loop detection works is that the
stratum level generally works for larger loops.

I have always wondered if there might not be a way to get better
loop detection if you treated the refid as a sort of shift register.
Each server would choose a random one byte number at shift that number
on the the refid it passes to the client. Then the client would look
at each byte of the refid from all of its servers. If the higher order
byte matches the clients random byte, avoid it if you can. If the
top two bytes match the lowest byte of the client's server's refid and
the the client's own byte, reject it. Reject if more bytes match.
-- 
blu

If global warming is about climate change, isn't
trying to prevent it actually anti-climatic?
----------------------------------------------------------------------
Brian Utterback - Solaris RPE, Sun Microsystems, Inc.
Ph:877-259-7345, Em:brian.utterback-at-ess-you-enn-dot-kom

From kostecke at ntp.org  Mon Jun 25 12:37:35 2007
From: kostecke at ntp.org (Steve Kostecke)
Date: Mon, 25 Jun 2007 08:37:35 -0400
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: Your message of "Mon, 25 Jun 2007 08:21:07 +0200."
	<467F5ED3.5070302@meinberg.de> 
Message-ID: <E1I2np1-0004HH-5B@stasis.kostecke.net>

Heiko Gerstung said:

>Using a public host key of the server would work as well. But I do not
>see that this helps in preventing loops, the only benefit I could see
>is if a server would carry all those unique IDs of all servers between
>the stratum 0 source and itself around and pass that list on to its
>downstream servers/clients. That would enable us to provide a "time
>trail" or a solution to the "traceable" time" stuff.

Autokey, when properly configured, provides exactly this capability.

-- 
Steve Kostecke <kostecke at ntp.org>
NTP Public Services Project http://support.ntp.org/
Public Key at http://support.ntp.org/Users/SteveKostecke

From mayer at gis.net  Mon Jun 25 12:38:56 2007
From: mayer at gis.net (Danny Mayer)
Date: Mon, 25 Jun 2007 08:38:56 -0400
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <467F5ED3.5070302@meinberg.de>
References: <467BF8DA.80502@gis.net> <p0624080fc2a279cac13c@[192.168.1.199]>
	<467F5ED3.5070302@meinberg.de>
Message-ID: <467FB760.5000406@gis.net>

Heiko Gerstung wrote:
> I would say that the refid is no security related data object. I agree
> that the MAC address and IP can change, but I do not see any bad
> implications here, at least not for the operational status.

I agree. I just want to get away from the idea that we SHOULD use IPv4
addresses (or IPv6 addresses MD5-summed). Just because the reference
implementation uses that doesn't mean that everyone else should do so.
The value can be anything as long as it's relatively unique.

Danny

From brian at innovationslab.net  Mon Jun 25 12:50:54 2007
From: brian at innovationslab.net (Brian Haberman)
Date: Mon, 25 Jun 2007 08:50:54 -0400
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <467FB760.5000406@gis.net>
References: <467BF8DA.80502@gis.net>
	<p0624080fc2a279cac13c@[192.168.1.199]>	<467F5ED3.5070302@meinberg.de>
	<467FB760.5000406@gis.net>
Message-ID: <467FBA2E.3080706@innovationslab.net>



Danny Mayer wrote:
> Heiko Gerstung wrote:
>> I would say that the refid is no security related data object. I agree
>> that the MAC address and IP can change, but I do not see any bad
>> implications here, at least not for the operational status.
> 
> I agree. I just want to get away from the idea that we SHOULD use IPv4
> addresses (or IPv6 addresses MD5-summed). Just because the reference
> implementation uses that doesn't mean that everyone else should do so.
> The value can be anything as long as it's relatively unique.

Given that the task at hand is documenting what NTPv4 is today, what
implementations *do not* use the IPv4 address or the hashed IPv6 address
as the refid?  I don't see the benefit of trying to retrofit this type
of change into the protocol spec trying to be advanced.

Regards,
Brian

From heiko.gerstung at meinberg.de  Mon Jun 25 13:32:15 2007
From: heiko.gerstung at meinberg.de (Heiko Gerstung)
Date: Mon, 25 Jun 2007 15:32:15 +0200
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <E1I2np1-0004HH-5B@stasis.kostecke.net>
References: <E1I2np1-0004HH-5B@stasis.kostecke.net>
Message-ID: <467FC3DF.9060002@meinberg.de>

Steve Kostecke schrieb:
> Heiko Gerstung said:
>
>   
>> Using a public host key of the server would work as well. But I do not
>> see that this helps in preventing loops, the only benefit I could see
>> is if a server would carry all those unique IDs of all servers between
>> the stratum 0 source and itself around and pass that list on to its
>> downstream servers/clients. That would enable us to provide a "time
>> trail" or a solution to the "traceable" time" stuff.
>>     
>
> Autokey, when properly configured, provides exactly this capability.
>   
Sounds great, Is there any tool or utility out there that can show me 
the exact trace for an instance of ntpd?

Best Regards,
Heiko


From mayer at ntp.isc.org  Mon Jun 25 13:40:11 2007
From: mayer at ntp.isc.org (Danny Mayer)
Date: Mon, 25 Jun 2007 09:40:11 -0400
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <467FC3DF.9060002@meinberg.de>
References: <E1I2np1-0004HH-5B@stasis.kostecke.net>
	<467FC3DF.9060002@meinberg.de>
Message-ID: <467FC5BB.6080507@ntp.isc.org>

Heiko Gerstung wrote:
> Steve Kostecke schrieb:
>> Heiko Gerstung said:
>>
>>   
>>> Using a public host key of the server would work as well. But I do not
>>> see that this helps in preventing loops, the only benefit I could see
>>> is if a server would carry all those unique IDs of all servers between
>>> the stratum 0 source and itself around and pass that list on to its
>>> downstream servers/clients. That would enable us to provide a "time
>>> trail" or a solution to the "traceable" time" stuff.
>>>     
>> Autokey, when properly configured, provides exactly this capability.
>>   
> Sounds great, Is there any tool or utility out there that can show me 
> the exact trace for an instance of ntpd?

Did you look at ntptrace or are you asking about Autokey?

Danny

From heiko.gerstung at meinberg.de  Mon Jun 25 13:52:41 2007
From: heiko.gerstung at meinberg.de (Heiko Gerstung)
Date: Mon, 25 Jun 2007 15:52:41 +0200
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <467FC5BB.6080507@ntp.isc.org>
References: <E1I2np1-0004HH-5B@stasis.kostecke.net>
	<467FC3DF.9060002@meinberg.de> <467FC5BB.6080507@ntp.isc.org>
Message-ID: <467FC8A9.6020702@meinberg.de>

Danny Mayer schrieb:
> Heiko Gerstung wrote:
>   
>> Steve Kostecke schrieb:
>>     
>>> Heiko Gerstung said:
>>>
>>>   
>>>       
>>>> Using a public host key of the server would work as well. But I do not
>>>> see that this helps in preventing loops, the only benefit I could see
>>>> is if a server would carry all those unique IDs of all servers between
>>>> the stratum 0 source and itself around and pass that list on to its
>>>> downstream servers/clients. That would enable us to provide a "time
>>>> trail" or a solution to the "traceable" time" stuff.
>>>>     
>>>>         
>>> Autokey, when properly configured, provides exactly this capability.
>>>   
>>>       
>> Sounds great, Is there any tool or utility out there that can show me 
>> the exact trace for an instance of ntpd?
>>     
>
> Did you look at ntptrace or are you asking about Autokey?
>
> Danny
>   

I indeed was talking about the Autokey trace. The "problem" with 
ntptrace is that it queries each involved server directly which is not 
what I thought of. Hold on  a second - are we getting off topic a little 
bit? :-)

In regards to the draft I would not change the wording at this stage, 
simply because it has no direct impact on the functionality of the 
protocol and the draft documents what is currently done in 100% of the 
implementation base.

Regards,
 Heiko

From heiko.gerstung at meinberg.de  Mon Jun 25 13:55:32 2007
From: heiko.gerstung at meinberg.de (Heiko Gerstung)
Date: Mon, 25 Jun 2007 15:55:32 +0200
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <467FAFAE.8030508@sun.com>
References: <467BF8DA.80502@gis.net> <p0624080fc2a279cac13c@[192.168.1.199]>
	<467F5ED3.5070302@meinberg.de> <467FAFAE.8030508@sun.com>
Message-ID: <467FC954.3030501@meinberg.de>

Brian Utterback schrieb:
> One of the key pieces you need to remember is that the while the refid
> should be unique, unless the data you want to use for the server's
> refid is already in the data somewhere that arrives from the server,
> the refid must be derivable from the client.
>
> To answer Heiko's comment about the stratum level, the problem with
> stratum level is the propagation delay when the level changes. However,
> the reason having only two levels of loop detection works is that the
> stratum level generally works for larger loops.
Well, is the propagation delay of the refid better? As far as I can tell 
the stratum level and the refid are changing at exactly the same time or 
do I miss something?
> I have always wondered if there might not be a way to get better
> loop detection if you treated the refid as a sort of shift register.
> Each server would choose a random one byte number at shift that number
> on the the refid it passes to the client. Then the client would look
> at each byte of the refid from all of its servers. If the higher order
> byte matches the clients random byte, avoid it if you can. If the
> top two bytes match the lowest byte of the client's server's refid and
> the the client's own byte, reject it. Reject if more bytes match.
I think that the stratum level offers the same functionality with a 
simpler approach. Add 1 to the stratum level of your upstream server and 
never synchronize with a server that has the same or higher stratum 
level. What a ruleset :-)

Cheers,
Heiko


From mayer at gis.net  Mon Jun 25 13:57:23 2007
From: mayer at gis.net (Danny Mayer)
Date: Mon, 25 Jun 2007 09:57:23 -0400
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <467FBA2E.3080706@innovationslab.net>
References: <467BF8DA.80502@gis.net>
	<p0624080fc2a279cac13c@[192.168.1.199]>	<467F5ED3.5070302@meinberg.de>
	<467FB760.5000406@gis.net> <467FBA2E.3080706@innovationslab.net>
Message-ID: <467FC9C3.5080208@gis.net>

Brian Haberman wrote:
> 
> Danny Mayer wrote:
>> Heiko Gerstung wrote:
>>> I would say that the refid is no security related data object. I agree
>>> that the MAC address and IP can change, but I do not see any bad
>>> implications here, at least not for the operational status.
>> I agree. I just want to get away from the idea that we SHOULD use IPv4
>> addresses (or IPv6 addresses MD5-summed). Just because the reference
>> implementation uses that doesn't mean that everyone else should do so.
>> The value can be anything as long as it's relatively unique.
> 
> Given that the task at hand is documenting what NTPv4 is today, what
> implementations *do not* use the IPv4 address or the hashed IPv6 address
> as the refid?  I don't see the benefit of trying to retrofit this type
> of change into the protocol spec trying to be advanced.
>

Not quite. The task is to document what an implementor needs to do, not
what the reference implementation does. I have no idea what other
implementations do.

Danny

> Regards,
> Brian
> 


From kostecke at ntp.org  Mon Jun 25 14:00:05 2007
From: kostecke at ntp.org (Steve Kostecke)
Date: Mon, 25 Jun 2007 10:00:05 -0400
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: Your message of "Mon, 25 Jun 2007 15:32:15 +0200."
	<467FC3DF.9060002@meinberg.de> 
Message-ID: <E1I2p6r-0006G4-GE@stasis.kostecke.net>

Heiko Gerstung said:

>Steve Kostecke schrieb:
>
>> Heiko Gerstung said:
>>
>>> Using a public host key of the server would work as well. But I do
>>> not see that this helps in preventing loops, the only benefit I
>>> could see is if a server would carry all those unique IDs of all
>>> servers between the stratum 0 source and itself around and pass that
>>> list on to its downstream servers/clients. That would enable us to
>>> provide a "time trail" or a solution to the "traceable" time" stuff.
>>
>> Autokey, when properly configured, provides exactly this capability.
>
>Sounds great, Is there any tool or utility out there that can show me
>the exact trace for an instance of ntpd?

If you're looking for something that will pretty-print the certificate
trail, or shrink-wrap it in a GUI, the answer is no. However all of the
raw data is available.

A snapshot of the certificates held by ntpd are displayed in the 'ntpq
-crv' output (ntpq -c"rv 0 cert" displays just the certificates).

The cryptostats log file provides a log of certificate receipt, etc.

>To: Steve Kostecke <kostecke at ntp.org>
>Cc: ntpwg at lists.ntp.isc.org

Please send your replies TO: the list and refrain from CC:ing me.

-- 
Steve Kostecke <kostecke at ntp.org>
NTP Public Services Project http://support.ntp.org/
Public Key at http://support.ntp.org/Users/SteveKostecke

From heiko.gerstung at meinberg.de  Mon Jun 25 14:29:05 2007
From: heiko.gerstung at meinberg.de (Heiko Gerstung)
Date: Mon, 25 Jun 2007 16:29:05 +0200
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <E1I2p6r-0006G4-GE@stasis.kostecke.net>
References: <E1I2p6r-0006G4-GE@stasis.kostecke.net>
Message-ID: <467FD131.2050102@meinberg.de>

Steve Kostecke schrieb:
> Heiko Gerstung said:
>
>   
>> Steve Kostecke schrieb:
>>
>>     
>>> Heiko Gerstung said:
>>>
>>>       
>>>> Using a public host key of the server would work as well. But I do
>>>> not see that this helps in preventing loops, the only benefit I
>>>> could see is if a server would carry all those unique IDs of all
>>>> servers between the stratum 0 source and itself around and pass that
>>>> list on to its downstream servers/clients. That would enable us to
>>>> provide a "time trail" or a solution to the "traceable" time" stuff.
>>>>         
>>> Autokey, when properly configured, provides exactly this capability.
>>>       
>> Sounds great, Is there any tool or utility out there that can show me
>> the exact trace for an instance of ntpd?
>>     
>
> If you're looking for something that will pretty-print the certificate
> trail, or shrink-wrap it in a GUI, the answer is no. However all of the
> raw data is available.
>
> A snapshot of the certificates held by ntpd are displayed in the 'ntpq
> -crv' output (ntpq -c"rv 0 cert" displays just the certificates).
>   
That would mean that I could see a bunch of certificates from all the 
servers in the autokey hierarchy. Is there a chance or a collection of 
data that shows me how exactly the hierarchy looks like (i.e. which 
server is getting the time from whom)?

> The cryptostats log file provides a log of certificate receipt, etc.
>   
Log files are great for finding out what has happened when but I do 
think they are useful for determining the current status of something.

>> To: Steve Kostecke <kostecke at ntp.org>
>> Cc: ntpwg at lists.ntp.isc.org
>>     
>
> Please send your replies TO: the list and refrain from CC:ing me
Done. Sorry, my mail client seems to better like it the other way around.

Regards,
Heiko


From brian at innovationslab.net  Mon Jun 25 14:58:56 2007
From: brian at innovationslab.net (Brian Haberman)
Date: Mon, 25 Jun 2007 10:58:56 -0400
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <467FC9C3.5080208@gis.net>
References: <467BF8DA.80502@gis.net>
	<p0624080fc2a279cac13c@[192.168.1.199]>	<467F5ED3.5070302@meinberg.de>
	<467FB760.5000406@gis.net> <467FBA2E.3080706@innovationslab.net>
	<467FC9C3.5080208@gis.net>
Message-ID: <467FD830.4010507@innovationslab.net>



Danny Mayer wrote:
> Brian Haberman wrote:
>> Danny Mayer wrote:
>>> Heiko Gerstung wrote:
>>>> I would say that the refid is no security related data object. I agree
>>>> that the MAC address and IP can change, but I do not see any bad
>>>> implications here, at least not for the operational status.
>>> I agree. I just want to get away from the idea that we SHOULD use IPv4
>>> addresses (or IPv6 addresses MD5-summed). Just because the reference
>>> implementation uses that doesn't mean that everyone else should do so.
>>> The value can be anything as long as it's relatively unique.
>> Given that the task at hand is documenting what NTPv4 is today, what
>> implementations *do not* use the IPv4 address or the hashed IPv6 address
>> as the refid?  I don't see the benefit of trying to retrofit this type
>> of change into the protocol spec trying to be advanced.
>>
> 
> Not quite. The task is to document what an implementor needs to do, not
> what the reference implementation does. I have no idea what other
> implementations do.

One of Heiko's notes stated that 100% of the implementations handle the
refid the way it is defined in the spec.  Sounds like a consensus to me.

Regards,
Brian

From kostecke at ntp.org  Mon Jun 25 15:03:01 2007
From: kostecke at ntp.org (Steve Kostecke)
Date: Mon, 25 Jun 2007 11:03:01 -0400
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: Your message of "Mon, 25 Jun 2007 16:29:05 +0200."
	<467FD131.2050102@meinberg.de> 
Message-ID: <E1I2q5l-00080w-PG@stasis.kostecke.net>

Heiko Gerstung said:

>Steve Kostecke schrieb:
>
>> Heiko Gerstung said:
>>
>>> Sounds great, Is there any tool or utility out there that can show
>>> me the exact trace for an instance of ntpd?
>>
>> A snapshot of the certificates held by ntpd are displayed in
>> the 'ntpq -crv' output (ntpq -c"rv 0 cert" displays just the
>> certificates).
>
>That would mean that I could see a bunch of certificates from all the
>servers in the autokey hierarchy.

Yes.  You'll see something like this:

cert="lan_server root_server 0x6", expire=200806241435,
cert="root_server root_server 0x7", expire=200805112155,
cert="client lan_server 0x6", expire=200806241442,
cert="client lan_refclock_server 0x6", expire=200806241442,
cert="lan_server lan_server 0x7", expire=200806182029,
cert="lan_refclock_server lan_refclock_server 0x7", expire=200805102346,
cert="client client 0x2", expire=200805311052

>Is there a chance or a collection of data that shows me how exactly the
>hierarchy looks like (i.e. which server is getting the time from whom)?

That's the job of the non-existant pretty-printing utility. The
collection of certs above shows two certificate trails:

Trail #1: client -> lan_server -> root_server

cert="client client 0x2"		# self-signed client
cert="client lan_server 0x6"		# client signed by lan_server
cert="lan_server lan_server 0x7"	# self-signed lan-server
cert="lan_server root_server 0x6"	# lan_server signed by root_server
cert="root_server root_server 0x7"	# self-signed root_server

Trail #2: client -> lan_server_with_refclock

cert="client client 0x2"
cert="client lan_server_with_refclock 0x6"
cert="lan_server_with_refclock lan_server_with_refclock 0x7"

-- 
Steve Kostecke <kostecke at ntp.org>
NTP Public Services Project http://support.ntp.org/
Public Key at http://support.ntp.org/Users/SteveKostecke

From mills at udel.edu  Mon Jun 25 17:16:50 2007
From: mills at udel.edu (David L. Mills)
Date: Mon, 25 Jun 2007 17:16:50 +0000
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <467F5ED3.5070302@meinberg.de>
References: <467BF8DA.80502@gis.net> <p0624080fc2a279cac13c@[192.168.1.199]>
	<467F5ED3.5070302@meinberg.de>
Message-ID: <467FF882.8020303@udel.edu>

Heiko,

Yes, the loop test is rigorously implemented and it really does work. 
Note that the Bellman Ford metric is already biased in order to avoid 
loops in the first place, but loops can still form in manycast and 
multiple broadcast configurations. If you look very carefully, you will 
note that not only does the test avoid loops, but it avoids cases where 
your neighbor is synchronized to the same server as you.

I say again, the scheme is not perfect, but it --is backward compatible 
with previous versions--.

Dave

Heiko Gerstung wrote:

> Brad Knowles schrieb:
>
>> On 6/22/07, Danny Mayer wrote:
>>
>>
>>> The problem here is that the refid is to be used to detect timing loops
>>> but it can be any value that can do the job and should be unique for
>>> each server and not interface address. Thus a server should have one and
>>> only one refid irrespective of whether it is using IPv4 or IPv6
>>> addresses. Tying it to an IP address is not really a good idea. Tying it
>>> to a MAC address might be a better idea.
>>>
>>
> I think that the stratum level does a much better job in avoiding timing
> loops, we probably should abandon the idea that the refid is anything
> more than an informational value. Is the refid really checked in the
> code? If it is (probably in the peer handling stuff) then I would
> suspect that it only covers direct connections to the next upstream
> server and does not perform a full loop check (server A -> server B->
> server C -> server A).
>
>> You've got a MAC address per interface, so if you want to avoid doing
>> anything on a per-interface basis, then using the MAC address is just
>> as bad as an IP address. Moreover, with many high availability
>> services, you can "steal" IP and MAC addresses from one machine to
>> another, and you really don't want to base anything for NTP on
>> something that could be moved from one machine to another on a
>> moments notice.
>>
> I would say that the refid is no security related data object. I agree
> that the MAC address and IP can change, but I do not see any bad
> implications here, at least not for the operational status.
>
>> You need to choose something else that is relatively guaranteed to be
>> unique on a per-server basis, is guaranteed to stay on that server
>> and not move anywhere else, and is guaranteed to be unique regardless
>> of how many interfaces, IP addresses, MAC addresses, etc... that may
>> be on the server. For Suns, this might be hostid, but for other
>> platforms I suspect you're going to need something else.
>>
>>
>> Note that this unique id could change between reboots of the server,
>> or stop-and-restart operations of the NTP daemon, etc....
>>
>> So, one potential solution would be for the NTP daemon to take all
>> known MAC addresses, IP addresses, and other suitable information
>> that is available at the time of the start of the NTP program and
>> combine that with a suitably large pseudo-random number, and then
>> generate an MD-5 or SHA-1 or SHA-2 hash of that number, extract the
>> leftmost or rightmost four octets, and have that calculated value
>> become the "refid".
>>
>> I'm not saying that this is the only solution, or even that it is
>> necessarily the best solution. But it does seem to be a pretty good
>> solution, and assuming you choose a "good enough" hash function, it
>> should be sufficiently unique for the purpose of loop detection.
>>
> Using a public host key of the server would work as well. But I do not
> see that this helps in preventing loops, the only benefit I could see is
> if a server would carry all those unique IDs of all servers between the
> stratum 0 source and itself around and pass that list on to its
> downstream servers/clients. That would enable us to provide a "time
> trail" or a solution to the "traceable" time" stuff.
>
> Regards,
> Heiko
>
>
>>> I'd like to see recipients of KISS codes take actions dependent on the
>>> receipt of some of the codes.
>>>
>> Excellent idea
>
>
>
> _______________________________________________
> ntpwg mailing list
> ntpwg at lists.ntp.isc.org
> https://lists.ntp.isc.org/mailman/listinfo/ntpwg


-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ntp.isc.org/pipermail/ntpwg/attachments/20070625/021b0895/attachment-0001.html 

From mills at udel.edu  Mon Jun 25 17:38:27 2007
From: mills at udel.edu (David L. Mills)
Date: Mon, 25 Jun 2007 17:38:27 +0000
Subject: [ntpwg] Issues with the NTP draft -06
In-Reply-To: <467FAFAE.8030508@sun.com>
References: <467BF8DA.80502@gis.net>
	<p0624080fc2a279cac13c@[192.168.1.199]>	<467F5ED3.5070302@meinberg.de>
	<467FAFAE.8030508@sun.com>
Message-ID: <467FFD93.7070704@udel.edu>

Brian,

The stratum is a red herring. It is the result of a comparison between 
synchronization distances, not the primal cause. As in all good Bellman 
Ford implementations, the distance is biased so as to minimize dither 
and resulting stratum flaps. While yours and other schemes might even be 
more reliable, I say for the umpteenth time the issue of backwards 
compatibility trumps all.

Dave

Brian Utterback wrote:

> One of the key pieces you need to remember is that the while the refid
> should be unique, unless the data you want to use for the server's
> refid is already in the data somewhere that arrives from the server,
> the refid must be derivable from the client.
>
> To answer Heiko's comment about the stratum level, the problem with
> stratum level is the propagation delay when the level changes. However,
> the reason having only two levels of loop detection works is that the
> stratum level generally works for larger loops.
>
> I have always wondered if there might not be a way to get better
> loop detection if you treated the refid as a sort of shift register.
> Each server would choose a random one byte number at shift that number
> on the the refid it passes to the client. Then the client would look
> at each byte of the refid from all of its servers. If the higher order
> byte matches the clients random byte, avoid it if you can. If the
> top two bytes match the lowest byte of the client's server's refid and
> the the client's own byte, reject it. Reject if more bytes match.



From lmontini at cisco.com  Mon Jun 25 18:29:44 2007
From: lmontini at cisco.com (Laurent Montini (lmontini))
Date: Mon, 25 Jun 2007 20:29:44 +0200
Subject: [ntpwg] wg last call reminder
In-Reply-To: <2E44C2268B59514C89AE2CB514D15ACA0691D1FA@NAEAMILLEX01VA.nadsusea.nads.navy.mil>
Message-ID: <AF5B7FD06839284AAA2D622960544BCD03F6176E@xmb-ams-33a.emea.cisco.com>

Hi,
 
Removing from my short list the comments Yakov and Danny already made, 
I remain (if I understood correctly as a neophyte wrt NTPv4 draft) 
with:
 
1) page 29
Considering text and Figure 17, I believe there are the following
errors:

   A packet is a duplicate if the transmit timestamp T3 in the packet
   matches the xmt state variable.  

==> is that not the org state variable? 

   A packet is bogus if the origin
   timestamp T1 in the packet does not match the org state variable.  

==> is that not the xmt state variable?

Also in the Figure 17, for the consistency, 
   T1=t1?  (Peer A xmt state variable at t4)
Changed to 
   T1<>t1?

2) page 34
Considering Figure 22 and Figure 1 on page 6 I'd have liked to 
get a definition of packet mode.
A.5.1 does not tell much and does not use "packet mode" term.
In that context I did not really understand the relation between 
Figure 1 and Figure 22.

Otherwise version 4 draft is an improvement (from version 3) and ready
to go to IESG.

.lm

________________________________

	From: ntpwg-bounces+lmontini=cisco.com at lists.ntp.isc.org
[mailto:ntpwg-bounces+lmontini=cisco.com at lists.ntp.isc.org] On Behalf Of
Odonoghue, Karen F CIV NSWCDD, W13
	Sent: jeudi 21 juin 2007 11:47
	To: ntpwg at lists.ntp.isc.org
	Subject: [ntpwg] wg last call reminder
	
	

	Folks, 

	This is a quick reminder that there is a WG Last Call under way
for the ntpv4 spec. 
	Please review, post any comments, and post your opinion on the
maturity to the wg mailing list. 
	I would like to extend the last call through next Monday to
accommodate folks who wish to spend quality weekend time reviewing the
document. 

	Also, a reminder that the cut-off for new drafts for the Chicago
meeting is July 2 which is rapidly approaching. A number of folks have
mentioned specific items that they would like to see addressed. I
strongly suggest that you submit individual submission drafts for
discussion at the Chicago meeting.

	Karen 

	************************************************************ 
	Karen O'Donoghue 
	+1-540-653-1567 (voice) 
	+1-540-653-8673 (fax) 
	karen.odonoghue at navy.mil  

From mayer at ntp.isc.org  Tue Jun 26 03:51:00 2007
From: mayer at ntp.isc.org (Danny Mayer)
Date: Mon, 25 Jun 2007 23:51:00 -0400
Subject: [ntpwg] wg last call reminder
In-Reply-To: <AF5B7FD06839284AAA2D622960544BCD03F6176E@xmb-ams-33a.emea.cisco.com>
References: <AF5B7FD06839284AAA2D622960544BCD03F6176E@xmb-ams-33a.emea.cisco.com>
Message-ID: <46808D24.3040401@ntp.isc.org>

Laurent Montini (lmontini) wrote:
> Hi,
>  
> Removing from my short list the comments Yakov and Danny already made, 
> I remain (if I understood correctly as a neophyte wrt NTPv4 draft) 
> with:
>  
> 1) page 29
> Considering text and Figure 17, I believe there are the following
> errors:
> 
>    A packet is a duplicate if the transmit timestamp T3 in the packet
>    matches the xmt state variable.  
> 
> ==> is that not the org state variable? 
> 
>    A packet is bogus if the origin
>    timestamp T1 in the packet does not match the org state variable.  
> 
> ==> is that not the xmt state variable?
> 
> Also in the Figure 17, for the consistency, 
>    T1=t1?  (Peer A xmt state variable at t4)
> Changed to 
>    T1<>t1?
> 
> 2) page 34
> Considering Figure 22 and Figure 1 on page 6 I'd have liked to 
> get a definition of packet mode.
> A.5.1 does not tell much and does not use "packet mode" term.
> In that context I did not really understand the relation between 
> Figure 1 and Figure 22.
> 
> Otherwise version 4 draft is an improvement (from version 3) and ready
> to go to IESG.
> 
> .lm

Except that we were commenting on v6 of the draft and not v4. Does the
v6 version not answer/fix the issues you raise?

Danny

From lmontini at cisco.com  Tue Jun 26 05:09:04 2007
From: lmontini at cisco.com (Laurent Montini (lmontini))
Date: Tue, 26 Jun 2007 07:09:04 +0200
Subject: [ntpwg] wg last call reminder
Message-ID: <AF5B7FD06839284AAA2D622960544BCD019ACC7A@xmb-ams-33a.emea.cisco.com>

I was talking about NTP version.
I commented version 6 of the draft.

Sorry for the misleading sentence.
.lm


Sent by Good Messaging (www.good.com)


 -----Original Message-----
From: 	Danny Mayer [mailto:mayer at ntp.isc.org]
Sent:	Tuesday, June 26, 2007 04:51 AM GMT Standard Time
To:	Laurent Montini (lmontini)
Cc:	ntpwg at lists.ntp.isc.org
Subject:	Re: [ntpwg] wg last call reminder

Laurent Montini (lmontini) wrote:
> Hi,
>  
> Removing from my short list the comments Yakov and Danny already made, 
> I remain (if I understood correctly as a neophyte wrt NTPv4 draft) 
> with:
>  
> 1) page 29
> Considering text and Figure 17, I believe there are the following
> errors:
> 
>    A packet is a duplicate if the transmit timestamp T3 in the packet
>    matches the xmt state variable.  
> 
> ==> is that not the org state variable? 
> 
>    A packet is bogus if the origin
>    timestamp T1 in the packet does not match the org state variable.  
> 
> ==> is that not the xmt state variable?
> 
> Also in the Figure 17, for the consistency, 
>    T1=t1?  (Peer A xmt state variable at t4)
> Changed to 
>    T1<>t1?
> 
> 2) page 34
> Considering Figure 22 and Figure 1 on page 6 I'd have liked to 
> get a definition of packet mode.
> A.5.1 does not tell much and does not use "packet mode" term.
> In that context I did not really understand the relation between 
> Figure 1 and Figure 22.
> 
> Otherwise version 4 draft is an improvement (from version 3) and ready
> to go to IESG.
> 
> .lm

Except that we were commenting on v6 of the draft and not v4. Does the
v6 version not answer/fix the issues you raise?

Danny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ntp.isc.org/pipermail/ntpwg/attachments/20070626/68fdacb8/attachment.html 

From mayer at gis.net  Tue Jun 26 11:52:13 2007
From: mayer at gis.net (Danny Mayer)
Date: Tue, 26 Jun 2007 07:52:13 -0400
Subject: [ntpwg] KISS codes
Message-ID: <4680FDED.2040209@gis.net>

Noone has commented on my recommendations for the KISS codes so I'm
sending it back out again. This is much more important than the
discussion on refid.

4) P24. Section 7.4 last sentence:
   Other than
   displaying the kiss code, KoD packets have no protocol significance
   and are discarded after inspection.

I'd like to see recipients of KISS codes take actions dependent on the
receipt of some of the codes. Practical experience has shown that the
operators of public servers need to be able to assert more control over
the clients that contact their servers. I'd like to therefore change
this sentence to read as follows:

   Recipients of kiss codes MUST inspect them and in the following cases
   take these actions:
   a) For kiss codes: DENY, RSTR the client MUST demobilize any
      associations to that server and stop sending packets to that
      server;
   b) For kiss code: RATE the client MUST immediately reduce its polling
      interval to that server and continue to reduce it each time it
      receives a RATE kiss code.
   c) Other than the above conditions, KoD packets have no protocol
      significance and are discarded after inspection.

From heiko.gerstung at meinberg.de  Tue Jun 26 12:08:17 2007
From: heiko.gerstung at meinberg.de (Heiko Gerstung)
Date: Tue, 26 Jun 2007 14:08:17 +0200
Subject: [ntpwg] KISS codes
In-Reply-To: <4680FDED.2040209@gis.net>
References: <4680FDED.2040209@gis.net>
Message-ID: <468101B1.302@meinberg.de>

Danny Mayer schrieb:
> Noone has commented on my recommendations for the KISS codes so I'm
> sending it back out again. This is much more important than the
> discussion on refid.
>
> 4) P24. Section 7.4 last sentence:
>    Other than
>    displaying the kiss code, KoD packets have no protocol significance
>    and are discarded after inspection.
>
> I'd like to see recipients of KISS codes take actions dependent on the
> receipt of some of the codes. Practical experience has shown that the
> operators of public servers need to be able to assert more control over
> the clients that contact their servers. I'd like to therefore change
> this sentence to read as follows:
>
>    Recipients of kiss codes MUST inspect them and in the following cases
>    take these actions:
>    a) For kiss codes: DENY, RSTR the client MUST demobilize any
>       associations to that server and stop sending packets to that
>       server;
>    b) For kiss code: RATE the client MUST immediately reduce its polling
>       interval to that server and continue to reduce it each time it
>       receives a RATE kiss code.
>    c) Other than the above conditions, KoD packets have no protocol
>       significance and are discarded after inspection.
>   
Works for me. If we have the chance, we should try to enforce people to 
actually honor the KISS codes and Danny's proposal does exactly that. 
However, I could live with the existing version as well, since this is 
the status quo and in the real world those crazy clients are neither 
running NTPv4 nor do they care about RFCs ... *sigh*

Regards,
Heiko



From mayer at gis.net  Tue Jun 26 12:44:25 2007
From: mayer at gis.net (Danny Mayer)
Date: Tue, 26 Jun 2007 08:44:25 -0400
Subject: [ntpwg] KISS codes
In-Reply-To: <468101B1.302@meinberg.de>
References: <4680FDED.2040209@gis.net> <468101B1.302@meinberg.de>
Message-ID: <46810A29.1000506@gis.net>

Heiko Gerstung wrote:
> Danny Mayer schrieb:
>> Noone has commented on my recommendations for the KISS codes so I'm
>> sending it back out again. This is much more important than the
>> discussion on refid.
>>
>> 4) P24. Section 7.4 last sentence:
>>    Other than
>>    displaying the kiss code, KoD packets have no protocol significance
>>    and are discarded after inspection.
>>
>> I'd like to see recipients of KISS codes take actions dependent on the
>> receipt of some of the codes. Practical experience has shown that the
>> operators of public servers need to be able to assert more control over
>> the clients that contact their servers. I'd like to therefore change
>> this sentence to read as follows:
>>
>>    Recipients of kiss codes MUST inspect them and in the following cases
>>    take these actions:
>>    a) For kiss codes: DENY, RSTR the client MUST demobilize any
>>       associations to that server and stop sending packets to that
>>       server;
>>    b) For kiss code: RATE the client MUST immediately reduce its polling
>>       interval to that server and continue to reduce it each time it
>>       receives a RATE kiss code.
>>    c) Other than the above conditions, KoD packets have no protocol
>>       significance and are discarded after inspection.
>>   
> Works for me. If we have the chance, we should try to enforce people to
> actually honor the KISS codes and Danny's proposal does exactly that.
> However, I could live with the existing version as well, since this is
> the status quo and in the real world those crazy clients are neither
> running NTPv4 nor do they care about RFCs ... *sigh*
> 

The goal is to change the status quo and the servers that are making
their services available a chance to indicate to clients to change their
behavior. Having this embedded in an RFC is much better than having
nothing there at all. We are all aware of client behavior but we do need
to take the opportunity to try and influence it.

Danny
> Regards,
> Heiko
> 
> 
> 


From stbryant at cisco.com  Tue Jun 26 12:47:43 2007
From: stbryant at cisco.com (Stewart Bryant)
Date: Tue, 26 Jun 2007 13:47:43 +0100
Subject: [ntpwg] ***SPAM*** Comments on NTP draft -06
In-Reply-To: <467BF8DA.80502@gis.net>
References: <467BF8DA.80502@gis.net>
Message-ID: <46810AEF.3010900@cisco.com>


Abstract

   The Network Time Protocol (NTP) is widely used to synchronize
   computer clocks in the Internet.  This document describes NTP Version
   4 (NTPv4), which is backwards compatible with NTP Version 3 (NTPv3)
   described in RFC 1305, as well as previous versions of the protocol.
   It includes a modified protocol header to accommodate the Internet
SB> What does "It" refer to?
   Protocol Version 6 address family.  NTPv4 includes fundamental

==========

   The NTP subnet model includes a number of widely accessible primary
   time servers synchronized by wire or radio to national standards.
   The purpose of the NTP protocol is to convey timekeeping information
   from these primary servers to secondary time servers and clients via
   both private networks and the public Internet.  Crafted algorithms

SB> What is a crafted algorithm?

   mitigate errors that may result from network disruptions, server
   failures and possible hostile actions.  Servers and clients are
   configured such that values flow towards clients from the primary
   servers at the root via branching secondary servers.

=========


2.  Modes of Operation

   An NTP implementation operates as a primary server, secondary server
   or client.  A primary server is synchronized directly to a reference
   clock, such as a GPS receiver or telephone modem service.  A client
   synchronizes to one or more upstream servers, but does not provide
   synchronization to dependent clients.  A secondary server has one or
   more upstream servers and one or more downstream servers or clients.
   All servers and clients who are fully NTPv4 compliance MUST implement
   the entire suite of algorithms described in this document.

SB> Why do we insist on this, surely someone producing an improved
SB> algorithm should be able to use it and still claim conformance?

=========



   As a standard practice, timing network topology should be organized
SB> Should or MUST?
   to avoid timing loops and minimize the synchronization distance.  In
   NTP the subnet topology is determined using a variant of the Bellman-
   Ford distributed routing algorithm, which computes the shortest-
   distance spanning tree rooted on the primary servers.  As a result of
SB> check the term spanning - shortest path tree might be better
SB> Do you mean server (singular) or servers (plural). If the latter there
SB> may be a collection of SPTs rooted at each server
   this design, the algorithm automatically reorganizes the subnet, so
   as to produce the most accurate and reliable time, even when there
   are failures in the timing network.


============


                   +-----------------------------------+
                   | Packet Variable <--   Variable    |
                   +-----------------------------------+
                   | x.leap        <--     s.leap      |
                   | x.version     <--     r.version   |
                   | x.mode        <--     4           |
                   | x.stratum     <--     s.stratum   |
                   | x.poll        <--     r.poll      |
                   | x.precision   <--     s.precision |
                   | x.rootdelay   <--     s.rootdelay |
                   | x.rootdisp    <--     s.rootdisp  |
                   | x.refid       <--     s.refid     |
                   | x.reftime     <--     s.reftime   |
                   | x.org         <--     r.xmt       |
                   | x.rec         <--     r.dst       |
                   | x.xmt         <--     clock       |
                   | x.keyid       <--     r.keyid     |
                   | x.digest      <--     md5 digest  |
                   +-----------------------------------+

                     Figure 2: fast_xmit Packet Header

SB> This is not a header definition in an IETF sense. In any case this
SB> seems rather detailed this early in the spec given that no definition
SB> of these fields is yet given.

============


   The ephemeral associations compete among themselves.  As new
   ephemeral associations are mobilized, the client runs the mitigation
   algorithms described in Section 10 and Section 11.2 for the best
   candidates out of the population, the remaining ephemeral
   associations are timed out and demobilized.  In this way the
   population includes only the best and freshest candidates to
SB> Freshest??
   discipline the system clock.  The reference implementation includes
   intricate means to do this, but these are beyond the scope of this
   document.


==========
   The delay (delta) represents the round trip delay
   between the client and server.  The dispersion (epsilon) represents
   the maximum error inherent in the measurement.  It increases at a
SB> Shouldn't the term "maximum error" have some form of statistical 
context?
   rate equal to the maximum disciplined system clock frequency
   tolerance (PHI), typically 15 PPM.  The jitter (psi) is defined as
   the root-mean-square (RMS) average of the most recent offset
   differences, represents the nominal error in estimating the offset.
SB> In timing terms jitter has significance in representing the high
SB> frequency error term (as opposed to wander it's low frequency 
counterpart
SB> Do we need to make it clear that we are using a different definition.

   While the theta, delta, epsilon, and psi statistics represent
   measurements of the system clock relative to the each server clock
SB> typo "to the each"

=========



   .....................................................................
   . Remote   .   Peer/Poll  .              System          .  Clock   .
   . Servers  .   Processes  .              Process         .Discipline.
   .          .              .                              . Process  .
   .+--------+. +-----------+. +------------+               .          .
   .|        |->|           |. |            |               .          .
   .|Server 1|  |Peer/Poll 1|->|            |               .          .
   .|        |<-|           |. |            |               .          .
   .+--------+. +-----------+. |            |               .          .
   .          .       ^      . |            |               .          .
   .          .       |      . |            |               .          .
   .+--------+. +-----------+. |            |  +-----------+.          .
   .|        |->|           |. | Selection  |->|           |. +------+ .
   .|Server 2|  |Peer/Poll 2|->|    and     |  | Combine   |->| Loop | .
   .|        |<-|           |. | Cluster    |  | Algorithm |. |Filter| .
   .+--------+. +-----------+. | Algorithms |->|           |. +------+ .
   .          .       ^      . |            |  +-----------+.    |     .
   .          .       |      . |            |               .    |     .
   .+--------+. +-----------+. |            |               .    |     .
   .|        |->|           |. |            |               .    |     .
   .|Server 3|  |Peer/Poll 3|->|            |               .    |     .
   .|        |<-|           |. |            |               .    |     .
   .+--------+. +-----------+. +------------+               .    |     .
   ....................^.........................................|......
                       |                                    .    V     .
                       |                                    . +-----+  .
                       +--------------------------------------| VFO |  .
                                                            . +-----+  .
                                                            .  Clock   .
                                                            .  Adjust  .
                                                            .  Process .
                                                            ............

                      Figure 3: Implementation Model

SB> Are three instances the norm, the max or just an example?

==========


   The only arithmetic operation permitted on dates and timestamps is

   twos-complement subtraction, yielding a 127-bit or 63-bit signed
SB> Why not addition to yield a time in the future?

===========


   s = era * 2^(32) + timestamp.

   Converting between NTP and system time can be a little messy, but
SB> but or and?
   beyond the scope of this document.  Note that the number of days in

===========

7.  Data Structures

   The NTP protocol state machines described in following sections are
SB>typo in the following
   defined using state variables and code fragments defined in
   Appendix A.  State variables are separated into classes according to
   their function in packet headers, peer and poll processes, the system
   process and the clock discipline process.  Packet variables represent
   the NTP header values in transmitted and received packets.  Peer and
   poll variables represent the contents of the association for each
   server separately.  System variables represent the state of the
   server as seen by its dependent clients.  Clock discipline variables
SB> what is a dependent client?
   represent the internal workings of the clock discipline algorithm.
   Additional parameters and variable classes are defined in Appendix A.

==========

            +-----------+-------+----------------------------------+
            | Name      | Value | Description                      |
            +-----------+-------+----------------------------------+
            | PORT      | 123   | NTP port number                  |
SB> UDP port number assigned to NTP?
SB> BTW can you run NTP over DCP or perhaps one of the SCTP modes?

==========

               +-----------+------------+-----------------------+
               | Name      | Formula    | Description           |
               +-----------+------------+-----------------------+
               | leap      | leap       | leap indicator (LI)   |
               | version   | version    | version number (VN)   |
               | mode      | mode       | mode                  |
               | stratum   | stratum    | stratum               |
               | poll      | poll       | poll exponent         |
               | precision | rho        | precision exponent    |
               | rootdelay | delta_r    | root delay            |
               | rootdisp  | epsilon_r  | root dispersion       |
               | refid     | refid      | reference ID          |
               | reftime   | reftime    | reference timestamp   |
               | org       | T1         | origin timestamp      |
               | rec       | T2         | receive timestamp     |
               | xmt       | T3         | transmit timestamp    |
               | dst       | T4         | destination timestamp |
               | keyid     | keyid      | key ID                |
               | digest    | digest     | message digest        |
               +-----------+------------+-----------------------+

SB> do you mean formula or symbol - applies many places - but we meet it
SB> here without explanation?

                     Figure 8: Packet Header Variables

   The NTP packet header follows the UDP and IP headers and the physical
   header specific to the underlying transport network.  Some fields use
   multiple words and others are packed in smaller fields within a word.
SB> I don't remember seeing a definition of word yet? In any case
SB> don't we mean longword?
   The NTP packet header shown in Figure 9 has 12 words followed by
   optional extension fields and finally an optional message
   authentication code (MAC) consisting of the key identifier field and
   message digest field.
SB> It should be clearer (in the fig) which of the (long)words  below
   are each component mentioned by name above.



       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |LI | VN  |Mode |    Stratum     |     Poll      |  Precision   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Root Delay                            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Root Dispersion                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                          Reference ID                         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                     Reference Timestamp (64)                  +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                      Origin Timestamp (64)                    +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                      Receive Timestamp (64)                   +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                      Transmit Timestamp (64)                  +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                    Extension Field 1 (variable)               +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                    Extension Field 2 (variable)               +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                          Key Identifier                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      |                       Message Digest (128)                    |
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Figure 9: Packet Header Format


===========

   The extension fields are used to add optional capabilities, for
   example, the Autokey security protocol [3].  The extension field
   format is presented in order that the packet can be parsed without
   knowledge of the extension field functions.  The MAC is used by both



Burbank, et al.         Expires November 25, 2007              [Page 20]

Internet-Draft             NTPv4 Specification                  May 2007


   Autokey and the symmetric key authentication scheme described in
   Appendix A.

   A list of the packet header variables is shown in Figure 8 and
   described in detail below.  Except for a minor variation when using
   the IPv6 address family, these fields are backwards compatible with
   NTPv3.  The packet header fields apply to both transmitted packets (x
   prefix) and received packets (r prefix).  In Figure 9 the size of
   some multiple-word fields is shown in bits if not the default 32
   bits. 
SB> Why not say bits in the fig and remove the text above which is
SB> mildly confusing

   The header extends from the beginning of the packet to the end
   of the Transmit Timestamp field.

SB> This would certainly be clearer with notations in the fig above
SB> or a set of smaller figures and a larger structure diagram
SB> or a better representation method such as pdf :)

   The fields and associated packet variables (in parentheses) are
   interpreted as follows:

   LI Leap Indicator (leap): 2-bit integer warning of an impending leap
   second to be inserted or deleted in the last minute of the current
   month with values defined in Figure 10.

           +-------+-------------------------------------------------+
           | Value | Meaning                                         |
           +-------+-------------------------------------------------+
           | 0     | no warning                                      |
           | 1     | last minute of the day has 61 seconds           |
           | 2     | last minute of the day has 59 seconds           |
SB> surely last minute of the last day of the month has X seconds?
           | 3     | alarm condition (the clock is not synchronized) |
           +-------+-------------------------------------------------+

===========



   It is customary to map the stratum value 0 in received packets to
   MAXSTRAT (16) in the peer variable p.stratum and to map p.stratum
   values of MAXSTRAT or greater to 0 in transmitted packets.  This
   allows reference clocks, which normally appear at stratum 0, to be
   conveniently mitigated using the same algorithms used for external
   sources.

SB> I do not understand the above para

   Poll: 8-bit signed integer representing the maximum interval between
   successive messages, in log2 seconds.  Suggested default limits for
   minimum and maximum poll intervals are 6 and 10, respectively.

   Precision: 8-bit signed integer representing the precision of the
   system clock, in log2 seconds.  For instance a value of -18
   corresponds to a precision of about one microsecond.  The precision
   can be determined when the service first starts up as the minimum
   time of several iterations to read the system clock.
SB> I do not understand the last sentence

===============
     +------+----------------------------------------------------------+
     | ID   | Clock Source                                             |
     +------+----------------------------------------------------------+
     | GOES | Geosynchronous Orbit Environment Satellite               |
     | GPS  | Global Position System                                   |
     | GAL  | Galileo Positioning System                               |
     | PPS  | Generic pulse-per-second                                 |
     | IRIG | Inter-Range Instrumentation Group                        |
     | WWVB | LF Radio WWVB Ft. Collins, CO 60 kHz                     |
     | DCF  | LF Radio DCF77 Mainflingen, DE 77.5 kHz                  |
     | HBG  | LF Radio HBG Prangins, HB 75 kHz                         |
     | MSF  | LF Radio MSF Anthorn, UK 60 kHz (Rugby until April 2007) |
     | JJY  | LF Radio JJY Fukushima, JP 40 kHz, Saga, JP 60 kHz       |
     | LORC | MF Radio LORAN C 100 kHz                                 |
     | TDF  | MF Radio Allouis, FR 162 kHz                             |
     | CHU  | HF Radio CHU Ottawa, Ontario                             |
     | WWV  | HF Radio WWV Ft. Collins, CO                             |
     | WWVH | HF Radio WWVH Kauai, HI                                  |
     | NIST | NIST telephone modem                                     |
     | ACTS | NIST telephone modem                                     |
     | USNO | USNO telephone modem                                     |
     | PTB  | European telephone modem                                 |
     +------+----------------------------------------------------------+

                     Figure 13: Reference Identifiers

SB> Is this going to be an IANA registry?
SB> Does there need to be an IEEE1588 code?

=============

   Origin Timestamp (org): Time at the client when the request departed
   for the server, in NTP timestamp format.

SB>Is there a reference interface point for this?

=============

   The MAC consists of the Key Identifier followed by the Message
   Digest.  The message digest, or cryptosum, is calculated as in [8]
   over all header and optional extension fields, but not the MAC
   itself.

SB> All headers, or all NTP headers?


=============


   A list of
   the currently-defined kiss codes is given in Figure 14.  Other than
   displaying the kiss code, KoD packets have no protocol significance
   and are discarded after inspection.

SB> Is this going to be an IANA registry?


   +------+------------------------------------------------------------+
   | Code |                           Meaning                          |
   +------+------------------------------------------------------------+
   | ACST | The association belongs to a unicast server                |
   | AUTH | Server authentication failed                               |
   | AUTO | Autokey sequence failed                                    |
   | BCST | The association belongs to a broadcast server              |
   | CRYP | Cryptographic authentication or identification failed      |
   | DENY | Access denied by remote server                             |
   | DROP | Lost peer in symmetric mode                                |
   | RSTR | Access denied due to local policy                          |
   | INIT | The association has not yet synchronized for the first     |
   |      | time                                                       |
   | MCST | The association belongs to a dynamically discovered server |
   | NKEY | No key found. Either the key was never installed or is     |
   |      | not trusted                                                |
   | RATE | Rate exceeded. The server has temporarily denied access    |
   |      | because the client exceeded the rate threshold             |
   | RMOT | Alteration of association from a remote host running       |
   |      | ntpdc.                                                     |
   | STEP | A step change in system time has occurred, but the         |
   |      | association has not yet resynchronized                     |
   +------+------------------------------------------------------------+

                           Figure 14: Kiss Codes
===========

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Field Type           |            Length             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                          Association ID                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Timestamp                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Filestamp                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                          Value Length                         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      .                                                               .
      .                            Value                              .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Signature Length                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      .                                                               .
      .                          Signature                            .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                       Padding (as needed)                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Figure 15: Extension Field Format

   All extension fields are zero-padded to a word (4 octets) boundary.
SB> Is it normal to describe words as 32 bits?

   The Field Type field is specific to the defined function and is not
   elaborated here.  While the minimum field length containing required
   fields is 4 words (16 octets), a maximum field length remains to be
   established.

   The Length field is a 16-bit integer which indicates the length of
SB> Integer or unsigned integer?

==========


   Note that the quantities within parentheses are computed from 64-bit
   unsigned timestamps and result in signed values with 63 significant
   bits plus sign.  These values can represent dates from 68 years in
   the past to 68 years in the future.  However, the offset and delay
   are computed as sums and differences of these values, which contain
   62 significant bits and two sign bits, so can represent unambiguous
   values from 34 years in the past to 34 years in the future.  In other
   words, the time of the client must be set within 34 years of the
   server before the service is started.  This is a fundamental
   limitation with 64-bit integer arithmetic.

SB> I am not sure why a client needs to be configured with a time
SB> to within 34 years. Surely if you make the assumption that the
SB> packet takes less than 34 years to arrive you can bootstrap
SB> without needing configuration - or at least you can relax the time
SB> from 34 years to 136 years


============

   In implementations where floating double arithmetic is available, the
   first-order differences can be converted to floating double and the
   second-order sums and differences computed in that arithmetic.  Since
   the second-order terms are typically very small relative to the
   timestamp magnitudes, there is no loss in significance, yet the
   unambiguous range is restored from 34 years to 68 years.

SB> Surely there is a protocol action that can resolve the ambiguity
SB> without needing floating double?

==============


   Note that the on-wire protocol as described resists replay of a
   server response packet.  However, it does not resist replay of the
   client request packet, which would result in a server reply packet
   with new values of T2 and T3 and result in incorrect offset and
   delay.  This vulnerability can be avoided by setting the xmt state
   variable to zero after computing the offset and delay.

SB> Need to check that the security section has a back ref to here.

==============

14.  Security Considerations

   NTPv4 provides an optional authentication field that utilizes the MD5
   algorithm.  MD5, as the case for SHA-1, is derived from MD4, which
   has long been known to be weak.  In 2004, techniques for efficiently
   finding collisions in MD5 were announced.  A summary of the
   apropriateness of MD5 can be found in [10].

   In the case of NTP as specified herein, NTP broadcast clients are
   vulnerable to disruption by misbehaving or hostile SNTP or NTP
   broadcast servers elsewhere in the Internet.  Access controls and/or
   cryptographic authentication means should be provided for additional
   security in such cases.

SB> This should be reviewed by the security directorate before the
SB> draft goes any further. Based on previous experience I doubt that
SB> the analysis will be considered sufficient. Note that the main
SB> text calls up at least one threat that is not called up here.

===============

15.  IANA Considerations

   UDP/TCP Port 123 was previously assigned by IANA for this protocol.
   The IANA has assigned the IPv4 multicast group address 224.0.1.1 and
   the IPv6 multicast address ending :101 for NTP.  This document
   introduces NTP extension fields allowing for the development of
   future extensions to the protocol, where a particular extension is to
   be identified by the Field Type sub-field within the extension field.
   IANA is requested to establish and maintain a registry for Extension
   Field Types associated with this protocol, populating this registry
   with no initial entries.  As future needs arise, new Extension Field
   Types may be defined.  Following the policies outlined in [11], new
   consensus.

SB> English problem in last sentence.

SB> There are a bunch of other values that are assigned in this protocol
SB> surely these need registries to ensure that the standard develops
SB> in a controlled way. This is an essential difference between
SB> definition by standard and definition by reference implementation.

============


Appendix A.  Code Skeleton

SB> You need to specify the normative/informative status of this appendix
SB> vis a vis the main body of the specification.

SB> Shouldn't this have a reference to ANSI C so that we have a
SB> definition of all the types - alternatively they all
SB> need to be defined here for consistency.

=============

#include <math.h>               /* avoids complaints about sqrt() */
#include <sys/time.h>           /* for gettimeofday() and friends */
#include <stdlib.h>             /* for malloc() and friends */

SB> Don't you need a pointer to a definitive instance of the above
SB> header files?

/*
 * Data types
 *
 * This program assumes the int data type is 32 bitsand the long data
SB> typo bitsand

==============


/*
 * Timestamp conversion macroni
 */
SB> typo macroni?

============

/*
 * Global constants. Some of these might be converted to variables
 * which can be tinkered by configuration or computed on-fly. For
 * instance, the reference implementation computes PRECISION on-fly and
 * provides performance tuning for the defines marked with % below.
 */

SB> We really need to distinguish quite firmly between
SB> invariants, implementation parameters and initial values
SB> This comment applies to all of the #defines in the
SB> following sections


#define VERSION         4       /* version number */
#define MINDISP         .01     /* % minimum dispersion (s) */
#define MAXDISP         16      /* maximum dispersion (s) */
#define MAXDIST         1       /* % distance threshold (s) */
#define NOSYNC          0x3     /* leap unsync */
#define MAXSTRAT        16      /* maximum stratum (infinity metric) */
#define MINPOLL         6       /* % minimum poll interval (64 s)*/
#define MAXPOLL         17      /* % maximum poll interval (36.4 h) */
#define MINCLOCK        3       /* minimum manycast survivors */
#define MAXCLOCK        10      /* maximum manycast candidates */
#define TTLMAX          8       /* max ttl manycast */
#define BEACON          15      /* max interval between beacons */

#define PHI             15e-6   /* % frequency tolerance (15 PPM) */
#define NSTAGE          8       /* clock register stages */
#define NMAX            50      /* maximum number of peers */
#define NSANE           1       /* % minimum intersection survivors */
#define NMIN            3       /* % minimum cluster survivors */

===============

SB> Suppose you ought to point out that this is the UNIX epoch - NTP
SB> epoch difference
#define JAN_1970        2208988800UL /* 1970 - 1900 in seconds */


================


SB> Is there any formal process to check that there were no edit issues
SB> in the code - which is I assume an extract from the reference 
implementation
SB> That is true here, but will apply again when it goes though the
SB> edit process.

- Stewart

From karen.odonoghue at navy.mil  Wed Jun 27 03:52:28 2007
From: karen.odonoghue at navy.mil (Odonoghue, Karen F CIV NSWCDD, W13)
Date: Tue, 26 Jun 2007 22:52:28 -0500
Subject: [ntpwg] ***SPAM*** FW: Comments on NTP draft -06
Message-ID: <2E44C2268B59514C89AE2CB514D15ACA06BDAA9E@NAEAMILLEX01VA.nadsusea.nads.navy.mil>

This message from Stewart seems to have been bounced by 
the ntp mailing list as spam. 

Karen

-----Original Message-----
From: Stewart Bryant [mailto:stbryant at cisco.com] 
Sent: Tuesday, June 26, 2007 8:48
To: Odonoghue, Karen F CIV NSWCDD, W13
Cc: NTP Working Group
Subject: Comments on NTP draft -06


Abstract

   The Network Time Protocol (NTP) is widely used to synchronize
   computer clocks in the Internet.  This document describes NTP Version
   4 (NTPv4), which is backwards compatible with NTP Version 3 (NTPv3)
   described in RFC 1305, as well as previous versions of the protocol.
   It includes a modified protocol header to accommodate the Internet
SB> What does "It" refer to?
   Protocol Version 6 address family.  NTPv4 includes fundamental

==========

   The NTP subnet model includes a number of widely accessible primary
   time servers synchronized by wire or radio to national standards.
   The purpose of the NTP protocol is to convey timekeeping information
   from these primary servers to secondary time servers and clients via
   both private networks and the public Internet.  Crafted algorithms

SB> What is a crafted algorithm?

   mitigate errors that may result from network disruptions, server
   failures and possible hostile actions.  Servers and clients are
   configured such that values flow towards clients from the primary
   servers at the root via branching secondary servers.

=========


2.  Modes of Operation

   An NTP implementation operates as a primary server, secondary server
   or client.  A primary server is synchronized directly to a reference
   clock, such as a GPS receiver or telephone modem service.  A client
   synchronizes to one or more upstream servers, but does not provide
   synchronization to dependent clients.  A secondary server has one or
   more upstream servers and one or more downstream servers or clients.
   All servers and clients who are fully NTPv4 compliance MUST implement
   the entire suite of algorithms described in this document.

SB> Why do we insist on this, surely someone producing an improved
SB> algorithm should be able to use it and still claim conformance?

=========



   As a standard practice, timing network topology should be organized
SB> Should or MUST?
   to avoid timing loops and minimize the synchronization distance.  In
   NTP the subnet topology is determined using a variant of the Bellman-
   Ford distributed routing algorithm, which computes the shortest-
   distance spanning tree rooted on the primary servers.  As a result of
SB> check the term spanning - shortest path tree might be better
SB> Do you mean server (singular) or servers (plural). If the latter
there
SB> may be a collection of SPTs rooted at each server
   this design, the algorithm automatically reorganizes the subnet, so
   as to produce the most accurate and reliable time, even when there
   are failures in the timing network.


============


                   +-----------------------------------+
                   | Packet Variable <--   Variable    |
                   +-----------------------------------+
                   | x.leap        <--     s.leap      |
                   | x.version     <--     r.version   |
                   | x.mode        <--     4           |
                   | x.stratum     <--     s.stratum   |
                   | x.poll        <--     r.poll      |
                   | x.precision   <--     s.precision |
                   | x.rootdelay   <--     s.rootdelay |
                   | x.rootdisp    <--     s.rootdisp  |
                   | x.refid       <--     s.refid     |
                   | x.reftime     <--     s.reftime   |
                   | x.org         <--     r.xmt       |
                   | x.rec         <--     r.dst       |
                   | x.xmt         <--     clock       |
                   | x.keyid       <--     r.keyid     |
                   | x.digest      <--     md5 digest  |
                   +-----------------------------------+

                     Figure 2: fast_xmit Packet Header

SB> This is not a header definition in an IETF sense. In any case this
SB> seems rather detailed this early in the spec given that no
definition
SB> of these fields is yet given.

============


   The ephemeral associations compete among themselves.  As new
   ephemeral associations are mobilized, the client runs the mitigation
   algorithms described in Section 10 and Section 11.2 for the best
   candidates out of the population, the remaining ephemeral
   associations are timed out and demobilized.  In this way the
   population includes only the best and freshest candidates to
SB> Freshest??
   discipline the system clock.  The reference implementation includes
   intricate means to do this, but these are beyond the scope of this
   document.


==========
   The delay (delta) represents the round trip delay
   between the client and server.  The dispersion (epsilon) represents
   the maximum error inherent in the measurement.  It increases at a
SB> Shouldn't the term "maximum error" have some form of statistical 
context?
   rate equal to the maximum disciplined system clock frequency
   tolerance (PHI), typically 15 PPM.  The jitter (psi) is defined as
   the root-mean-square (RMS) average of the most recent offset
   differences, represents the nominal error in estimating the offset.
SB> In timing terms jitter has significance in representing the high
SB> frequency error term (as opposed to wander it's low frequency 
counterpart
SB> Do we need to make it clear that we are using a different
definition.

   While the theta, delta, epsilon, and psi statistics represent
   measurements of the system clock relative to the each server clock
SB> typo "to the each"

=========



   .....................................................................
   . Remote   .   Peer/Poll  .              System          .  Clock   .
   . Servers  .   Processes  .              Process         .Discipline.
   .          .              .                              . Process  .
   .+--------+. +-----------+. +------------+               .          .
   .|        |->|           |. |            |               .          .
   .|Server 1|  |Peer/Poll 1|->|            |               .          .
   .|        |<-|           |. |            |               .          .
   .+--------+. +-----------+. |            |               .          .
   .          .       ^      . |            |               .          .
   .          .       |      . |            |               .          .
   .+--------+. +-----------+. |            |  +-----------+.          .
   .|        |->|           |. | Selection  |->|           |. +------+ .
   .|Server 2|  |Peer/Poll 2|->|    and     |  | Combine   |->| Loop | .
   .|        |<-|           |. | Cluster    |  | Algorithm |. |Filter| .
   .+--------+. +-----------+. | Algorithms |->|           |. +------+ .
   .          .       ^      . |            |  +-----------+.    |     .
   .          .       |      . |            |               .    |     .
   .+--------+. +-----------+. |            |               .    |     .
   .|        |->|           |. |            |               .    |     .
   .|Server 3|  |Peer/Poll 3|->|            |               .    |     .
   .|        |<-|           |. |            |               .    |     .
   .+--------+. +-----------+. +------------+               .    |     .
   ....................^.........................................|......
                       |                                    .    V     .
                       |                                    . +-----+  .
                       +--------------------------------------| VFO |  .
                                                            . +-----+  .
                                                            .  Clock   .
                                                            .  Adjust  .
                                                            .  Process .
                                                            ............

                      Figure 3: Implementation Model

SB> Are three instances the norm, the max or just an example?

==========


   The only arithmetic operation permitted on dates and timestamps is

   twos-complement subtraction, yielding a 127-bit or 63-bit signed
SB> Why not addition to yield a time in the future?

===========


   s = era * 2^(32) + timestamp.

   Converting between NTP and system time can be a little messy, but
SB> but or and?
   beyond the scope of this document.  Note that the number of days in

===========

7.  Data Structures

   The NTP protocol state machines described in following sections are
SB>typo in the following
   defined using state variables and code fragments defined in
   Appendix A.  State variables are separated into classes according to
   their function in packet headers, peer and poll processes, the system
   process and the clock discipline process.  Packet variables represent
   the NTP header values in transmitted and received packets.  Peer and
   poll variables represent the contents of the association for each
   server separately.  System variables represent the state of the
   server as seen by its dependent clients.  Clock discipline variables
SB> what is a dependent client?
   represent the internal workings of the clock discipline algorithm.
   Additional parameters and variable classes are defined in Appendix A.

==========

            +-----------+-------+----------------------------------+
            | Name      | Value | Description                      |
            +-----------+-------+----------------------------------+
            | PORT      | 123   | NTP port number                  |
SB> UDP port number assigned to NTP?
SB> BTW can you run NTP over DCP or perhaps one of the SCTP modes?

==========

               +-----------+------------+-----------------------+
               | Name      | Formula    | Description           |
               +-----------+------------+-----------------------+
               | leap      | leap       | leap indicator (LI)   |
               | version   | version    | version number (VN)   |
               | mode      | mode       | mode                  |
               | stratum   | stratum    | stratum               |
               | poll      | poll       | poll exponent         |
               | precision | rho        | precision exponent    |
               | rootdelay | delta_r    | root delay            |
               | rootdisp  | epsilon_r  | root dispersion       |
               | refid     | refid      | reference ID          |
               | reftime   | reftime    | reference timestamp   |
               | org       | T1         | origin timestamp      |
               | rec       | T2         | receive timestamp     |
               | xmt       | T3         | transmit timestamp    |
               | dst       | T4         | destination timestamp |
               | keyid     | keyid      | key ID                |
               | digest    | digest     | message digest        |
               +-----------+------------+-----------------------+

SB> do you mean formula or symbol - applies many places - but we meet it
SB> here without explanation?

                     Figure 8: Packet Header Variables

   The NTP packet header follows the UDP and IP headers and the physical
   header specific to the underlying transport network.  Some fields use
   multiple words and others are packed in smaller fields within a word.
SB> I don't remember seeing a definition of word yet? In any case
SB> don't we mean longword?
   The NTP packet header shown in Figure 9 has 12 words followed by
   optional extension fields and finally an optional message
   authentication code (MAC) consisting of the key identifier field and
   message digest field.
SB> It should be clearer (in the fig) which of the (long)words  below
   are each component mentioned by name above.



       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |LI | VN  |Mode |    Stratum     |     Poll      |  Precision   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Root Delay                            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Root Dispersion                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                          Reference ID                         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                     Reference Timestamp (64)                  +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                      Origin Timestamp (64)                    +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                      Receive Timestamp (64)                   +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                      Transmit Timestamp (64)                  +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                    Extension Field 1 (variable)               +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                    Extension Field 2 (variable)               +
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                          Key Identifier                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      |                       Message Digest (128)                    |
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Figure 9: Packet Header Format


===========

   The extension fields are used to add optional capabilities, for
   example, the Autokey security protocol [3].  The extension field
   format is presented in order that the packet can be parsed without
   knowledge of the extension field functions.  The MAC is used by both



Burbank, et al.         Expires November 25, 2007              [Page 20]

Internet-Draft             NTPv4 Specification                  May 2007


   Autokey and the symmetric key authentication scheme described in
   Appendix A.

   A list of the packet header variables is shown in Figure 8 and
   described in detail below.  Except for a minor variation when using
   the IPv6 address family, these fields are backwards compatible with
   NTPv3.  The packet header fields apply to both transmitted packets (x
   prefix) and received packets (r prefix).  In Figure 9 the size of
   some multiple-word fields is shown in bits if not the default 32
   bits. 
SB> Why not say bits in the fig and remove the text above which is
SB> mildly confusing

   The header extends from the beginning of the packet to the end
   of the Transmit Timestamp field.

SB> This would certainly be clearer with notations in the fig above
SB> or a set of smaller figures and a larger structure diagram
SB> or a better representation method such as pdf :)

   The fields and associated packet variables (in parentheses) are
   interpreted as follows:

   LI Leap Indicator (leap): 2-bit integer warning of an impending leap
   second to be inserted or deleted in the last minute of the current
   month with values defined in Figure 10.

           +-------+-------------------------------------------------+
           | Value | Meaning                                         |
           +-------+-------------------------------------------------+
           | 0     | no warning                                      |
           | 1     | last minute of the day has 61 seconds           |
           | 2     | last minute of the day has 59 seconds           |
SB> surely last minute of the last day of the month has X seconds?
           | 3     | alarm condition (the clock is not synchronized) |
           +-------+-------------------------------------------------+

===========



   It is customary to map the stratum value 0 in received packets to
   MAXSTRAT (16) in the peer variable p.stratum and to map p.stratum
   values of MAXSTRAT or greater to 0 in transmitted packets.  This
   allows reference clocks, which normally appear at stratum 0, to be
   conveniently mitigated using the same algorithms used for external
   sources.

SB> I do not understand the above para

   Poll: 8-bit signed integer representing the maximum interval between
   successive messages, in log2 seconds.  Suggested default limits for
   minimum and maximum poll intervals are 6 and 10, respectively.

   Precision: 8-bit signed integer representing the precision of the
   system clock, in log2 seconds.  For instance a value of -18
   corresponds to a precision of about one microsecond.  The precision
   can be determined when the service first starts up as the minimum
   time of several iterations to read the system clock.
SB> I do not understand the last sentence

===============
     +------+----------------------------------------------------------+
     | ID   | Clock Source                                             |
     +------+----------------------------------------------------------+
     | GOES | Geosynchronous Orbit Environment Satellite               |
     | GPS  | Global Position System                                   |
     | GAL  | Galileo Positioning System                               |
     | PPS  | Generic pulse-per-second                                 |
     | IRIG | Inter-Range Instrumentation Group                        |
     | WWVB | LF Radio WWVB Ft. Collins, CO 60 kHz                     |
     | DCF  | LF Radio DCF77 Mainflingen, DE 77.5 kHz                  |
     | HBG  | LF Radio HBG Prangins, HB 75 kHz                         |
     | MSF  | LF Radio MSF Anthorn, UK 60 kHz (Rugby until April 2007) |
     | JJY  | LF Radio JJY Fukushima, JP 40 kHz, Saga, JP 60 kHz       |
     | LORC | MF Radio LORAN C 100 kHz                                 |
     | TDF  | MF Radio Allouis, FR 162 kHz                             |
     | CHU  | HF Radio CHU Ottawa, Ontario                             |
     | WWV  | HF Radio WWV Ft. Collins, CO                             |
     | WWVH | HF Radio WWVH Kauai, HI                                  |
     | NIST | NIST telephone modem                                     |
     | ACTS | NIST telephone modem                                     |
     | USNO | USNO telephone modem                                     |
     | PTB  | European telephone modem                                 |
     +------+----------------------------------------------------------+

                     Figure 13: Reference Identifiers

SB> Is this going to be an IANA registry?
SB> Does there need to be an IEEE1588 code?

=============

   Origin Timestamp (org): Time at the client when the request departed
   for the server, in NTP timestamp format.

SB>Is there a reference interface point for this?

=============

   The MAC consists of the Key Identifier followed by the Message
   Digest.  The message digest, or cryptosum, is calculated as in [8]
   over all header and optional extension fields, but not the MAC
   itself.

SB> All headers, or all NTP headers?


=============


   A list of
   the currently-defined kiss codes is given in Figure 14.  Other than
   displaying the kiss code, KoD packets have no protocol significance
   and are discarded after inspection.

SB> Is this going to be an IANA registry?


   +------+------------------------------------------------------------+
   | Code |                           Meaning                          |
   +------+------------------------------------------------------------+
   | ACST | The association belongs to a unicast server                |
   | AUTH | Server authentication failed                               |
   | AUTO | Autokey sequence failed                                    |
   | BCST | The association belongs to a broadcast server              |
   | CRYP | Cryptographic authentication or identification failed      |
   | DENY | Access denied by remote server                             |
   | DROP | Lost peer in symmetric mode                                |
   | RSTR | Access denied due to local policy                          |
   | INIT | The association has not yet synchronized for the first     |
   |      | time                                                       |
   | MCST | The association belongs to a dynamically discovered server |
   | NKEY | No key found. Either the key was never installed or is     |
   |      | not trusted                                                |
   | RATE | Rate exceeded. The server has temporarily denied access    |
   |      | because the client exceeded the rate threshold             |
   | RMOT | Alteration of association from a remote host running       |
   |      | ntpdc.                                                     |
   | STEP | A step change in system time has occurred, but the         |
   |      | association has not yet resynchronized                     |
   +------+------------------------------------------------------------+

                           Figure 14: Kiss Codes
===========

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Field Type           |            Length             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                          Association ID                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Timestamp                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Filestamp                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                          Value Length                         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      .                                                               .
      .                            Value                              .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Signature Length                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      .                                                               .
      .                          Signature                            .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                       Padding (as needed)                     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Figure 15: Extension Field Format

   All extension fields are zero-padded to a word (4 octets) boundary.
SB> Is it normal to describe words as 32 bits?

   The Field Type field is specific to the defined function and is not
   elaborated here.  While the minimum field length containing required
   fields is 4 words (16 octets), a maximum field length remains to be
   established.

   The Length field is a 16-bit integer which indicates the length of
SB> Integer or unsigned integer?

==========


   Note that the quantities within parentheses are computed from 64-bit
   unsigned timestamps and result in signed values with 63 significant
   bits plus sign.  These values can represent dates from 68 years in
   the past to 68 years in the future.  However, the offset and delay
   are computed as sums and differences of these values, which contain
   62 significant bits and two sign bits, so can represent unambiguous
   values from 34 years in the past to 34 years in the future.  In other
   words, the time of the client must be set within 34 years of the
   server before the service is started.  This is a fundamental
   limitation with 64-bit integer arithmetic.

SB> I am not sure why a client needs to be configured with a time
SB> to within 34 years. Surely if you make the assumption that the
SB> packet takes less than 34 years to arrive you can bootstrap
SB> without needing configuration - or at least you can relax the time
SB> from 34 years to 136 years


============

   In implementations where floating double arithmetic is available, the
   first-order differences can be converted to floating double and the
   second-order sums and differences computed in that arithmetic.  Since
   the second-order terms are typically very small relative to the
   timestamp magnitudes, there is no loss in significance, yet the
   unambiguous range is restored from 34 years to 68 years.

SB> Surely there is a protocol action that can resolve the ambiguity
SB> without needing floating double?

==============


   Note that the on-wire protocol as described resists replay of a
   server response packet.  However, it does not resist replay of the
   client request packet, which would result in a server reply packet
   with new values of T2 and T3 and result in incorrect offset and
   delay.  This vulnerability can be avoided by setting the xmt state
   variable to zero after computing the offset and delay.

SB> Need to check that the security section has a back ref to here.

==============

14.  Security Considerations

   NTPv4 provides an optional authentication field that utilizes the MD5
   algorithm.  MD5, as the case for SHA-1, is derived from MD4, which
   has long been known to be weak.  In 2004, techniques for efficiently
   finding collisions in MD5 were announced.  A summary of the
   apropriateness of MD5 can be found in [10].

   In the case of NTP as specified herein, NTP broadcast clients are
   vulnerable to disruption by misbehaving or hostile SNTP or NTP
   broadcast servers elsewhere in the Internet.  Access controls and/or
   cryptographic authentication means should be provided for additional
   security in such cases.

SB> This should be reviewed by the security directorate before the
SB> draft goes any further. Based on previous experience I doubt that
SB> the analysis will be considered sufficient. Note that the main
SB> text calls up at least one threat that is not called up here.

===============

15.  IANA Considerations

   UDP/TCP Port 123 was previously assigned by IANA for this protocol.
   The IANA has assigned the IPv4 multicast group address 224.0.1.1 and
   the IPv6 multicast address ending :101 for NTP.  This document
   introduces NTP extension fields allowing for the development of
   future extensions to the protocol, where a particular extension is to
   be identified by the Field Type sub-field within the extension field.
   IANA is requested to establish and maintain a registry for Extension
   Field Types associated with this protocol, populating this registry
   with no initial entries.  As future needs arise, new Extension Field
   Types may be defined.  Following the policies outlined in [11], new
   consensus.

SB> English problem in last sentence.

SB> There are a bunch of other values that are assigned in this protocol
SB> surely these need registries to ensure that the standard develops
SB> in a controlled way. This is an essential difference between
SB> definition by standard and definition by reference implementation.

============


Appendix A.  Code Skeleton

SB> You need to specify the normative/informative status of this
appendix
SB> vis a vis the main body of the specification.

SB> Shouldn't this have a reference to ANSI C so that we have a
SB> definition of all the types - alternatively they all
SB> need to be defined here for consistency.

=============

#include <math.h>               /* avoids complaints about sqrt() */
#include <sys/time.h>           /* for gettimeofday() and friends */
#include <stdlib.h>             /* for malloc() and friends */

SB> Don't you need a pointer to a definitive instance of the above
SB> header files?

/*
 * Data types
 *
 * This program assumes the int data type is 32 bitsand the long data
SB> typo bitsand

==============


/*
 * Timestamp conversion macroni
 */
SB> typo macroni?

============

/*
 * Global constants. Some of these might be converted to variables
 * which can be tinkered by configuration or computed on-fly. For
 * instance, the reference implementation computes PRECISION on-fly and
 * provides performance tuning for the defines marked with % below.
 */

SB> We really need to distinguish quite firmly between
SB> invariants, implementation parameters and initial values
SB> This comment applies to all of the #defines in the
SB> following sections


#define VERSION         4       /* version number */
#define MINDISP         .01     /* % minimum dispersion (s) */
#define MAXDISP         16      /* maximum dispersion (s) */
#define MAXDIST         1       /* % distance threshold (s) */
#define NOSYNC          0x3     /* leap unsync */
#define MAXSTRAT        16      /* maximum stratum (infinity metric) */
#define MINPOLL         6       /* % minimum poll interval (64 s)*/
#define MAXPOLL         17      /* % maximum poll interval (36.4 h) */
#define MINCLOCK        3       /* minimum manycast survivors */
#define MAXCLOCK        10      /* maximum manycast candidates */
#define TTLMAX          8       /* max ttl manycast */
#define BEACON          15      /* max interval between beacons */

#define PHI             15e-6   /* % frequency tolerance (15 PPM) */
#define NSTAGE          8       /* clock register stages */
#define NMAX            50      /* maximum number of peers */
#define NSANE           1       /* % minimum intersection survivors */
#define NMIN            3       /* % minimum cluster survivors */

===============

SB> Suppose you ought to point out that this is the UNIX epoch - NTP
SB> epoch difference
#define JAN_1970        2208988800UL /* 1970 - 1900 in seconds */


================


SB> Is there any formal process to check that there were no edit issues
SB> in the code - which is I assume an extract from the reference 
implementation
SB> That is true here, but will apply again when it goes though the
SB> edit process.

- Stewart

From brad at shub-internet.org  Wed Jun 27 04:13:54 2007
From: brad at shub-internet.org (Brad Knowles)
Date: Tue, 26 Jun 2007 23:13:54 -0500
Subject: [ntpwg] ***SPAM*** FW: Comments on NTP draft -06
In-Reply-To: <2E44C2268B59514C89AE2CB514D15ACA06BDAA9E@NAEAMILLEX01VA.nadsusea.nads.nav
	y.mil>
References: <2E44C2268B59514C89AE2CB514D15ACA06BDAA9E@NAEAMILLEX01VA.nadsusea.nads.nav
	y.mil>
Message-ID: <p06240800c2a793cfc7d3@[192.168.1.199]>

On 6/26/07, Odonoghue, Karen F CIV NSWCDD, W13 wrote:

>  This message from Stewart seems to have been bounced by
>  the ntp mailing list as spam.

It was marked as spam, but I got a copy and there's a copy in the 
archives (see 
<https://lists.ntp.isc.org/pipermail/ntpwg/2007-June/000653.html>), 
so unless Stewart included me as a blind-carbon-copy recipient and 
somehow managed to get the Mailman archive system on this machine to 
include a copy there, then the message definitely got posted to the 
list and sent out.

In the future, if you have any questions then you can always check 
the archive to see if it has a copy of the message in question.

-- 
Brad Knowles <brad at shub-internet.org>, Consultant & Author
LinkedIn Profile: <http://tinyurl.com/y8kpxu>
Slides from Invited Talks: <http://tinyurl.com/tj6q4>

09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

From mayer at ntp.isc.org  Thu Jun 28 14:11:49 2007
From: mayer at ntp.isc.org (Danny Mayer)
Date: Thu, 28 Jun 2007 10:11:49 -0400
Subject: [ntpwg] ***SPAM*** Re:  Comments on NTP draft -06
In-Reply-To: <46810AEF.3010900@cisco.com>
References: <467BF8DA.80502@gis.net> <46810AEF.3010900@cisco.com>
Message-ID: <4683C1A5.3040604@ntp.isc.org>

Stewart Bryant wrote:
> Abstract
> 
>    The Network Time Protocol (NTP) is widely used to synchronize
>    computer clocks in the Internet.  This document describes NTP Version
>    4 (NTPv4), which is backwards compatible with NTP Version 3 (NTPv3)
>    described in RFC 1305, as well as previous versions of the protocol.
>    It includes a modified protocol header to accommodate the Internet
> SB> What does "It" refer to?

In this case the V4 version of the NTP protocol.

>    Protocol Version 6 address family.  NTPv4 includes fundamental
> 
> 2.  Modes of Operation
> 
>    An NTP implementation operates as a primary server, secondary server
>    or client.  A primary server is synchronized directly to a reference
>    clock, such as a GPS receiver or telephone modem service.  A client
>    synchronizes to one or more upstream servers, but does not provide
>    synchronization to dependent clients.  A secondary server has one or
>    more upstream servers and one or more downstream servers or clients.
>    All servers and clients who are fully NTPv4 compliance MUST implement
>    the entire suite of algorithms described in this document.
> 
> SB> Why do we insist on this, surely someone producing an improved
> SB> algorithm should be able to use it and still claim conformance?
> 

You have a point here especially as Dave Mills is constantly tweaking
the algorithms to improve the results. However I think that the point
trying to be made here is that there is a set of algorithms being used
and not just one that needs to be used to bring the clock into
compliance with UTC. I don't think it's the algorithms themselves that's
set in stone, it the fact that there's a set of them each of which can
be implemented any way the implementor pleases. I cannot craft better
language on this, but I'm sure others can.

> =========
> 
> 
> 
>    As a standard practice, timing network topology should be organized
> SB> Should or MUST?

I think "should" is sufficient here as NTP goes to great lengths to
discard anything that does not conform to its idea of valid (for some
meaning of valid). timing loop avoidance and synchronization distance
minimization just helps the calculations.

>    to avoid timing loops and minimize the synchronization distance.  In
>    NTP the subnet topology is determined using a variant of the Bellman-
>    Ford distributed routing algorithm, which computes the shortest-
>    distance spanning tree rooted on the primary servers.  As a result of
> SB> check the term spanning - shortest path tree might be better
> SB> Do you mean server (singular) or servers (plural). If the latter there
> SB> may be a collection of SPTs rooted at each server

I think that Dave Mills really means distance spanning tree from a
mathematical point of view.

>    this design, the algorithm automatically reorganizes the subnet, so
>    as to produce the most accurate and reliable time, even when there
>    are failures in the timing network.
> 
> 
> ============
> 
> 
>                    +-----------------------------------+
>                    | Packet Variable <--   Variable    |
>                    +-----------------------------------+
>                    | x.leap        <--     s.leap      |
>                    | x.version     <--     r.version   |
>                    | x.mode        <--     4           |
>                    | x.stratum     <--     s.stratum   |
>                    | x.poll        <--     r.poll      |
>                    | x.precision   <--     s.precision |
>                    | x.rootdelay   <--     s.rootdelay |
>                    | x.rootdisp    <--     s.rootdisp  |
>                    | x.refid       <--     s.refid     |
>                    | x.reftime     <--     s.reftime   |
>                    | x.org         <--     r.xmt       |
>                    | x.rec         <--     r.dst       |
>                    | x.xmt         <--     clock       |
>                    | x.keyid       <--     r.keyid     |
>                    | x.digest      <--     md5 digest  |
>                    +-----------------------------------+
> 
>                      Figure 2: fast_xmit Packet Header
> 
> SB> This is not a header definition in an IETF sense. In any case this
> SB> seems rather detailed this early in the spec given that no definition
> SB> of these fields is yet given.
> 

Well this looks like a duplicate of Figure 35 on P54. We should
eliminate one or the other.
> ============
> 
> 
>    The ephemeral associations compete among themselves.  As new
>    ephemeral associations are mobilized, the client runs the mitigation
>    algorithms described in Section 10 and Section 11.2 for the best
>    candidates out of the population, the remaining ephemeral
>    associations are timed out and demobilized.  In this way the
>    population includes only the best and freshest candidates to
> SB> Freshest??

Those candidates which most recently responded with an NTP packet.

>    discipline the system clock.  The reference implementation includes
>    intricate means to do this, but these are beyond the scope of this
>    document.
> 
> 
> ==========
>    The delay (delta) represents the round trip delay
>    between the client and server.  The dispersion (epsilon) represents
>    the maximum error inherent in the measurement.  It increases at a
> SB> Shouldn't the term "maximum error" have some form of statistical 
> context?

It is. This is a definition of what the term means rather than how it is
to be estimated.

>    rate equal to the maximum disciplined system clock frequency
>    tolerance (PHI), typically 15 PPM.  The jitter (psi) is defined as
>    the root-mean-square (RMS) average of the most recent offset
>    differences, represents the nominal error in estimating the offset.
> SB> In timing terms jitter has significance in representing the high
> SB> frequency error term (as opposed to wander it's low frequency 
> counterpart
> SB> Do we need to make it clear that we are using a different definition.
> 
>    While the theta, delta, epsilon, and psi statistics represent
>    measurements of the system clock relative to the each server clock
> SB> typo "to the each"
> 
> =========
> 
> 
> 
>    .....................................................................
>    . Remote   .   Peer/Poll  .              System          .  Clock   .
>    . Servers  .   Processes  .              Process         .Discipline.
>    .          .              .                              . Process  .
>    .+--------+. +-----------+. +------------+               .          .
>    .|        |->|           |. |            |               .          .
>    .|Server 1|  |Peer/Poll 1|->|            |               .          .
>    .|        |<-|           |. |            |               .          .
>    .+--------+. +-----------+. |            |               .          .
>    .          .       ^      . |            |               .          .
>    .          .       |      . |            |               .          .
>    .+--------+. +-----------+. |            |  +-----------+.          .
>    .|        |->|           |. | Selection  |->|           |. +------+ .
>    .|Server 2|  |Peer/Poll 2|->|    and     |  | Combine   |->| Loop | .
>    .|        |<-|           |. | Cluster    |  | Algorithm |. |Filter| .
>    .+--------+. +-----------+. | Algorithms |->|           |. +------+ .
>    .          .       ^      . |            |  +-----------+.    |     .
>    .          .       |      . |            |               .    |     .
>    .+--------+. +-----------+. |            |               .    |     .
>    .|        |->|           |. |            |               .    |     .
>    .|Server 3|  |Peer/Poll 3|->|            |               .    |     .
>    .|        |<-|           |. |            |               .    |     .
>    .+--------+. +-----------+. +------------+               .    |     .
>    ....................^.........................................|......
>                        |                                    .    V     .
>                        |                                    . +-----+  .
>                        +--------------------------------------| VFO |  .
>                                                             . +-----+  .
>                                                             .  Clock   .
>                                                             .  Adjust  .
>                                                             .  Process .
>                                                             ............
> 
>                       Figure 3: Implementation Model
> 
> SB> Are three instances the norm, the max or just an example?

If you mean instances of servers, then this is just an example. The
reference implementation lets you have as many as you want but it will
ignore some if it has too many but even that limit can be changed.

> 
> ==========
> 
> 
>    The only arithmetic operation permitted on dates and timestamps is
> 
>    twos-complement subtraction, yielding a 127-bit or 63-bit signed
> SB> Why not addition to yield a time in the future?

What's calculated when you boil everything down is the amount that your
system clock differs from the reference clocks. That number may be
positive or negative but NTP never calculates time in the future or
past, just the amount your clock disagrees and the frequency changes
necessary to bring it into line.

> 
> ===========
> 
> 
>    s = era * 2^(32) + timestamp.
> 
>    Converting between NTP and system time can be a little messy, but
> SB> but or and?
>    beyond the scope of this document.  Note that the number of days in
> 
> ===========
> 
> 7.  Data Structures
> 
>    The NTP protocol state machines described in following sections are
> SB>typo in the following
>    defined using state variables and code fragments defined in
>    Appendix A.  State variables are separated into classes according to
>    their function in packet headers, peer and poll processes, the system
>    process and the clock discipline process.  Packet variables represent
>    the NTP header values in transmitted and received packets.  Peer and
>    poll variables represent the contents of the association for each
>    server separately.  System variables represent the state of the
>    server as seen by its dependent clients.  Clock discipline variables
> SB> what is a dependent client?

The recipients of NTP packets the server responds with, or in the case
of broadcast the ones it sends out that are received by clients.

>    represent the internal workings of the clock discipline algorithm.
>    Additional parameters and variable classes are defined in Appendix A.
> 
> ==========
> 
>             +-----------+-------+----------------------------------+
>             | Name      | Value | Description                      |
>             +-----------+-------+----------------------------------+
>             | PORT      | 123   | NTP port number                  |
> SB> UDP port number assigned to NTP?

Yes. This is assigned by IANA. See Section 7.2 (p18) and also Section 15.

> SB> BTW can you run NTP over DCP or perhaps one of the SCTP modes?

In theory you can run it over any protocol, but you would would break
things like autokey which makes use of the IP address of the client and
server to authenticate. It's really designed for UDP/IP.

> 
> ==========
> 
>                +-----------+------------+-----------------------+
>                | Name      | Formula    | Description           |
>                +-----------+------------+-----------------------+
>                | leap      | leap       | leap indicator (LI)   |
>                | version   | version    | version number (VN)   |
>                | mode      | mode       | mode                  |
>                | stratum   | stratum    | stratum               |
>                | poll      | poll       | poll exponent         |
>                | precision | rho        | precision exponent    |
>                | rootdelay | delta_r    | root delay            |
>                | rootdisp  | epsilon_r  | root dispersion       |
>                | refid     | refid      | reference ID          |
>                | reftime   | reftime    | reference timestamp   |
>                | org       | T1         | origin timestamp      |
>                | rec       | T2         | receive timestamp     |
>                | xmt       | T3         | transmit timestamp    |
>                | dst       | T4         | destination timestamp |
>                | keyid     | keyid      | key ID                |
>                | digest    | digest     | message digest        |
>                +-----------+------------+-----------------------+
> 
> SB> do you mean formula or symbol - applies many places - but we meet it
> SB> here without explanation?
> 
>                      Figure 8: Packet Header Variables
> 
>    The NTP packet header follows the UDP and IP headers and the physical
>    header specific to the underlying transport network.  Some fields use
>    multiple words and others are packed in smaller fields within a word.
> SB> I don't remember seeing a definition of word yet? In any case
> SB> don't we mean longword?

32-bit word, to be specific.

>    The NTP packet header shown in Figure 9 has 12 words followed by
>    optional extension fields and finally an optional message
>    authentication code (MAC) consisting of the key identifier field and
>    message digest field.
> SB> It should be clearer (in the fig) which of the (long)words  below
>    are each component mentioned by name above.
> 
> 
> 
>        0                   1                   2                   3
>        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |LI | VN  |Mode |    Stratum     |     Poll      |  Precision   |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                         Root Delay                            |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                         Root Dispersion                       |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                          Reference ID                         |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                                                               |
>       +                     Reference Timestamp (64)                  +
>       |                                                               |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                                                               |
>       +                      Origin Timestamp (64)                    +
>       |                                                               |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                                                               |
>       +                      Receive Timestamp (64)                   +
>       |                                                               |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                                                               |
>       +                      Transmit Timestamp (64)                  +
>       |                                                               |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                                                               |
>       +                    Extension Field 1 (variable)               +
>       |                                                               |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                                                               |
>       +                    Extension Field 2 (variable)               +
>       |                                                               |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                          Key Identifier                       |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                                                               |
>       |                       Message Digest (128)                    |
>       |                                                               |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> 
>                       Figure 9: Packet Header Format
> 
> 
> ===========
> 
>    The extension fields are used to add optional capabilities, for
>    example, the Autokey security protocol [3].  The extension field
>    format is presented in order that the packet can be parsed without
>    knowledge of the extension field functions.  The MAC is used by both
> 
> 
> 
> Burbank, et al.         Expires November 25, 2007              [Page 20]
> 
> Internet-Draft             NTPv4 Specification                  May 2007
> 
> 
>    Autokey and the symmetric key authentication scheme described in
>    Appendix A.
> 
>    A list of the packet header variables is shown in Figure 8 and
>    described in detail below.  Except for a minor variation when using
>    the IPv6 address family, these fields are backwards compatible with
>    NTPv3.  The packet header fields apply to both transmitted packets (x
>    prefix) and received packets (r prefix).  In Figure 9 the size of
>    some multiple-word fields is shown in bits if not the default 32
>    bits. 
> SB> Why not say bits in the fig and remove the text above which is
> SB> mildly confusing
> 
>    The header extends from the beginning of the packet to the end
>    of the Transmit Timestamp field.
> 
> SB> This would certainly be clearer with notations in the fig above
> SB> or a set of smaller figures and a larger structure diagram
> SB> or a better representation method such as pdf :)
> 
>    The fields and associated packet variables (in parentheses) are
>    interpreted as follows:
> 
>    LI Leap Indicator (leap): 2-bit integer warning of an impending leap
>    second to be inserted or deleted in the last minute of the current
>    month with values defined in Figure 10.
> 
>            +-------+-------------------------------------------------+
>            | Value | Meaning                                         |
>            +-------+-------------------------------------------------+
>            | 0     | no warning                                      |
>            | 1     | last minute of the day has 61 seconds           |
>            | 2     | last minute of the day has 59 seconds           |
> SB> surely last minute of the last day of the month has X seconds?

Not exactly. It's actually the last day of a specific quarter though I
don't think it's ever happened yet on any day but the last day of the year.

>            | 3     | alarm condition (the clock is not synchronized) |
>            +-------+-------------------------------------------------+
> 
> ===========
> 
> 
> 
>    It is customary to map the stratum value 0 in received packets to
>    MAXSTRAT (16) in the peer variable p.stratum and to map p.stratum
>    values of MAXSTRAT or greater to 0 in transmitted packets.  This
>    allows reference clocks, which normally appear at stratum 0, to be
>    conveniently mitigated using the same algorithms used for external
>    sources.
> 
> SB> I do not understand the above para

This looks like an implementation-specific detail.

> 
>    Poll: 8-bit signed integer representing the maximum interval between
>    successive messages, in log2 seconds.  Suggested default limits for
>    minimum and maximum poll intervals are 6 and 10, respectively.
> 
>    Precision: 8-bit signed integer representing the precision of the
>    system clock, in log2 seconds.  For instance a value of -18
>    corresponds to a precision of about one microsecond.  The precision
>    can be determined when the service first starts up as the minimum
>    time of several iterations to read the system clock.
> SB> I do not understand the last sentence

Yep, that's wrong. The precision can be calculated from this but it
isn't the minimum time.

> 
> ===============
>      +------+----------------------------------------------------------+
>      | ID   | Clock Source                                             |
>      +------+----------------------------------------------------------+
>      | GOES | Geosynchronous Orbit Environment Satellite               |
>      | GPS  | Global Position System                                   |
>      | GAL  | Galileo Positioning System                               |
>      | PPS  | Generic pulse-per-second                                 |
>      | IRIG | Inter-Range Instrumentation Group                        |
>      | WWVB | LF Radio WWVB Ft. Collins, CO 60 kHz                     |
>      | DCF  | LF Radio DCF77 Mainflingen, DE 77.5 kHz                  |
>      | HBG  | LF Radio HBG Prangins, HB 75 kHz                         |
>      | MSF  | LF Radio MSF Anthorn, UK 60 kHz (Rugby until April 2007) |
>      | JJY  | LF Radio JJY Fukushima, JP 40 kHz, Saga, JP 60 kHz       |
>      | LORC | MF Radio LORAN C 100 kHz                                 |
>      | TDF  | MF Radio Allouis, FR 162 kHz                             |
>      | CHU  | HF Radio CHU Ottawa, Ontario                             |
>      | WWV  | HF Radio WWV Ft. Collins, CO                             |
>      | WWVH | HF Radio WWVH Kauai, HI                                  |
>      | NIST | NIST telephone modem                                     |
>      | ACTS | NIST telephone modem                                     |
>      | USNO | USNO telephone modem                                     |
>      | PTB  | European telephone modem                                 |
>      +------+----------------------------------------------------------+
> 
>                      Figure 13: Reference Identifiers
> 
> SB> Is this going to be an IANA registry?

If don't think that there is a need for that. It's just advisory about
what's being used. That could change if this becomes required
information, eg for tracability.

> SB> Does there need to be an IEEE1588 code?

What's that for?

> 
> =============
> 
>    Origin Timestamp (org): Time at the client when the request departed
>    for the server, in NTP timestamp format.
> 
> SB>Is there a reference interface point for this?

Meaning what?

> =============
> 
>    The MAC consists of the Key Identifier followed by the Message
>    Digest.  The message digest, or cryptosum, is calculated as in [8]
>    over all header and optional extension fields, but not the MAC
>    itself.
> 
> SB> All headers, or all NTP headers?
> 
NTP headers.

> 
> =============
> 
> 
>    A list of
>    the currently-defined kiss codes is given in Figure 14.  Other than
>    displaying the kiss code, KoD packets have no protocol significance
>    and are discarded after inspection.
> 
> SB> Is this going to be an IANA registry?

Right now it's informational, with the exception of my recommendation to
make DENY, RSTR, and RATE have the client do something. Is there a need
for this in the IANA registry?

> 
> 
>    +------+------------------------------------------------------------+
>    | Code |                           Meaning                          |
>    +------+------------------------------------------------------------+
>    | ACST | The association belongs to a unicast server                |
>    | AUTH | Server authentication failed                               |
>    | AUTO | Autokey sequence failed                                    |
>    | BCST | The association belongs to a broadcast server              |
>    | CRYP | Cryptographic authentication or identification failed      |
>    | DENY | Access denied by remote server                             |
>    | DROP | Lost peer in symmetric mode                                |
>    | RSTR | Access denied due to local policy                          |
>    | INIT | The association has not yet synchronized for the first     |
>    |      | time                                                       |
>    | MCST | The association belongs to a dynamically discovered server |
>    | NKEY | No key found. Either the key was never installed or is     |
>    |      | not trusted                                                |
>    | RATE | Rate exceeded. The server has temporarily denied access    |
>    |      | because the client exceeded the rate threshold             |
>    | RMOT | Alteration of association from a remote host running       |
>    |      | ntpdc.                                                     |
>    | STEP | A step change in system time has occurred, but the         |
>    |      | association has not yet resynchronized                     |
>    +------+------------------------------------------------------------+
> 
>                            Figure 14: Kiss Codes
> ===========
> 
>        0                   1                   2                   3
>        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |          Field Type           |            Length             |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                          Association ID                       |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                           Timestamp                           |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                           Filestamp                           |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                          Value Length                         |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       .                                                               .
>       .                            Value                              .
>       .                                                               .
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                        Signature Length                       |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       .                                                               .
>       .                          Signature                            .
>       .                                                               .
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                       Padding (as needed)                     |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> 
>                      Figure 15: Extension Field Format
> 
>    All extension fields are zero-padded to a word (4 octets) boundary.
> SB> Is it normal to describe words as 32 bits?
words are 32-bits in this document.
> 
>    The Field Type field is specific to the defined function and is not
>    elaborated here.  While the minimum field length containing required
>    fields is 4 words (16 octets), a maximum field length remains to be
>    established.
> 
>    The Length field is a 16-bit integer which indicates the length of
> SB> Integer or unsigned integer?
> 

I would expect this to be unsigned. However note the UDP limitations
prevent it getting so big that the sign bit ever becomes an issue.

> ==========
> 
> 
>    Note that the quantities within parentheses are computed from 64-bit
>    unsigned timestamps and result in signed values with 63 significant
>    bits plus sign.  These values can represent dates from 68 years in
>    the past to 68 years in the future.  However, the offset and delay
>    are computed as sums and differences of these values, which contain
>    62 significant bits and two sign bits, so can represent unambiguous
>    values from 34 years in the past to 34 years in the future.  In other
>    words, the time of the client must be set within 34 years of the
>    server before the service is started.  This is a fundamental
>    limitation with 64-bit integer arithmetic.
> 
> SB> I am not sure why a client needs to be configured with a time
> SB> to within 34 years. Surely if you make the assumption that the
> SB> packet takes less than 34 years to arrive you can bootstrap
> SB> without needing configuration - or at least you can relax the time
> SB> from 34 years to 136 years

No, the problem is that some servers (especially true of embedded
systems) don't have the datetime stored in NVR and have no idea when
they start what time it is. The 32-bit limit on the size of the variable
used in the call on traditional Unix boxes in which they use to retrieve
the time from the system clock is what causes this problem.

> 
> 
> ============
> 
>    In implementations where floating double arithmetic is available, the
>    first-order differences can be converted to floating double and the
>    second-order sums and differences computed in that arithmetic.  Since
>    the second-order terms are typically very small relative to the
>    timestamp magnitudes, there is no loss in significance, yet the
>    unambiguous range is restored from 34 years to 68 years.
> 
> SB> Surely there is a protocol action that can resolve the ambiguity
> SB> without needing floating double?

No, see above.
> 
> ==============
> 
> 
>    Note that the on-wire protocol as described resists replay of a
>    server response packet.  However, it does not resist replay of the
>    client request packet, which would result in a server reply packet
>    with new values of T2 and T3 and result in incorrect offset and
>    delay.  This vulnerability can be avoided by setting the xmt state
>    variable to zero after computing the offset and delay.
> 
> SB> Need to check that the security section has a back ref to here.
> 
> ==============
> 
> 14.  Security Considerations
> 
>    NTPv4 provides an optional authentication field that utilizes the MD5
>    algorithm.  MD5, as the case for SHA-1, is derived from MD4, which
>    has long been known to be weak.  In 2004, techniques for efficiently
>    finding collisions in MD5 were announced.  A summary of the
>    apropriateness of MD5 can be found in [10].
> 
>    In the case of NTP as specified herein, NTP broadcast clients are
>    vulnerable to disruption by misbehaving or hostile SNTP or NTP
>    broadcast servers elsewhere in the Internet.  Access controls and/or
>    cryptographic authentication means should be provided for additional
>    security in such cases.
> 
> SB> This should be reviewed by the security directorate before the
> SB> draft goes any further. Based on previous experience I doubt that
> SB> the analysis will be considered sufficient. Note that the main
> SB> text calls up at least one threat that is not called up here.
> 
> ===============
> 
> 15.  IANA Considerations
> 
>    UDP/TCP Port 123 was previously assigned by IANA for this protocol.
>    The IANA has assigned the IPv4 multicast group address 224.0.1.1 and
>    the IPv6 multicast address ending :101 for NTP.  This document
>    introduces NTP extension fields allowing for the development of
>    future extensions to the protocol, where a particular extension is to
>    be identified by the Field Type sub-field within the extension field.
>    IANA is requested to establish and maintain a registry for Extension
>    Field Types associated with this protocol, populating this registry
>    with no initial entries.  As future needs arise, new Extension Field
>    Types may be defined.  Following the policies outlined in [11], new
>    consensus.
> 
> SB> English problem in last sentence.

There was a dropped partial sentence that I already noted in my response.

Danny
> 
> SB> There are a bunch of other values that are assigned in this protocol
> SB> surely these need registries to ensure that the standard develops
> SB> in a controlled way. This is an essential difference between
> SB> definition by standard and definition by reference implementation.
> 
> ============
> 
> 
> Appendix A.  Code Skeleton
> 
> SB> You need to specify the normative/informative status of this appendix
> SB> vis a vis the main body of the specification.
> 
> SB> Shouldn't this have a reference to ANSI C so that we have a
> SB> definition of all the types - alternatively they all
> SB> need to be defined here for consistency.
> 
> =============
> 
> #include <math.h>               /* avoids complaints about sqrt() */
> #include <sys/time.h>           /* for gettimeofday() and friends */
> #include <stdlib.h>             /* for malloc() and friends */
> 
> SB> Don't you need a pointer to a definitive instance of the above
> SB> header files?
> 
> /*
>  * Data types
>  *
>  * This program assumes the int data type is 32 bitsand the long data
> SB> typo bitsand
> 
> ==============
> 
> 
> /*
>  * Timestamp conversion macroni
>  */
> SB> typo macroni?
> 
> ============
> 
> /*
>  * Global constants. Some of these might be converted to variables
>  * which can be tinkered by configuration or computed on-fly. For
>  * instance, the reference implementation computes PRECISION on-fly and
>  * provides performance tuning for the defines marked with % below.
>  */
> 
> SB> We really need to distinguish quite firmly between
> SB> invariants, implementation parameters and initial values
> SB> This comment applies to all of the #defines in the
> SB> following sections
> 
> 
> #define VERSION         4       /* version number */
> #define MINDISP         .01     /* % minimum dispersion (s) */
> #define MAXDISP         16      /* maximum dispersion (s) */
> #define MAXDIST         1       /* % distance threshold (s) */
> #define NOSYNC          0x3     /* leap unsync */
> #define MAXSTRAT        16      /* maximum stratum (infinity metric) */
> #define MINPOLL         6       /* % minimum poll interval (64 s)*/
> #define MAXPOLL         17      /* % maximum poll interval (36.4 h) */
> #define MINCLOCK        3       /* minimum manycast survivors */
> #define MAXCLOCK        10      /* maximum manycast candidates */
> #define TTLMAX          8       /* max ttl manycast */
> #define BEACON          15      /* max interval between beacons */
> 
> #define PHI             15e-6   /* % frequency tolerance (15 PPM) */
> #define NSTAGE          8       /* clock register stages */
> #define NMAX            50      /* maximum number of peers */
> #define NSANE           1       /* % minimum intersection survivors */
> #define NMIN            3       /* % minimum cluster survivors */
> 
> ===============
> 
> SB> Suppose you ought to point out that this is the UNIX epoch - NTP
> SB> epoch difference
> #define JAN_1970        2208988800UL /* 1970 - 1900 in seconds */
> 
> 
> ================
> 
> 
> SB> Is there any formal process to check that there were no edit issues
> SB> in the code - which is I assume an extract from the reference 
> implementation
> SB> That is true here, but will apply again when it goes though the
> SB> edit process.
> 
> - Stewart

From sla at ucolick.org  Thu Jun 28 16:12:16 2007
From: sla at ucolick.org (Steve Allen)
Date: Thu, 28 Jun 2007 09:12:16 -0700
Subject: [ntpwg] Comments on NTP draft -06
In-Reply-To: <4683C1A5.3040604@ntp.isc.org>
References: <467BF8DA.80502@gis.net> <46810AEF.3010900@cisco.com>
	<4683C1A5.3040604@ntp.isc.org>
Message-ID: <20070628161216.GA16642@ucolick.org>

On Thu 2007-06-28T10:11:49 -0400, Danny Mayer hath writ:
> >    LI Leap Indicator (leap): 2-bit integer warning of an impending leap
> >    second to be inserted or deleted in the last minute of the current
> >    month with values defined in Figure 10.
> >
> >            +-------+-------------------------------------------------+
> >            | Value | Meaning                                         |
> >            +-------+-------------------------------------------------+
> >            | 0     | no warning                                      |
> >            | 1     | last minute of the day has 61 seconds           |
> >            | 2     | last minute of the day has 59 seconds           |
> > SB> surely last minute of the last day of the month has X seconds?
>
> Not exactly. It's actually the last day of a specific quarter though I
> don't think it's ever happened yet on any day but the last day of the year.

No, not the quarter.  The text is right to use "month".  ITU-R TF.460
allows for a leap second on the last day of *any* month.  That's
another point in favor of including a reference to the official
document.

Perhaps the original point was that when the LI is 0 then the last
minute of the month should default to 60 seconds?

--
Steve Allen                 <sla at ucolick.org>                WGS-84 (GPS)
UCO/Lick Observatory        Natural Sciences II, Room 165    Lat  +36.99855
University of California    Voice: +1 831 459 3046           Lng -122.06015
Santa Cruz, CA 95064        http://www.ucolick.org/~sla/     Hgt +250 m

From seaman at noao.edu  Thu Jun 28 16:52:57 2007
From: seaman at noao.edu (Rob Seaman)
Date: Thu, 28 Jun 2007 09:52:57 -0700
Subject: [ntpwg] Comments on NTP draft -06
In-Reply-To: <20070628161216.GA16642@ucolick.org>
References: <467BF8DA.80502@gis.net> <46810AEF.3010900@cisco.com>
	<4683C1A5.3040604@ntp.isc.org> <20070628161216.GA16642@ucolick.org>
Message-ID: <7D846CD9-84B7-43F9-8A06-F940BDFB15C7@noao.edu>

To expand on Steve's comments, note:

1) Leap seconds have indeed also been issued at the end of June (but  
not 2007).

2) Just announced, there will be NO leap second at the end of  
December 2007.

3) Current IERS policy limits the introduction of leap seconds to the  
end of June and December, but the UTC standard (good for many  
centuries yet) has always been the end of any month.

See:  http://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat

Rob Seaman
NOAO
-----

On Jun 28, 2007, at 9:12 AM, Steve Allen wrote:

> On Thu 2007-06-28T10:11:49 -0400, Danny Mayer hath writ:
>>>    LI Leap Indicator (leap): 2-bit integer warning of an  
>>> impending leap
>>>    second to be inserted or deleted in the last minute of the  
>>> current
>>>    month with values defined in Figure 10.
>>>
>>>            +------- 
>>> +-------------------------------------------------+
>>>            | Value |  
>>> Meaning                                         |
>>>            +------- 
>>> +-------------------------------------------------+
>>>            | 0     | no  
>>> warning                                      |
>>>            | 1     | last minute of the day has 61  
>>> seconds           |
>>>            | 2     | last minute of the day has 59  
>>> seconds           |
>>> SB> surely last minute of the last day of the month has X seconds?
>>
>> Not exactly. It's actually the last day of a specific quarter  
>> though I
>> don't think it's ever happened yet on any day but the last day of  
>> the year.
>
> No, not the quarter.  The text is right to use "month".  ITU-R TF.460
> allows for a leap second on the last day of *any* month.  That's
> another point in favor of including a reference to the official
> document.
>
> Perhaps the original point was that when the LI is 0 then the last
> minute of the month should default to 60 seconds?
>
> --
> Steve Allen                 <sla at ucolick.org>                WGS-84  
> (GPS)
> UCO/Lick Observatory        Natural Sciences II, Room 165    Lat   
> +36.99855
> University of California    Voice: +1 831 459 3046           Lng  
> -122.06015
> Santa Cruz, CA 95064        http://www.ucolick.org/~sla/     Hgt  
> +250 m
> _______________________________________________
> ntpwg mailing list
> ntpwg at lists.ntp.isc.org
> https://lists.ntp.isc.org/mailman/listinfo/ntpwg


From imp at bsdimp.com  Thu Jun 28 19:30:13 2007
From: imp at bsdimp.com (M. Warner Losh)
Date: Thu, 28 Jun 2007 13:30:13 -0600 (MDT)
Subject: [ntpwg] Comments on NTP draft -06
In-Reply-To: <20070628161216.GA16642@ucolick.org>
References: <46810AEF.3010900@cisco.com> <4683C1A5.3040604@ntp.isc.org>
	<20070628161216.GA16642@ucolick.org>
Message-ID: <20070628.133013.-1350497847.imp@bsdimp.com>

In message: <20070628161216.GA16642 at ucolick.org>
            Steve Allen <sla at ucolick.org> writes:
: On Thu 2007-06-28T10:11:49 -0400, Danny Mayer hath writ:
: > >    LI Leap Indicator (leap): 2-bit integer warning of an impending leap
: > >    second to be inserted or deleted in the last minute of the current
: > >    month with values defined in Figure 10.
: > >
: > >            +-------+-------------------------------------------------+
: > >            | Value | Meaning                                         |
: > >            +-------+-------------------------------------------------+
: > >            | 0     | no warning                                      |
: > >            | 1     | last minute of the day has 61 seconds           |
: > >            | 2     | last minute of the day has 59 seconds           |
: > > SB> surely last minute of the last day of the month has X seconds?
: >
: > Not exactly. It's actually the last day of a specific quarter though I
: > don't think it's ever happened yet on any day but the last day of the year.

"Day" is right here, at least from historical ntp implementation point
of view.  These implementations turn on the 'today is leap second day'
in the kernel, which implements its local policy for doing that when
they see these bits set.

: No, not the quarter.  The text is right to use "month".  ITU-R TF.460
: allows for a leap second on the last day of *any* month.  That's
: another point in favor of including a reference to the official
: document.

Current ntp implementations limit this to the quarterly, and filters
them when it isn't leap day.

: Perhaps the original point was that when the LI is 0 then the last
: minute of the month should default to 60 seconds?

I think that's good, or a separate value to distinguish 

Warner

From sla at ucolick.org  Thu Jun 28 20:09:42 2007
From: sla at ucolick.org (Steve Allen)
Date: Thu, 28 Jun 2007 13:09:42 -0700
Subject: [ntpwg] Comments on NTP draft -06
In-Reply-To: <20070628.133013.-1350497847.imp@bsdimp.com>
References: <46810AEF.3010900@cisco.com> <4683C1A5.3040604@ntp.isc.org>
	<20070628161216.GA16642@ucolick.org>
	<20070628.133013.-1350497847.imp@bsdimp.com>
Message-ID: <20070628200942.GA17808@ucolick.org>

On Thu 2007-06-28T13:30:13 -0600, M. Warner Losh hath writ:
> Current ntp implementations limit this to the quarterly, and filters
> them when it isn't leap day.

Not a problem.  There are roughly 300 years yet to elapse before this
detail will need further attention.

--
Steve Allen                 <sla at ucolick.org>                WGS-84 (GPS)
UCO/Lick Observatory        Natural Sciences II, Room 165    Lat  +36.99855
University of California    Voice: +1 831 459 3046           Lng -122.06015
Santa Cruz, CA 95064        http://www.ucolick.org/~sla/     Hgt +250 m

From mills at udel.edu  Thu Jun 28 20:39:00 2007
From: mills at udel.edu (David L. Mills)
Date: Thu, 28 Jun 2007 20:39:00 +0000
Subject: [ntpwg] Comments on NTP draft -06
In-Reply-To: <20070628.133013.-1350497847.imp@bsdimp.com>
References: <46810AEF.3010900@cisco.com>
	<4683C1A5.3040604@ntp.isc.org>	<20070628161216.GA16642@ucolick.org>
	<20070628.133013.-1350497847.imp@bsdimp.com>
Message-ID: <46841C64.5090504@udel.edu>

Warner,

There have been some recent changes, but your description is 
substantially correct. See the leap second section in the ntp-dev 
documentation for the ntpd program.

Specifically, the current code can use the lNIST eapseconds file even 
without the crypto code. The NIST leapseconds file is refreshed about 
once every six months, even if nothing has changed. If the file is 
present and a leap has been announced at a specific NTP second in 
future, the daemon computes the number of seconds remaining until the 
leap. If the number of seconds is less than a month, the system leap 
bits are set. If leass than a day, the kernel is armed for the leap.

If kernel code is not available or disabled, the leap is implemented as 
an ugly step. If the Unix system clock code is as recommended in the 
nanokernel distribution, the kernel clock will appear to be set 
backward, but stand still or slowly advance during the leap second.

If the leapseonds table is not present and a plurality of server leap 
bits are set, the number of NTP seconds until the end of the month is 
computed from calendar calculations and it operates as above.

A small number of issues remain, such as what to do about expired 
leapsecond files, what to do if the leapsecond information is downloaded 
from a crypto server, etc. The paint ain't quite dry yet.

Dave

M. Warner Losh wrote:

> In message: <20070628161216.GA16642 at ucolick.org>
> Steve Allen <sla at ucolick.org> writes:
> : On Thu 2007-06-28T10:11:49 -0400, Danny Mayer hath writ:
> : > > LI Leap Indicator (leap): 2-bit integer warning of an impending leap
> : > > second to be inserted or deleted in the last minute of the current
> : > > month with values defined in Figure 10.
> : > >
> : > > +-------+-------------------------------------------------+
> : > > | Value | Meaning |
> : > > +-------+-------------------------------------------------+
> : > > | 0 | no warning |
> : > > | 1 | last minute of the day has 61 seconds |
> : > > | 2 | last minute of the day has 59 seconds |
> : > > SB> surely last minute of the last day of the month has X seconds?
> : >
> : > Not exactly. It's actually the last day of a specific quarter though I
> : > don't think it's ever happened yet on any day but the last day of 
> the year.
>
> "Day" is right here, at least from historical ntp implementation point
> of view. These implementations turn on the 'today is leap second day'
> in the kernel, which implements its local policy for doing that when
> they see these bits set.
>
> : No, not the quarter. The text is right to use "month". ITU-R TF.460
> : allows for a leap second on the last day of *any* month. That's
> : another point in favor of including a reference to the official
> : document.
>
> Current ntp implementations limit this to the quarterly, and filters
> them when it isn't leap day.
>
> : Perhaps the original point was that when the LI is 0 then the last
> : minute of the month should default to 60 seconds?
>
> I think that's good, or a separate value to distinguish
>
> Warner
> _______________________________________________
> ntpwg mailing list
> ntpwg at lists.ntp.isc.org
> https://lists.ntp.isc.org/mailman/listinfo/ntpwg



From imp at bsdimp.com  Thu Jun 28 20:51:54 2007
From: imp at bsdimp.com (M. Warner Losh)
Date: Thu, 28 Jun 2007 14:51:54 -0600 (MDT)
Subject: [ntpwg] Comments on NTP draft -06
In-Reply-To: <46841C64.5090504@udel.edu>
References: <20070628161216.GA16642@ucolick.org>
	<20070628.133013.-1350497847.imp@bsdimp.com>
	<46841C64.5090504@udel.edu>
Message-ID: <20070628.145154.-345495464.imp@bsdimp.com>

In message: <46841C64.5090504 at udel.edu>
            "David L. Mills" <mills at udel.edu> writes:
: A small number of issues remain, such as what to do about expired 
: leapsecond files, what to do if the leapsecond information is downloaded 
: from a crypto server, etc. The paint ain't quite dry yet.

Funny you should mention the 'what to do if the leapsecond information
is expired' cased.  I'm looking into a bug in that area.  Last
summer's leap second tables have expired today, leading to some
unexpected bugs in the code that I maintain...  We have a need to know
leap information in our application, so we use the NIST format to
store the data...

I noticed that the NIST leapsecond.list file was updated in early May
to expire in june 2008, several weeks before bulletin C34 came out
making it official that there's no leap second this December.  I can
only assume that the folks at NIST have an inside track on information
about future leaps :-)

Thanks for the update on the code.  I've read the leap second part of
the udel ntpd code far too many times over the past 8 years, but I've
managed to escape that chore for about two years now...

Warner

From stbryant at cisco.com  Thu Jun 28 22:00:19 2007
From: stbryant at cisco.com (Stewart Bryant)
Date: Thu, 28 Jun 2007 23:00:19 +0100
Subject: [ntpwg] Comments on NTP draft -06
In-Reply-To: <20070628161216.GA16642@ucolick.org>
References: <467BF8DA.80502@gis.net>
	<46810AEF.3010900@cisco.com>	<4683C1A5.3040604@ntp.isc.org>
	<20070628161216.GA16642@ucolick.org>
Message-ID: <46842F73.7040906@cisco.com>

Steve Allen wrote:
> On Thu 2007-06-28T10:11:49 -0400, Danny Mayer hath writ:
>   
>>>    LI Leap Indicator (leap): 2-bit integer warning of an impending leap
>>>    second to be inserted or deleted in the last minute of the current
>>>    month with values defined in Figure 10.
>>>
>>>            +-------+-------------------------------------------------+
>>>            | Value | Meaning                                         |
>>>            +-------+-------------------------------------------------+
>>>            | 0     | no warning                                      |
>>>            | 1     | last minute of the day has 61 seconds           |
>>>            | 2     | last minute of the day has 59 seconds           |
>>> SB> surely last minute of the last day of the month has X seconds?
>>>       
>> Not exactly. It's actually the last day of a specific quarter though I
>> don't think it's ever happened yet on any day but the last day of the year.
>>     
>
> No, not the quarter.  The text is right to use "month".  ITU-R TF.460
> allows for a leap second on the last day of *any* month.  That's
> another point in favor of including a reference to the official
> document.
>
> Perhaps the original point was that when the LI is 0 then the last
> minute of the month should default to 60 seconds?
>   

That too.

My point was that the text in the table should align with the main text, 
which as a I recall said last second of the month.

- Stewart

From stbryant at cisco.com  Thu Jun 28 21:54:00 2007
From: stbryant at cisco.com (Stewart Bryant)
Date: Thu, 28 Jun 2007 22:54:00 +0100
Subject: [ntpwg] What goes in the IANA registries?
In-Reply-To: <4683C1A5.3040604@ntp.isc.org>
References: <467BF8DA.80502@gis.net> <46810AEF.3010900@cisco.com>
	<4683C1A5.3040604@ntp.isc.org>
Message-ID: <46842DF8.6020609@cisco.com>

As I pointed out in my review comments there are a number of tables of 
assigned values that are not called up as needing IANA registries.

The response was that they were only advisory and therefore did not need 
to be registered.

I can see how a standard set by reference implementation can get away 
with this approach, but I do not think that it is satisfactory in a 
standard set by an SDO.

Once NTP is published as an RFC there needs to be a formal mechanism 
whereby values can be added to informational tables in such a way that 
clashes do not occur. Allocation of additional values needs to be done 
in such a way that they do not damage the protocol and access is fair 
and impartial. IETF mechanism for doing that is by requesting a registry 
entry from IANA using the permission level documented in the RFC that 
created it.

Stewart

From mills at udel.edu  Fri Jun 29 01:15:52 2007
From: mills at udel.edu (David L. Mills)
Date: Fri, 29 Jun 2007 01:15:52 +0000
Subject: [ntpwg] On-wire protocol
Message-ID: <46845D48.8020502@udel.edu>

Guys,

Several people have pointed out errors in the on-wire description and 
Figure 17. Some said it hard to follow. As a word description would be 
hard for the editors to follow, I have provided replacements for the 
diagram and paragraphs immediately before and after it. I have also 
included the transmit replay provision mentioned in previous messages. 
Somebody else should copycheck and verify that I'm not having a bad 
dream. This is the kind of thing you can (and I have) read it many times 
and still fail to spot nits.

For amusement: prepare a paper triangle with equal sides six inches. 
Print with bold font three lines: top "Paris", middle "in the", bottom 
"the spring". Sic, read that again carefully. Now ask your friends to 
read it. Ask them several times until they get it. Works on just about 
everybody.

Dave

=============================================================================

The on-wire protocol uses four timestamps numbered t1 through t4 and 
three state variables, org, rec and xmt, as shown in Figure 17. This 
figure shows the most general case where each of two peers A and B 
independently measure the offset and delay relative to the other. For 
purposes of illustration the packet timestamps are shown in lower case, 
while the state variables are shown in upper case. The state variables 
are copied from the packet timestamps upon arrival or departure of a packet.
 
              t2            t3           t6            t7
         +---------+   +---------+   +---------+   +---------+
         |    0    |   |    t1   |   |   t3    |   |    t5   |
         +---------+   +---------+   +---------+   +---------+
         |    0    |   |    t2   |   |   t4    |   |    t6   |  Packet
         +---------+   +---------+   +---------+   +---------+ Timestamps
         |   t1    |   |t3=clock |   |   t5    |   |t7=clock |
         +---------+   +---------+   +---------+   +---------+
         |t2=clock |                 |t6=clock |
         +---------+                 +---------+
                                                                Peer B
         +---------+   +---------+   +---------+   +---------+
    org  |   T1    |   |    T1   |   | t5<>T1? |   |    T5   |
         +---------+   +---------+   +---------+   +---------+   State
    rec  |   T2    |   |    T2   |   |   T6    |   |    T6   | Variables
         +---------+   +---------+   +---------+   +---------+
    xmt  |    0    |   |    T3   |   |  t3=T3? |   |    T7   |
         +---------+   +---------+   +---------+   +---------+

                   t2      t3                 t6          t7
         ---------------------------------------------------------
                  /\         \                 /\            \
                  /           \                /              \
                 /             \              /                \
                /               \/           /                 \/
         ---------------------------------------------------------
              t1                t4         t5                  t8

             t1            t4            t5             t8
         +---------+   +---------+   +---------+   +---------+
         |    0    |   |    t1   |   |   t3    |   |    t5   |
         +---------+   +---------+   +---------+   +---------+
         |    0    |   |    t2   |   |   t4    |   |    t6   |  Packet
         +---------+   +---------+   +---------+   +---------+ Timestamps
         |t1=clock |   |    t3   |   |t5=clock |   |    t7   |
         +---------+   +---------+   +---------+   +---------+
                       |t4=clock |                 |t8=clock |
                       +---------+                 +---------+
                                                                Peer A
         +---------+   +---------+   +---------+   +---------+
    org  |    0    |   |  t3<>0? |   |   T3    |   | t7<>T3? |
         +---------+   +---------+   +---------+   +---------+   State
    rec  |    0    |   |    T4   |   |   T4    |   |    T8   | Variables
         +---------+   +---------+   +---------+   +---------+
    xmt  |   T1    |   |  t1=T1? |   |   T5    |   |  t5=T5? |
         +---------+   +---------+   +---------+   +---------+

                        Figure 17: On-Wire Protocol

In the figure the first packet transmitted by A contains only the origin 
timestamp t1, which is then copied to T1. B receives the packet at t2 
and copies t1 to T1 and the receive timestamp t2 to T2. At this time or 
some time later at t3, B sends a packet to A containing t1 and t2 and in 
addition the transmit timestamp t3. All three timestamps are copied to 
the corresponding state variables. A receives the packet at t4 
containing the three timestamps t1, t2 and t3 and in addition the 
destination timestamp t4. These four timestamps are used to compute the 
offset and delay of B relative to A, as described below.

Before the xmt and org state variables are updated, two sanity checks 
are performed in order to protect against duplicate, bogus or replayed 
packets. In the exchange above, a packet is duplicate or replay if the 
transmit timestamp t3 in the packet matches the org state variable T3. A 
packet is bogus if the origin timestamp t1 in the packet does not match 
the xmt state variable T1. In either of these cases the state variables 
are updated, then the packet is discarded. To protect against replay of 
the last transmitted packet, the xmt state variable is set to zero 
immediately after a successful bogus check. 

From mills at udel.edu  Thu Jun 28 20:18:43 2007
From: mills at udel.edu (David L. Mills)
Date: Thu, 28 Jun 2007 20:18:43 +0000
Subject: [ntpwg] ***SPAM*** Re:  Comments on NTP draft -06
In-Reply-To: <4683C1A5.3040604@ntp.isc.org>
References: <467BF8DA.80502@gis.net> <46810AEF.3010900@cisco.com>
	<4683C1A5.3040604@ntp.isc.org>
Message-ID: <468417A3.8060404@udel.edu>

Guys,

Thanks for Stewart's close study. Thanks for Danny's comments. This is 
going to be a burden for the editors, for which I have much sympathy. If 
this had been in PDF markup, the editors wouldn't need as much sympathy.

Inline:

Dave

Danny Mayer wrote:

> Stewart Bryant wrote:
>
>> Abstract
>>
>> The Network Time Protocol (NTP) is widely used to synchronize
>> computer clocks in the Internet. This document describes NTP Version
>> 4 (NTPv4), which is backwards compatible with NTP Version 3 (NTPv3)
>> described in RFC 1305, as well as previous versions of the protocol.
>> It includes a modified protocol header to accommodate the Internet
>> SB> What does "It" refer to?
>
>
> In this case the V4 version of the NTP protocol.

It <- NTPv4

>
>> Protocol Version 6 address family. NTPv4 includes fundamental
>>
>> 2. Modes of Operation
>>
>> An NTP implementation operates as a primary server, secondary server
>> or client. A primary server is synchronized directly to a reference
>> clock, such as a GPS receiver or telephone modem service. A client
>> synchronizes to one or more upstream servers, but does not provide
>> synchronization to dependent clients. A secondary server has one or
>> more upstream servers and one or more downstream servers or clients.
>> All servers and clients who are fully NTPv4 compliance MUST implement
>> the entire suite of algorithms described in this document.
>>
>> SB> Why do we insist on this, surely someone producing an improved
>> SB> algorithm should be able to use it and still claim conformance?
>>
>
> You have a point here especially as Dave Mills is constantly tweaking
> the algorithms to improve the results. However I think that the point
> trying to be made here is that there is a set of algorithms being used
> and not just one that needs to be used to bring the clock into
> compliance with UTC. I don't think it's the algorithms themselves that's
> set in stone, it the fact that there's a set of them each of which can
> be implemented any way the implementor pleases. I cannot craft better
> language on this, but I'm sure others can.
>
Essay follows.

The reason for these restrictions is that the impulse response of each 
secondary server along the path from the primary servers to the clients 
needs to be carefully controlled to avoid underdamping or overdamping of 
the aggregate impulse response. The more servers along the path the more 
critical this is. If a client has no dependent clients of its own or if 
a server has only a single reference clock, the mitigation algorithms 
are not needed, which is the nexus of the specification.

Notwithstanding the above, if any server or client claims NTPv4 
compliance, then the algorithms must be functionally equivalent to the 
specified algorithms. This is a truth in advertising issue and raises an 
endless number of issues. Case in point:

Symmetricom makes a NTP server with a single GPS clock. By the above 
definition it is properly described as an SNTPv4 server. It doesn't need 
the mitigation algorithms. Now, Symmetricom provides an ACTS clock as 
backup, but only one of the two can be active at any time. By rule it 
remains SNTPv4 compliant. Now, Symmetrcom allows both to operate at the 
same time, which raises the issue how the two are mitigated. To conform 
strictly to the spec, the prescribed algorithms must be implemented to 
claim NTPv4 conformance.

 From an engineering point of view, there are many ways to skin the cat. 
A fully conforming NTPv4 implementation should function identically to 
the reference implementation with respect to source selection, step 
behavior, impulse response, etc. There have been a wide variety of 
situations reported over the years. Customers should expect a new 
product claiming NTPv4 compliance to behave in the same fashion as 
present experience.

However, it would be possible to slice and dice. For example, if a 
product used a selection algorithm other than NTPv4 but functioned "in 
the same way", is it NTPv4 compliant? That's a very hard thing to 
confirm or deny. The NTPv4 selection algorithm embodies a dose of 
computer science theory from which strong claims of accuracy and 
behavior can be proved. Really, all that is needed is to require that 
any competing algorithm obey the same principles. I don't know how to 
roll these principles in the specification and expect implementors to 
have the training and experience to properly implement an equivalent but 
different algorithm.

>> =========
>>
>>
>>
>> As a standard practice, timing network topology should be organized
>> SB> Should or MUST?
>
>
> I think "should" is sufficient here as NTP goes to great lengths to
> discard anything that does not conform to its idea of valid (for some
> meaning of valid). timing loop avoidance and synchronization distance
> minimization just helps the calculations.
>
>> to avoid timing loops and minimize the synchronization distance. In
>> NTP the subnet topology is determined using a variant of the Bellman-
>> Ford distributed routing algorithm, which computes the shortest-
>> distance spanning tree rooted on the primary servers. As a result of
>> SB> check the term spanning - shortest path tree might be better
>> SB> Do you mean server (singular) or servers (plural). If the latter 
>> there
>> SB> may be a collection of SPTs rooted at each server
>
>
> I think that Dave Mills really means distance spanning tree from a
> mathematical point of view.

I really mean "shortest distance spanning tree" in a strictly 
mathematical sense. If you find "shortest path spanning tree" more 
soothing, go for it. The key concept is "Bellman Ford".

>
>> this design, the algorithm automatically reorganizes the subnet, so
>> as to produce the most accurate and reliable time, even when there
>> are failures in the timing network.
>>
>>
>> ============
>>
>>
>> +-----------------------------------+
>> | Packet Variable <-- Variable |
>> +-----------------------------------+
>> | x.leap <-- s.leap |
>> | x.version <-- r.version |
>> | x.mode <-- 4 |
>> | x.stratum <-- s.stratum |
>> | x.poll <-- r.poll |
>> | x.precision <-- s.precision |
>> | x.rootdelay <-- s.rootdelay |
>> | x.rootdisp <-- s.rootdisp |
>> | x.refid <-- s.refid |
>> | x.reftime <-- s.reftime |
>> | x.org <-- r.xmt |
>> | x.rec <-- r.dst |
>> | x.xmt <-- clock |
>> | x.keyid <-- r.keyid |
>> | x.digest <-- md5 digest |
>> +-----------------------------------+
>>
>> Figure 2: fast_xmit Packet Header
>>
>> SB> This is not a header definition in an IETF sense. In any case this
>> SB> seems rather detailed this early in the spec given that no definition
>> SB> of these fields is yet given.
>>
>
> Well this looks like a duplicate of Figure 35 on P54. We should
> eliminate one or the other.

No; the two tables are very different. Read carefully. I leave to the 
editors to adopt whatever figure label is politically correct.

>> ============
>>
>>
>> The ephemeral associations compete among themselves. As new
>> ephemeral associations are mobilized, the client runs the mitigation
>> algorithms described in Section 10 and Section 11.2 for the best
>> candidates out of the population, the remaining ephemeral
>> associations are timed out and demobilized. In this way the
>> population includes only the best and freshest candidates to
>> SB> Freshest??
>
>
> Those candidates which most recently responded with an NTP packet.
>
>> discipline the system clock. The reference implementation includes
>> intricate means to do this, but these are beyond the scope of this
>> document.
>>
>>
>> ==========
>> The delay (delta) represents the round trip delay
>> between the client and server. The dispersion (epsilon) represents
>> the maximum error inherent in the measurement. It increases at a
>> SB> Shouldn't the term "maximum error" have some form of statistical
>> context?
>
>
> It is. This is a definition of what the term means rather than how it is
> to be estimated.
>
>> rate equal to the maximum disciplined system clock frequency
>> tolerance (PHI), typically 15 PPM. The jitter (psi) is defined as
>> the root-mean-square (RMS) average of the most recent offset
>> differences, represents the nominal error in estimating the offset.
>> SB> In timing terms jitter has significance in representing the high
>> SB> frequency error term (as opposed to wander it's low frequency
>> counterpart
>> SB> Do we need to make it clear that we are using a different definition.
>
I have made it clear over the years both in my publications and messages 
that the timing issues in wrangling a herd of cheap computer clocks is 
unlike tuning a farm of cesium oscillators and the terms used in each 
field may be differnent. See the statistics definitions on p 9.

>>
>> While the theta, delta, epsilon, and psi statistics represent
>> measurements of the system clock relative to the each server clock
>> SB> typo "to the each"
>>
>> =========
>>
>>
>>
>> .....................................................................
>> . Remote . Peer/Poll . System . Clock .
>> . Servers . Processes . Process .Discipline.
>> . . . . Process .
>> .+--------+. +-----------+. +------------+ . .
>> .| |->| |. | | . .
>> .|Server 1| |Peer/Poll 1|->| | . .
>> .| |<-| |. | | . .
>> .+--------+. +-----------+. | | . .
>> . . ^ . | | . .
>> . . | . | | . .
>> .+--------+. +-----------+. | | +-----------+. .
>> .| |->| |. | Selection |->| |. +------+ .
>> .|Server 2| |Peer/Poll 2|->| and | | Combine |->| Loop | .
>> .| |<-| |. | Cluster | | Algorithm |. |Filter| .
>> .+--------+. +-----------+. | Algorithms |->| |. +------+ .
>> . . ^ . | | +-----------+. | .
>> . . | . | | . | .
>> .+--------+. +-----------+. | | . | .
>> .| |->| |. | | . | .
>> .|Server 3| |Peer/Poll 3|->| | . | .
>> .| |<-| |. | | . | .
>> .+--------+. +-----------+. +------------+ . | .
>> ....................^.........................................|......
>> | . V .
>> | . +-----+ .
>> +--------------------------------------| VFO | .
>> . +-----+ .
>> . Clock .
>> . Adjust .
>> . Process .
>> ............
>>
>> Figure 3: Implementation Model
>>
>> SB> Are three instances the norm, the max or just an example?
>
>
> If you mean instances of servers, then this is just an example. The
> reference implementation lets you have as many as you want but it will
> ignore some if it has too many but even that limit can be changed.
>
>> ==========
>>
>>
>> The only arithmetic operation permitted on dates and timestamps is
>>
>> twos-complement subtraction, yielding a 127-bit or 63-bit signed
>> SB> Why not addition to yield a time in the future?
>
>
> What's calculated when you boil everything down is the amount that your
> system clock differs from the reference clocks. That number may be
> positive or negative but NTP never calculates time in the future or
> past, just the amount your clock disagrees and the frequency changes
> necessary to bring it into line.


Absolutely. This point is often lost in discourse. What does it mean to 
add 2007 June 28 1902 to 1582 June 28 2007?

>
>> ===========
>>
>>
>> s = era * 2^(32) + timestamp.
>>
>> Converting between NTP and system time can be a little messy, but
>> SB> but or and?
>> beyond the scope of this document. Note that the number of days in
>>
>> ===========
>>
>> 7. Data Structures
>>
>> The NTP protocol state machines described in following sections are
>> SB>typo in the following
>> defined using state variables and code fragments defined in
>> Appendix A. State variables are separated into classes according to
>> their function in packet headers, peer and poll processes, the system
>> process and the clock discipline process. Packet variables represent
>> the NTP header values in transmitted and received packets. Peer and
>> poll variables represent the contents of the association for each
>> server separately. System variables represent the state of the
>> server as seen by its dependent clients. Clock discipline variables
>> SB> what is a dependent client?
>
>
> The recipients of NTP packets the server responds with, or in the case
> of broadcast the ones it sends out that are received by clients.
>
>> represent the internal workings of the clock discipline algorithm.
>> Additional parameters and variable classes are defined in Appendix A.
>>
>> ==========
>>
>> +-----------+-------+----------------------------------+
>> | Name | Value | Description |
>> +-----------+-------+----------------------------------+
>> | PORT | 123 | NTP port number |
>> SB> UDP port number assigned to NTP?
>
>
> Yes. This is assigned by IANA. See Section 7.2 (p18) and also Section 15.
>
>> SB> BTW can you run NTP over DCP or perhaps one of the SCTP modes?
>
>
> In theory you can run it over any protocol, but you would would break
> things like autokey which makes use of the IP address of the client and
> server to authenticate. It's really designed for UDP/IP.
>
>> ==========
>>
>> +-----------+------------+-----------------------+
>> | Name | Formula | Description |
>> +-----------+------------+-----------------------+
>> | leap | leap | leap indicator (LI) |
>> | version | version | version number (VN) |
>> | mode | mode | mode |
>> | stratum | stratum | stratum |
>> | poll | poll | poll exponent |
>> | precision | rho | precision exponent |
>> | rootdelay | delta_r | root delay |
>> | rootdisp | epsilon_r | root dispersion |
>> | refid | refid | reference ID |
>> | reftime | reftime | reference timestamp |
>> | org | T1 | origin timestamp |
>> | rec | T2 | receive timestamp |
>> | xmt | T3 | transmit timestamp |
>> | dst | T4 | destination timestamp |
>> | keyid | keyid | key ID |
>> | digest | digest | message digest |
>> +-----------+------------+-----------------------+
>>
>> SB> do you mean formula or symbol - applies many places - but we meet it
>> SB> here without explanation?
>

See p 4. These are names of symbols as used in formulae and come from 
the PDF reference and implementation guide. The reader can easily figure 
that out.

>>
>> Figure 8: Packet Header Variables
>>
>> The NTP packet header follows the UDP and IP headers and the physical
>> header specific to the underlying transport network. Some fields use
>> multiple words and others are packed in smaller fields within a word.
>> SB> I don't remember seeing a definition of word yet? In any case
>> SB> don't we mean longword?
>
There is no mention of longword in this doeument, only 32-bit words, 
multiple words and subfields.

>
> 32-bit word, to be specific.
>
>> The NTP packet header shown in Figure 9 has 12 words followed by
>> optional extension fields and finally an optional message
>> authentication code (MAC) consisting of the key identifier field and
>> message digest field.
>> SB> It should be clearer (in the fig) which of the (long)words below
>> are each component mentioned by name above.
>

It's very clear in the figure and in the explantion below.

>>
>>
>>
>> 0 1 2 3
>> 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> |LI | VN |Mode | Stratum | Poll | Precision |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | Root Delay |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | Root Dispersion |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | Reference ID |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | |
>> + Reference Timestamp (64) +
>> | |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | |
>> + Origin Timestamp (64) +
>> | |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | |
>> + Receive Timestamp (64) +
>> | |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | |
>> + Transmit Timestamp (64) +
>> | |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | |
>> + Extension Field 1 (variable) +
>> | |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | |
>> + Extension Field 2 (variable) +
>> | |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | Key Identifier |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | |
>> | Message Digest (128) |
>> | |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>>
>> Figure 9: Packet Header Format
>>
>>
>> ===========
>>
>> The extension fields are used to add optional capabilities, for
>> example, the Autokey security protocol [3]. The extension field
>> format is presented in order that the packet can be parsed without
>> knowledge of the extension field functions. The MAC is used by both
>>
>>
>>
>> Burbank, et al. Expires November 25, 2007 [Page 20]
>> 
>> Internet-Draft NTPv4 Specification May 2007
>>
>>
>> Autokey and the symmetric key authentication scheme described in
>> Appendix A.
>>
>> A list of the packet header variables is shown in Figure 8 and
>> described in detail below. Except for a minor variation when using
>> the IPv6 address family, these fields are backwards compatible with
>> NTPv3. The packet header fields apply to both transmitted packets (x
>> prefix) and received packets (r prefix). In Figure 9 the size of
>> some multiple-word fields is shown in bits if not the default 32
>> bits.
>> SB> Why not say bits in the fig and remove the text above which is
>> SB> mildly confusing
>
The editors might or might not want to change the figure and/or words.

>>
>> The header extends from the beginning of the packet to the end
>> of the Transmit Timestamp field.
>>
>> SB> This would certainly be clearer with notations in the fig above
>> SB> or a set of smaller figures and a larger structure diagram
>> SB> or a better representation method such as pdf :)
>
Don't get me going.

>>
>> The fields and associated packet variables (in parentheses) are
>> interpreted as follows:
>>
>> LI Leap Indicator (leap): 2-bit integer warning of an impending leap
>> second to be inserted or deleted in the last minute of the current
>> month with values defined in Figure 10.
>>
>> +-------+-------------------------------------------------+
>> | Value | Meaning |
>> +-------+-------------------------------------------------+
>> | 0 | no warning |
>> | 1 | last minute of the day has 61 seconds |
>> | 2 | last minute of the day has 59 seconds |
>> SB> surely last minute of the last day of the month has X seconds?
>
>
> Not exactly. It's actually the last day of a specific quarter though I
> don't think it's ever happened yet on any day but the last day of the 
> year.

The document really means the last minute of the day. The reason for 
this is that the leap is actually implemented in the kernel and the 
kernel really doesn't want to figure the last day in the month. The 
expectation is that the impelmentation will figure out which day and set 
the leap bits in the kernel syscall sometime on that day. The editors 
may wish to add words to that effect.

>
>> | 3 | alarm condition (the clock is not synchronized) |
>> +-------+-------------------------------------------------+
>>
>> ===========
>>
>>
>>
>> It is customary to map the stratum value 0 in received packets to
>> MAXSTRAT (16) in the peer variable p.stratum and to map p.stratum
>> values of MAXSTRAT or greater to 0 in transmitted packets. This
>> allows reference clocks, which normally appear at stratum 0, to be
>> conveniently mitigated using the same algorithms used for external
>> sources.
>>
>> SB> I do not understand the above para
>
Read it word for word. The editors might want to explain here more 
details about the influence of stratum in computing the synchronization 
distance and why that is important in the selection process, but I think 
that is not warranted here.

>
> This looks like an implementation-specific detail.
>
>> Poll: 8-bit signed integer representing the maximum interval between
>> successive messages, in log2 seconds. Suggested default limits for
>> minimum and maximum poll intervals are 6 and 10, respectively.
>>
>> Precision: 8-bit signed integer representing the precision of the
>> system clock, in log2 seconds. For instance a value of -18
>> corresponds to a precision of about one microsecond. The precision
>> can be determined when the service first starts up as the minimum
>> time of several iterations to read the system clock.
>> SB> I do not understand the last sentence
>
>
> Yep, that's wrong. The precision can be calculated from this but it
> isn't the minimum time.

Not wrong. That's exactly how is is calculated. See p 14.

>
>> ===============
>> +------+----------------------------------------------------------+
>> | ID | Clock Source |
>> +------+----------------------------------------------------------+
>> | GOES | Geosynchronous Orbit Environment Satellite |
>> | GPS | Global Position System |
>> | GAL | Galileo Positioning System |
>> | PPS | Generic pulse-per-second |
>> | IRIG | Inter-Range Instrumentation Group |
>> | WWVB | LF Radio WWVB Ft. Collins, CO 60 kHz |
>> | DCF | LF Radio DCF77 Mainflingen, DE 77.5 kHz |
>> | HBG | LF Radio HBG Prangins, HB 75 kHz |
>> | MSF | LF Radio MSF Anthorn, UK 60 kHz (Rugby until April 2007) |
>> | JJY | LF Radio JJY Fukushima, JP 40 kHz, Saga, JP 60 kHz |
>> | LORC | MF Radio LORAN C 100 kHz |
>> | TDF | MF Radio Allouis, FR 162 kHz |
>> | CHU | HF Radio CHU Ottawa, Ontario |
>> | WWV | HF Radio WWV Ft. Collins, CO |
>> | WWVH | HF Radio WWVH Kauai, HI |
>> | NIST | NIST telephone modem |
>> | ACTS | NIST telephone modem |
>> | USNO | USNO telephone modem |
>> | PTB | European telephone modem |
>> +------+----------------------------------------------------------+
>>
>> Figure 13: Reference Identifiers
>>
>> SB> Is this going to be an IANA registry?
>
>
> If don't think that there is a need for that. It's just advisory about
> what's being used. That could change if this becomes required
> information, eg for tracability.
>
>> SB> Does there need to be an IEEE1588 code?
>
>
> What's that for?

This document says nothing about IEEE 1588, nor is there need to. It 
might be polite in the introduction to mention that.

>
>> =============
>>
>> Origin Timestamp (org): Time at the client when the request departed
>> for the server, in NTP timestamp format.
>>
>> SB>Is there a reference interface point for this?
>
>
> Meaning what?

Good practice is to strike a timestamp as close to the hardware as 
possible, but a reader familar with the art would know that.

>
>> =============
>>
>> The MAC consists of the Key Identifier followed by the Message
>> Digest. The message digest, or cryptosum, is calculated as in [8]
>> over all header and optional extension fields, but not the MAC
>> itself.
>>
>> SB> All headers, or all NTP headers?
>>
> NTP headers.

I don't understand how the NTP hash could include the headers at lower 
protocol layers.

>
>> =============
>>
>>
>> A list of
>> the currently-defined kiss codes is given in Figure 14. Other than
>> displaying the kiss code, KoD packets have no protocol significance
>> and are discarded after inspection.
>>
>> SB> Is this going to be an IANA registry?
>
>
> Right now it's informational, with the exception of my recommendation to
> make DENY, RSTR, and RATE have the client do something. Is there a need
> for this in the IANA registry?

I remain uncomforable about requiring an NTPv4 complient client to do 
something about kiss codes. Strongly advising is the politically correct 
request. As reported in the PTTI paper about the Wisconsin and NIST 
incidents, clients that abuse the service are not about to do anything 
about complaint reports. Current SNTP hacks like ntpdate and sntp don't 
abuse the rulse, but script in which they are embedded might. More 
likely, a responsible sntp implementation might return an exit code that 
tells a responsible script to back off.

>
>>
>> +------+------------------------------------------------------------+
>> | Code | Meaning |
>> +------+------------------------------------------------------------+
>> | ACST | The association belongs to a unicast server |
>> | AUTH | Server authentication failed |
>> | AUTO | Autokey sequence failed |
>> | BCST | The association belongs to a broadcast server |
>> | CRYP | Cryptographic authentication or identification failed |
>> | DENY | Access denied by remote server |
>> | DROP | Lost peer in symmetric mode |
>> | RSTR | Access denied due to local policy |
>> | INIT | The association has not yet synchronized for the first |
>> | | time |
>> | MCST | The association belongs to a dynamically discovered server |
>> | NKEY | No key found. Either the key was never installed or is |
>> | | not trusted |
>> | RATE | Rate exceeded. The server has temporarily denied access |
>> | | because the client exceeded the rate threshold |
>> | RMOT | Alteration of association from a remote host running |
>> | | ntpdc. |
>> | STEP | A step change in system time has occurred, but the |
>> | | association has not yet resynchronized |
>> +------+------------------------------------------------------------+
>>
>> Figure 14: Kiss Codes
>> ===========
>>
>> 0 1 2 3
>> 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | Field Type | Length |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | Association ID |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | Timestamp |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | Filestamp |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | Value Length |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> . .
>> . Value .
>> . .
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | Signature Length |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> . .
>> . Signature .
>> . .
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>> | Padding (as needed) |
>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>>
>> Figure 15: Extension Field Format
>>
>> All extension fields are zero-padded to a word (4 octets) boundary.
>> SB> Is it normal to describe words as 32 bits?
>
> words are 32-bits in this document.

This practice originates from the dawn of IP/TCP thirty years ago. I 
follow in that honorable tradition.

>> The Field Type field is specific to the defined function and is not
>> elaborated here. While the minimum field length containing required
>> fields is 4 words (16 octets), a maximum field length remains to be
>> established.
>>
>> The Length field is a 16-bit integer which indicates the length of
>> SB> Integer or unsigned integer?
>>
>
> I would expect this to be unsigned. However note the UDP limitations
> prevent it getting so big that the sign bit ever becomes an issue.

All lengths are unsigned.

>
>> ==========
>>
>>
>> Note that the quantities within parentheses are computed from 64-bit
>> unsigned timestamps and result in signed values with 63 significant
>> bits plus sign. These values can represent dates from 68 years in
>> the past to 68 years in the future. However, the offset and delay
>> are computed as sums and differences of these values, which contain
>> 62 significant bits and two sign bits, so can represent unambiguous
>> values from 34 years in the past to 34 years in the future. In other
>> words, the time of the client must be set within 34 years of the
>> server before the service is started. This is a fundamental
>> limitation with 64-bit integer arithmetic.
>>
>> SB> I am not sure why a client needs to be configured with a time
>> SB> to within 34 years. Surely if you make the assumption that the
>> SB> packet takes less than 34 years to arrive you can bootstrap
>> SB> without needing configuration - or at least you can relax the time
>> SB> from 34 years to 136 years
>
>
> No, the problem is that some servers (especially true of embedded
> systems) don't have the datetime stored in NVR and have no idea when
> they start what time it is. The 32-bit limit on the size of the variable
> used in the call on traditional Unix boxes in which they use to retrieve
> the time from the system clock is what causes this problem.

See the discussion on p 15 and especially on p 29. Note the distinction 
between first and second order differences..

>
>>
>> ============
>>
>> In implementations where floating double arithmetic is available, the
>> first-order differences can be converted to floating double and the
>> second-order sums and differences computed in that arithmetic. Since
>> the second-order terms are typically very small relative to the
>> timestamp magnitudes, there is no loss in significance, yet the
>> unambiguous range is restored from 34 years to 68 years.
>>
>> SB> Surely there is a protocol action that can resolve the ambiguity
>> SB> without needing floating double?
>
>
> No, see above.
>
>> ==============
>>
>>
>> Note that the on-wire protocol as described resists replay of a
>> server response packet. However, it does not resist replay of the
>> client request packet, which would result in a server reply packet
>> with new values of T2 and T3 and result in incorrect offset and
>> delay. This vulnerability can be avoided by setting the xmt state
>> variable to zero after computing the offset and delay.
>>
>> SB> Need to check that the security section has a back ref to here.
>
I yield to the editors to respond to these points.

>>
>> ==============
>>
>> 14. Security Considerations
>>
>> NTPv4 provides an optional authentication field that utilizes the MD5
>> algorithm. MD5, as the case for SHA-1, is derived from MD4, which
>> has long been known to be weak. In 2004, techniques for efficiently
>> finding collisions in MD5 were announced. A summary of the
>> apropriateness of MD5 can be found in [10].
>>
>> In the case of NTP as specified herein, NTP broadcast clients are
>> vulnerable to disruption by misbehaving or hostile SNTP or NTP
>> broadcast servers elsewhere in the Internet. Access controls and/or
>> cryptographic authentication means should be provided for additional
>> security in such cases.
>>
>> SB> This should be reviewed by the security directorate before the
>> SB> draft goes any further. Based on previous experience I doubt that
>> SB> the analysis will be considered sufficient. Note that the main
>> SB> text calls up at least one threat that is not called up here.
>>
>> ===============
>>
>> 15. IANA Considerations
>>
>> UDP/TCP Port 123 was previously assigned by IANA for this protocol.
>> The IANA has assigned the IPv4 multicast group address 224.0.1.1 and
>> the IPv6 multicast address ending :101 for NTP. This document
>> introduces NTP extension fields allowing for the development of
>> future extensions to the protocol, where a particular extension is to
>> be identified by the Field Type sub-field within the extension field.
>> IANA is requested to establish and maintain a registry for Extension
>> Field Types associated with this protocol, populating this registry
>> with no initial entries. As future needs arise, new Extension Field
>> Types may be defined. Following the policies outlined in [11], new
>> consensus.
>>
>> SB> English problem in last sentence.
>
>
> There was a dropped partial sentence that I already noted in my response.
>
> Danny
>
>> SB> There are a bunch of other values that are assigned in this protocol
>> SB> surely these need registries to ensure that the standard develops
>> SB> in a controlled way. This is an essential difference between
>> SB> definition by standard and definition by reference implementation.
>>
>> ============
>>
>>
>> Appendix A. Code Skeleton
>>
>> SB> You need to specify the normative/informative status of this appendix
>> SB> vis a vis the main body of the specification.
>>
>> SB> Shouldn't this have a reference to ANSI C so that we have a
>> SB> definition of all the types - alternatively they all
>> SB> need to be defined here for consistency.
>
As clearly stated in the text, the appendix is not intended as an 
implementation, only a guide to understanding the algorithms. To insure 
consistency the code has been compiled and checked for errors. Some 
details which should be obvious to one skilled in the art have 
intentionally been omitted. I don't think, nor am I prepared to change 
the format or style of presentation. The typo is intentional.

>>
>> =============
>>
>> #include <math.h> /* avoids complaints about sqrt() */
>> #include <sys/time.h> /* for gettimeofday() and friends */
>> #include <stdlib.h> /* for malloc() and friends */
>>
>> SB> Don't you need a pointer to a definitive instance of the above
>> SB> header files?
>>
>> /*
>> * Data types
>> *
>> * This program assumes the int data type is 32 bitsand the long data
>> SB> typo bitsand
>>
>> ==============
>>
>>
>> /*
>> * Timestamp conversion macroni
>> */
>> SB> typo macroni?
>>
>> ============
>>
>> /*
>> * Global constants. Some of these might be converted to variables
>> * which can be tinkered by configuration or computed on-fly. For
>> * instance, the reference implementation computes PRECISION on-fly and
>> * provides performance tuning for the defines marked with % below.
>> */
>>
>> SB> We really need to distinguish quite firmly between
>> SB> invariants, implementation parameters and initial values
>> SB> This comment applies to all of the #defines in the
>> SB> following sections
>>
>>
>> #define VERSION 4 /* version number */
>> #define MINDISP .01 /* % minimum dispersion (s) */
>> #define MAXDISP 16 /* maximum dispersion (s) */
>> #define MAXDIST 1 /* % distance threshold (s) */
>> #define NOSYNC 0x3 /* leap unsync */
>> #define MAXSTRAT 16 /* maximum stratum (infinity metric) */
>> #define MINPOLL 6 /* % minimum poll interval (64 s)*/
>> #define MAXPOLL 17 /* % maximum poll interval (36.4 h) */
>> #define MINCLOCK 3 /* minimum manycast survivors */
>> #define MAXCLOCK 10 /* maximum manycast candidates */
>> #define TTLMAX 8 /* max ttl manycast */
>> #define BEACON 15 /* max interval between beacons */
>>
>> #define PHI 15e-6 /* % frequency tolerance (15 PPM) */
>> #define NSTAGE 8 /* clock register stages */
>> #define NMAX 50 /* maximum number of peers */
>> #define NSANE 1 /* % minimum intersection survivors */
>> #define NMIN 3 /* % minimum cluster survivors */
>>
>> ===============
>>
>> SB> Suppose you ought to point out that this is the UNIX epoch - NTP
>> SB> epoch difference
>> #define JAN_1970 2208988800UL /* 1970 - 1900 in seconds */
>>
>>
>> ================
>>
>>
>> SB> Is there any formal process to check that there were no edit issues
>> SB> in the code - which is I assume an extract from the reference
>> implementation
>> SB> That is true here, but will apply again when it goes though the
>> SB> edit process.
>
This is not an extract from the reference implementation. As said above, 
it has been compiled to check for typos, consistency, etc. In 
retrospect, the variable names should have been more closely consistent 
with those used in themain  text, but I'm not going to fix that now.

>>
>> - Stewart
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ntp.isc.org/pipermail/ntpwg/attachments/20070628/9fff86ad/attachment-0001.html 

