draft-ietf-avtcore-leap-second-00.txt   draft-ietf-avtcore-leap-second-01.txt 
AVTCore K. Gross AVTCore K. Gross
Internet-Draft AVA Networks Internet-Draft AVA Networks
Updates: 3550 (if approved) R. van Brandenburg Updates: 3550 (if approved) R. van Brandenburg
Intended status: Standards Track TNO Intended status: Standards Track TNO
Expires: December 23, 2012 June 21, 2012 Expires: April 22, 2013 October 19, 2012
RTP and Leap Seconds RTP and Leap Seconds
draft-ietf-avtcore-leap-second-00 draft-ietf-avtcore-leap-second-01
Abstract Abstract
This document discusses issues that arise when RTP sessions span This document discusses issues that arise when RTP sessions span
(UTC) leap seconds. It updates RFC 3550 to describe how RTP senders Universal Coordinate Time (UTC) leap seconds. It updates RFC 3550 to
and receivers should behave in the presence of leap seconds. describe how RTP senders and receivers should behave in the presence
of leap seconds.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 23, 2012. This Internet-Draft will expire on April 22, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the Copyright (c) 2012 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 10 skipping to change at page 2, line 10
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Leap seconds . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Leap seconds . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1. UTC behavior during leap second . . . . . . . . . . . . . . 3 3.1. UTC behavior during leap second . . . . . . . . . . . . . . 4
3.2. NTP behavior during leap second . . . . . . . . . . . . . . 4 3.2. NTP behavior during leap second . . . . . . . . . . . . . . 4
3.3. POSIX behavior during leap second . . . . . . . . . . . . . 4 3.3. POSIX behavior during leap second . . . . . . . . . . . . . 4
4. Recommendations . . . . . . . . . . . . . . . . . . . . . . . . 4 3.4. Summary of leap-second behaviors . . . . . . . . . . . . . 4
4. Recommendations . . . . . . . . . . . . . . . . . . . . . . . . 5
4.1. RTP Sender Reports and Receiver Reports . . . . . . . . . . 5 4.1. RTP Sender Reports and Receiver Reports . . . . . . . . . . 5
4.2. RTP Packet Playout . . . . . . . . . . . . . . . . . . . . 5 4.2. RTP Packet Playout . . . . . . . . . . . . . . . . . . . . 5
5. Security Considerations . . . . . . . . . . . . . . . . . . . . 5 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 5
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 5 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 6
8. Normative References . . . . . . . . . . . . . . . . . . . . . 5 8. Normative References . . . . . . . . . . . . . . . . . . . . . 6
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 6 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 6
1. Introduction 1. Introduction
In some applications, RTP streams are referenced to a walllock time In some media networking applications, RTP streams are referenced to
(absolute date and time). This is typically accomplished through use a wall-clock time (absolute date and time). This is accomplished
of the NTP timestamp field in the RTCP sender report (SR) to create a through use of the NTP timestamp field in the RTCP sender report (SR)
mapping between RTP timestamps and the wallclock. When a wallclock to create a mapping between RTP timestamps and the wall clock. When
reference is used, the playout time for RTP packets is referenced to a wall-clock reference is used, the play-out time for RTP packets is
the wallclock. Smooth and continuous media playout requires a smooth referenced to the wall clock. Smooth and continuous media play out
and continuous timebase. The timebase used by the wallclock may requires a smooth and continuous time base. The time base used by
include leap seconds which, in many cases, are not rendered smoothly. the wall clock may include leap seconds which are not rendered
smoothly.
This document provides recommendations for smoothly rendering This document provides recommendations for smoothly rendering
streamed media referenced to common wallclocks which may not have streamed media referenced to common wall clocks which do not have
smooth or continuous behavior in the presence of leap seconds. smooth or continuous behavior in the presence of leap seconds.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119] and indicate document are to be interpreted as described in [1] and indicate
requirement levels for compliant implementations. requirement levels for compliant implementations.
3. Leap seconds 3. Leap seconds
Leap seconds are intended to keep UTC time synchronized with the The world time standard is International Atomic Time (TAI) which is
rotation of the earth. Leap seconds are scheduled by the based on vibrations of cesium atoms in an atomic clock. The more
International Earth Rotation and Reference Systems Service. Leap common Universal Coordinated Time (UTC) is based on the rotation of
the Earth. In 1971 UTC was redefined in terms of TAI and the concept
of leap seconds was introduced to allow UTC to remain synchronized
with with the rotation of the Earth. Leap seconds are scheduled by
the International Earth Rotation and Reference Systems Service. Leap
seconds may be scheduled at the last day of any month but are seconds may be scheduled at the last day of any month but are
preferentially scheduled for December and June and secondarily March preferentially scheduled for December and June and secondarily March
and September.[TF.460-6] Because earth's rotation is unpredictable, and September.[2] Because Earth's rotation is unpredictable, leap
leap seconds are typically not scheduled more than six months in seconds are typically not scheduled more than six months in advance.
advance. Leap seconds can be scheduled to either add or remove a Leap seconds can be scheduled to either add or remove a second from
second from the day. All leap second events thus far have been the day. All leap second events since their introduction in 1971
scheduled in June or December and have all added seconds. This is a have been scheduled in June or December and all have added seconds.
situation that is expected but not guaranteed to continue. This is a situation that is expected to but not guaranteed to
continue.
NOTE- The ITU is studying a proposal which could eventually eliminate NOTE- The ITU is studying a proposal which could eventually eliminate
leap seconds from UTC. As of January 2012, this proposal is expected leap seconds from UTC. As of January 2012, this proposal is expected
to be decided no earlier than 2015. to be decided no earlier than 2015.[3]
3.1. UTC behavior during leap second 3.1. UTC behavior during leap second
UTC clocks insert a 61st second at the end of the day when a leap UTC clocks insert a 61st second at the end of the day when a leap
second is scheduled. The leap second is designated "23h 59m 60s". second is scheduled. The leap second is designated "23h 59m 60s".
The sequence of the second markers near the UTC leap second
transition are:
Day 0, 23h 59m 59s
Day 0, 23h 59m 60s <-- leap second
Day 1, 0h 0m 0s
3.2. NTP behavior during leap second 3.2. NTP behavior during leap second
Under NTP [RFC5905] a leap second is inserted at the beginning of the Under NTP [4] a leap second is inserted at the beginning of the last
last second of the day. This results in the clock freezing or second of the day. This results in the clock freezing or slowing for
slowing for one second immediately prior to the last second of the one second immediately prior to the last second of the affected day.
affected day. This results in the last second of the day having a This results in the last second of the day having a real-time
real-time duration of two seconds. duration of two seconds.
3.3. POSIX behavior during leap second 3.3. POSIX behavior during leap second
Most POSIX systems insert the leap second at the end of the last Most POSIX systems insert the leap second at the end of the last
second of the day. This results in repetition of the last second. A second of the day. This results in repetition of the last second. A
timestamp within the last second of the day is therefore ambiguous in timestamp within the last second of the day is therefore ambiguous in
that it can refer to either of the last two seconds of a day that it can refer to a moment in time in either of the last two
containing a leap second. seconds of a day containing a leap second.
3.4. Summary of leap-second behaviors
Table 1 summarizes behavior across a leap second for the wall clocks
discussed above.
The table illustrates the leap second that occurred June 30, 2012
when the offset between International Atomic time (TAI) and UTC
changed from 34 to 35 seconds. The first column shows RTP timestamps
for an 8 kHz audio stream. The second column shows the TAI
reference. Following columns show behavior for the leap-second-
bearing wall clocks described above. Time values are shown at half-
second intervals.
+-------+--------------+--------------+--------------+--------------+
| RTP | TAI | UTC | POSIX | NTP |
+-------+--------------+--------------+--------------+--------------+
| 8000 | 00:00:32.500 | 23:59:58.500 | 23:59:58.500 | 23:59:58.500 |
| 12000 | 00:00:33.000 | 23:59:59.000 | 23:59:59.000 | 23:59:59.000 |
| 16000 | 00:00:33.500 | 23:59:59.500 | 23:59:59.500 | 23:59:59.500 |
| 20000 | 00:00:34.000 | 23:59:60.000 | 23:59:59.000 | 00:00:00.000 |
| 24000 | 00:00:34.500 | 23:59:60.500 | 23:59:59.500 | 00:00:00.000 |
| 28000 | 00:00:35.000 | 00:00:00.000 | 00:00:00.000 | 00:00:00.000 |
| 32000 | 00:00:35.500 | 00:00:00.500 | 00:00:00.500 | 00:00:00.500 |
+-------+--------------+--------------+--------------+--------------+
Table 1
4. Recommendations 4. Recommendations
Senders and receivers which are not referenced to a wallclock are not Senders and receivers which are not referenced to a wall clock are
affected by issues associated with leap seconds and no special not affected by issues associated with leap seconds and no special
accommodation is required. accommodation is required.
RTP implementation using a wallclock reference is simplified by using RTP implementation using a wall-clock reference is simplified by
a clock with a timescale which does not include leap seconds. IEEE using a clock with a timescale which does not include leap seconds.
1588 [IEEE1588-2008], GPS [IS-GPS-200F] and other TAI (International IEEE 1588 [5], GPS [6] and other TAI [7] references do not include
Atomic Time) [CircularT] references do not include leap seconds. NTP leap seconds. NTP time, operating system clocks and other UTC
time, operating system clocks and other UTC (Coordinated Universal (Coordinated Universal Time) references include leap seconds.
Time) references include leap seconds.
All participants working to a leap-second-bearing reference SHOULD All participants working to a leap-second-bearing reference SHOULD
recognize leap seconds and have a working communications channel to recognize leap seconds and have a working communications channel to
receive notification of leap second scheduling. Without prior receive notification of leap second scheduling. Without prior
knowledge of leap second schedule, NTP servers and clients may become knowledge of leap second schedule, NTP servers and clients may become
offset by exactly one second with respect to their UTC reference. offset by exactly one second with respect to their UTC reference.
This potential discrepancy begins when a leap second occurs and ends This potential discrepancy begins when a leap second occurs and ends
when all participants receive a time update from a server or peer. when all participants receive a time update from a server or peer.
Depending on the system implementation, the offset can last anywhere Depending on the system implementation, the offset can last anywhere
from a few seconds to a few days. A long-lived discrepancy can be from a few seconds to a few days. A long-lived discrepancy can be
particularly disruptive to RTP operation. particularly disruptive to RTP operation.
Because of the ambiguity leap seconds can introduce and the Because of the ambiguity leap seconds can introduce and the
inconsistent manner in which different systems accommodate leap inconsistent manner in which different systems accommodate leap
seconds, generating or using NTP timestamps during the entire last seconds, generating or using NTP timestamps during the entire last
second of a day on which a leap second has been scheduled SHOULD be second of a day on which a leap second has been scheduled SHOULD be
avoided. Note that the period to be avoided has a real-time duration avoided. Note that the period to be avoided has a real-time duration
of two seconds. of two seconds. In the Table 1 example, the region to be avoided is
indicated by RTP timestamps 12000 through 28000
4.1. RTP Sender Reports and Receiver Reports 4.1. RTP Sender Reports and Receiver Reports
RTP Senders working to a leap-second-bearing reference SHOULD NOT RTP Senders working to a leap-second-bearing reference SHOULD NOT
generate sender reports containing an originating NTP timestamp in generate sender reports containing an originating NTP timestamp in
the vicinity of a leap second. Receivers SHOULD ignore timestamps in the vicinity of a leap second. Receivers SHOULD ignore timestamps in
any such reports inadvertently generated. any such reports inadvertently generated.
4.2. RTP Packet Playout 4.2. RTP Packet Playout
Receivers working to a leap-second-bearing reference SHOULD take leap Receivers working to a leap-second-bearing reference SHOULD take leap
seconds in their reference into account in determining playout time seconds in their reference into account in determining play-out time
from RTP timestamps for data in RTP packets. from RTP timestamps for data in RTP packets.
5. Security Considerations 5. Security Considerations
It is believed that the recommendations herein introduce no new It is believed that the recommendations herein introduce no new
security considerations beyond those already discussed in [RFC3550]. security considerations beyond those already discussed in [8].
6. IANA Considerations 6. IANA Considerations
This document has no actions for IANA." This document has no actions for IANA.
7. Acknowledgements 7. Acknowledgements
The authors would like to thank Steve Allen for his valuable comments The authors would like to thank Steve Allen for his valuable comments
in helping to improve this document. in helping to improve this document.
8. Normative References 8. Normative References
[CircularT] [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement
BIPM, "Circular T", May 2012. Levels", March 1997.
[IEEE1588-2008] [2] ITU-R, "Recommendation ITU-R TF.460-4 - Standard-frequency and
IEEE, "IEEE Standard for a Precision Clock Synchronization time-signal emissions", February 2002.
Protocol for Networked Measurement and Control Systems",
July 2008.
[IS-GPS-200F] [3] ITU-R Working Party 7A, "Question SG07.236", February 2012.
Global Positioning Systems Directorate, "Navstar GPS Space
Segment/Navigation User Segment Interfaces",
September 2011.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [4] Mills, D., Delaware, U., Martin, J., Ed., Burbank, J., and W.
Requirement Levels", March 1997. Kasch, "Network Time Protocol Version 4: Protocol and Algorithms
Specification", June 2010.
[RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. [5] IEEE, "IEEE Standard for a Precision Clock Synchronization
Jacobson, "RTP: A Transport Protocol for Real-Time Protocol for Networked Measurement and Control Systems",
Applications, RFC3550", July 2003. July 2008.
[RFC5905] Mills, D., Delaware, U., Martin, J., Ed., Burbank, J., and [6] Global Positioning Systems Directorate, "Navstar GPS Space
W. Kasch, "Network Time Protocol Version 4: Protocol and Segment/Navigation User Segment Interfaces", September 2011.
Algorithms Specification", June 2010.
[TF.460-6] [7] BIPM, "Circular T", May 2012.
ITU-R, "Recommendation ITU-R TF.460-4 - Standard-frequency
and time-signal emissions", February 2002. [8] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson,
"RTP: A Transport Protocol for Real-Time Applications, RFC3550",
July 2003.
Authors' Addresses Authors' Addresses
Kevin Gross Kevin Gross
AVA Networks AVA Networks
Boulder, CO Boulder, CO
US US
Email: kevin.gross@avanw.com Email: kevin.gross@avanw.com
 End of changes. 29 change blocks. 
78 lines changed or deleted 102 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/