RFC 7829

SCTP-PF: A Quick Failover Algorithm for the Stream Control Transmission Protocol

πŸ“… published April 2016, from ietf

RFC 7829 πŸŽ€βœ¨

Title: SCTP-PF: A Quick Failover Algorithm for the Stream Control Transmission Protocol πŸ¦‹

Authors: Y. Nishida (GE Global Research), P. Natarajan (Cisco Systems), A. Caro (BBN Technologies), P. Amer (University of Delaware), and K. Nielsen (Ericsson) πŸ’–

Published by: the Internet Engineering Task Force (IETF) 🌸

Category: Standards Track πŸ‘‘ It's an Internet Standards Track document, which means it's official protocol stuff! πŸ’…

Date: April 2016 πŸ“

ISSN: 2070-1721


Abstract ✨

Okay so the Stream Control Transmission Protocol (SCTP) supports multihoming 🌈 but when the failover operation from RFC 4960 is followed, there can be serious delay and performance degradation during the data transfer path failover 😭 This document specifies a quick failover algorithm and introduces the SCTP Potentially Failed (SCTP-PF) destination state in SCTP Path Management πŸ”₯

This document also specifies a dormant state operation of SCTP that is required to be followed by an SCTP-PF implementation, but it may equally well be applied by a standard SCTP implementation, as described in RFC 4960 πŸ’œ

Additionally, this document introduces an alternative switchback operation mode called "Primary Path Switchover" that will be beneficial in certain situations πŸ¦‹ This mode of operation applies to both a standard SCTP implementation and an SCTP-PF implementation ✨

The procedures defined in the document require only minimal modifications to the specification in RFC 4960 πŸŽ€ The procedures are sender-side only and do not impact the SCTP receiver 🫢


Status of This Memo 🧚

This is an Internet Standards Track document.

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7829.

Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents πŸ—‚οΈ

1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
2.  Conventions and Terminology . . . . . . . . . . . . . . . . .   5
3.  SCTP with Potentially Failed (SCTP-PF) Destination State  . .   5
  3.1.  Overview  . . . . . . . . . . . . . . . . . . . . . . . .   5
  3.2.  Specification of the SCTP-PF Procedures . . . . . . . . .   6
4.  Dormant State Operation . . . . . . . . . . . . . . . . . . .  10
  4.1.  SCTP Dormant State Procedure  . . . . . . . . . . . . . .  11
5.  Primary Path Switchover . . . . . . . . . . . . . . . . . . .  11
6.  Suggested SCTP Protocol Parameter Values  . . . . . . . . . .  13
7.  Socket API Considerations . . . . . . . . . . . . . . . . . .  13
  7.1.  Support for the Potentially Failed Path State . . . . . .  14
  7.2.  Peer Address Thresholds (SCTP_PEER_ADDR_THLDS) Socket
        Option  . . . . . . . . . . . . . . . . . . . . . . . . .  15
  7.3.  Exposing the Potentially Failed Path State
        (SCTP_EXPOSE_POTENTIALLY_FAILED_STATE) Socket Option  . .  16
8.  Security Considerations . . . . . . . . . . . . . . . . . . .  16
9.  MIB Considerations  . . . . . . . . . . . . . . . . . . . . .  17
10. References  . . . . . . . . . . . . . . . . . . . . . . . . .  17
  10.1.  Normative References . . . . . . . . . . . . . . . . . .  17
  10.2.  Informative References . . . . . . . . . . . . . . . . .  18
Appendix A.  Discussion of Alternative Approaches . . . . . . . .  20
  A.1.  Reduce PMR  . . . . . . . . . . . . . . . . . . . . . . .  20
  A.2.  Adjust RTO-Related Parameters . . . . . . . . . . . . . .  21
Appendix B.  Discussion of the Path-Bouncing Effect . . . . . . .  21
Appendix C.  SCTP-PF for SCTP Single-Homed Operation  . . . . . .  22
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .  22
Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  23

1. Introduction πŸ’–

The Stream Control Transmission Protocol (SCTP) specified in [RFC4960] supports multihoming at the transport layer 🌸 SCTP's multihoming features include failure detection and failover procedures to provide network interface redundancy and improved end-to-end fault tolerance ✨ In SCTP's current failure detection procedure, the sender must experience Path.Max.Retrans (PMR) number of consecutive failed timer-based retransmissions on a destination address before detecting a path failure 😬 Until detecting the path failure, the sender continues to transmit data on the failed path πŸ’€ The prolonged time in which SCTP as described in [RFC4960] continues to use a failed path severely degrades the performance of the protocol 😭 To address this problem, this document specifies a quick failover algorithm called "SCTP-PF" based on the introduction of a new Potentially Failed (PF) path state in SCTP path management πŸ”₯ The performance deficiencies of the failover operation described in RFC 4960, and the improvements obtainable from the introduction of a PF state in SCTP, were proposed and documented in [NATARAJAN09] for Concurrent Multipath Transfer SCTP [IYENGAR06] 🧠

While SCTP-PF can accelerate the failover process and improve performance, the risk that an SCTP endpoint might enter the dormant state where all destination addresses are inactive can be increased πŸ™ˆ [RFC4960] leaves the protocol operation during dormant state to implementations and encourages avoiding entering the state as much as possible by careful tuning of the PMR and Association.Max.Retrans (AMR) parameters 🎯 We specify a dormant state operation for SCTP-PF, which makes SCTP-PF provide the same disruption tolerance as [RFC4960] despite the fact that the dormant state may be entered more quickly πŸ¦‹ The dormant state operation may equally well be applied by an implementation of [RFC4960] and will serve here to provide added fault tolerance for situations where the tuning of the PMR and AMR parameters fail to provide adequate prevention of the entering of the dormant state 🫢

The operation after the recovery of a failed path also impacts the performance of the protocol πŸ‘€ With the procedures specified in [RFC4960], SCTP will (after a failover from the primary path) switch back to use the primary path for data transfer as soon as this path becomes available again πŸ”„ From a performance perspective, such a forced switchback of the data transmission path can be suboptimal as the Congestion Window (CWND) towards the original primary destination address has to be rebuilt once data transfer resumes, [CARO02] 🌊 As an optional alternative to the switchback operation of [RFC4960], this document specifies an alternative Primary Path Switchover procedure that avoids such forced switchbacks of the data transfer path πŸ’… The Primary Path Switchover operation was originally proposed in [CARO02] πŸ“

While SCTP-PF is primarily motivated by a desire to improve the multihomed operation, the feature also applies to SCTP single-homed operation 🧚 Here the algorithm serves to provide increased failure detection on idle associations, whereas the failover or switchback aspects of the algorithm will not be activated πŸ’€ This is discussed in more detail in Appendix C πŸ“–

A brief description of the motivation for the introduction of the PF state, including a discussion of alternative approaches to mitigate the deficiencies of the failover operation in [RFC4960], are given in the appendices πŸ—’οΈ Discussion of path-bouncing effects that might be caused by frequent switchovers are also provided there πŸ“


2. Conventions and Terminology πŸ“š

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] πŸŽ€


3. SCTP with Potentially Failed (SCTP-PF) Destination State 🌈

3.1. Overview πŸ”­

To minimize the performance impact during failover, the sender should avoid transmitting data to a failed destination address as early as possible πŸƒβ€β™€οΈ In the SCTP path management scheme described in [RFC4960], the sender stops transmitting data to a destination address only after the destination address is marked inactive πŸ›‘ This process takes a significant amount of time as it requires the error counter of the destination address to exceed the PMR threshold 🐒 The issue cannot simply be mitigated by lowering the PMR threshold because this may result in spurious failure detection and unnecessary prevention of the usage of a preferred primary path πŸ™ƒ Also, due to the coupled tuning of the PMR and the AMR parameter values in [RFC4960], lowering the PMR threshold may result in lowering the AMR threshold, which would result in a decrease of the fault tolerance of SCTP 😱

The solution provided in this document is to extend the SCTP path management scheme of [RFC4960] by the addition of the PF state as an intermediate state in between the active and inactive state of a destination address in the path management scheme of [RFC4960], and let the failover of data transfer away from a destination address be driven by the entering of the PF state instead of by the entering of the inactive state πŸͺ„ Thereby, SCTP may perform quick failover without negatively impacting the overall fault tolerance of SCTP as described in [RFC4960] ✨ At the same time, HEARTBEAT probing based on Retransmission Timeout (RTO) is initiated towards a destination address once it enters PF state πŸ’“ Thereby, SCTP may quickly ascertain whether network connectivity towards the destination address is broken or whether the failover was spurious πŸ” In the case where the failover was spurious, data transfer may quickly resume towards the original destination address πŸ₯³

The new failure detection algorithm assumes that loss detected by a timeout implies either severe congestion or network connectivity failure 🌧️ It recommends that, by default, a destination address be classified as PF at the occurrence of the first timeout 🚦

3.2. Specification of the SCTP-PF Procedures ✨

okay bestie, here's how SCTP-PF actually works, step by step πŸ’…

  1. The sender keeps a brand new tunable SCTP Protocol Parameter called PotentiallyFailed.Max.Retrans (PFMR) πŸŽ€. PFMR is the new intermediate PF threshold on the destination address error counter. Once that threshold is exceeded, the destination address gets classified as PF. The RECOMMENDED value of PFMR is 0. If PFMR is set to be greater than or equal to PMR, the PF threshold ends up so high that the destination address hits the inactive state before it could ever be classified as PF πŸ’€
  2. The error counter of an active destination address gets incremented or cleared just like [RFC4960] says πŸ“–. So it goes up each time the Timer T3 retransmission (T3-rtx) timer expires, or each time a HEARTBEAT chunk is sent while idle and isn't acknowledged within an RTO. When the value in the destination address error counter goes above PFMR, the endpoint MUST mark the destination address as in the PF state 🚩
  3. An SCTP-PF sender SHOULD NOT send data to destination addresses in PF state when alternative destination addresses in active state are available. Specifically, this means:
    • i. When there's outbound data to send and the destination address currently used for data transmission is in PF state, the sender SHOULD choose a destination address in active state, if one exists, and use it for data transmission ✨
    • ii. As specified in Section 6.4.1 of [RFC4960], when the sender retransmits data that has timed out, it should try to pick a new destination address for the retransmission. In this case, the sender SHOULD choose an alternate destination transport address in active state, if one exists πŸ”
    • iii. When there's outbound data to send and the SCTP user explicitly requests to send data to a destination address in PF state, the sender SHOULD send the data to an alternate destination address in active state if one exists 🫢

When choosing among multiple destination addresses in active state, an SCTP sender follows the guiding principles of Section 6.4.1 of [RFC4960] by choosing the most divergent source-destination pairs compared with, for (the aforementioned points i and ii):

  • i. the destination address in PF state that it performs a failover from, and
  • ii. the destination address towards which the data timed out.

Rules for picking the most divergent source-destination pair are an implementation decision and are not specified within this document πŸ€·β€β™€οΈ

In all cases, the sender MUST NOT change the state of the chosen destination address, whether this state be active or PF, and it MUST NOT clear the error counter of the destination address as a result of choosing it for data transmission. no touching!! πŸ™…β€β™€οΈ

  1. When the destination addresses are all in PF state, or some are in PF state and some in inactive state, the sender MUST choose one destination address in PF state and SHOULD transmit or retransmit data to this destination address using the following rules 🌸
    • i. The sender SHOULD choose the destination in PF state with the lowest error count (fewest consecutive timeouts) for data transmission and transmit or retransmit data to this destination.
    • ii. When there are multiple destination addresses in PF state with same error count, the sender should let the choice among the multiple destination addresses in PF state with equal error count be based on the principles of choosing the most divergent source-destination pairs when executing (potentially consecutive) retransmission outlined in Section 6.4.1 of [RFC4960]. Rules for picking the most divergent source-destination pairs are an implementation decision and are not specified within this document.

The sender MUST NOT change the state and the error counter of any destination addresses as the result of the selection πŸ›‘

  1. The HB.Interval of the Path Heartbeat function of [RFC4960] MUST be ignored for destination addresses in PF state πŸ™ˆ Instead, HEARTBEAT chunks are sent to destination addresses in PF state once per RTO. HEARTBEAT chunks SHOULD be sent to destination addresses in PF state, but the sending of HEARTBEATs MUST honor whether or not the Path Heartbeat function (Section 8.3 of [RFC4960]) is enabled for the destination address. That is, if the Path Heartbeat function is disabled for the destination address in question, HEARTBEATs MUST NOT be sent. Heads up: when the Path Heartbeat function is disabled, it may take longer to transition a destination address in PF state back to active state 🐒
  2. HEARTBEATs are sent when a destination address reaches the PF state πŸ’“ When a HEARTBEAT chunk is not acknowledged within the RTO, the sender increments the error counter and exponentially backs off the RTO value. If the error counter is less than PMR, the sender transmits another packet containing the HEARTBEAT chunk immediately after the timeout on the previous HEARTBEAT expires. When data is being transmitted to a destination address in the PF state, the transmission of a HEARTBEAT chunk MAY be omitted in the case where the receipt of a Selective Acknowledgment (SACK) of the data or a T3-rtx timer expiration on the data can provide equivalent information, such as the case where the data chunk has been transmitted to a single destination address only 🧠 Likewise, the timeout of a HEARTBEAT chunk MAY be ignored if data is outstanding towards the destination address.
  3. When the sender receives a HEARTBEAT ACK from a HEARTBEAT sent to a destination address in PF state, the sender SHOULD clear the error counter of the destination address and transition the destination address back to active state πŸ₯³ However, there may be a situation where HEARTBEAT chunks can go through while DATA chunks cannot. Hence, in a situation where a HEARTBEAT ACK arrives while there is data outstanding towards the destination address to which the HEARTBEAT was sent, then an implementation MAY choose to not have the HEARTBEAT ACK reset the error counter, but have the error counter reset await the fate of the outstanding data transmission. This situation can happen when data is sent to a destination address in PF state. When the sender resumes data transmission on a destination address after a transition of the destination address from PF to active state, it MUST do this following the prescriptions of Section 7.2 of [RFC4960] πŸ“‹
  4. Additional PMR - PFMR consecutive timeouts on a destination address in PF state confirm the path failure, upon which the destination address transitions to the inactive state πŸ’” As described in [RFC4960], the sender SHOULD (i) notify the Upper Layer Protocol (ULP) about this state transition, and (ii) transmit HEARTBEAT chunks to the inactive destination address at a lower HB.Interval frequency as described in Section 8.3 of [RFC4960] (when the Path Heartbeat function is enabled for the destination address).
  5. Acknowledgments for chunks that have been transmitted to multiple destinations (i.e., a chunk that has been retransmitted to a different destination address than the destination address to which the chunk was first transmitted) SHOULD NOT clear the error count for an inactive destination address and SHOULD NOT move a destination address in PF state back to active state, since a sender cannot disambiguate whether the ACK was for the original transmission or the retransmission(s) πŸ€” An SCTP sender MAY clear the error counter and move a destination address back to active state by information other than acknowledgments, when it can uniquely determine which destination, among multiple destination addresses, the chunk reached. This document makes no reference to what such information could consist of, nor how such information could be obtained.
  6. Acknowledgments for data chunks that have been transmitted to one destination address only MUST clear the error counter for the destination address and MUST transition a destination address in PF state back to active state πŸŽ‰ This situation can happen when new data is sent to a destination address in the PF state. It can also happen in situations where the destination address is in the PF state due to the occurrence of a spurious T3-rtx timer and acknowledgments start to arrive for data sent prior to occurrence of the spurious T3-rtx and data has not yet been retransmitted towards other destinations. This document does not specify special handling for detection of, or reaction to, spurious T3-rtx timeouts, e.g., for special operation vis-a-vis the congestion control handling or data retransmission operation towards a destination address that undergoes a transition from active to PF to active state due to a spurious T3-rtx timeout. But it is noted that this is an area that would benefit from additional attention, experimentation, and specification for single-homed SCTP as well as for multihomed SCTP protocol operation. this one's a whole saga, bestie 🌈
  7. When all destination addresses are in inactive state, and SCTP protocol operation thus is said to be in dormant state, the prescriptions given in Section 4 shall be followed 😴
  8. The SCTP stack SHOULD expose the PF state of its destination addresses to the ULP as well as provide the means to notify the ULP of state transitions of its destination addresses from active to PF, and vice versa πŸ“£ However, it is recommended that an SCTP stack implementing SCTP-PF also allows for the ULP to be kept ignorant of the PF state of its destinations and the associated state transitions, thus allowing for retention of the simpler state transition model of [RFC4960] in the ULP. For this reason, it is recommended that an SCTP stack implementing SCTP-PF also provide the ULP with the means to suppress exposure of the PF state and the associated state transitions 🧚

4. Dormant State Operation ✨

Okay so picture this: the SCTP endpoints get completely cut off from each other 😭. In that situation, SCTP-PF's aggressive HEARTBEAT transmissions on destination addresses in PF state can make the association go dormant way faster than a standard SCTP implementation of [RFC4960] with the same PMR and AMR settings. For example, an association with two destination addresses would usually hit dormant state in half the time of a standard [RFC4960] implementation. Why? An SCTP PF sender sends HEARTBEATs and data retransmissions in parallel, on RTO intervals, whenever there are multiple destination addresses in PF state. This whole argument assumes RTO << HB.Interval from [RFC4960] 🧠.

The big goal here is that SCTP-PF should keep the same level of disruption tolerance as a standard SCTP implementation with the same PMR and AMR setting. So we're prescribing that an SCTP-PF implementation SHOULD operate as described in Section 4.1 during dormant state πŸ’….

An SCTP-PF implementation MAY pick a different dormant state operation than the one in Section 4.1, as long as the solution it picks does not decrease the fault tolerance of SCTP-PF operation 🫢.

The dormant state rules below MUST NOT be tied to the value of the PFMR. They only depend on whether SCTP-PF logic is activated in an SCTP implementation πŸŽ€.

Also, the dormant state operation below can give enhanced disruption tolerance to a standard SCTP implementation that doesn't support SCTP-PF at all, so it can totally make sense for a standard SCTP implementation to follow this mode too ✨. For a standard SCTP implementation, carrying on with data transmission during dormant state makes SCTP's fault tolerance way more robust. That helps in situations where some, or all, of the alternative paths of an SCTP association go inactive before the primary path used for data transmission even notices trouble πŸ‘‘.

4.1. SCTP Dormant State Procedure

  1. When all the destination addresses are in inactive state and data is ready to transfer, the sender MUST choose one destination and send data to that destination address.
  2. The sender MUST NOT change the state of the chosen destination address (it stays in inactive state), and it MUST NOT clear the error counter of the destination address just because it chose that address for data transmission πŸ™ˆ.
  3. The sender SHOULD choose the destination in inactive state with the lowest error count (fewest consecutive timeouts) for data transmission. When multiple destinations in inactive state have the same error count, the sender SHOULD try to pick the most divergent source -- destination pair from the last source -- destination pair where failure was observed. The rules for picking the most divergent source-destination pair are an implementation decision and aren't specified in this document πŸ€·β€β™€οΈ. To make it possible to tell inactive destination addresses apart by their error count, SCTP will need to let the destination address error counters keep incrementing up to some reasonable limit above PMR+1, which changes what Section 8.3 of [RFC4960] says about this. The exact limit isn't specified in this document, but it's considered reasonable to make the limit an order of magnitude higher than the PMR value πŸ“ˆ. A sender MAY choose to use other strategies instead of the one defined here. Prioritizing the last active destination address (the one with the fewest error counts) is optimal when some paths are permanently inactive, but it's suboptimal when path instability is transient πŸŒͺ️.

5. Primary Path Switchover

The whole point of Primary Path Switchover is to let the SCTP sender keep transmitting data on a new working path, even when the old primary destination address comes back to active πŸ¦‹. It works by having SCTP switch the primary path over to the new working path once the error counter of the primary path goes past a certain threshold. This mode can be used not only by SCTP-PF implementations, but also by implementations of [RFC4960] 🌈.

Primary Path Switchover only needs changes on the sender side. Here are the details:

  1. The sender keeps track of a new tunable parameter called Primary.Switchover.Max.Retrans (PSMR). For SCTP-PF implementations, the PSMR MUST be set greater than or equal to the PFMR value. For implementations of [RFC4960], the PSMR MUST be set greater than or equal to the PMR value. Implementations MUST reject any other values of PSMR 🚫.
  2. When the path error counter on a set primary path goes over PSMR, the SCTP implementation MUST autonomously select and set a new primary path πŸ’₯.
  3. The primary path that the SCTP implementation selects MUST be the path that would be chosen for data transfer at that given time. A previously failed primary path can be used as a data transfer path again, following normal path selection, when the current data transfer path fails πŸ”.
  4. For SCTP-PF, the recommended value of PSMR is PFMR when the Primary Path Switchover operation mode is used. This means no forced switchback to a previously failed primary path happens. An SCTP-PF implementation of Primary Path Switchover MUST support setting PSMR = PFMR. An SCTP-PF implementation of Primary Path Switchover MAY support setting PSMR > PFMR πŸ“.
  5. For standard SCTP, the recommended value of PSMR is PMR when Primary Path Switchover is used. Again, this means no forced switchback to a previously failed primary path. A standard SCTP implementation of Primary Path Switchover MUST support setting PSMR = PMR. A standard SCTP implementation of Primary Path Switchover MAY support larger settings, PSMR > PMR πŸ’œ.
  6. It MUST be possible to turn off Primary Path Switchover and get the standard switchback operation of [RFC4960] instead πŸ”Œ.

How good the switchover is depends on how the quality of a set primary path compares to the quality of the alternative paths available, and on how much you want the mode to spread traffic across a bunch of network paths 🧁. Load distribution across multiple SCTP associations can be enforced by spreading out the set primary paths, using the switchback operation of [RFC4960]. BUT, since the switchback behavior of [RFC4960] is suboptimal in some situations, especially when a number of equally good paths are available, an SCTP implementation MAY also support Primary Path Switchover as an alternative behavior, and MAY enable it based on applications' requests 🌸.

For an SCTP implementation that implements Primary Path Switchover, this specification RECOMMENDS that the standard switchback operation of [RFC4960] be kept as the default operation πŸŽ€.


6. Suggested SCTP Protocol Parameter Values

This document doesn't change the value recommendations for the SCTP Protocol Parameters defined in [RFC4960] πŸ“–.

The following protocol parameter is RECOMMENDED:

   PotentiallyFailed.Max.Retrans (PFMR) - 0

7. Socket API Considerations 🧚

This section explains how the socket API defined in [RFC6458] gets extended so the application can control and observe the SCTP-PF behavior, as well as the Primary Path Switchover function πŸ‘€.

Please note that this section is informational only πŸ’β€β™€οΈ.

A socket API implementation based on [RFC6458] is extended, through the existing SCTP_PEER_ADDR_CHANGE event, to send an event notification when a peer address enters or leaves the PF state. The socket API implementation is also extended to show the PF state of a peer address in the existing SCTP_GET_PEER_ADDR_INFO structure πŸ”₯.

Two new read/write socket options are also defined, for the level IPPROTO_SCTP and the names SCTP_PEER_ADDR_THLDS and SCTP_EXPOSE_POTENTIALLY_FAILED_STATE, as described below. The first one controls the values of the PFMR and PSMR parameters from Sections 3 and 5. The second one controls whether the PF path state is exposed 🫠.

Support for the SCTP_PEER_ADDR_THLDS and SCTP_EXPOSE_POTENTIALLY_FAILED_STATE socket options also needs to be added to the function sctp_opt_info() βœ….

7.1. Support for the Potentially Failed Path State

As defined in [RFC6458], the SCTP_PEER_ADDR_CHANGE event is provided when the status of a peer address changes. On top of the state changes described in [RFC6458], this event is also provided when a peer address enters or leaves the PF state. The notification, as defined in [RFC6458], uses the following structure:

   struct sctp_paddr_change {
     uint16_t spc_type;
     uint16_t spc_flags;
     uint32_t spc_length;
     struct sockaddr_storage spc_aaddr;
     uint32_t spc_state;
     uint32_t spc_error;
     sctp_assoc_t spc_assoc_id;
   }

[RFC6458] defines the constants SCTP_ADDR_AVAILABLE, SCTP_ADDR_UNREACHABLE, SCTP_ADDR_REMOVED, SCTP_ADDR_ADDED, and SCTP_ADDR_MADE_PRIM to go in the spc_state field 🧾. This document adds one new constant, SCTP_ADDR_POTENTIALLY_FAILED, which gets reported when the affected address becomes PF 🌟.

The SCTP_GET_PEER_ADDR_INFO socket option defined in [RFC6458] can be used to check the state of a peer address. It uses the following structure:

   struct sctp_paddrinfo {
     sctp_assoc_t spinfo_assoc_id;
     struct sockaddr_storage spinfo_address;
     int32_t spinfo_state;
     uint32_t spinfo_cwnd;
     uint32_t spinfo_srtt;
     uint32_t spinfo_rto;
     uint32_t spinfo_mtu;
   };

[RFC6458] defines the constants SCTP_UNCONFIRMED, SCTP_ACTIVE, and SCTP_INACTIVE to go in the spinfo_state field. This document adds one new constant, SCTP_POTENTIALLY_FAILED, which is reported when the peer address is PF πŸ’–.

7.2. Peer Address Thresholds (SCTP_PEER_ADDR_THLDS) Socket Option ✨

okay so apps can totally control how SCTP-PF behaves πŸ’… by getting or setting how many consecutive timeouts it takes before a peer address gets labeled PF or unreachable. The same socket option is also how apps set or read the number of timeouts before the Primary Path Switchover function automatically swaps the primary path πŸ¦‹. It lives at level IPPROTO_SCTP and goes by the name SCTP_PEER_ADDR_THLDS.

The thresholds are passed around in this struct:

struct sctp_paddrthlds {
  sctp_assoc_t spt_assoc_id;
  struct sockaddr_storage spt_address;
  uint16_t spt_pathmaxrxt;
  uint16_t spt_pathpfthld;
  uint16_t spt_pathcpthld;
};
  • spt_assoc_id: this one gets ignored for one-to-one style sockets πŸ™ˆ. For one-to-many style sockets, the app can fill in an association identifier or SCTP_FUTURE_ASSOC. Putting SCTP_{CURRENT|ALL}_ASSOC in here is an error, so don't do it, bestie πŸ’€.
  • spt_address: this picks which peer address you care about. If you give it a wildcard address, the option applies to all current and future peer addresses 🌈.
  • spt_pathmaxrxt: each peer address you're watching counts as unreachable once its path error counter goes above spt_pathmaxrxt 😭.
  • spt_pathpfthld: each peer address you're watching counts as PF once its path error counter goes above spt_pathpfthld ✨.
  • spt_pathcpthld: each peer address you're watching stops being the primary remote address once its path error counter goes above spt_pathcpthld πŸ‘‘. Setting it to 0xffff turns off picking a new primary peer address entirely. If an implementation can't auto-pick a new primary address, it should throw an error with errno set to EINVAL whenever you use something other than 0xffff here. For SCTP-PF, setting spt_pathcpthld < spt_pathpfthld should be rejected with errno set to EINVAL πŸ™…β€β™€οΈ. For standard SCTP, setting spt_pathcpthld < spt_pathmaxrxt should be rejected with errno set to EINVAL. An SCTP-PF implementation may only support setting spt_pathcpthld = spt_pathpfthld and spt_pathcpthld = 0xffff, and a standard SCTP implementation may only support setting spt_pathcpthld = spt_pathmaxrxt and spt_pathcpthld = 0xffff. In those cases, SCTP shall reject any other values with errno set to EINVAL 🫢.

7.3. Exposing the Potentially Failed Path State (SCTP_EXPOSE_POTENTIALLY_FAILED_STATE) Socket Option

Apps can decide whether the PF path state shows up in the SCTP_PEER_ADDR_CHANGE event and in SCTP_GET_PEER_ADDR_INFO, like we covered in Section 7.1 πŸŽ€. The default is totally up to each implementation, so check what yours does πŸ€·β€β™€οΈ.

This option lives at level IPPROTO_SCTP and is named SCTP_EXPOSE_POTENTIALLY_FAILED_STATE.

The struct that controls whether the PF state gets exposed looks like this:

struct sctp_assoc_value {
  sctp_assoc_t assoc_id;
  uint32_t assoc_value;
};
  • assoc_id: this gets ignored for one-to-one style sockets. For one-to-many style sockets, the app can fill in an association identifier or SCTP_FUTURE_ASSOC. Using SCTP_{CURRENT|ALL}_ASSOC here is an error 🚫.
  • assoc_value: the PF path state is exposed if, and only if, this parameter is non-zero 🧚.

8. Security Considerations πŸ”

Security stuff for SCTP and its APIs is covered in [RFC4960] and [RFC6458], so go read those too πŸ“š.

This document doesn't change existing SCTP messages on the wire at all 🌸. It also doesn't introduce any new SCTP messages on the wire, which means there are no new security considerations to deal with from that angle.

Okay, real talk, though 😀. SCTP-PF makes SCTP way more robust when the primary path is failing or congested, but it also makes it more vulnerable to network connectivity and congestion attacks on the primary path πŸ’€. SCTP-PF makes it easier for an attacker to trick SCTP into switching the data transfer path, because the amount of time an attacker needs to mess with network connectivity is way shorter than what [RFC4960] assumes. That said, SCTP-PF doesn't really change how much time and effort an attacker needs to keep SCTP away from the primary path. With the standard switchback operation in [RFC4960], SCTP goes back to using its primary path as soon as the next HEARTBEAT succeeds πŸ¦‹.

The Primary Path Switchover mechanism is where things get spicy 🌢️. It changes the threat analysis. On-path attackers can force a permanent change to the data transfer path by blocking the primary path until the Primary Path Switchover algorithm kicks in and triggers a switchover. This is especially true when Primary Path Switchover is used together with SCTP-PF using the particular setting PSMR = PFMR = 0, because Primary Path Switchover happens already at the first RTO timeout experienced. Anyone using the Primary Path Switchover mechanism should be aware of this 🚨.

The event notifications for path state changes from active to PF state and back give attackers a bit more room to generate local events πŸ‘€. It is assumed, though, that event notifications are rate-limited in the implementation to deal with this threat ⭐.

9. MIB Considerations πŸ“Š

SCTP-PF brings in new SCTP algorithms for failover and switchback, along with some new state parameters πŸ’œ. It is recommended that the SCTP-MIB defined in [RFC3873] gets updated so you can manage an SCTP-PF implementation. This can be done by extending the sctpAssocRemAddrActive field of the SCTPAssocRemAddrTable so it includes info about the PF state of the destination address, and by adding new fields to the SCTPAssocRemAddrTable that support the PotentiallyFailed.Max.Retrans (PFMR) and Primary.Switchover.Max.Retrans (PSMR) parameters πŸ“.

10. References πŸ“–

10.1. Normative References

10.2. Informative References

  • [CARO02] Caro, A., Iyengar, J., Amer, P., Heinz, G., and R. Stewart, "A Two-level Threshold Recovery Mechanism for SCTP", Tech report, CIS Dept., University of Delaware, July 2002.
  • [CARO04] Caro, A., Amer, P., and R. Stewart, "End-to-End Failover Thresholds for Transport Layer Multihoming", MILCOM 2004, DOI 10.1109/MILCOM.2004.1493253, November 2004.
  • [CARO05] Caro, A., "End-to-End Fault Tolerance using Transport Layer Multihoming", Ph.D. Thesis, University of Delaware, DOI 10.1007/BF03219970, January 2005.
  • [FALLON08] Fallon, S., Jacob, P., Qiao, Y., Murphy, L., Fallon, E., and A. Hanley, "SCTP Switchover Performance Issues in WLAN Environments", IEEE CCNC, DOI 10.1109/ccnc08.2007.131, January 2008.
  • [GRINNEMO04] Grinnemo, K-J. and A. Brunstrom, "Performance of SCTP-controlled failovers in M3UA-based SIGTRAN networks", Advanced Simulation Technologies Conference, April 2004.
  • [IYENGAR06] Iyengar, J., Amer, P., and R. Stewart, "Concurrent Multipath Transfer using SCTP Multihoming over Independent End-to-end Paths", IEEE/ACM Transactions on Networking, DOI 10.1109/TNET.2006.882843, October 2006.
  • [JUNGMAIER02] Jungmaier, A., Rathgeb, E., and M. Tuexen, "On the use of SCTP in failover scenarios", World Multiconference on Systemics, Cybernetics and Informatics, July 2002.
  • [NATARAJAN09] Natarajan, P., Ekiz, N., Amer, P., and R. Stewart, "Concurrent Multipath Transfer during Path Failure", Computer Communications, DOI 10.1016/j.comcom.2009.05.001, May 2009.
  • [RFC3873] Pastor, J. and M. Belinchon, "Stream Control Transmission Protocol (SCTP) Management Information Base (MIB)", RFC 3873, DOI 10.17487/RFC3873, September 2004, <http://www.rfc-editor.org/info/rfc3873>.
  • [RFC6458] Stewart, R., Tuexen, M., Poon, K., Lei, P., and V. Yasevich, "Sockets API Extensions for the Stream Control Transmission Protocol (SCTP)", RFC 6458, DOI 10.17487/RFC6458, December 2011, <http://www.rfc-editor.org/info/rfc6458>.

Appendix A. Discussion of Alternative Approaches 🧠

This section lists alternative approaches for the issues described in this document. Even though these approaches don't require updating RFC 4960, we do not recommend them, for the reasons described below πŸ™ˆ.

A.1. Reduce PMR ✨

okay bestie, this one's all about shrinking Path.Max.Retrans (PMR) πŸ’…. Smaller values make failover faster, and some research actually recommends it πŸ” [JUNGMAIER02], [GRINNEMO04], and [FALLON08]. But to really cut the failover time, you have to go all the way down (like PFMR) to Path.Max.Retrans=0. With that setting, SCTP jumps to another destination address on a single timeout 😬, and that can cause a spurious failover.

Spurious failover is a real problem in standard SCTP. Unlike SCTP-PF, HEARTBEATs on the left primary path are still governed by HB.Interval during the failover process πŸ’€. HB.Interval is usually in the order of seconds (the recommended value is 30 seconds). So when the primary path goes inactive, the next HEARTBEAT might not go out until many seconds later, and as recommended, that's 30 seconds later πŸ™ˆ. By then the primary path may have long since recovered (if it needed to recover at all), so the failover could be truly spurious 😭.

Post failover, the endpoint is stuck waiting many seconds before it can resume transmission on the primary path. And once it's back, the CWND has to be rebuilt from scratch, which is a process the throughput already had to suffer through on the alternate path πŸ₯².

Using a smaller HB.Interval might help, but it means more frequent HEARTBEATing even when there are no observed troubles, which is a general waste of bandwidth 🫠. The bandwidth overhead can be reduced if the ULP uses a smaller HB.Interval only on whichever path is currently the primary path. The catch is that this adds complexity to the ULP 🧩.

Smaller Path.Max.Retrans values also affect Association.Max.Retrans πŸ‘€. When the association's error count exceeds the Association.Max.Retrans threshold, the SCTP sender considers the peer endpoint unreachable and terminates the association. Section 8.2 in [RFC4960] recommends that the Association.Max.Retrans value should not be larger than the summation of the Path.Max.Retrans of each of the destination addresses.

If it isn't, the SCTP sender considers its peer reachable even when all destinations are INACTIVE. That's the dormant state trap πŸͺ€. To avoid it, a standard SCTP implementation SHOULD reduce Association.Max.Retrans whenever it reduces Path.Max.Retrans. The tradeoff is that a smaller Association.Max.Retrans lowers SCTP's fault tolerance, because it increases the chances of association termination during minor congestion events πŸ’”.

Several research results show we can shorten the failover process by tweaking the RTO-related parameters [JUNGMAIER02] and [FALLON08] πŸ¦‹. During failover, RTO keeps getting doubled. But if we pick a smaller value for RTO.max, we can stop that exponential growth at some point ✨. Choosing smaller values for RTO.initial or RTO.min also helps keep the RTO value small 🌸.

Just like reducing Path.Max.Retrans, the big perk here is that it doesn't require any changes to the current specification πŸŽ€. The catch is that it means ignoring several recommendations in Section 15 of [RFC4960]. It also needs a solid understanding of the network characteristics between endpoints. Without that, you can run into adverse side effects like spurious timeouts 😬.

The real issue is this: even if RTO.max is lowered to an optimal low value, as long as Path.Max.Retrans stays at the recommended value from [RFC4960], shrinking RTO.max doesn't reduce the failover time enough to prevent severe performance degradation during failover πŸ“‰. Not it πŸ’€.


Appendix B. Discussion of the Path-Bouncing Effect

The methods in this document can speed up the failover process 🏎️. Because of that, they might introduce a path-bouncing effect, where the sender keeps switching the data transmission path over and over πŸ“. Sounds harmful to the data transfer, right? Well, several research results show there's no serious problem with SCTP when it comes to path bouncing (see [CARO04] and [CARO05]) πŸ™Œ.

There are two main reasons why 🧠. First, SCTP is basically designed for multipath communication. That means it maintains all path-related parameters (CWND, ssthresh, RTT, error count, etc.) for each destination address. Path bouncing can't mess with those parameters πŸ›‘οΈ. Also, when SCTP moves the data transfer to another path, it starts with the minimal or the initial CWND. So there's very little chance of packet reordering or duplication πŸͺ„.

Second, even if all communication paths between the end nodes share the same bottleneck, SCTP-PF only results in a behavior that [RFC4960] already allows πŸ’….


Appendix C. SCTP-PF for SCTP Single-Homed Operation

For a single-homed SCTP association, the only tangible effect of turning on SCTP-PF operation is better failure detection πŸ”Ž. That shows up in a few ways: the PF state of the sole destination address can be reported, and for idle associations, the inactive state of the destination address is entered and reported faster. Endpoint failure is also detected faster πŸƒβ€β™€οΈ. It's believed that none of these effects are harmful, as long as adequate dormant state operation is implemented 🫢.

It's also believed these effects may be especially useful for applications that deploy multiple SCTP associations for load-balancing purposes βš–οΈ. The early notification of the PF state can be used for preventive measures, since entering the PF state can act as a warning of potential congestion 🚨. Depending on the PMR value, the aggressive HEARTBEAT transmission in the PF state may speed up endpoint failure detection on idle associations. That happens when the sole path's error counter exceeds the AMR threshold, in cases where HB.Interval is relatively large compared to RTO (e.g., 30 seconds) 🌈.


Acknowledgments

The authors want to thank the members of the IETF Transport Area Working Group (tsvwg) for their ongoing discussions about this document and their insightful feedback πŸ’–. We also really appreciate the continuous encouragement and suggestions from the Chairs of the tsvwg πŸ‘‘. A special shoutout to Michael Tuexen for his many invaluable comments and his substantial support in making this document πŸ«ΆπŸŽ€.


Authors' Addresses

Yoshifumi Nishida
GE Global Research
2623 Camino Ramon
San Ramon, CA  94583
United States

Email: nishida@wide.ad.jp
Preethi Natarajan
Cisco Systems
510 McCarthy Blvd.
Milpitas, CA  95035
United States

Email: prenatar@cisco.com
Armando Caro
BBN Technologies
10 Moulton St.
Cambridge, MA  02138
United States

Email: acaro@bbn.com
Paul D. Amer
University of Delaware
Computer Science Department - 434 Smith Hall
Newark, DE  19716-2586
United States

Email: amer@udel.edu
Karen E. E. Nielsen
Ericsson
Kistavaegen 25
Stockholm  164 80
Sweden

Email: karen.nielsen@tieto.com
πŸ“¦ where this page comes from