idnits 2.17.1 draft-stenn-ntp-leap-smear-refid-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 25, 2019) is 1857 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'RFC0791' is mentioned on line 129, but not defined Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force H. Stenn 3 Internet-Draft Network Time Foundation 4 Intended status: Standards Track March 25, 2019 5 Expires: September 26, 2019 7 Network Time Protocol Leap Smear REFID 8 draft-stenn-ntp-leap-smear-refid-02 10 Abstract 12 Leap Seconds are part of UTC. NTP timestamps are based on POSIX 13 timestamps, which require each day to have exactly 86,400 seconds per 14 day. Some applications and environments choose to "smear" leap 15 second corrections over a period that can last up to 24 hours' time, 16 and implement NTP servers that offer smeared time to clients asking 17 them for the time. 19 Both NTP clients and operators have no current way to tell if an NTP 20 server is offering leap-smeared time or not. This is a problem. 22 Similarly, an NTP server may choose to offer leap-smeared time to 23 clients that do not appear to know that a leap event is in-process. 24 This is a problem. 26 This proposal offers a mechanism that provides a simple and clean 27 solution to problems, by giving a way that clients (and operators) 28 can trivially ask for leap-smeared time and detect a server that is 29 offering leap-smeared time. 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at https://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on September 26, 2019. 48 Copyright Notice 50 Copyright (c) 2019 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents 55 (https://trustee.ietf.org/license-info) in effect on the date of 56 publication of this document. Please review these documents 57 carefully, as they describe your rights and restrictions with respect 58 to this document. Code Components extracted from this document must 59 include Simplified BSD License text as described in Section 4.e of 60 the Trust Legal Provisions and are provided without warranty as 61 described in the Simplified BSD License. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 66 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 67 2. Leap Smear REFID . . . . . . . . . . . . . . . . . . . . . . 3 68 3. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 69 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 70 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5 71 6. Normative References . . . . . . . . . . . . . . . . . . . . 5 72 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 5 74 1. Introduction 76 Leap Seconds are applied as needed to UTC in order to keep its time 77 of day close to UT1's mean solar time. 79 RFC 5905 [RFC5905] and earlier versions of NTP are the overwhelming 80 method of distributing time on networks. The timescale used by NTP 81 is based on POSIX which, for better or worse, ignores any instances 82 where there are not the ordinary 86,400 seconds per day. 84 Leap Seconds will continue to exist for the foreseeable future, and 85 similarly, POSIX can be expected to ignore leap seconds for the 86 foreseeable future. 88 Different applications have different requirements for the stability 89 of time during the application of a leap second. Some applications 90 are tolerant of a fast application of the correction, while other 91 applications prefer to "smear" the leap second over a longer period, 92 where the time reported by leap-second aware servers is gradually 93 applied so there is no abrupt change to time during the processing of 94 a leap second. 96 While leap second processing can be expected to be properly handled 97 by up-to-date software and by time servers, there are large numbers 98 of out-of-date software installations and client systems that are 99 just not able to properly handle a leap second correction. 101 Additionally, some use-cases for calculating elapsed time (a 102 "difference clock") that use POSIX timestamps are greatly complicated 103 in the possible presence of a leap-second corrections. If the 104 presence of leap-smeared time is of greater value than legally- 105 correct time, leap smearing is the choice some administrators will 106 take. 108 This proposal offers a way for a system to generate a REFID that 109 indicates that the time being supplied in the NTP packet already 110 contains an amount of leap smear correction, and what that amount is. 111 It also provides part of a solution whereby a client can receive 112 leap-smeared time in the case where part of the leap smear occurs 113 before the actual leap second, and the remainder of the leap smear 114 occurs after the actual leap second. 116 1.1. Requirements Language 118 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 119 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 120 document are to be interpreted as described in RFC 2119 [RFC2119]. 122 2. Leap Smear REFID 124 RFC 5905 [RFC5905] defines the data type of NTP time values in 125 Section 6, "Data Types": 127 All NTP time values are represented in twos-complement format, 128 with bits numbered in big-endian (as described in Appendix A of 129 [RFC0791]) fashion from zero starting at the left, or high-order, 130 position. ... 132 The 32 bit signed integer seconds portion and the 32 bit unsigned 133 fractional seconds portion, or 32:32 format is: 135 0 1 2 3 136 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 137 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 138 | Seconds | 139 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 140 | Fraction | 141 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 143 NTP Timestamp Format (32:32) 145 This format provides coverage for 136 years' time to a precision of 146 232 picoseconds. If a leap-second addition is being completely 147 smeared just before before the stroke of the next POSIX second then 148 the smear correction will be (0,1). If this was the only way to 149 apply a leap smear correction then we could simply use an unsigned 150 value to represent the correction. But while the first popular leap 151 smear implementation applied the correction over an appropriate 152 number of hours' time before the actual leap second so the system 153 time was corrected at the stroke of 00:00, that meant that the 154 difference between system time and UTC spent half of the duration of 155 the smear application at [.5,1) "off" of correct time. The second 156 popular implementation of the leap smear applied the first half- 157 second correction before the stroke of 00:00 for a correction range 158 of (0,.5] and the last half-second correction starting at the stroke 159 of 00:00 for a [-.5,0) correction range. This also means we need a 160 signed value to represent the amount of correction. 162 If a system implements the leap-smear REFID, the REFID of a system 163 that is supplying smeared time to client requests while leap-smear 164 correction is active would be 254.b1.b2.b3, where the three octets 165 (b1, b2, and b3) are a 2:22 formatted value, yielding precision to 166 238 nanoseconds, or about a quarter of a microsecond. 168 Note that if an NTP server decides to offer smeared time corrections 169 to clients, it SHOULD only offer this time in response to CLIENT time 170 requests. There is something to be said for further only offering 171 smeared time to CLIENT time requests that show an LI value of 0, and 172 perhaps 3. The reason for this is that if a client knows a leap 173 second is pending, it can be expected to know how to process that 174 leap second. An NTP server that is offering smeared time SHOULD NOT 175 send smeared time in any peer exchanges. Also, CLIENT machines 176 SHOULD NOT be distributing time (smeared or otherwise) to other 177 systems. 179 We also note that during the application of a leap smear, the REFID 180 from a system offering smeared time cannot provide detection of a 181 timing loop. This is not expected to be a problem because time 182 server systems are not expected to make CLIENT connections with each 183 other, so they should not be receiving smeared time. Moreso, if a 184 time server is configured to make CLIENT connections to a server that 185 offers smeared time, with the mechanism described here it can detect 186 when it is getting smeared time, and either ignore time from that 187 source, or "undo" the leap smear correction and use the corrected 188 time for that sample. 190 This proposal is not an attempt to justify servers offering leap 191 smeared time. Its purpose is to make it easy to identify when a 192 client is receiving smeared time, and provide the client a way to 193 know the amount of smear correction as of the latest successful poll. 195 3. Acknowledgements 197 The author wishes to acknowledge the contributions of Juergen 198 Perlinger. 200 4. IANA Considerations 202 This memo requests that IANA allocate a pseudo Extension Field Type 203 of 0xFEFF so the proposed "I-Do" exchange can report whether or not 204 this server can offer leap smeared time in response to CLIENT time 205 requests, identifying the amount of correction using the above REFID. 207 5. Security Considerations 209 No special or unusual security issues have been identified that are 210 directly related to this proposal. 212 Additional information TBD. 214 6. Normative References 216 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 217 Requirement Levels", BCP 14, RFC 2119, 218 DOI 10.17487/RFC2119, March 1997, 219 . 221 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, 222 "Network Time Protocol Version 4: Protocol and Algorithms 223 Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, 224 . 226 Author's Address 228 Harlan Stenn 229 Network Time Foundation 230 P.O. Box 918 231 Talent, OR 97540 232 US 234 Email: stenn@nwtime.org