RFC 7496

Additional Policies for the Partially Reliable Stream Control Transmission Protocol Extension

πŸ“… published April 2015, from ietf

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 (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 in sprstat_policy, on the stream in sprstat_sid, for the association in sprstat_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 in sprstat_policy for the association in sprstat_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 in assoc_id is 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