draft-ietf-avtcore-leap-second-02.txt   draft-ietf-avtcore-leap-second-03.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: August 23, 2013 February 19, 2013 Expires: January 15, 2014 July 14, 2013
RTP and Leap Seconds RTP and Leap Seconds
draft-ietf-avtcore-leap-second-02 draft-ietf-avtcore-leap-second-03
Abstract Abstract
This document discusses issues that arise when RTP sessions span This document discusses issues that arise when RTP sessions span
Universal Coordinate Time (UTC) leap seconds. It updates RFC 3550 to Coordinated Universal Time (UTC) leap seconds. It updates RFC 3550
describe how RTP senders and receivers should behave in the presence to describe how RTP senders and receivers should behave in the
of leap seconds. 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 August 23, 2013. This Internet-Draft will expire on January 15, 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2
3. Leap seconds . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Leap seconds . . . . . . . . . . . . . . . . . . . . . . . . 2
3.1. UTC behavior during leap second . . . . . . . . . . . . . . 4 3.1. UTC behavior during positive leap second . . . . . . . . 3
3.2. NTP behavior during leap second . . . . . . . . . . . . . . 4 3.2. NTP behavior during positive leap second . . . . . . . . 3
3.3. POSIX behavior during leap second . . . . . . . . . . . . . 4 3.3. POSIX behavior during positive leap second . . . . . . . 3
3.4. Summary of leap-second behaviors . . . . . . . . . . . . . 4 3.4. Example of leap-second behaviors . . . . . . . . . . . . 4
4. Recommendations . . . . . . . . . . . . . . . . . . . . . . . . 5 4. Receiver behavior during leap second . . . . . . . . . . . . 4
4.1. RTP Sender Reports . . . . . . . . . . . . . . . . . . . . 6 5. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 5
4.2. RTP Packet Playout . . . . . . . . . . . . . . . . . . . . 6 5.1. RTP Sender Reports . . . . . . . . . . . . . . . . . . . 5
5. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 5.2. RTP Packet Playout . . . . . . . . . . . . . . . . . . . 6
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 7 6. Security Considerations . . . . . . . . . . . . . . . . . . . 6
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 7 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7
8.1. Normative References . . . . . . . . . . . . . . . . . . . 7 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 7
8.2. Informative References . . . . . . . . . . . . . . . . . . 7 9.1. Normative References . . . . . . . . . . . . . . . . . . 7
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 8 9.2. Informative References . . . . . . . . . . . . . . . . . 7
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7
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 RTCP sender report (SR)
to create a mapping between RTP timestamps and the wall clock. When to create a mapping between RTP timestamps and the wall clock. When
a wall-clock reference is used, the playout time for RTP packets is a 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
skipping to change at page 4, line 10 skipping to change at page 3, line 30
second from the day. A leap second that adds an extra second is second from the day. A leap second that adds an extra second is
known as a positive leap second. A leap second that skips a second known as a positive leap second. A leap second that skips a second
is known as a negative leap second. All leap seconds since their is known as a negative leap second. All leap seconds since their
introduction in 1972 have been scheduled in June or December and all introduction in 1972 have been scheduled in June or December and all
have been positive. have been positive.
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.[4] to be decided no earlier than 2015.[4]
3.1. UTC behavior during leap second 3.1. UTC behavior during positive leap second
UTC clocks insert a 61st second at the end of the day when a leap UTC clocks feature a 61st second at the end of the day when a
second is scheduled. The leap second is designated "23h 59m 60s". positive leap second is scheduled. The leap second is designated
"23h 59m 60s".
3.2. NTP behavior during leap second 3.2. NTP behavior during positive leap second
Under NTP [5] a leap second is inserted at the beginning of the last Under NTP[5] a leap second is inserted at the beginning of the last
second of the day. This results in the clock freezing or slowing for second of the day. This results in the clock freezing or slowing for
one second immediately prior to the last second of the affected day. one second immediately prior to the last second of the affected day.
This results in the last second of the day having a real-time This results in the last second of the day having a real-time
duration of two seconds. Timestamp accuracy is compromised during duration of two seconds. Timestamp accuracy is compromised during
this period because the clock's rate is not well defined. this period because the clock's rate is not well defined.
3.3. POSIX behavior during leap second 3.3. POSIX behavior during positive leap second
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
timestamp within the last second of the day is 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.
3.4. Summary of leap-second behaviors Most POSIX systems insert the positive leap second at the end of the
last 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 that it can refer to a moment in time in either of the
last two seconds of a day containing a leap second.
Table 1 summarizes behavior across a leap second for the wall clocks 3.4. Example of leap-second behaviors
discussed above.
Table 1 illustrates the leap second that occurred June 30, 2012 when Table 1 illustrates the positive leap second that occurred June 30,
the offset between International Atomic time (TAI) and UTC changed 2012 when the offset between International Atomic time (TAI) and UTC
from 34 to 35 seconds. The first column shows RTP timestamps for an changed from 34 to 35 seconds. The first column shows RTP timestamps
8 kHz audio stream. The second column shows the TAI reference. for an 8 kHz audio stream. The second column shows the TAI
Following columns show behavior for the leap-second-bearing wall reference. Following columns show behavior for the leap-second-
clocks described above. Time values are shown at half-second bearing wall clocks described above. Time values are shown at half-
intervals. second intervals.
+-------+--------------+--------------+--------------+--------------+ +-------+--------------+--------------+--------------+--------------+
| RTP | TAI | UTC | POSIX | NTP | | RTP | TAI | UTC | POSIX | NTP |
+-------+--------------+--------------+--------------+--------------+ +-------+--------------+--------------+--------------+--------------+
| 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
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) 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.
4. Recommendations 4. Receiver behavior during leap second
Timestamps generated during a leap second may be ambiguous or
interpreted differently by sender and receiver or interpreted
differently by different receivers.
Without prior knowledge of leap-second schedule, NTP servers and
clients may become offset by exactly one second with respect to their
UTC reference. This potential discrepancy begins when a leap second
occurs and ends when all participants receive a time update from a
server or peer. Depending on the system implementation, the offset
can last anywhere from a few seconds to a few days. A long-lived
discrepancy can be particularly disruptive to RTP operation.
These discrepancies, depending on direction, may cause receivers to
think they are receiving RTP packets after they should be played or
to attempt to buffer received data an additional second before
playing it. Either situation can cause an interruption in playback.
Some receivers may automatically recognize an unexpected offset and
resynchronize to the stream to accommodate it. Once the offset is
resolved, such receivers may need to resynchronize again.
5. Recommendations
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,[6] GPS [7] and other TAI [8] references do not include IEEE 1588,[6] GPS [7] and other TAI [8] 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.
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.
knowledge of leap second schedule, NTP servers and clients may become
offset by exactly one second with respect to their UTC reference.
This potential discrepancy begins when a leap second occurs and ends
when all participants receive a time update from a server or peer.
Depending on the system implementation, the offset can last anywhere
from a few seconds to a few days. A long-lived discrepancy can be
particularly disruptive to RTP operation.
Because of the timestamp ambiguity, positive leap seconds can Because of the timestamp ambiguity, positive leap seconds can
introduce and the inconsistent manner in which different systems introduce and the inconsistent manner in which different systems
accommodate leap seconds, generating or using NTP timestamps during accommodate positive leap seconds, generating or using NTP timestamps
the entire last second of a day on which a positive leap second has during the entire last second of a day on which a positive leap
been scheduled SHOULD be avoided. Note that the period to be avoided second has been scheduled SHOULD be avoided. Note that the period to
has a real-time duration of two seconds. In the Table 1 example, the be avoided has a real-time duration of two seconds. In the Table 1
region to be avoided is indicated by RTP timestamps 12000 through example, the region to be avoided is indicated by RTP timestamps
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 with respect to RTP timestamps complications. No special treatment with respect to RTP timestamps
is required in the presence of a negative leap second. is required in the presence of a negative leap second.
4.1. RTP Sender Reports 5.1. RTP Sender 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 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
end of the last day of every month. end of the last day of every month.
Receivers working to a leap-second-bearing reference SHOULD ignore Receivers working to a leap-second-bearing reference SHOULD ignore
timestamps in any sender reports generated in the vicinity of a timestamps in any sender reports generated in the vicinity of a
positive leap second. positive leap second.
For the purpose of ignoring sender reports in the vicinity of a leap For the purpose of ignoring sender reports in the vicinity of a leap
second, receivers MAY assume a positive leap second occurs at the end second, receivers MAY assume a positive leap second occurs at the end
of the last day of every month. of the last day of every month.
4.2. RTP Packet Playout 5.2. RTP Packet Playout
Receivers working to a leap-second-bearing reference SHOULD take both Receivers working to a leap-second-bearing reference SHOULD take both
positive and negative leap seconds in the reference into account in positive and negative leap seconds in the reference into account in
determining playout time based on RTP timestamps for data in RTP determining playout time based on RTP timestamps for data in RTP
packets. packets.
5. Security Considerations 6. Security Considerations
RTP streams using a wall-clock reference as discussed here present an RTP streams using a wall-clock reference as discussed here present an
additional attack vector compared to self-clocking streams. additional attack vector compared to self-clocking streams.
Manipulation of the wall clock at either sender or receiver can Manipulation of the wall clock at either sender or receiver can
potentially disrupt streaming. potentially disrupt streaming.
For an RTP stream operating to an leap-seocnd-bearing reference to For an RTP stream operating to an leap-seocnd-bearing reference to
operate reliably across a leap second, sender and receive must both operate reliably across a leap second, sender and receive must both
be aware of the leap second. It is possible to disrupt a stream by be aware of the leap second. It is possible to disrupt a stream by
blocking or delaying leap second notification to one of the blocking or delaying leap second notification to one of the
participants. Streaming can be similarly affected if one of the participants. Streaming can be similarly affected if one of the
participants can be tricked into believing a leap second has been participants can be tricked into believing a leap second has been
scheduled where there is not one. These vulnerabilities are present scheduled where there is not one. These vulnerabilities are present
in RFC 3550 [1] and these new recommendations neither heighten or in RFC 3550 [1] and these new recommendations neither heighten or
diminish them. Integrity of the leap second schedule is the diminish them. Integrity of the leap second schedule is the
responsibility of the operating system and time distribution responsibility of the operating system and time distribution
mechanism both of which are outside the scope of RFC 3550 [1] and mechanism both of which are outside the scope of RFC 3550 [1] and
these recommendations. these recommendations.
6. IANA Considerations 7. IANA Considerations
This document has no actions for IANA. This document has no actions for IANA.
7. Acknowledgements 8. 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. References 9. References
8.1. Normative References 9.1. Normative References
[1] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, [1] Schulzrinne, H., Casner, S., Frederick, R., and V.
"RTP: A Transport Protocol for Real-Time Applications", STD 64, Jacobson, "RTP: A Transport Protocol for Real-Time
RFC 3550, July 2003. Applications", STD 64, RFC 3550, July 2003.
[2] Bradner, S., "Key words for use in RFCs to Indicate Requirement [2] Bradner, S., "Key words for use in RFCs to Indicate
Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
8.2. Informative References 9.2. Informative References
[3] ITU-R, "Recommendation ITU-R TF.460-4 - Standard-frequency and [3] ITU-R, "Recommendation ITU-R TF.460-6 - Standard-frequency
time-signal emissions", February 2002. and time-signal emissions", February 2002.
[4] ITU-R Working Party 7A, "Question SG07.236", February 2012. [4] ITU-R Working Party 7A, "Question SG07.236", February
2012.
[5] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network Time [5] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network
Protocol Version 4: Protocol and Algorithms Specification", Time Protocol Version 4: Protocol and Algorithms
RFC 5905, June 2010. Specification", RFC 5905, June 2010.
[6] IEEE, "IEEE Standard for a Precision Clock Synchronization [6] IEEE, "IEEE Standard for a Precision Clock Synchronization
Protocol for Networked Measurement and Control Systems", Protocol for Networked Measurement and Control Systems",
July 2008. July 2008.
[7] Global Positioning Systems Directorate, "Navstar GPS Space [7] Global Positioning Systems Directorate, "Navstar GPS Space
Segment/Navigation User Segment Interfaces", September 2011. Segment/Navigation User Segment Interfaces", September
2011.
[8] BIPM, "Circular T", May 2012. [8] BIPM, "Circular T", May 2012.
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
Ray van Brandenburg Ray van Brandenburg
TNO TNO
Brassersplein 2 Brassersplein 2
Delft 2612CT Delft 2612CT
the Netherlands the Netherlands
Phone: +31-88-866-7000 Phone: +31-88-866-7000
Email: ray.vanbrandenburg@tno.nl Email: ray.vanbrandenburg@tno.nl
 End of changes. 36 change blocks. 
89 lines changed or deleted 104 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/