idnits 2.17.1 draft-ietf-avtcore-leap-second-04.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC3550, updated by this document, for RFC5378 checks: 1998-04-07) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (August 27, 2013) is 3895 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) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 AVTCore K. Gross 3 Internet-Draft AVA Networks 4 Updates: 3550 (if approved) R. van Brandenburg 5 Intended status: Standards Track TNO 6 Expires: February 28, 2014 August 27, 2013 8 RTP and Leap Seconds 9 draft-ietf-avtcore-leap-second-04 11 Abstract 13 This document discusses issues that arise when RTP sessions span 14 Coordinated Universal Time (UTC) leap seconds. It updates RFC 3550 15 to describe how RTP senders and receivers should behave in the 16 presence of leap seconds. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on February 28, 2014. 35 Copyright Notice 37 Copyright (c) 2013 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 54 3. Leap seconds . . . . . . . . . . . . . . . . . . . . . . . . 2 55 3.1. UTC behavior during positive leap second . . . . . . . . 3 56 3.2. NTP behavior during positive leap second . . . . . . . . 3 57 3.3. POSIX behavior during positive leap second . . . . . . . 3 58 3.4. Example of leap-second behaviors . . . . . . . . . . . . 4 59 4. Receiver behavior during leap second . . . . . . . . . . . . 4 60 5. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 5 61 5.1. RTP Sender Reports . . . . . . . . . . . . . . . . . . . 6 62 5.2. RTP Packet Playout . . . . . . . . . . . . . . . . . . . 6 63 6. Security Considerations . . . . . . . . . . . . . . . . . . . 6 64 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 65 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 66 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 67 9.1. Normative References . . . . . . . . . . . . . . . . . . 7 68 9.2. Informative References . . . . . . . . . . . . . . . . . 7 69 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 71 1. Introduction 73 In some media networking applications, RTP streams are referenced to 74 a wall-clock time (absolute date and time). This is accomplished 75 through use of the NTP timestamp field in the RTCP sender report (SR) 76 to create a mapping between RTP timestamps and the wall clock. When 77 a wall-clock reference is used, the playout time for RTP packets is 78 referenced to the wall clock. Smooth and continuous media playout 79 requires a smooth and continuous time base. The time base used by 80 the wall clock may include leap seconds which are not rendered 81 smoothly. 83 This document updates RFC 3550 [1] providing recommendations for 84 smoothly rendering streamed media referenced to common wall clocks 85 which do not have smooth or continuous behavior in the presence of 86 leap seconds. 88 2. Terminology 90 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 91 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 92 document are to be interpreted as described in RFC 2119 [2] and 93 indicate requirement levels for compliant implementations. 95 3. Leap seconds 96 The world scientific time standard is International Atomic Time (TAI) 97 which is based on vibrations of cesium atoms in an atomic clock. The 98 world civil time is based on the rotation of the Earth. In 1972 the 99 civil time standard, Coordinated Universal Time (UTC), was redefined 100 in terms of TAI and the concept of leap seconds was introduced to 101 allow UTC to remain synchronized with the rotation of the Earth. 103 Leap seconds are scheduled by the International Earth Rotation and 104 Reference Systems Service. Leap seconds may be scheduled at the last 105 day of any month but are preferentially scheduled for December and 106 June and secondarily March and September.[3] Because Earth's rotation 107 is unpredictable, leap seconds are typically not scheduled more than 108 six months in advance. 110 Leap seconds do not respect local time and always occur at the end of 111 the UTC day. Leap seconds can be scheduled to either add or remove a 112 second from the day. A leap second that adds an extra second is 113 known as a positive leap second. A leap second that skips a second 114 is known as a negative leap second. All leap seconds since their 115 introduction in 1972 have been scheduled in June or December and all 116 have been positive. 118 NOTE- The ITU is studying a proposal which could eventually eliminate 119 leap seconds from UTC. As of January 2012, this proposal is expected 120 to be decided no earlier than 2015.[4] 122 3.1. UTC behavior during positive leap second 124 UTC clocks feature a 61st second at the end of the day when a 125 positive leap second is scheduled. The leap second is designated 126 "23h 59m 60s". 128 3.2. NTP behavior during positive leap second 130 Under NTP[5] a leap second is inserted at the beginning of the last 131 second of the day. This results in the clock freezing or slowing for 132 one second immediately prior to the last second of the affected day. 133 This results in the last second of the day having a real-time 134 duration of two seconds. Timestamp accuracy is compromised during 135 this period because the clock's rate is not well defined. 137 3.3. POSIX behavior during positive leap second 139 Most POSIX systems insert the positive leap second at the end of the 140 last second of the day. This results in repetition of the last 141 second. A timestamp within the last second of the day is therefore 142 ambiguous in that it can refer to a moment in time in either of the 143 last two seconds of a day containing a leap second. 145 3.4. Example of leap-second behaviors 147 Table 1 illustrates the positive leap second that occurred June 30, 148 2012 when the offset between International Atomic time (TAI) and UTC 149 changed from 34 to 35 seconds. The first column shows RTP timestamps 150 for an 8 kHz audio stream. The second column shows the TAI 151 reference. Following columns show behavior for the leap-second- 152 bearing wall clocks described above. Time values are shown at half- 153 second intervals. 155 +-------+--------------+--------------+--------------+--------------+ 156 | RTP | TAI | UTC | POSIX | NTP | 157 +-------+--------------+--------------+--------------+--------------+ 158 | 8000 | 00:00:32.500 | 23:59:58.500 | 23:59:58.500 | 23:59:58.500 | 159 | 12000 | 00:00:33.000 | 23:59:59.000 | 23:59:59.000 | 23:59:59.000 | 160 | 16000 | 00:00:33.500 | 23:59:59.500 | 23:59:59.500 | 23:59:59.500 | 161 | 20000 | 00:00:34.000 | 23:59:60.000 | 23:59:59.000 | 00:00:00.000 | 162 | 24000 | 00:00:34.500 | 23:59:60.500 | 23:59:59.500 | 00:00:00.000 | 163 | 28000 | 00:00:35.000 | 00:00:00.000 | 00:00:00.000 | 00:00:00.000 | 164 | 32000 | 00:00:35.500 | 00:00:00.500 | 00:00:00.500 | 00:00:00.500 | 165 +-------+--------------+--------------+--------------+--------------+ 167 Table 1 169 NOTE- Some NTP implementations do not entirely freeze the clock while 170 the leap second is inserted. Successive calls to retrieve system 171 time return infinitesimally larger (e.g. 1 microsecond or 1 172 nanosecond larger) time values. This behavior is designed to satisfy 173 assumptions applications may make that time increases monotonically. 174 This behavior occurs in the least-significant bits of the time value 175 and so is not typically visible in the human-readable format shown in 176 the table. 178 4. Receiver behavior during leap second 180 Timestamps generated during a leap second may be ambiguous or 181 interpreted differently by sender and receiver or interpreted 182 differently by different receivers. 184 Without prior knowledge of leap-second schedule, NTP servers and 185 clients may become offset by exactly one second with respect to their 186 UTC reference. This potential discrepancy begins when a leap second 187 occurs and ends when all participants receive a time update from a 188 server or peer. Depending on the system implementation, the offset 189 can last anywhere from a few seconds to a few days. A long-lived 190 discrepancy can be particularly disruptive to RTP operation. 192 These discrepancies, depending on direction, may cause receivers to 193 think they are receiving RTP packets after they should be played or 194 to attempt to buffer received data an additional second before 195 playing it. Either situation can cause an interruption in playback. 196 Some receivers may automatically recognize an unexpected offset and 197 resynchronize to the stream to accommodate it. Once the offset is 198 resolved, such receivers may need to resynchronize again. 200 5. Recommendations 202 Senders and receivers which are not referenced to a wall clock are 203 not affected by issues associated with leap seconds and no special 204 accommodation is required. 206 RTP implementation using a wall-clock reference is simplified by 207 using a clock with a timescale which does not include leap seconds. 208 IEEE 1588,[6] GPS [7] and other TAI [8] references do not include 209 leap seconds. NTP time, operating system clocks and other UTC 210 references include leap seconds. 212 All participants working to a leap-second-bearing reference SHOULD 213 recognize leap seconds and have a working communications channel to 214 receive notification of leap-second scheduling. Note that a working 215 communication channel includes a protocol means of notifying clocks 216 of an impending leap second such as the Leap Indicator in the NTP 217 header [5] but also a means for top-tier clocks to receive leap- 218 second schedule information published by the International Earth 219 Rotation and Reference Systems Service. 221 Because of the timestamp ambiguity, positive leap seconds can 222 introduce and the inconsistent manner in which different systems 223 accommodate positive leap seconds, generating or using NTP timestamps 224 during the entire last second of a day on which a positive leap 225 second has been scheduled SHOULD be avoided. Note that the period to 226 be avoided has a real-time duration of two seconds. In the Table 1 227 example, the region to be avoided is indicated by RTP timestamps 228 12000 through 28000 230 Negative leap seconds do not introduce timestamp ambiguity or other 231 complications. No special treatment is needed to avoid ambiguity 232 with respect to RTP timestamps in the presence of a negative leap 233 second. 235 5.1. RTP Sender Reports 237 RTP Senders working to a leap-second-bearing reference SHOULD NOT 238 generate sender reports containing an originating NTP timestamp in 239 the vicinity of a positive leap second. To maintain a consistent 240 RTCP schedule and avoid the risk of unintentional timeouts, such 241 senders MAY send receiver reports in place of sender reports in the 242 vicinity of the leap second. 244 For the purpose of suspending sender reports in the vicinity of a 245 leap second, senders MAY assume a positive leap second occurs at the 246 end of the last day of every month. 248 Receivers working to a leap-second-bearing reference SHOULD ignore 249 timestamps in any sender reports generated in the vicinity of a 250 positive leap second. 252 For the purpose of ignoring sender reports in the vicinity of a leap 253 second, receivers MAY assume a positive leap second occurs at the end 254 of the last day of every month. 256 5.2. RTP Packet Playout 258 Receivers working to a leap-second-bearing reference SHOULD take both 259 positive and negative leap seconds in the reference into account in 260 determining playout time based on RTP timestamps for data in RTP 261 packets. 263 6. Security Considerations 265 RTP streams using a wall-clock reference as discussed here present an 266 additional attack vector compared to self-clocking streams. 267 Manipulation of the wall clock at either sender or receiver can 268 potentially disrupt streaming. 270 For an RTP stream operating to an leap-second-bearing reference to 271 operate reliably across a leap second, sender and receive must both 272 be aware of the leap second. It is possible to disrupt a stream by 273 blocking or delaying leap second notification to one of the 274 participants. Streaming can be similarly affected if one of the 275 participants can be tricked into believing a leap second has been 276 scheduled where there is not one. These vulnerabilities are present 277 in RFC 3550 [1] and these new recommendations neither heighten or 278 diminish them. Integrity of the leap second schedule is the 279 responsibility of the operating system and time distribution 280 mechanism both of which are outside the scope of RFC 3550 [1] and 281 these recommendations. 283 7. IANA Considerations 285 This document has no actions for IANA. 287 8. Acknowledgements 289 The authors would like to thank Steve Allen for his valuable comments 290 in helping to improve this document. 292 9. References 294 9.1. Normative References 296 [1] Schulzrinne, H., Casner, S., Frederick, R., and V. 297 Jacobson, "RTP: A Transport Protocol for Real-Time 298 Applications", STD 64, RFC 3550, July 2003. 300 [2] Bradner, S., "Key words for use in RFCs to Indicate 301 Requirement Levels", BCP 14, RFC 2119, March 1997. 303 9.2. Informative References 305 [3] ITU-R, "Recommendation ITU-R TF.460-6 - Standard-frequency 306 and time-signal emissions", February 2002. 308 [4] ITU-R Working Party 7A, "Question SG07.236", February 309 2012. 311 [5] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network 312 Time Protocol Version 4: Protocol and Algorithms 313 Specification", RFC 5905, June 2010. 315 [6] IEEE, "IEEE Standard for a Precision Clock Synchronization 316 Protocol for Networked Measurement and Control Systems", 317 July 2008. 319 [7] Global Positioning Systems Directorate, "Navstar GPS Space 320 Segment/Navigation User Segment Interfaces", September 321 2011. 323 [8] BIPM, "Circular T", May 2012. 325 Authors' Addresses 326 Kevin Gross 327 AVA Networks 328 Boulder, CO 329 US 331 Email: kevin.gross@avanw.com 333 Ray van Brandenburg 334 TNO 335 Brassersplein 2 336 Delft 2612CT 337 the Netherlands 339 Phone: +31-88-866-7000 340 Email: ray.vanbrandenburg@tno.nl