draft-ietf-avtcore-leap-second-06.txt   draft-ietf-avtcore-leap-second-07.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: May 19, 2014 November 15, 2013 Expires: June 30, 2014 December 27, 2013
RTP and Leap Seconds RTP and Leap Seconds
draft-ietf-avtcore-leap-second-06 draft-ietf-avtcore-leap-second-07
Abstract Abstract
This document discusses issues that arise when RTP sessions span This document discusses issues that arise when RTP sessions span
Coordinated Universal Time (UTC) leap seconds. It updates RFC 3550 Coordinated Universal Time (UTC) leap seconds. It updates RFC 3550
to describe how RTP senders and receivers should behave in the to describe how RTP senders and receivers should behave in the
presence of leap seconds. presence of leap seconds.
Status of This Memo Status of This Memo
skipping to change at page 1, line 34 skipping to change at page 1, line 34
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 May 19, 2014. This Internet-Draft will expire on June 30, 2014.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2013 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2
3. Leap seconds . . . . . . . . . . . . . . . . . . . . . . . . 2 3. Leap seconds . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1. UTC behavior during positive leap second . . . . . . . . 3 3.1. UTC behavior during positive leap second . . . . . . . . 3
3.2. NTP behavior during positive leap second . . . . . . . . 3 3.2. NTP behavior during positive leap second . . . . . . . . 3
3.3. POSIX behavior during positive leap second . . . . . . . 3 3.3. POSIX behavior during positive leap second . . . . . . . 3
3.4. Example of leap-second behaviors . . . . . . . . . . . . 4 3.4. Example of leap-second behaviors . . . . . . . . . . . . 4
4. Receiver behavior during leap second . . . . . . . . . . . . 5 4. Receiver behavior during leap second . . . . . . . . . . . . 5
5. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 5 5. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 5
5.1. RTP Sender Reports . . . . . . . . . . . . . . . . . . . 6 5.1. Sender Reports . . . . . . . . . . . . . . . . . . . . . 6
5.2. RTP Packet Playout . . . . . . . . . . . . . . . . . . . 6 5.2. RTP Packet Playout . . . . . . . . . . . . . . . . . . . 7
6. Security Considerations . . . . . . . . . . . . . . . . . . . 6 6. Security Considerations . . . . . . . . . . . . . . . . . . . 7
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
9.1. Normative References . . . . . . . . . . . . . . . . . . 7 9.1. Normative References . . . . . . . . . . . . . . . . . . 8
9.2. Informative References . . . . . . . . . . . . . . . . . 7 9.2. Informative References . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9
1. Introduction 1. Introduction
In some media networking applications, RTP streams are referenced to In some media networking applications, RTP streams are referenced to
a wall-clock time (absolute date and time). This is accomplished a wall-clock time (absolute date and time). This is accomplished
through use of the NTP timestamp field in the RTCP sender report (SR) through use of the NTP timestamp field in the sender report (SR) to
to create a mapping between RTP timestamps and the wall clock. When create a mapping between RTP timestamps and the wall clock. When a
a wall-clock reference is used, the playout time for RTP packets is wall-clock reference is used, the playout time for RTP packets is
referenced to the wall clock. Smooth and continuous media playout referenced to the wall clock. Smooth and continuous media playout
requires a smooth and continuous time base. The time base used by requires a smooth and continuous time base. The time base used by
the wall clock may include leap seconds which are not rendered the wall clock may include leap seconds which are not rendered
smoothly. smoothly.
This document updates RFC 3550 [1] providing recommendations for This document updates RFC 3550 [1] providing recommendations for
smoothly rendering streamed media referenced to common wall clocks smoothly rendering streamed media referenced to common wall clocks
which do not have smooth or continuous behavior in the presence of which do not have smooth or continuous behavior in the presence of
leap seconds. leap seconds.
skipping to change at page 4, line 15 skipping to change at page 4, line 18
In many systems leap seconds are accommodated by repeating the last In many systems leap seconds are accommodated by repeating the last
second of the day. A timestamp within the last second of the day is second of the day. A timestamp within the last second of the day is
therefore ambiguous in that it can refer to a moment in time in therefore ambiguous in that it can refer to a moment in time in
either of the last two seconds of a day containing a leap second. either of the last two seconds of a day containing a leap second.
Other systems use the same technique used by NTP, freezing or slowing Other systems use the same technique used by NTP, freezing or slowing
for one second immediately prior to the last second of the affected for one second immediately prior to the last second of the affected
day. day.
In some cases [5] [4] leap seconds are accommodated by warping time, In some cases [5] [4] leap seconds are accommodated by warping time,
slightly altering the length of the second in the vicinity of the slightly altering the length of the second in the vicinity of a leap
leap second. second.
3.4. Example of leap-second behaviors 3.4. Example of leap-second behaviors
Table 1 illustrates the positive leap second that occurred June 30, Table 1 illustrates the positive leap second that occurred June 30,
2012 when the offset between International Atomic time (TAI) and UTC 2012 when the offset between International Atomic time (TAI) and UTC
changed from 34 to 35 seconds. The first column shows RTP timestamps changed from 34 to 35 seconds. The first column shows RTP timestamps
for an 8 kHz audio stream. The second column shows the TAI for an 8 kHz audio stream. The second column shows the TAI
reference. Following columns show behavior for the leap-second- reference. Following columns show behavior for the leap-second-
bearing wall clocks described above. Time values are shown at half- bearing wall clocks described above. Time values are shown at half-
second intervals. second intervals.
skipping to change at page 4, line 40 skipping to change at page 4, line 43
+-------+--------------+--------------+--------------+--------------+ +-------+--------------+--------------+--------------+--------------+
| 8000 | 00:00:32.500 | 23:59:58.500 | 23:59:58.500 | 23:59:58.500 | | 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 | | 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 | | 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 | | 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 | | 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 | | 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 | | 32000 | 00:00:35.500 | 00:00:00.500 | 00:00:00.500 | 00:00:00.500 |
+-------+--------------+--------------+--------------+--------------+ +-------+--------------+--------------+--------------+--------------+
Table 1 Table 1: Positive leap second behavior
NOTE- Some NTP implementations do not entirely freeze the clock while NOTE- Some NTP implementations do not entirely freeze the clock while
the leap second is inserted. Successive calls to retrieve system the leap second is inserted. Successive calls to retrieve system
time return infinitesimally larger (e.g. 1 microsecond or 1 time return infinitesimally larger (e.g. 1 microsecond or 1
nanosecond larger) time values. This behavior is designed to satisfy nanosecond larger) time values. This behavior is designed to satisfy
assumptions applications may make that time increases monotonically. assumptions applications may make that time increases monotonically.
This behavior occurs in the least-significant bits of the time value This behavior occurs in the least-significant bits of the time value
and so is not typically visible in the human-readable format shown in and so is not typically visible in the human-readable format shown in
the table. the table.
skipping to change at page 5, line 41 skipping to change at page 5, line 44
Senders and receivers which are not referenced to a wall clock are Senders and receivers which are not referenced to a wall clock are
not 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 wall-clock reference is simplified by RTP implementation using a wall-clock reference is simplified by
using a clock with a timescale which does not include leap seconds. using a clock with a timescale which does not include leap seconds.
IEEE 1588,[9] GPS [10] and other TAI [11] references do not include IEEE 1588,[9] GPS [10] and other TAI [11] references do not include
leap seconds. NTP time, operating system clocks and other UTC leap seconds. NTP time, operating system clocks and other UTC
references include leap seconds. references include leap seconds.
+-------------------------+----------------+---------------+
| Reference clock type | Examples | Accommodation |
+-------------------------+----------------+---------------+
| None | Self clocking | None needed |
| Non-leap-second-bearing | 1588, GPS, TAI | None needed |
| Leap-second-bearing | NTP | Recommended |
+-------------------------+----------------+---------------+
Recommendations summary
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. Note that a working receive notification of leap-second scheduling. Note that a working
communication channel includes a protocol means of notifying clocks communication channel includes a protocol means of notifying clocks
of an impending leap second such as the Leap Indicator in the NTP of an impending leap second such as the Leap Indicator in the NTP
header [8] but also a means for top-tier clocks to receive leap- header [8] but also a means for top-tier clocks to receive leap-
second schedule information published by the International Earth second schedule information published by the International Earth
Rotation and Reference Systems Service. [12] Rotation and Reference Systems Service. [12]
Because of the timestamp ambiguity, positive leap seconds can Because of the timestamp ambiguity that positive leap seconds can
introduce and the inconsistent manner in which different systems introduce and the inconsistent manner in which different systems
accommodate positive leap seconds, generating or using NTP timestamps accommodate positive leap seconds, generating or using NTP timestamps
during the entire last second of a day on which a positive leap during the entire last second of a day on which a positive leap
second has been scheduled SHOULD be avoided. Note that the period to second has been scheduled SHOULD be avoided. Note that the period to
be avoided has a real-time duration of two seconds. In the Table 1 be avoided has a real-time duration of two seconds. In the Table 1
example, the region to be avoided is indicated by RTP timestamps example, the region to be avoided is indicated by RTP timestamps
12000 through 28000 12000 through 28000
Negative leap seconds do not introduce timestamp ambiguity or other Negative leap seconds do not introduce timestamp ambiguity or other
complications. No special treatment is needed to avoid ambiguity complications. No special treatment is needed to avoid ambiguity
with respect to RTP timestamps in the presence of a negative leap with respect to RTP timestamps in the presence of a negative leap
second. second.
POSIX clocks which use the a warping technique to accommodate leap POSIX clocks which use a warping technique to accommodate leap
seconds (e.g. [5] [4]) are not a good choice for an interoperable seconds (e.g. [5] [4]) are not a good choice for an interoperable
timestamp reference and SHOULD be avoided for this application. timestamp reference and SHOULD be avoided for this application.
5.1. RTP Sender Reports 5.1. Sender Reports
In order to avoid generating or using NTP timestamps during positive
leap seconds, RTP senders and receivers need to avoid sending or
using sender reports to synchronize their clocks in the vicinity of a
leap second and instead rely on their internal clocks to maintain
sync until the leap second has passed.
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 positive leap second. To maintain a consistent the vicinity of a positive leap second. To maintain a consistent
RTCP schedule and avoid the risk of unintentional timeouts, such RTCP schedule and avoid the risk of unintentional timeouts, such
senders MAY send receiver reports in place of sender reports in the senders MAY send receiver reports in place of sender reports in the
vicinity of the leap second. vicinity of the leap second.
For the purpose of suspending sender reports in the vicinity of a For the purpose of suspending sender reports in the vicinity of a
leap second, senders MAY assume a positive leap second occurs at the leap second, senders MAY assume a positive leap second occurs at the
skipping to change at page 8, line 22 skipping to change at page 8, line 44
[7] ITU, "Question 236/7", February 2012, [7] ITU, "Question 236/7", February 2012,
<http://www.itu.int/pub/R-QUE-SG07.236-2001>. <http://www.itu.int/pub/R-QUE-SG07.236-2001>.
[8] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network [8] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network
Time Protocol Version 4: Protocol and Algorithms Time Protocol Version 4: Protocol and Algorithms
Specification", RFC 5905, June 2010. Specification", RFC 5905, June 2010.
[9] IEEE, "IEEE Standard for a Precision Clock Synchronization [9] IEEE, "IEEE Standard for a Precision Clock Synchronization
Protocol for Networked Measurement and Control Systems", Protocol for Networked Measurement and Control Systems",
IEEE Standard 1588-2008, July 2008, <http:// IEEE Standard 1588-2008, July 2008,
standards.ieee.org/findstds/standard/1588-2008.html>. <http://standards.ieee.org/findstds/standard/
1588-2008.html>.
[10] Global Positioning Systems Directorate, "Navstar GPS Space [10] Global Positioning Systems Directorate, "Navstar GPS Space
Segment/Navigation User Segment Interfaces", September Segment/Navigation User Segment Interfaces", September
2011, <http://www.navcen.uscg.gov/pdf/IS-GPS-200F.pdf>. 2011, <http://www.navcen.uscg.gov/pdf/IS-GPS-200F.pdf>.
[11] Bureau International des Poids et Mesures (BIPM), [11] Bureau International des Poids et Mesures (BIPM),
"International Atomic Time", November 2013, "International Atomic Time", November 2013,
<http://www.bipm.org/en/scientific/tai/tai.html>. <http://www.bipm.org/en/scientific/tai/tai.html>.
[12] International Earth Rotation and Reference System Service, [12] International Earth Rotation and Reference System Service,
 End of changes. 14 change blocks. 
22 lines changed or deleted 39 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/