RFC 7496
Additional Policies for the Partially Reliable Stream Control Transmission Protocol Extension
Additional Policies for the Partially Reliable Stream Control Transmission Protocol Extension π¦
Okay bestie, let's talk about RFC 7496 π It's a Standards Track doc from April 2015, and it's the IETF's official word on two new add-on policies for the PR-SCTP extension β¨ Four authors worked on it: M. Tuexen (Muenster Univ. of Appl. Sciences), R. Seggelmann (Metafinanz Informationssysteme GmbH), R. Stewart (Netflix, Inc.), and S. Loreto (Ericsson). Its ISSN is 2070-1721. The title block doesn't list anything it obsoletes or updates, so it's a fresh start, no drama π
Abstract
This doc adds two extra policies to PR-SCTP, the Partially Reliable Stream Control Transmission Protocol extension π The goal is to limit how many times things get retransmitted, and to let important user messages jump the line, so the send buffer gets used more efficiently π§
Status of This Memo
Okay, this part is the official paperwork π It's an Internet Standards Track document, which means it's a product of the Internet Engineering Task Force (IETF) and reflects the consensus of the IETF community. It went through public review and got approved for publication by the Internet Engineering Steering Group (IESG). If you want more on Internet Standards, check out Section 2 of RFC 5741. For the current status, any errata, or to send feedback, head to http://www.rfc-editor.org/info/rfc7496 πΈ
Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved π
This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info), as they stood on the day it was published. Please read those carefully, because they spell out your rights and restrictions for this document π§Ύ Any Code Components pulled out of this document must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, as described in the Simplified BSD License π«Ά
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Additional PR-SCTP Policies . . . . . . . . . . . . . . . . . 3
3.1. Limited Retransmissions Policy . . . . . . . . . . . . . 3
3.2. Priority Policy . . . . . . . . . . . . . . . . . . . . . 4
4. Socket API Considerations . . . . . . . . . . . . . . . . . . 4
4.1. Data Types . . . . . . . . . . . . . . . . . . . . . . . 5
4.2. Support for Added PR-SCTP Policies . . . . . . . . . . . 5
4.3. Socket Option for Getting the Stream-Specific PR-SCTP
Status (SCTP_PR_STREAM_STATUS) . . . . . . . . . . . . . 6
4.4. Socket Option for Getting the Association-Specific
PR-SCTP Status (SCTP_PR_ASSOC_STATUS) . . . . . . . . . . 7
4.5. Socket Option for Getting and Setting the PR-SCTP Support
(SCTP_PR_SUPPORTED) . . . . . . . . . . . . . . . . . . . 8
5. Security Considerations . . . . . . . . . . . . . . . . . . . 9
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 9
6.1. Normative References . . . . . . . . . . . . . . . . . . 9
6.2. Informative References . . . . . . . . . . . . . . . . . 9
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 10
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11
1. Introduction β¨
Okay so the Partially Reliable SCTP (PR-SCTP) extension, defined in [RFC3758], gives senders a generic way to give up on user messages π The choice to abandon a message is made only on the sender side, and the exact condition is called a "PR-SCTP policy" ([RFC3758] calls them "PR-SCTP Services"). [RFC3758] also defines one specific policy called "Timed Reliability", which lets the sender set a timeout for a user message. Once that timeout hits, the SCTP stack abandons the message π
This document specifies the following two additional PR-SCTP policies:
Limited Retransmission Policy: Lets you cap the number of retransmissions π
Priority Policy: Lets you remove lower-priority messages when the send buffer needs room for higher-priority ones π
2. Conventions π
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. Those are the BCP 14 words, and they're the whole reason this section exists π€
3. Additional PR-SCTP Policies π
This section defines two new PR-SCTP policies, one in each subsection π
Please note that it is REQUIRED to implement [RFC3758] if you want to implement these additional policies. However, these additional policies are OPTIONAL when you implement [RFC3758] π§
3.1. Limited Retransmissions Policy π
Using the Limited Retransmission Policy lets the sender of a user message set an upper limit on retransmissions for each DATA chunk of that message. The sender MUST abandon a user message if the number of retransmissions for any of its DATA chunks would go over the limit. The sender MUST still do everything else needed to handle the retransmission event, like adapting the congestion window and the retransmission timeout. Please note that the retransmission count includes both fast and timer-based retransmissions π
The sender MAY limit retransmissions to 0. This means the message gets abandoned the moment it would be retransmitted for the first time. This setting gives you a service similar to UDP, which also doesn't do any retransmissions π¦
Please note that using this policy does not affect how the thresholds 'Association.Max.Retrans' and 'Path.Max.Retrans' are handled, as specified in Section 8 of [RFC4960] π«Ά
The WebRTC protocol stack (see [DATA-CHAN]) is an example of where the Limited Retransmissions Policy gets used πΈ
3.2. Priority Policy π
Using the Priority Policy lets the sender of a user message specify a priority. When a user message is being stored in the send buffer and there isn't enough free space, the SCTP stack on the sender side MAY abandon other user messages from the same SCTP association (on the same or a different stream) that have a lower priority than the one provided. User messages sent reliably are treated as having a higher priority than every message sent with the Priority Policy. How the messages to abandon get selected is implementation specific π
Once the lower-priority messages are abandoned, high-priority messages can get transferred without the send call blocking (if you're using blocking mode) or the send call failing (if you're using non-blocking mode) π₯
The IP Flow Information Export (IPFIX) protocol stack (see [RFC7011]) is an example of where the Priority Policy can be used π Template records would be sent with full reliability, while flow records related to billing, security, and other monitoring would use the Priority Policy with varying priorities. Security-related flow records would get a higher priority than monitoring-related ones π
4. Socket API Considerations π
This section describes how the socket API defined in [RFC6458] gets extended to support the newly defined PR-SCTP policies. It also covers some statistical info, and how to control the negotiation of the PR-SCTP extension during SCTP association setup π§
Please note that this section is informational only π
4.1. Data Types π’
This section uses data types from [IEEE.1003-1G.1997]: uintN_t means an unsigned integer of exactly N bits (for example, uint16_t). This is the same as in [RFC6458] π
4.2. Support for Added PR-SCTP Policies π§
As defined in [RFC6458], the PR-SCTP policy is specified and configured using the following sctp_prinfo structure:
struct sctp_prinfo {
uint16_t pr_policy;
uint32_t pr_value;
};
When the Limited Retransmission Policy from Section 3.1 is used, pr_policy has the value SCTP_PR_SCTP_RTX, and the number of retransmissions goes in pr_value π
When using the Priority Policy from Section 3.2, pr_policy has the value SCTP_PR_SCTP_PRIO. The priority goes in pr_value. A pr_value of zero is the highest priority, and bigger numbers in pr_value mean lower priorities π
Here's the table that sums up the possible parameter settings from [RFC6458] and this document π
+-------------------+---------------------------+---------------+
| pr_policy | pr_value | Specification |
+-------------------+---------------------------+---------------+
| SCTP_PR_SCTP_NONE | Ignored | [RFC6458] |
| SCTP_PR_SCTP_TTL | Lifetime in ms | [RFC6458] |
| SCTP_PR_SCTP_RTX | Number of retransmissions | Section 3.1 |
| SCTP_PR_SCTP_PRIO | Priority | Section 3.2 |
+-------------------+---------------------------+---------------+
Okay, that's the first half of the spec, bestie π«Ά Section 4.3 and everything after it is coming in part 2, so stay tuned ππ¦
4.3. Socket Option for Getting the Stream-Specific PR-SCTP Status (SCTP_PR_STREAM_STATUS) β¨
Okay bestie, this one is how you peek at the stream-specific PR-SCTP status π. It uses IPPROTO_SCTP as its level and SCTP_PR_STREAM_STATUS as its name. It's getsockopt() only, so no setsockopt() for this one π ββοΈ. The value is this struct:
struct sctp_prstatus {
sctp_assoc_t sprstat_assoc_id;
uint16_t sprstat_sid;
uint16_t sprstat_policy;
uint64_t sprstat_abandoned_unsent;
uint64_t sprstat_abandoned_sent;
};
Here's what each field does π :
sprstat_assoc_id: ignored on one-to-one style sockets π. On one-to-many style sockets, it tells you which association you want the info for. Using SCTP_{CURRENT|ALL|FUTURE}_ASSOC in here is an error, so don't do it bestie π.sprstat_sid: the outgoing SCTP stream you're asking about π§.sprstat_policy: the PR-SCTP policy you're asking about. Using SCTP_PR_SCTP_NONE here is an error. If you pass SCTP_PR_SCTP_ALL, the counters get aggregated over all the supported policies π.sprstat_abandoned_unsent: how many user messages got abandoned under the policy insprstat_policy, on the stream insprstat_sid, for the association insprstat_assoc_id, before any part of the message was sent π.sprstat_abandoned_sent: same deal, but these got abandoned after a part of the message was already sent π¬.
Why two counters? Because SCTP_SEND_FAILED_EVENT makes the same unsent-vs-sent split, so it matches up nicely π«Ά. Also, bestie, this is a big deal: an abandoned large message that needs SCTP-level fragmentation gets counted in sprstat_abandoned_sent as soon as at least one fragment of it has been sent π. That means every abandoned user message lands in either sprstat_abandoned_unsent or sprstat_abandoned_sent, never both, never neither π.
If you want more detailed info about abandoned messages, subscribing to SCTP_SEND_FAILED_EVENT is recommended π. Heads up though: some implementations might not support this option at all, since it uses more resources for each outgoing SCTP stream. For that same reason, some implementations might only support SCTP_PR_SCTP_ALL in sprstat_policy π« .
sctp_opt_info() needs to be extended to support SCTP_PR_STREAM_STATUS β¨.
4.4. Socket Option for Getting the Association-Specific PR-SCTP Status (SCTP_PR_ASSOC_STATUS) π¦
This socket option is the association-wide version of the last one π. It uses IPPROTO_SCTP as its level and SCTP_PR_ASSOC_STATUS as its name. It's also getsockopt() only, not setsockopt(). It uses the same struct we just covered in Section 4.3:
struct sctp_prstatus {
sctp_assoc_t sprstat_assoc_id;
uint16_t sprstat_sid;
uint16_t sprstat_policy;
uint64_t sprstat_abandoned_unsent;
uint64_t sprstat_abandoned_sent;
};
Field by field π:
sprstat_assoc_id: same rules as in Section 4.3. Ignored on one-to-one style sockets. On one-to-many style sockets it picks the association, and using SCTP_{CURRENT|ALL|FUTURE}_ASSOC here is an error π«.sprstat_sid: this one is totally ignored. No stream stuff here, bestie π.sprstat_policy: same as before. SCTP_PR_SCTP_NONE is an error, and SCTP_PR_SCTP_ALL gives you counters aggregated over all supported policies π.sprstat_abandoned_unsent: the number of user messages abandoned under the policy insprstat_policyfor the association insprstat_assoc_id, before any part of the message could be sent π.sprstat_abandoned_sent: same association and policy, but counted after part of the message was already sent π¬.
The unsent and sent counters are split for the same reason as before, since SCTP_SEND_FAILED_EVENT does that too π«Ά. And the fragmentation rule holds here as well: an abandoned large message needing SCTP-level fragmentation goes into sprstat_abandoned_sent as soon as at least one fragment is out the door π. Every abandoned user message is counted in either sprstat_abandoned_unsent or sprstat_abandoned_sent π.
If you need more detail about abandoned messages, you can use the option from Section 4.3 or subscribe to SCTP_SEND_FAILED_EVENT. Both are recommended for that β¨.
sctp_opt_info() needs to be extended to support SCTP_PR_ASSOC_STATUS π§.
4.5. Socket Option for Getting and Setting the PR-SCTP Support (SCTP_PR_SUPPORTED) π
This one is the on/off switch π. It lets you enable or disable negotiating PR-SCTP support for future associations. For existing associations, you can check whether PR-SCTP support got negotiated on a particular one π.
Whether PR-SCTP is enabled by default is up to the implementation π€·ββοΈ.
It uses IPPROTO_SCTP as its level and SCTP_PR_SUPPORTED as its name. You can use it with both getsockopt() and setsockopt() β¨. The value uses this struct, which is defined in [RFC6458] π:
struct sctp_assoc_value {
sctp_assoc_t assoc_id;
uint32_t assoc_value;
};
assoc_id: ignored on one-to-one style sockets. On one-to-many style sockets, it picks the association you're acting on. You can also use the special sctp_assoc_t SCTP_FUTURE_ASSOC here. Using SCTP_{CURRENT|ALL}_ASSOC inassoc_idis an error π«.assoc_value: a non-zero value turns PR-SCTP on, and a value of 0 turns it off π .
sctp_opt_info() needs to be extended to support SCTP_PR_SUPPORTED π.
5. Security Considerations π
Real talk bestie, this section is serious π€. This document doesn't add any security considerations beyond the ones already in [RFC4960], [RFC3758], and [RFC6458] π‘οΈ.
As [RFC3758]'s own Security Considerations point out, transport-layer security in the form of TLS over SCTP (see [RFC3436]) can't be used for PR-SCTP π«. The good news is that DTLS over SCTP (see [RFC6083]) could be used instead π«Ά. If you do use DTLS over SCTP as specified in [RFC6083], then the Security Considerations of [RFC6083] do apply β οΈ.
One more thing, and it's important π: using PR-SCTP on an SCTP association doesn't let that association behave more aggressively than an SCTP association that isn't using PR-SCTP. So nobody gets to be a bully just because they turned PR-SCTP on π ββοΈ.
6. References π
6.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC3758] Stewart, R., Ramalho, M., Xie, Q., Tuexen, M., and P.
Conrad, "Stream Control Transmission Protocol (SCTP)
Partial Reliability Extension", RFC 3758, May 2004,
<http://www.rfc-editor.org/info/rfc3758>.
[RFC4960] Stewart, R., Ed., "Stream Control Transmission Protocol",
RFC 4960, September 2007,
<http://www.rfc-editor.org/info/rfc4960>.
6.2. Informative References
[RFC3436] Jungmaier, A., Rescorla, E., and M. Tuexen, "Transport
Layer Security over Stream Control Transmission Protocol",
RFC 3436, December 2002,
<http://www.rfc-editor.org/info/rfc3436>.
[RFC6083] Tuexen, M., Seggelmann, R., and E. Rescorla, "Datagram
Transport Layer Security (DTLS) for Stream Control
Transmission Protocol (SCTP)", RFC 6083, January 2011,
<http://www.rfc-editor.org/info/rfc6083>.
[RFC6458] Stewart, R., Tuexen, M., Poon, K., Lei, P., and V.
Yasevich, "Sockets API Extensions for the Stream Control
Transmission Protocol (SCTP)", RFC 6458, December 2011,
<http://www.rfc-editor.org/info/rfc6458>.
[RFC7011] Claise, B., Ed., Trammell, B., Ed., and P. Aitken,
"Specification of the IP Flow Information Export (IPFIX)
Protocol for the Exchange of Flow Information", STD 77,
RFC 7011, September 2013,
<http://www.rfc-editor.org/info/rfc7011>.
[DATA-CHAN]
Jesup, R., Loreto, S., and M. Tuexen, "WebRTC Data
Channels", Work in Progress, draft-ietf-rtcweb-data-
channel-13, January 2015.
[IEEE.1003-1G.1997]
IEEE, "Protocol Independent Interfaces", IEEE Standard
1003.1G, March 1997.
Acknowledgments π«Ά
The authors wish to thank Benoit Claise, Spencer Dawkins, Gorry Fairhurst, Stephen Farrell, Barry Leiba, Karen Egede Nielsen, Ka-Cheong Poon, Dan Romascanu, Irene Ruengeler, Jamal Hadi Salim, Joseph Salowey, Brian Trammell, and Vlad Yasevich for their invaluable comments πβ¨.
Authors' Addresses π
Michael Tuexen
Muenster University of Applied Sciences
Stegerwaldstrasse 39
48565 Steinfurt
Germany
EMail: tuexen@fh-muenster.de
Robin Seggelmann
Metafinanz Informationssysteme GmbH
Leopoldstrasse 146
80804 Muenchen
Germany
EMail: rfc@robin-seggelmann.com
Randall R. Stewart
Netflix, Inc.
Chapin, SC 29036
United States
EMail: randall@lakerest.net
Salvatore Loreto
Ericsson
Hirsalantie 11
Jorvas 02420
Finland
EMail: Salvatore.Loreto@ericsson.com
π¦ where this page comes from
- ietf: rfc7496 2015-04
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms