draft-ietf-sigtran-sctp-04.txt   draft-ietf-sigtran-sctp-05.txt 
skipping to change at page 10, line ? skipping to change at page 10, line ?
Nortel Networks Nortel Networks
I. Rytina I. Rytina
Ericsson Ericsson
M. Kalla M. Kalla
Telcordia Telcordia
L. Zhang L. Zhang
UCLA UCLA
V. Paxson V. Paxson
ACIRI ACIRI
expires in six months November 24,1999 expires in six months January 17,2000
Simple Control Transmission Protocol Simple Control Transmission Protocol
<draft-ietf-sigtran-sctp-04.txt> <draft-ietf-sigtran-sctp-05.txt>
Status of This Memo Status of This Memo
This document is an Internet-Draft and is in full conformance with all This document is an Internet-Draft and is in full conformance with all
provisions of Section 10 of RFC 2026. Internet-Drafts are working provisions of Section 10 of RFC 2026. Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas, documents of the Internet Engineering Task Force (IETF), its areas,
and its working groups. Note that other groups may also distribute and its working groups. Note that other groups may also distribute
working documents as Internet-Drafts. working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet- Drafts as reference
material or to cite them other than as ``work in progress.''
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt http://www.ietf.org/ietf/1id-abstracts.txt
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
Stewart, et al [Page 1] Stewart, et al [Page 1]
Abstract Abstract
This document describes the Simple Control Transmission Protocol This document describes the Simple Control Transmission Protocol
(SCTP). SCTP is designed to transport PSTN signalling messages over (SCTP). SCTP is designed to transport PSTN signalling messages over
IP networks, but is capable of broader application. IP networks, but is capable of broader applications.
SCTP is an application-level datagram transfer protocol operating on SCTP is a reliable datagram transfer protocol operating on top of an
top of an unreliable datagram service such as UDP. It offers the unreliable routed packet network such as IP. It offers the following
following services to its users: services to its users:
-- acknowledged error-free non-duplicated transfer of user data -- acknowledged error-free non-duplicated transfer of user data,
-- application-level segmentation to conform to discovered MTU size -- data segmentation to conform to discovered path MTU size,
-- sequenced delivery of user datagrams within multiple streams, -- sequenced delivery of user messages within multiple streams,
with an option for order-of-arrival delivery of individual with an option for order-of-arrival delivery of individual
datagrams user messages,
-- optional multiplexing of user datagrams into SCTP datagrams, -- optional multiplexing of user messages into SCTP datagrams, and
subject to MTU size restrictions -- network-level fault tolerance through supporting of multi-homing
-- enhanced reliability through support of multi-homing at either or at either or both ends of an association.
both ends of the association.
The design of SCTP includes appropriate congestion avoidance behaviour The design of SCTP includes appropriate congestion avoidance behaviour
and resistance to flooding and masquerade attacks. and resistance to flooding and masquerade attacks.
Stewart, et al [Page 2] Stewart, et al [Page 2]
TABLE OF CONTENTS TABLE OF CONTENTS
1. Introduction.................................................. 5 1. Introduction.................................................. 5
1.1 Motivation.................................................. 5 1.1 Motivation.................................................. 5
1.2 Architectural View of SCTP.................................. 6 1.2 Architectural View of SCTP.................................. 6
1.3 Functional View of SCTP..................................... 6 1.3 Functional View of SCTP..................................... 6
1.3.1 Association Startup and Takedown........................ 7 1.3.1 Association Startup and Takedown........................ 7
1.3.2 Sequenced Delivery within Streams....................... 8 1.3.2 Sequenced Delivery within Streams....................... 8
1.3.3 User Data Segmentation.................................. 8 1.3.3 User Data Segmentation.................................. 8
1.3.4 Acknowledgement and Congestion Avoidance................ 8 1.3.4 Acknowledgement and Congestion Avoidance................ 8
1.3.5 Chunk Multiplex......................................... 9 1.3.5 Chunk Multiplex......................................... 9
1.3.6 Path Management......................................... 9 1.3.6 Path Management......................................... 9
1.3.7 Message Validation...................................... 9 1.3.7 Message Validation...................................... 9
1.4 Recapitulation of Key Terms.................................10 1.4 Recapitulation of Key Terms.................................10
1.5. Abbreviations..............................................12 1.5 Abbreviations...............................................12
2. SCTP Datagram Format..........................................12 2. SCTP Datagram Format..........................................12
2.1 SCTP Common Header Field Descriptions.......................13 2.1 SCTP Common Header Field Descriptions.......................13
2.2 Chunk Field Descriptions....................................14 2.2 Chunk Field Descriptions....................................14
2.2.1 Optional/Variable-length Parameter Format..............16 2.2.1 Optional/Variable-length Parameter Format...............16
2.2.2 Vendor-Specific Extension Parameter Format..............16 2.2.2 Vendor-Specific Extension Parameter Format..............16
2.3 SCTP Chunk Definitions......................................18 2.3 SCTP Chunk Definitions......................................18
2.3.1 Initiation (INIT).......................................18 2.3.1 Initiation (INIT).......................................18
2.3.1.1 Optional or Variable Length Parameters..............20 2.3.1.1 Optional or Variable Length Parameters..............20
2.3.2 Initiation Acknowledgement (INIT ACK)...................23 2.3.2 Initiation Acknowledgement (INIT ACK)...................23
2.3.2.1 Optional or Variable Length Parameters..............24 2.3.2.1 Optional or Variable Length Parameters..............24
2.3.3 Selective Acknowledgement (SACK)........................25 2.3.3 Selective Acknowledgement (SACK)........................25
2.3.4 Heartbeat Request (HEARTBEAT)...........................27 2.3.4 Heartbeat Request (HEARTBEAT)...........................27
2.3.5 Heartbeat Acknowledgment (HEARTBEAT ACK)................28 2.3.5 Heartbeat Acknowledgment (HEARTBEAT ACK)................28
2.3.6 Abort Association (ABORT)...............................29 2.3.6 Abort Association (ABORT)...............................29
skipping to change at page 10, line ? skipping to change at page 10, line ?
2.3.9 Operation Error (ERROR).................................31 2.3.9 Operation Error (ERROR).................................31
2.3.10 Encryption Cookie (COOKIE).............................33 2.3.10 Encryption Cookie (COOKIE).............................33
2.3.11 Cookie Acknowledgment (COOKIE ACK).....................33 2.3.11 Cookie Acknowledgment (COOKIE ACK).....................33
2.3.12 Payload Data (DATA)....................................34 2.3.12 Payload Data (DATA)....................................34
2.4 Vendor-Specific Chunk Extensions............................35 2.4 Vendor-Specific Chunk Extensions............................35
3. SCTP Association State Diagram.................................37 3. SCTP Association State Diagram.................................37
4. Association Initialization.....................................39 4. Association Initialization.....................................39
4.1 Normal Establishment of an Association......................39 4.1 Normal Establishment of an Association......................39
4.1.1 Handle Stream Parameters................................41 4.1.1 Handle Stream Parameters................................41
4.1.2 Handle Address Parameters...............................41 4.1.2 Handle Address Parameters...............................41
4.1.3 Generating Responder Cookie.............................41 4.1.3 Generating Encryption Cookie............................41
4.1.4 Cookie Processing.......................................42 4.1.4 Cookie Processing.......................................42
4.1.5 Cookie Authentication...................................42 4.1.5 Cookie Authentication...................................42
4.1.6 An Example of Normal Association Establishment..........43 4.1.6 An Example of Normal Association Establishment..........43
4.2 Handle Duplicate INIT, INIT ACK, COOKIE, and COOKIE ACK.....44 4.2 Handle Duplicate INIT, INIT ACK, COOKIE, and COOKIE ACK.....44
4.2.1 Handle Duplicate INIT in COOKIE-WAIT 4.2.1 Handle Duplicate INIT in COOKIE-WAIT
or COOKIE-SENT States...................................45 or COOKIE-SENT States...................................45
4.2.2 Handle Duplicate INIT in Other States...................45 4.2.2 Handle Duplicate INIT in Other States...................45
4.2.3 Handle Duplicate INIT ACK...............................46 4.2.3 Handle Duplicate INIT ACK...............................46
4.2.4 Handle Duplicate COOKIE.................................46 4.2.4 Handle Duplicate COOKIE.................................46
4.2.5 Handle Duplicate COOKIE-ACK.............................47 4.2.5 Handle Duplicate COOKIE-ACK.............................47
Stewart, et al [Page 3] Stewart, et al [Page 3]
4.2.6 Handle Stale COOKIE Error...............................47 4.2.6 Handle Stale COOKIE Error...............................47
4.3 Other Initialization Issues.................................48 4.3 Other Initialization Issues.................................48
4.3.1 Selection of Tag Value..................................48 4.3.1 Selection of Tag Value..................................48
4.3.2 Initiation from behind a NAT............................48
5. User Data Transfer.............................................48 5. User Data Transfer.............................................48
5.1 Transmission of DATA Chunks.................................49 5.1 Transmission of DATA Chunks.................................49
5.2 Acknowledgment of Reception of DATA Chunks..................51 5.2 Acknowledgment of Reception of DATA Chunks..................51
5.3 Management Retransmission Timer.............................51 5.2.1 Tracking Peer's Receive Buffer Space....................52
5.3 Management Retransmission Timer.............................52
5.3.1 RTO Calculation.........................................52 5.3.1 RTO Calculation.........................................52
5.3.2 Retransmission Timer Rules..............................53 5.3.2 Retransmission Timer Rules..............................53
5.3.3 Handle T3-rxt Expiration................................54 5.3.3 Handle T3-rxt Expiration................................54
5.4 Multi-homed SCTP Endpoints..................................55 5.4 Multi-homed SCTP Endpoints..................................55
5.4.1 Failover from Inactive Destination Address..............56 5.4.1 Failover from Inactive Destination Address..............56
5.5 Stream Identifier and Sequence Number.......................56 5.5 Stream Identifier and Sequence Number.......................56
5.6 Ordered and Un-ordered Delivery.............................56 5.6 Ordered and Un-ordered Delivery.............................56
5.7 Report Gaps in Received DATA TSNs...........................57 5.7 Report Gaps in Received DATA TSNs...........................57
5.8 CRC-16 Utilization..........................................58 5.8 Adler-32 Checksum Calculation...............................58
5.9 Segmentation................................................59 5.9 Segmentation................................................59
5.10 Bundling and Multiplexing..................................60 5.10 Bundling and Multiplexing..................................60
6. Congestion Control ..........................................60 6. Congestion Control ..........................................60
6.1 SCTP Differences from TCP Congestion Control................61 6.1 SCTP Differences from TCP Congestion Control................61
6.2 SCTP Slow-Start and Congestion Avoidance....................62 6.2 SCTP Slow-Start and Congestion Avoidance....................62
6.2.1 Slow-Start..............................................62 6.2.1 Slow-Start..............................................62
6.2.2 Congestion Avoidance....................................63 6.2.2 Congestion Avoidance....................................63
6.2.3 Congestion Control......................................63 6.2.3 Congestion Control......................................63
6.2.4 Fast Retransmit on Gap Reports..........................64 6.2.4 Fast Retransmit on Gap Reports..........................64
6.3 Path MTU Discovery..........................................64 6.3 Path MTU Discovery..........................................64
7. Fault Management..............................................65 7. Fault Management..............................................65
7.1 Endpoint Failure Detection..................................65 7.1 Endpoint Failure Detection..................................65
7.2 Path Failure Detection......................................66 7.2 Path Failure Detection......................................66
7.3 Path Heartbeat..............................................66 7.3 Path Heartbeat..............................................66
7.4 Verification Tag............................................67 7.4 Handle "Out of the blue" Packets............................67
7.5 Verification Tag............................................67
7.5.1 Exceptions in Verification Tag Rules....................67
8. Termination of Association.....................................68 8. Termination of Association.....................................68
8.1 Close of an Association.....................................68 8.1 Close of an Association.....................................68
8.2 Shutdown of an Association..................................68 8.2 Shutdown of an Association..................................68
9. Interface with Upper Layer.....................................69 9. Interface with Upper Layer.....................................69
9.1 ULP-to-SCTP.................................................70 9.1 ULP-to-SCTP.................................................70
9.2 SCTP-to-ULP.................................................77 9.2 SCTP-to-ULP.................................................77
10. Security Considerations.......................................80 10. Security Considerations.......................................80
10.1 Security Objectives........................................80 10.1 Security Objectives........................................80
10.2 SCTP Responses To Potential Threats........................80 10.2 SCTP Responses To Potential Threats........................80
10.2.1 Countering Insider Attacks.............................80 10.2.1 Countering Insider Attacks.............................80
skipping to change at page 10, line ? skipping to change at page 10, line ?
10.2.4.1 Flooding...........................................81 10.2.4.1 Flooding...........................................81
10.2.4.2 Masquerade.........................................82 10.2.4.2 Masquerade.........................................82
10.2.4.3 Improper Monopolization of Services................83 10.2.4.3 Improper Monopolization of Services................83
10.3 Protection against Fraud and Repudiation...................83 10.3 Protection against Fraud and Repudiation...................83
11. IANA Consideration............................................84 11. IANA Consideration............................................84
11.1 IETF-defined Chunk Extension...............................84 11.1 IETF-defined Chunk Extension...............................84
Stewart, et al [Page 4] Stewart, et al [Page 4]
11.2 IETF-defined Chunk Parameter Extension.....................85 11.2 IETF-defined Chunk Parameter Extension.....................85
11.3 IETF-defined Additional Error Causes.......................85 11.3 IETF-defined Additional Error Causes.......................85
11.4 Payload Protocol Identifiers...............................86
12. Suggested SCTP Protocol Parameter Values......................86 12. Suggested SCTP Protocol Parameter Values......................86
13. Acknowledgments...............................................87 13. Acknowledgments...............................................87
14. Authors' Addresses............................................87 14. Authors' Addresses............................................87
15. References....................................................88 15. References....................................................88
1. Introduction 1. Introduction
This section explains the reasoning behind the development of the This section explains the reasoning behind the development of the
Simple Control Transmission Protocol (SCTP), the services it offers, Simple Control Transmission Protocol (SCTP), the services it offers,
and the basic concepts needed to understand the detailed description and the basic concepts needed to understand the detailed description
of the protocol. of the protocol.
1.1 Motivation 1.1 Motivation
TCP [RFC 793, "Transmission Control Protocol", Jon Postel ed., TCP [8] has performed immense service as the primary means of reliable
September 1981] has performed immense service as the primary means of data transfer in IP networks. However, an increasing number of recent
reliable data transfer in IP networks. However, an increasing number applications have found TCP too limiting, and have incorporated their
of recent applications have found TCP too limiting, and have own reliable data transfer protocol on top of UDP [9]. The limitations
incorporated their own reliable data transfer protocol on top of UDP which users have wished to bypass relate both to the intrinsic nature
[RFC 768, "User Datagram Protocol", Jon Postel, August 1980]. The of TCP and to its typical implementation.
limitations which users have wished to bypass relate both to the
intrinsic nature of TCP and to its typical implementation.
Intrinsic limitations: Intrinsic limitations:
-- TCP provides both reliable data transfer and strict order- -- TCP provides both reliable data transfer and strict order-
of-transmission delivery of data. Some applications need reliable of-transmission delivery of data. Some applications need reliable
transfer without sequence maintenance, while others would be transfer without sequence maintenance, while others would be
satisfied with partial ordering of the data. In both of these satisfied with partial ordering of the data. In both of these
cases the head-of-line blocking offered by TCP causes cases the head-of-line blocking offered by TCP causes
unnecessary delay. unnecessary delay.
skipping to change at page 10, line ? skipping to change at page 10, line ?
such failures. such failures.
Transport of PSTN signalling across the IP network is an application Transport of PSTN signalling across the IP network is an application
for which all of these limitations of TCP are relevant. While this for which all of these limitations of TCP are relevant. While this
application directly motivated the development of SCTP, other application directly motivated the development of SCTP, other
applications may find SCTP a good match to their requirements. applications may find SCTP a good match to their requirements.
1.2 Architectural View of SCTP 1.2 Architectural View of SCTP
SCTP is viewed as a layer between the SCTP user application ("SCTP SCTP is viewed as a layer between the SCTP user application ("SCTP
user" for short) and an unreliable end-to-end datagram service such as user" for short) and an unreliable routed packet network service such
UDP. The basic service offered by SCTP is the reliable transfer of as IP. The basic service offered by SCTP is the reliable transfer of
user datagrams between peer SCTP users. It performs this service user messages between peer SCTP users. It performs this service
within the context of an association between two SCTP nodes. Chapter 9 within the context of an association between two SCTP nodes. Chapter 9
of this document sketches the API which should exist at the boundary of this document sketches the API which should exist at the boundary
between the SCTP and the SCTP user layers. between the SCTP and the SCTP user layers.
SCTP is connection-oriented in nature, but the SCTP association is a SCTP is connection-oriented in nature, but the SCTP association is a
broader concept than the TCP connection. SCTP provides the means for broader concept than the TCP connection. SCTP provides the means for
each SCTP endpoint (Section 1.4) to provide the other during each SCTP endpoint (Section 1.4) to provide the other during
association startup with a list of transport addresses (e.g. association startup with a list of transport addresses (e.g. multiple
address/UDP port combinations) through which that endpoint can be IP addresses in combination with an SCTP port) through which that
reached and from which it will originate messages. The association endpoint can be reached and from which it will originate messages.
spans transfers over all of the possible source/destination The association spans transfers over all of the possible
combinations which may be generated from the two endpoint lists. source/destination combinations which may be generated from the two
endpoint lists.
_____________ _____________ _____________ _____________
| SCTP User | | SCTP User | | SCTP User | | SCTP User |
| Application | | Application | | Application | | Application |
|-------------| |-------------| |-------------| |-------------|
| SCTP | | SCTP | | SCTP | | SCTP |
| Transport | | Transport | | Transport | | Transport |
| Service | | Service | | Service | | Service |
|-------------| |-------------| |-------------| |-------------|
| Unreliable |One or more ---- One or more| Unreliable | | |One or more ---- One or more| |
| Datagram |port/address \/ port/address| Datagram | | IP Network |IP address \/ IP address| IP Network |
| Service |appearances /\ appearances| Service | | Service |appearances /\ appearances| Service |
|_____________| ---- |_____________| |_____________| ---- |_____________|
SCTP Node A |<-------- Network transport ------->| SCTP Node B SCTP Node A |<-------- Network transport ------->| SCTP Node B
Figure 1: An SCTP Association Figure 1: An SCTP Association
Stewart, et al [Page 6] Stewart, et al [Page 6]
1.3 Functional View of SCTP 1.3 Functional View of SCTP
skipping to change at page 10, line ? skipping to change at page 10, line ?
SCTP provides for graceful takedown of an active association on SCTP provides for graceful takedown of an active association on
request from the SCTP user. See the description of the TERMINATE request from the SCTP user. See the description of the TERMINATE
primitive in chapter 9. SCTP also allows ungraceful takedown, either primitive in chapter 9. SCTP also allows ungraceful takedown, either
on request from the user (ABORT primitive) or as a result of an error on request from the user (ABORT primitive) or as a result of an error
condition detected within the SCTP layer. Chapter 8 describes both the condition detected within the SCTP layer. Chapter 8 describes both the
graceful and the ungraceful takedown procedures. graceful and the ungraceful takedown procedures.
1.3.2 Sequenced Delivery within Streams 1.3.2 Sequenced Delivery within Streams
The term "stream" is used in SCTP to refer to a sequence of The term "stream" is used in SCTP to refer to a sequence of user
datagrams. This is in contrast to its usage in TCP, where it refers to messages. This is in contrast to its usage in TCP, where it refers to
a sequence of bytes. a sequence of bytes.
The SCTP user can specify at association startup time the number of The SCTP user can specify at association startup time the number of
streams to be supported by the association. This number is negotiated streams to be supported by the association. This number is negotiated
with the remote end (see section 4.1.1). User datagrams are associated with the remote end (see section 4.1.1). User messages are associated
with stream numbers (SEND, RECEIVE primitives, Chapter 9). Internally, with stream numbers (SEND, RECEIVE primitives, Chapter 9). Internally,
SCTP assigns a stream sequence number to each datagram passed to it by SCTP assigns a stream sequence number to each message passed to it by
the SCTP user. On the receiving side, SCTP ensures that datagrams are the SCTP user. On the receiving side, SCTP ensures that messages are
delivered to the SCTP user in sequence within a given stream. However, delivered to the SCTP user in sequence within a given stream. However,
while one stream may be blocked waiting for the next in-sequence user while one stream may be blocked waiting for the next in-sequence user
datagram, delivery from other streams may proceed. message, delivery from other streams may proceed.
SCTP provides a mechanism for bypassing the sequenced delivery SCTP provides a mechanism for bypassing the sequenced delivery
service. User datagrams sent using this mechanism are delivered to the service. User messages sent using this mechanism are delivered to the
SCTP user as soon as they are received. SCTP user as soon as they are received.
1.3.3 User Data Segmentation 1.3.3 User Data Segmentation
SCTP can segment user datagrams to ensure that the SCTP datagram SCTP can segment user messages to ensure that the SCTP datagram
passed to the lower layer conforms to the path MTU. Segments are passed to the lower layer conforms to the path MTU. Segments are
reassembled into complete datagrams before being passed to the SCTP reassembled into complete messages before being passed to the SCTP
user. user.
1.3.4 Acknowledgement and Congestion Avoidance 1.3.4 Acknowledgement and Congestion Avoidance
SCTP assigns a Transmission Sequence Number (TSN) to each user data SCTP assigns a Transmission Sequence Number (TSN) to each user data
segment or unsegmented datagram. The TSN is independent of any segment or unsegmented message. The TSN is independent of any
sequence number assigned at the stream level. The receiving end sequence number assigned at the stream level. The receiving end
acknowledges all TSNs received, even if there are gaps in the acknowledges all TSNs received, even if there are gaps in the
sequence. In this way, reliable delivery is kept functionally separate sequence. In this way, reliable delivery is kept functionally separate
from sequenced delivery. from sequenced delivery.
The Acknowledgement and Congestion Avoidance function is responsible The Acknowledgement and Congestion Avoidance function is responsible
for message retransmission when timely acknowledgement has not been for message retransmission when timely acknowledgement has not been
Stewart, et al [Page 8] Stewart, et al [Page 8]
received. Message retransmission is conditioned by congestion received. Message retransmission is conditioned by congestion
avoidance procedures similar to those used for TCP. avoidance procedures similar to those used for TCP. See Chapters 5
See Chapters 5 and 6 for a detailed description of the protocol and 6 for a detailed description of the protocol procedures associated
procedures associated with this function. with this function.
1.3.5 Chunk Multiplex 1.3.5 Chunk Multiplex
As described in Chapter 2, the SCTP datagram as delivered to the lower As described in Chapter 2, the SCTP datagram as delivered to the lower
layer consists of a common header followed by one or more chunks. Each layer consists of a common header followed by one or more chunks. Each
chunk may contain either user data or SCTP control information. The chunk may contain either user data or SCTP control information. The
SCTP user has the option to request "bundling", or multiplexing of SCTP user has the option to request "bundling", or multiplexing of
more than one user datagram into a single SCTP datagram. The chunk more than one user messages into a single SCTP datagram. The chunk
multiplex function of SCTP is responsible for assembly of the complete multiplex function of SCTP is responsible for assembly of the complete
SCTP datagram and its disassembly at the receiving end. SCTP datagram and its disassembly at the receiving end.
1.3.6 Path Management 1.3.6 Path Management
The sending SCTP user is able to manipulate the set of transport The sending SCTP user is able to manipulate the set of transport
addresses used as destinations for SCTP datagrams, through the addresses used as destinations for SCTP datagrams, through the
primitives described in Chapter 9. The SCTP path management function primitives described in Chapter 9. The SCTP path management function
chooses the destination transport address for each outgoing SCTP chooses the destination transport address for each outgoing SCTP
datagram based on the SCTP user's instructions and the currently datagram based on the SCTP user's instructions and the currently
perceived reachability status of the eligible destination set. perceived reachability status of the eligible destination set.
The path management function monitors reachability through heartbeat The path management function monitors reachability through heartbeat
messages where other message traffic is inadequate to provide this messages when other message traffic is inadequate to provide this
information, and advises the SCTP user when reachability of any far- information, and advises the SCTP user when reachability of any far-
end transport address changes. The path management function is also end transport address changes. The path management function is also
responsible for reporting the eligible set of local transport responsible for reporting the eligible set of local transport
addresses to the far end during association startup, and for reporting addresses to the far end during association startup, and for reporting
the transport addresses returned from the far end to the SCTP user. the transport addresses returned from the far end to the SCTP user.
At association start-up, a primary destination transport address is At association start-up, a primary destination transport address is
defined for each SCTP endpoint, and is used for normal sending of SCTP defined for each SCTP endpoint, and is used for normal sending of SCTP
datagrams. datagrams.
On the receiving end, the path management is responsible for verifying On the receiving end, the path management is responsible for verifying
the existence of a valid SCTP association to which the inbound SCTP the existence of a valid SCTP association to which the inbound SCTP
datagram belongs before passing it for further processing. datagram belongs before passing it for further processing.
1.3.7 Message Validation 1.3.7 Message Validation
The common SCTP header includes a validation tag and an optional CRC A mandatory verification tag and an Adler-32 checksum [2] fields are
field. A validation tag value is chosen by each end of the association included in the SCTP common header. The verification tag value is
during association startup. Messages received without the validation chosen by each end of the association during association startup.
tag value expected by the receiver are discarded, as a protection Messages received without the verification tag value expected by the
Stewart, et al [Page 9] Stewart, et al [Page 9]
against blind masquerade attacks and against stale datagrams from a receiver are discarded, as a protection against blind masquerade
previous association. attacks and against stale datagrams from a previous association.
The CRC may optionally be set by the sender, to provide additional The Adler-32 checksum MUST be set by the sender of each SCTP datagram,
protection against data corruption in the network beyond that provided to provide additional protection against data corruption in the
by lower layers (e.g. the UDP checksum). network beyond that provided by lower layers (e.g. the IP checksum).
1.4 Recapitulation of Key Terms 1.4 Recapitulation of Key Terms
The language used to describe SCTP has been introduced in the previous The language used to describe SCTP has been introduced in the previous
sections. This section provides a consolidated list of the key terms sections. This section provides a consolidated list of the key terms
and their definitions. and their definitions.
o SCTP user application (SCTP user): The logical higher-layer o SCTP user application (SCTP user): The logical higher-layer
application entity which uses the services of SCTP, also called application entity which uses the services of SCTP, also called
the Upper-layer Protocol (ULP). the Upper-layer Protocol (ULP).
o User datagram (user message): the unit of data delivery across the o User message: the unit of data delivery across the interface
interface between SCTP and its user. between SCTP and its user.
o User data: the content of user datagrams.
o SCTP datagram: the unit of data delivery across the interface o SCTP datagram: the unit of data delivery across the interface
between SCTP and the unreliable datagram service (e.g. UDP) which between SCTP and the unreliable packet network (e.g. IP) which
it is using. An SCTP datagram includes the common SCTP header, it is using. An SCTP datagram includes the common SCTP header,
possible SCTP control chunks, and user data encapsulated within possible SCTP control chunks, and user data encapsulated within
SCTP DATA chunks. SCTP DATA chunks.
o Transport address: an address which serves as a source or o Transport address: an address which serves as a source or
destination for the unreliable datagram transport service used by destination for the unreliable packet transport service used by
SCTP. In IP networks, a transport address is defined by the SCTP. In IP networks, a transport address is defined by the
combination of an IP address and a UDP port number. combination of an IP address and an SCTP port number.
Note, only one SCTP port may be defined for each endpoint,
but each endpoint may have multiple IP addresses.
o SCTP endpoint: the logical sender/receiver of SCTP datagrams. On a o SCTP endpoint: the logical sender/receiver of SCTP datagrams. On a
multi-homed host, an SCTP endpoint is represented to its peers as a multi-homed host, an SCTP endpoint is represented to its peers as a
combination of a set of eligible destination transport addresses to combination of a set of eligible destination transport addresses to
which SCTP datagrams can be sent and a set of eligible source which SCTP datagrams can be sent and a set of eligible source
transport addresses from which SCTP datagrams can be received. transport addresses from which SCTP datagrams can be received.
Note, a source or destination transport address can only be Note, a source or destination transport address can only be
included in one unique SCTP endpoint, i.e., it is NOT allowed to included in one unique SCTP endpoint, i.e., it is NOT allowed to
have the same SCTP source or destination transport address appear have the same SCTP source or destination transport address appear
skipping to change at page 11, line 14 skipping to change at page 11, line 14
o Chunk: a unit of information within an SCTP datagram, consisting of o Chunk: a unit of information within an SCTP datagram, consisting of
a chunk header and chunk-specific content. a chunk header and chunk-specific content.
o Transmission Sequence Number (TSN): a 32-bit sequence number used o Transmission Sequence Number (TSN): a 32-bit sequence number used
internally by SCTP. One TSN is attached to each chunk containing internally by SCTP. One TSN is attached to each chunk containing
user data to permit the receiving SCTP endpoint to acknowledge its user data to permit the receiving SCTP endpoint to acknowledge its
receipt and detect duplicate deliveries. receipt and detect duplicate deliveries.
o Stream: a uni-directional logical channel established from one to o Stream: a uni-directional logical channel established from one to
another associated SCTP endpoints, within which all user datagrams another associated SCTP endpoints, within which all user messages
are delivered in sequence except for those submitted to the are delivered in sequence except for those submitted to the
unordered delivery service. un-ordered delivery service.
Note: The relationship between stream numbers in opposite Note: The relationship between stream numbers in opposite
directions is strictly a matter of how the applications use directions is strictly a matter of how the applications use
them. It is the responsiblity of the SCTP user to create these them. It is the responsiblity of the SCTP user to create and
correlations if they are so desired. manage these correlations if they are so desired.
o Stream sequence number: a 16-bit sequence number used internally by o Stream Sequence Number: a 16-bit sequence number used internally by
SCTP to assure sequenced delivery of the user datagrams within a SCTP to assure sequenced delivery of the user messages within a
given stream. One stream sequence number is attached to each user given stream. One stream sequence number is attached to each user
datagram. message.
o Path: the route taken by the SCTP datagrams sent by one SCTP
endpoint to a specific destination transport address of its peer
SCTP endpoint. Note, sending to different destination transport
addresses does not necessarily guarantee getting separate paths.
o Bundling: an optional multiplexing operation, whereby more than one o Bundling: an optional multiplexing operation, whereby more than one
user datagram may be carried in the same SCTP datagram. Each user user messages may be carried in the same SCTP datagram. Each user
datagram occupies its own DATA chunk. message occupies its own DATA chunk.
o Outstanding TSN (at an SCTP endpoint): a TSN (and the associated DATA o Outstanding TSN (at an SCTP endpoint): a TSN (and the associated DATA
chunk) which have been sent by the endpoint but for which it has not chunk) which have been sent by the endpoint but for which it has not
yet received an acknowledgement. yet received an acknowledgement.
o Unacknowledged TSN (at an SCTP endpoint): a TSN (and the associated DATA o Unacknowledged TSN (at an SCTP endpoint): a TSN (and the associated DATA
chunk) which have been received by the endpoint but for which an chunk) which have been received by the endpoint but for which an
acknowledgement has not yet been sent. acknowledgement has not yet been sent.
o Receiver Window (rwnd): The most recently advertised receiver o Receiver Window (rwnd): The most recently calculated receiver
window, in number of octets. This gives an indication of the space window, in number of octets. This gives an indication of the space
available in the receiver's inbound buffer. available in the receiver's inbound buffer.
o Congestion Window (cwnd): An SCTP variable that limits the data, in o Congestion Window (cwnd): An SCTP variable that limits the data, in
number of octets, a sender can send into the network before number of octets, a sender can send into the network before
receiving an acknowledgment on a particular destination Transport receiving an acknowledgment on a particular destination Transport
address. address.
o Slow Start Threshold (ssthresh): An SCTP variable. This is the o Slow Start Threshold (ssthresh): An SCTP variable. This is the
threshold which the endpoint will use to determine whether to threshold which the endpoint will use to determine whether to
perform slow start or congestion avoidance on a particular destination perform slow start or congestion avoidance on a particular destination
transport address. Ssthresh is in number of octets. transport address. Ssthresh is in number of octets.
o Transmission Control Block (TCB): an internal data structure o Transmission Control Block (TCB): an internal data structure
created by an SCTP endpoint for each of its existing SCTP created by an SCTP endpoint for each of its existing SCTP
associations to other SCTP endpoints. TCB contains all the status associations to other SCTP endpoints. TCB contains all the status
and operational information for the endpoint to maintain and manage and operational information for the endpoint to maintain and manage
the corresponding association. the corresponding association.
o Network Byte Order: Most significant byte first, a.k.a Big Endian.
1.5. Abbreviations 1.5. Abbreviations
MD5 - MD5 Message-Digest Algorithm [4] MD5 - MD5 Message-Digest Algorithm [4]
NAT - Network Address Translation
RTO - Retransmission Time-out RTO - Retransmission Time-out
RTT - Round-trip Time RTT - Round-trip Time
RTTVAR - Round-trip Time Variation RTTVAR - Round-trip Time Variation
SCTP - Simple Control Transmission Protocol SCTP - Simple Control Transmission Protocol
SRTT - Smoothed RTT SRTT - Smoothed RTT
TCB - Transmission Control Block TCB - Transmission Control Block
TLV - Type-Length-Value Coding Format TLV - Type-Length-Value Coding Format
TSN - Transport Sequence Number TSN - Transmission Sequence Number
ULP - Upper-layer Protocol ULP - Upper-layer Protocol
2. SCTP Datagram Format 2. SCTP Datagram Format
An SCTP datagram is composed of a common header and chunks. A chunk An SCTP datagram is composed of a common header and chunks. A chunk
contains either control information or user data. contains either control information or user data.
The SCTP datagram format is shown below: The SCTP datagram format is shown below:
skipping to change at page 12, line 51 skipping to change at page 12, line 51
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Common Header | | Common Header |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Chunk #1 | | Chunk #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Chunk #n | | Chunk #n |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Multiple chunks can be multiplexed into one UDP SCTP datagram up to Multiple chunks can be multiplexed into one SCTP datagram up to
the MTU size except for the INIT, INIT ACK, and SHUTDOWN ACK the MTU size, except for the INIT, INIT ACK, and SHUTDOWN ACK
chunks. These chunks MUST not be multiplexed with any other chunk in a chunks. These chunks MUST NOT be multiplexed with any other chunk in a
datagram. See Section 5.10 for more details on chunk multiplexing. datagram. See Section 5.10 for more details on chunk multiplexing.
If an user data message doesn't fit into one SCTP datagram it can be If an user data message doesn't fit into one SCTP datagram it can be
segmented into multiple chunks using the procedure defined in segmented into multiple chunks using the procedure defined in
Section 5.9. Section 5.9.
All integer fields in SCTP datagrams MUST be transmitted in the All integer fields in an SCTP datagram MUST be transmitted in the
network byte order, unless otherwise stated. network byte order, unless otherwise stated.
2.1 SCTP Common Header Field Descriptions 2.1 SCTP Common Header Field Descriptions
SCTP Common Header Format SCTP Common Header Format
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Vers | Reserved |C| CRC-16 | | Source Port Number | Destination Port Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Verification Tag | | Verification Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Adler-32 Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Version: 4 bits, u_int Source Port Number: 16 bit u_int
This field represents the version number of the SCTP protocol, This is the SCTP sender's port number. It can be used by the
and MUST be set to '0011'. receiver, in combination with the source IP address, to identify the
association to which this datagram belongs.
Desination Port Number: 16 bit u_int
This is the SCTP port number to which this datagram is destined. The
receiving endpoint will use this port number to de-multiplex the
SCTP datagram to the correct receiving association/application.
Verification Tag: 32 bit u_int Verification Tag: 32 bit u_int
The receiver of this datagram uses the Verification Tag to identify The receiver of this datagram uses the Verification Tag to validate
the association. On transmit, the value of this Verification Tag MUST the sender of this SCTP datagram. On transmit, the value of this
be set to the value of the Initiate Tag received from the peer Verification Tag MUST be set to the value of the Initiate Tag
endpoint during the association initialization. received from the peer endpoint during the association
initialization.
For datagrams carrying the INIT chunk, the transmitter MUST set the For datagrams carrying the INIT chunk, the transmitter MUST set the
Verification Tag to all 0's. If the receiver receives a datagram Verification Tag to all 0's. If the receiver receives a datagram
with an all-zeros Verification Tag field, it checks the Chunk ID with an all-zeros Verification Tag field, it checks the Chunk ID
immediately following the common header. If the Chunk Type is not immediately following the common header. If the Chunk Type is
INIT or SHUTDOWN ACK, the receiver MUST drop the datagram. neither INIT nor SHUTDOWN ACK, the receiver MUST drop the datagram.
For datagrams carrying the SHUTDOWN-ACK chunk, the transmitter For datagrams carrying the SHUTDOWN ACK chunk, the transmitter
SHOULD set the Verification Tag to the Initiate Tag received from SHOULD set the Verification Tag to the Initiate Tag received from
the peer endpoint during the association initialization, if known. the peer endpoint during the association initialization, if known.
Otherwise the Verification Tag MUST be set to all 0's. Otherwise, the Verification Tag MUST be set to all 0's.
Reserved:
Reserved bits MUST be set to 0 on transmit and should be ignored
on reception.
C: 1 bit (Octet 2, Bit 8)
When the C-bit is set to 1, the CRC-16 field contains the CRC-16
(defined below).
When the C-bit is set to 0, the CRC-16 field is not used and MUST be
set to 0.
CRC-16: (Octets 3 & 4)
When the C Bit is set to 1, this field MUST contain a CRC-16.
The CRC-16 used is defined in Section 4.2 of ITU Recommendation
Q.703 [2].
Section 5.8 defines the use of CRC-16 in SCTP. Adler-32 Checksum: 32 bit u_int
IMPLEMENTATION NOTE: When the C bit is set to 0, an implementation This field MUST contain an Adler-32 checksum of this SCTP
MAY use the fixed value 0x30000000 as a sanity check on an inbound datagram. Its calculation is discussed in Section 5.8.
datagram. If the first long integer is not the fixed value the
datagram MAY be discarded with no further processing.
2.2 Chunk Field Descriptions 2.2 Chunk Field Descriptions
The figure below illustrates the field format for the chunks to be The figure below illustrates the field format for the chunks to be
transmitted in the SCTP datagram. Each chunk is formatted with a Chunk transmitted in the SCTP datagram. Each chunk is formatted with a Chunk
ID field, a Chunk-specific flag field, a Length field and a value ID field, a chunk-specific Flag field, a Length field, and a Value
field. field.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Chunk ID |Chunk Flags | Chunk Length | | Chunk ID |Chunk Flags | Chunk Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \ \ \
/ Value / / Chunk Value /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Chunk ID: 8 bits, u_int Chunk ID: 8 bits, u_int
This field identifies the type of information contained in the chunk This field identifies the type of information contained in the Chunk
value field. It takes a value from 0x00 to 0xFF. The value of 0xFE Value field. It takes a value from 0x00 to 0xFF. The value of 0xFE
is reserved for vendor-specific extensions. The value of 0xFF is is reserved for vendor-specific extensions. The value of 0xFF is
reserved for future use as an extension field. Procedures for reserved for future use as an extension field. Procedures for
extending this field by vendors are defined in Section 2.4. extending this field by vendors are defined in Section 2.4.
The values of Chunk ID are defined as follows: The values of Chunk ID are defined as follows:
ID Value Chunk Type ID Value Chunk Type
----- ---------- ----- ----------
00000000 - Payload Data (DATA) 00000000 - Payload Data (DATA)
00000001 - Initiation (INIT) 00000001 - Initiation (INIT)
00000010 - Initiation Acknowledgment (INIT ACK) 00000010 - Initiation Acknowledgment (INIT ACK)
00000011 - Selective Acknowledgment (SACK) 00000011 - Selective Acknowledgment (SACK)
00000100 - Heartbeat Request (HEARTBEAT) 00000100 - Heartbeat Request (HEARTBEAT)
00000101 - Heartbeat Acknowledgment (HEARTBEAT ACK) 00000101 - Heartbeat Acknowledgment (HEARTBEAT ACK)
00000110 - Abort (ABORT) 00000110 - Abort (ABORT)
00000111 - Shutdown (SHUTDOWN) 00000111 - Shutdown (SHUTDOWN)
00001000 - Shutdown Acknowledgment (SHUTDOWN ACK) 00001000 - Shutdown Acknowledgment (SHUTDOWN ACK)
00001001 - Operation Error (ERROR) 00001001 - Operation Error (ERROR)
00001010 - Responder Cookie (COOKIE) 00001010 - Encryption Cookie (COOKIE)
00001011 - Cookie Acknowledgement (COOKIE ACK) 00001011 - Cookie Acknowledgement (COOKIE ACK)
00001100 to 11111101 - reserved for future IETF usage 00001100 to 11111101 - reserved by IETF
11111110 - Vendor-specific chunk extensions 11111110 - Vendor-specific Chunk Extensions
11111111 - IETF-defined Chunk Extension 11111111 - IETF-defined Chunk Extensions
Chunk Flags: 8 bits Chunk Flags: 8 bits
The usage of these bits depends on the chunk type as given by the The usage of these bits depends on the chunk type as given by the
Chunk ID. Unless otherwise specified, they are set to zero on Chunk ID. Unless otherwise specified, they are set to zero on
transmit and are ignored on receipt. transmit and are ignored on receipt.
Chunk Length: 16 bits (u_int) Chunk Length: 16 bits (u_int)
This value represents the size of the chunk in octets including the This value represents the size of the chunk in octets including the
Chunk ID, Flags, Length and Value fields. Therefore, if the Value Chunk ID, Flags, Length, and Value fields. Therefore, if the Value
field is zero-length, the Length field will be set to 0x0004. The field is zero-length, the Length field will be set to 0x0004. The
Length field does not include any padding. Length field does not count any padding.
Chunk Value: variable length Chunk Value: variable length
The Chunk Value field contains the actual information to be The Chunk Value field contains the actual information to be
transferred in the chunk. The usage and format of this field transferred in the chunk. The usage and format of this field is
is dependent on the Chunk ID. The Chunk Value field MUST be dependent on the Chunk ID. The Chunk Value field MUST be aligned on
aligned on 32-bit boundaries. If the length of the chunk does not 32-bit boundaries. If the length of the chunk does not align on
align on 32-bit boundaries, it is padded at the end with all zero 32-bit boundaries, it is padded at the end with all zero octets.
octets.
SCTP defined chunks are described in detail in Section 2.3. The SCTP defined chunks are described in detail in Section 2.3. The
guidelines for Vendor-Specific chunk extensions are discussed in guideline for vendor-specific chunk extensions is discussed in Section
Section 2.4. And the guidelines for IETF-defined chunk extensions 2.4. And the guidelines for IETF-defined chunk extensions can be found
can be found in Section 11.1 of this document. in Section 11.1 of this document.
2.2.1 Optional/Variable-length Parameter Format 2.2.1 Optional/Variable-length Parameter Format
The optional and variable-length parameters contained in a chunk The optional and variable-length parameters contained in a chunk
are defined in a Type-Length-Value format as shown below. are defined in a Type-Length-Value format as shown below.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Parameter Type | Parameter Length | | Parameter Type | Parameter Length |
skipping to change at page 17, line 13 skipping to change at page 17, line 13
This is to allow vendors to support their own extended parameters not This is to allow vendors to support their own extended parameters not
defined by the IETF. It MUST not affect the operation of SCTP. defined by the IETF. It MUST not affect the operation of SCTP.
Endpoints not equipped to interpret the vendor-specific information Endpoints not equipped to interpret the vendor-specific information
sent by a remote endpoint MUST ignore it (although it may be sent by a remote endpoint MUST ignore it (although it may be
reported). Endpoints that do not receive desired vendor-specific reported). Endpoints that do not receive desired vendor-specific
information SHOULD make an attempt to operate without it, although information SHOULD make an attempt to operate without it, although
they may do so (and report they are doing so) in a degraded mode. they may do so (and report they are doing so) in a degraded mode.
A summary of the Vendor-Specific Extension format is shown below. The A summary of the Vendor-specific extension format is shown below. The
fields are transmitted from left to right. fields are transmitted from left to right.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Parameter Type = 0xFFFE | Parameter Length | | Parameter Type = 0xFFFE | Parameter Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Vendor-Id | | Vendor-Id |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \ \ \
/ Value / / Parameter Value /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type: 16 bit u_int Type: 16 bit u_int
0xFFFE for all Vendor-Specific parameters. 0xFFFE for all Vendor-Specific parameters.
Length: 16 bit u_int Length: 16 bit u_int
Indicate the size of the parameter in octets, including the Indicate the size of the parameter in octets, including the
skipping to change at page 18, line 39 skipping to change at page 18, line 39
This field is the length of the vendor-specific parameter and This field is the length of the vendor-specific parameter and
Includes the VS-Type, VS-Length and VS-Value (if included) fields. Includes the VS-Type, VS-Length and VS-Value (if included) fields.
VS-Value: Variable Length VS-Value: Variable Length
This field contains the parameter identified by the VS-Type field. This field contains the parameter identified by the VS-Type field.
It's meaning is identified by the vendor. It's meaning is identified by the vendor.
2.3 SCTP Chunk Definitions 2.3 SCTP Chunk Definitions
This section defines the format of the different chunk types. This section defines the format of the different SCTP chunk types.
2.3.1 Initiation (INIT) (00000001) 2.3.1 Initiation (INIT) (00000001)
This chunk is used to initiate a SCTP association between This chunk is used to initiate a SCTP association between two
two endpoints. The format of the INIT message is shown below: endpoints. The format of the INIT message is shown below:
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 0 0 0 0 0 1|Chunk Flags | Chunk Length | |0 0 0 0 0 0 0 1|Chunk Flags | Chunk Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Initiate Tag | | Initiate Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Receiver Window Credit | | Advertised Receiver Window Credit (a_rwnd) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of Outbound Streams | Number of Inbound Streams | | Number of Outbound Streams | Number of Inbound Streams |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Initial TSN | | Initial TSN |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \ \ \
/ Optional/Variable-Length Parameters / / Optional/Variable-Length Parameters /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 19, line 36 skipping to change at page 19, line 36
Fixed Parameters Status Fixed Parameters Status
---------------------------------------------- ----------------------------------------------
Initiate Tag Mandatory Initiate Tag Mandatory
Receiver Window Credit Mandatory Receiver Window Credit Mandatory
Number of Outbound Streams Mandatory Number of Outbound Streams Mandatory
Number of Inbound Streams Mandatory Number of Inbound Streams Mandatory
Initial TSN Mandatory Initial TSN Mandatory
Variable Parameters Status Type Value Variable Parameters Status Type Value
------------------------------------------------------------- -------------------------------------------------------------
IPv4 Address/Port (Note 1) Optional 0x0005 IPv4 Address (Note 1) Optional 0x0005
IPv6 Address/Port (Note 1) Optional 0x0006 IPv6 Address (Note 1) Optional 0x0006
Cookie Preservative Optional 0x0009 Cookie Preservative Optional 0x0009
Note 1: The INIT chunks may contain multiple addresses that may be Note 1: The INIT chunks may contain multiple addresses that may be
IPv4 and/or IPv6 in any combination. IPv4 and/or IPv6 in any combination.
The sequence of parameters within an INIT may be processed in any Chunk Flags field in INIT is reserved, and all bits in it should be
order. set to 0 by the sender and ignored by the receiver. The sequence of
parameters within an INIT may be processed in any order.
Vendor-specific parameters are allowed in INIT. However, they MUST be
appended to the end of the above INIT chunk. The format of the
vendor-specific parameters MUST follow the Type-Length-value format as
defined in Section 2.2.2. In case an endpoint does not support the
vendor-specific data received, it MUST ignore the additional fields.
Initiate Tag: 32 bit u_int Initiate Tag: 32 bit u_int
The receiver of the INIT (the responding end) records the value of The receiver of the INIT (the responding end) records the value of
the Initiate Tag parameter. This value MUST be placed into the the Initiate Tag parameter. This value MUST be placed into the
Verification Tag field of every SCTP datagram that the responding end Verification Tag field of every SCTP datagram that the responding
transmits within this association. end transmits within this association.
The valid range for Initiate Tag is from 0x1 to 0xffffffff. See The valid range for Initiate Tag is from 0x1 to 0xffffffff. See
Section 4.3.1 for more on selection of the tag value. Section 4.3.1 for more on the selection of the tag value.
If the value of the Initiate Tag in a received INIT chunk is found If the value of the Initiate Tag in a received INIT chunk is found
to be 0x0, the receiver MUST treat it as an error and silently to be 0x0, the receiver MUST treat it as an error and silently
discard the datagram. discard the datagram.
Receiver Window Credit (rwnd): 32 bit u_int Advertised Receiver Window Credit (a_rwnd): 32 bit u_int
This field defines the maximum number of octets of outbound data the This value represents the dedicated buffer space, in number of
receiver of the INIT is allowed to have outstanding (i.e. sent and octets, the sender of the INIT has placed in association with this
not acknowledged). window. During the life of the association this buffer space SHOULD
not be lessened (i.e. dedicated buffers taken away from this
association).
Number of Outbound Streams (OS): 16 bit u_int Number of Outbound Streams (OS): 16 bit u_int
Defines the number of outbound streams the sender of this INIT chunk Defines the number of outbound streams the sender of this INIT chunk
wishes to create in this association. The value of 0 MUST NOT be wishes to create in this association. The value of 0 MUST NOT be
used. used.
Number of Inbound Streams (MIS) : 16 bit u_int Number of Inbound Streams (MIS) : 16 bit u_int
Defines the maximum number of streams the sender of this INIT chunk Defines the maximum number of streams the sender of this INIT chunk
allows the peer end to create in this association. The value 0 MUST allows the peer end to create in this association. The value 0 MUST
NOT be used. NOT be used.
Initial TSN (I-TSN) : 32 bit u_int Initial TSN (I-TSN) : 32 bit u_int
Defines the initial TSN that the sender will use. The valid range is Defines the initial TSN that the sender will use. The valid range is
from 0x0 to 0xffffffff. This field MAY be set to the value of the from 0x0 to 0xffffffff. This field MAY be set to the value of the
Initiate Tag field. Initiate Tag field.
The Reserved fields must be set to all 0 by the sender and ignored by Vendor-specific parameters are allowed in INIT. However, they MUST be
the receiver. appended to the end of the above INIT chunks. The format of the
vendor-specific parameters MUST follow the Type-Length-value format as
defined in Section 2.2.2. In case an endpoint does not support the
vendor-specific chunks received, it MUST ignore them.
2.3.1.1 Optional or Variable Length Parameters 2.3.1.1 Optional/Variable Length Parameters in INIT
The following parameters follow the Type-Length-Value format as The following parameters follow the Type-Length-Value format as
defined in Section 2.2.1. The IP address fields MUST come after the defined in Section 2.2.1. The IP address fields MUST come after
fixed-length fields. the fixed-length fields defined in the previous Section.
Any extensions MUST come after the IP address fields. Any extensions MUST come after the IP address fields.
IPv4 Address/Port IPv4 Address Parameter
This parameter contains an IPv4 address/port for use as a destination
transport address by the receiver.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1|0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0| |0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1|0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IPv4 Address | | IPv4 Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Port | Padding = 0 | IPv4 Address: 32 bit
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IPv4 Address: 32bit u_int
Contains an IPv4 address of this endpoint. It is binary encoded.
Port Number: 16 bit u_int
Contains the UDP port number which the sender of this INIT wants
to use for this address.
Padding: 16 bits
This field is set to 0x00 on transmit and ignored on receive.
IPv6 Address/Port: Contains an IPv4 address of the sending endpoint. It is binary
encoded.
This parameter contains an IPv6 address/port for use as a IPv6 Address:
destination transport address by the receiver.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0|0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0| |0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0|0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
| IPv6 Address | | IPv6 Address |
| | | |
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Port | Padding = 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IPv6 Address: 128 bit u_int
Contains an IPv6 address of the sender of this message. It is
binary encoded.
Port Number: 16 bit u_int
Contains the UDP port number which the sender of this INIT wants
to use for this address.
Padding: 16 bits IPv6 Address: 128 bit
This field is set to 0x00 on transmit and ignored on receive.
The values passed in the IPv4 and IPv6 Address/Port parameters Contains an IPv6 address of the sending endpoint. It is binary
indicate to the other end of the association which transport encoded.
addresses this end will support for the association being
initiated. Within the association, any one of these addresses may
appear in the source address field of a datagram sent from this (the
initiating) end, and may be used as a destination of a datagram sent
from the other (the responding) end.
Note that an endpoint MAY be multi-homed. A multi-homed endpoint may Combining with the Source Port Number in the SCTP common header, the
have access to different types of network, thus more than one value passed in an IPv4 or IPv6 Address parameter indicates a
address type may be present in one INIT chunk, i.e., IPv4 and IPv6 transport address the sender of the INIT will support for the
addresses are allowed in the same INIT message. association being initiated. That is, during the lifetime of this
association, this IP address may appear in the source address field
of a datagram sent from the sender of the INIT, and may be used as a
destination address of a datagram sent from the receiver of the
INIT.
More than one IP Address parameter can be included in an INIT chunk. More than one IP Address parameters can be included in an INIT
chunk when the INIT sender is multi-homed. Moreover, a multi-homed
endpoint may have access to different types of network, thus more
than one address type may be present in one INIT chunk, i.e., IPv4
and IPv6 transport addresses are allowed in the same INIT message.
If the INIT contains a least one IP Address parameter, then only the If the INIT contains a least one IP Address parameter, then only the
transport addresses provided within the INIT may be used as transport address(es) provided within the INIT may be used as
destinations by the responding end. If the INIT does not contain any destinations by the responding end. If the INIT does not contain any
IP Address parameters, the responding end MUST use the source IP Address parameters, the responding end MUST use the source
address associated with the received SCTP datagram as its sole address associated with the received SCTP datagram as its sole
destination address for the session. destination address for the association.
Cookie Preservative Cookie Preservative
The sender of the INIT shall use this parameter to suggest to the The sender of the INIT shall use this parameter to suggest to the
receiver of the INIT for a longer life-span of the Responder Cookie. receiver of the INIT for a longer life-span of the Encryption Cookie.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1|0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0| |0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1|0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Suggested Cookie Life-span Increment (msec.) | | Suggested Cookie Life-span Increment (msec.) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Suggested Cookie Life-span Increment: 32bit u_int Suggested Cookie Life-span Increment: 32bit u_int
This parameter indicates to the receiver the need for a cookie that This parameter indicates to the receiver how much increment the
expires in a longer period of time than that of the previous one. It sender wishes the reciever to add to its default cookie life-span.
is normally added to the INIT message during the second attempt of
establishing an association with a peer after the first attempt This optional parameter should be added to the INIT message by the
failed due to a Stale COOKIE report from the same peer. It is sender when it re-attempts establishing an association with a peer
optional for the receiver to honor the suggested cookie life-span to which its first attempt of establishing the association failed
increment based upon its local security requirements. due to a Stale COOKIE error. Note, the receiver MAY choose to ignore
the suggested cookie life-span increase for its own security
reasons.
2.3.2 Initiation Acknowledgement (INIT ACK) (00000010): 2.3.2 Initiation Acknowledgement (INIT ACK) (00000010):
The INIT ACK chunk is used to acknowledge the initiation of a SCTP The INIT ACK chunk is used to acknowledge the initiation of an SCTP
association. association.
The parameter part of INIT ACK is formatted similarly to the INIT The parameter part of INIT ACK is formatted similarly to the INIT
chunk. It uses two extra variable parameters: The Responder Cookie chunk. It uses two extra variable parameters: The Encryption Cookie
and the Unrecognized Parameter: and the Unrecognized Parameter:
The format of the INIT ACK message is shown below: The format of the INIT ACK message is shown below:
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 0 0 0 0 1 0| Chunk Flags | Chunk Length | |0 0 0 0 0 0 1 0| Chunk Flags | Chunk Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Initiate Tag | | Initiate Tag |
skipping to change at page 24, line 7 skipping to change at page 24, line 7
Fixed Parameters Status Fixed Parameters Status
---------------------------------------------- ----------------------------------------------
Initiate Tag Mandatory Initiate Tag Mandatory
Receiver Window Credit Mandatory Receiver Window Credit Mandatory
Number of Outbound Streams Mandatory Number of Outbound Streams Mandatory
Number of Inbound Streams Mandatory Number of Inbound Streams Mandatory
Initial TSN Mandatory Initial TSN Mandatory
Variable Parameters Status Type Value Variable Parameters Status Type Value
------------------------------------------------------------- -------------------------------------------------------------
Responder Cookie Mandatory 0x0007 Encryption Cookie Mandatory 0x0007
IPv4 Address (Note 1) Optional 0x0005 IPv4 Address (Note 1) Optional 0x0005
IPv6 Address (Note 1) Optional 0x0006 IPv6 Address (Note 1) Optional 0x0006
Unrecognized Parameters Optional 0x0008 Unrecognized Parameters Optional 0x0008
Note 1: The INIT ACK chunks may contain multiple addresses that Note 1: The INIT ACK chunks may contain any number of IP address
may be IPv4 and/or IPv6 in any combination. parameters that may be IPv4 and/or IPv6 in any combination.
Same as with INIT, more than one IP Address parameter can be included Same as with INIT, in combination with the Source Port carried in the
in an INIT ACK chunk. SCTP common header, each IP Address parameter in the INIT ACK indicates
to the receiver of the INIT ACK a valid transport address supported by
the sender of the INIT ACK for the lifetime of the association being
initiated.
If the INIT ACK contains a least one IP Address parameter, then only If the INIT ACK contains at least one IP Address parameter, then only
The transport addresses provided within the INIT ACK may be used as the transport address(es) explicitly indicated in the INIT ACK may be
destinations by the responding end. If the INIT ACK does not contain used as the destination(s) by the receiver of the INIT ACK. However,
any IP Address parameters, the responding end MUST use the source if the INIT ACK contains no IP Address parameter, the receiver of the
address associated with the received SCTP datagram as its sole INIT ACK MUST take the source IP address associated with this INIT ACK
destination address for the session. as its sole destination address for this association.
The Responder Cookie and Unrecognized Parameters use the Type-Length- The Encryption Cookie and Unrecognized Parameters use the Type-Length-
Value format as defined in Section 2.2.1 and are described below. The Value format as defined in Section 2.2.1 and are described below. The
other fields are defined the same as their counterparts in the INIT other fields are defined the same as their counterparts in the INIT
message. message.
2.3.2.1 Optional or Variable Length Parameters 2.3.2.1 Optional or Variable Length Parameters
Responder Cookie: variable size, depending on Size of Cookie Encryption Cookie: variable size, depending on Size of Cookie
This field MUST contain all the necessary state and parameter This field MUST contain all the necessary state and parameter
information required for the sender of this INIT ACK to create the information required for the sender of this INIT ACK to create the
association, along with an MD5 digital signature (128-bit). See association, along with an MD5 digital signature (128-bit). See
Section 4.1.3 for details on Cookie definition. The Cookie MUST be Section 4.1.3 for details on Cookie definition. The Cookie MUST be
padded with '0' to the next 32-bit word boundary; otherwise, the padded with '0' to the next 32-bit word boundary. The internal
format of the Cookie is implementation-specific. format of the Cookie is implementation-specific.
Unrecognized Parameters: Variable Size. Unrecognized Parameters: Variable Size.
This parameter is returned to the originator of the INIT message if This parameter is returned to the originator of the INIT message if
the receiver does not recognize one or more Optional/Variable-length the receiver does not recognize one or more Optional TLV parameters
parameters in the INIT chunk. This parameter field will contain the in the INIT chunk. This parameter field will contain the
unrecognized parameters copied from the INIT message complete unrecognized parameters copied from the INIT message complete
with TLV. with TLV.
Vendor-Specific parameters are allowed in INIT ACK. However, they Vendor-Specific parameters are allowed in INIT ACK. However, they
MUST be defined using the format described in Section 2.2.2, and be MUST be defined using the format described in Section 2.2.2, and be
appended to the end of the INIT ACK chunk. In case the receiver of appended to the end of the above INIT ACK chunks. In case the receiver
the INIT ACK does not support the vendor-specific parameters received, of the INIT ACK does not support the vendor-specific parameters
it MUST ignore those fields. received, it MUST ignore those fields.
2.3.3 Selective Acknowledgement (SACK) (00000011): 2.3.3 Selective Acknowledgement (SACK) (00000011):
This chunk is sent to the remote endpoint to acknowledge received DATA This chunk is sent to the remote endpoint to acknowledge received DATA
chunks and to inform the remote endpoint of gaps in the received chunks and to inform the remote endpoint of gaps in the received
subsequences of DATA chunks as represented by their TSNs. subsequences of DATA chunks as represented by their TSNs.
The SACK MUST contain the Cumulative TSN ACK and Receiver Window The SACK MUST contain the Cumulative TSN ACK and Advertised Receiver
Credit (rwnd) parameters. By definition, the value of the Cumulative Window Credit (a_rwnd) parameters. By definition, the value of the
TSN ACK parameter is the last TSN received at the time the Selective Cumulative TSN ACK parameter is the last TSN received at the time the
ACK is sent, before a break in the sequence of received TSNs occurs; Selective ACK is sent, before a break in the sequence of received TSNs
the next TSN value following this one has not yet been received at the occurs; the next TSN value following this one has not yet been
reporting end. This parameter therefore acknowledges receipt of all received at the reporting end. This parameter therefore acknowledges
TSNs up to and including the value given. receipt of all TSNs up to and including the value given.
The handling of the a_rwnd by the receiver of the SACK is diccussed in
detail in Section 5.2.1.
The Selective ACK also contains zero or more fragment reports. Each The Selective ACK also contains zero or more fragment reports. Each
fragment report acknowledges a subsequence of TSNs received following fragment report acknowledges a subsequence of TSNs received following
a break in the sequence of received TSNs. By definition, all TSNs a break in the sequence of received TSNs. By definition, all TSNs
acknowledged by fragment reports are higher than the value of the acknowledged by fragment reports are higher than the value of the
Cumulative TSN ACK. Cumulative TSN ACK.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 0 0 0 0 1 1|Chunk Flags | Chunk Length | |0 0 0 0 0 0 1 1|Chunk Flags | Chunk Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cumulative TSN ACK | | Cumulative TSN ACK |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Receiver Window Credit (rwnd) | | Advertised Receiver Window Credit (a_rwnd) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of Fragments = N | (Reserved) | | Number of Fragments = N | (Reserved) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Fragment #1 Start | Fragment #1 End | | Fragment #1 Start | Fragment #1 End |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/ / / /
\ ... \ \ ... \
/ / / /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Fragment #N Start | Fragment #N End | | Fragment #N Start | Fragment #N End |
skipping to change at page 25, line 54 skipping to change at page 25, line 57
Chunk Flags: Chunk Flags:
Set to all zeros on transmit and ignored on receipt. Set to all zeros on transmit and ignored on receipt.
Cumulative TSN ACK: 32 bit u_int Cumulative TSN ACK: 32 bit u_int
This parameter contains the TSN of the last DATA chunk received in This parameter contains the TSN of the last DATA chunk received in
sequence before a gap. sequence before a gap.
Receiver Window Credit (rwnd): 32 bit u_int Advertised Receiver Window Credit (a_rwnd): 32 bit u_int
This field defines the new maximum number of octets of outbound data This field indicates the updated receive buffer space in octets of
the receiver of this SACK is allowed to have outstanding (i.e. sent the sender of this SACK, see Section 5.11 for details.
and not acknowledged).
Number of Fragments: 16 bit u_int Number of Fragments: 16 bit u_int
Indicates the number of TSN fragments included in this Selective Indicates the number of TSN fragments included in this Selective
ACK. ACK.
Reserved: 16 bit Reserved: 16 bit
Must be set to all 0 by the sender and ignored by the receiver. Must be set to all 0 by the sender and ignored by the receiver.
skipping to change at page 27, line 23 skipping to change at page 27, line 23
| | <- still missing | | <- still missing
---------- ----------
| TSN=12 | | TSN=12 |
---------- ----------
| TSN=11 | | TSN=11 |
---------- ----------
| TSN=10 | | TSN=10 |
---------- ----------
then, the parameter part of the Selective ACK MUST be constructed as then, the parameter part of the Selective ACK MUST be constructed as
follows (assuming the new rwnd is set to 0x1234 by the sender): follows (assuming the new a_rwnd is set to 0x1234 by the sender):
+---------------+--------------+ +---------------+--------------+
| Cumulative TSN ACK = 12 | | Cumulative TSN ACK = 12 |
----------------+--------------- ----------------+---------------
| rwnd = 0x1234 | | a_rwnd = 0x1234 |
----------------+--------------- ----------------+---------------
| num of frag=2 | (rev = 0) | | num of frag=2 | (rev = 0) |
----------------+--------------- ----------------+---------------
|frag #1 strt=2 |frag #1 end=3 | |frag #1 strt=2 |frag #1 end=3 |
----------------+--------------- ----------------+---------------
|frag #2 strt=5 |frag #2 end=5 | |frag #2 strt=5 |frag #2 end=5 |
-------------------------------- --------------------------------
2.3.4 Heartbeat Request (HEARTBEAT) (00000100): 2.3.4 Heartbeat Request (HEARTBEAT) (00000100):
skipping to change at page 29, line 33 skipping to change at page 29, line 33
Heartbeat Information: Heartbeat Information:
The values of this field SHALL be copied from the Heartbeat The values of this field SHALL be copied from the Heartbeat
Information field found in the Heartbeat Request to which this Information field found in the Heartbeat Request to which this
Heartbeat Acknowledgement is responding. Heartbeat Acknowledgement is responding.
2.3.6 Abort Association (ABORT) (00000110): 2.3.6 Abort Association (ABORT) (00000110):
The ABORT chunk is sent to the peer of an association to terminate the The ABORT chunk is sent to the peer of an association to terminate the
association. The Abort chunk has no parameters. association. The ABORT chunk has no parameters. The sender of ABORT
may bundle one or more ERROR chunks to indicate the reason of abort.
If an endpoint receives an INIT or INIT ACK missing a mandatory However, if ERROR chunks are bundled with an ABORT, they MUST be
parameter, it MUST send an ABORT message to its peer. It SHOULD placed before the ABORT chunk in the outbound datagram.
include a Operational Error chunk with the Abort chunk to specify
the reason.
If an endpoint receives an ABORT with a format error or for an If an endpoint receives an ABORT with a format error or for an
association that doesn't exist, it drops the chunk and ignores it. association that doesn't exist, it MUST silently discard it.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 0 0 0 1 1 0|Chunk Flags |0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0| |0 0 0 0 0 1 1 0|Chunk Flags |0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Chunk Flags: Chunk Flags:
Set to zero on transmit and ignored on receipt. Set to zero on transmit and ignored on receipt.
Some special rules apply to the Verification Tag field of SCTP
datagrams which carry an ABORT, see Section 7.5 for details.
2.3.7 SHUTDOWN (00000111): 2.3.7 SHUTDOWN (00000111):
An endpoint in an association MUST use this chunk to initiate a An endpoint in an association MUST use this chunk to initiate a
graceful termination of the association with its peer. This chunk has graceful termination of the association with its peer. This chunk has
the following format. the following format.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 0 0 0 1 1 1|Chunk Flags |0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0| |0 0 0 0 0 1 1 1|Chunk Flags |0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
skipping to change at page 32, line 9 skipping to change at page 32, line 9
Cause Length, and Cause-Specific Information fields Cause Length, and Cause-Specific Information fields
Cause-specific Information: variable length Cause-specific Information: variable length
This field carries the details of the error condition. This field carries the details of the error condition.
Currently SCTP defines the following error causes: Currently SCTP defines the following error causes:
Cause of error Cause of error
--------------- ---------------
Invalid Stream Identifier Invalid Stream Identifier: indicating receiving a DATA sent to a
nonexistent stream.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cause Code=1 | Cause Length=8 | | Cause Code=1 | Cause Length=8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream Identifier | (Reserved) | | Stream Identifier | (Reserved) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Cause of error Cause of error
--------------- ---------------
Missing Mandatory Parameter Missing Mandatory Parameter: indicating that mandatory one or more
TLV parameters are missing in a received INIT or INIT ACK.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cause Code=2 | Cause Length=8+N*2 | | Cause Code=2 | Cause Length=8+N*2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of missing params=N | | Number of missing params=N |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Missing Param ID #1 | Missing Param ID #2 | | Missing Param Type #1 | Missing Param Type #2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Missing Param ID #N-1 | Missing Param ID #N | | Missing Param Type #N-1 | Missing Param Type #N |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Each missing mandatory parameter ID should be specified in the Each missing mandatory parameter type should be specified.
message.
Cause of error Cause of error
-------------- --------------
Stale Cookie Error: indicating the receiving of a valid cookie Stale Cookie Error: indicating the receiving of a valid cookie
which is however expired. which is however expired.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cause Code=3 | Cause Length=8 | | Cause Code=3 | Cause Length=8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Measure of Staleness (msec.) | | Measure of Staleness (usec.) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The sender of this error cause MAY choose to report how long The sender of this error cause MAY choose to report how long past
past expiration the cookie is, by putting in the Measure of expiration the cookie is, by putting in the Measure of Staleness
Staleness field the difference, in microseconds, between the current field the difference, in microseconds, between the current time and
time and the time the cookie expired. If the sender does not wish to the time the cookie expired. If the sender does not wish to provide
provide this information it should set Measure of staleness to 0. this information it should set Measure of staleness to 0.
Cause of error
---------------
Out of Resource: indicating that the sender is out of resource. This
is usually sent in combination with an ABORT.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cause Code=4 | Cause Length=4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Guidelines for IETF-defined Error Cause extensions are discussed in Guidelines for IETF-defined Error Cause extensions are discussed in
Section 11.3 of this document. Section 11.3 of this document.
2.3.10 Encryption Cookie (COOKIE) (00001010): 2.3.10 Encryption Cookie (COOKIE) (00001010):
This chunk is used only during the initialization of an association. This chunk is used only during the initialization of an association.
It is sent by the initiator of an association to its peer to complete It is sent by the initiator of an association to its peer to complete
the initialization process. This chunk MUST precede any DATA chunk the initialization process. This chunk MUST precede any DATA chunk
sent within the association, but MAY be bundled with one or more DATA sent within the association, but MAY be bundled with one or more DATA
skipping to change at page 34, line 16 skipping to change at page 34, line 16
The following format MUST be used for the DATA chunk: The following format MUST be used for the DATA chunk:
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 0 0 0 0 0 0| Reserved|U|B|E| Length | |0 0 0 0 0 0 0 0| Reserved|U|B|E| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TSN | | TSN |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream Identifier S | Sequence Number n | | Stream Identifier S | Stream Sequence Number n |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload Protocol Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \ \ \
/ User Data (seq n of Stream S) / / User Data (seq n of Stream S) /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Reserved: 5 bits Reserved: 5 bits
should be set to all '0's and ignored by the receiver. should be set to all '0's and ignored by the receiver.
U bit: 1 bit U bit: 1 bit
The (U)nordered bit, if set, indicates that this is an unordered The (U)nordered bit, if set, indicates that this is an unordered
data chunk, and there is NO Sequence Number assigned to this DATA data chunk, and there is NO Stream Sequence Number assigned to this
chunk. Therefore, the receiver MUST ignore the Sequence Number DATA chunk. Therefore, the receiver MUST ignore the Stream Sequence
field. Number field.
After reassembly (if necessary), unordered data chunks MUST be After reassembly (if necessary), unordered data chunks MUST be
dispatched to the upper layer by the receiver without any attempt of dispatched to the upper layer by the receiver without any attempt of
re-ordering. re-ordering.
Note, if an unordered user message is segmented, each segment MUST Note, if an unordered user message is segmented, each segment of the
have its U bit set to 1. message MUST have its U bit set to 1.
B bit: 1 bit B bit: 1 bit
The (B)eginning segment bit, if set, indicates the first segment of The (B)eginning segment bit, if set, indicates the first segment of
an SCTP user message. a user message.
E bit: 1 bit E bit: 1 bit
The (E)nding segment bit, if set, indicates the last segment of an The (E)nding segment bit, if set, indicates the last segment of a
SCTP user message. user message.
A non-segmented user message shall have both the B and E bits set A non-segmented user message shall have both the B and E bits set
to 1. Setting both B and E bits to 0 indicates a middle segment of a to 1. Setting both B and E bits to 0 indicates a middle segment of a
multi-segment SCTP user message, as summarized in the following table: multi-segment user message, as summarized in the following table:
B E Description B E Description
============================================================ ============================================================
| 1 0 | First piece of a segmented SCTP user message. | | 1 0 | First piece of a segmented user message |
+----------------------------------------------------------+ +----------------------------------------------------------+
| 0 0 | Middle piece of a segmented user message | | 0 0 | Middle piece of a segmented user message |
+----------------------------------------------------------+ +----------------------------------------------------------+
| 0 1 | Last piece of a segmented SCTP user message. | | 0 1 | Last piece of a segmented user message |
+----------------------------------------------------------+ +----------------------------------------------------------+
| 1 1 | Un-segmented Message | | 1 1 | Un-segmented Message |
============================================================ ============================================================
Length: 16 bits (16 bit u_int) Length: 16 bits (16 bit u_int)
This field indicates the length of the DATA chunk in octets. It This field indicates the length of the DATA chunk in octets. It
includes the Type field, the Reserved field, the U and B/E bits, the includes the Type field, the Reserved field, the U and B/E bits, the
Length field, TSN, the Stream Identifier, the Stream Sequence Length field, TSN, the Stream Identifier, the Stream Sequence
Number, and the User Data fields. It does not include any padding. Number, and the User Data fields. It does not include any padding.
skipping to change at page 35, line 41 skipping to change at page 35, line 41
Sequence Number n: 16 bit u_int Sequence Number n: 16 bit u_int
This value presents the sequence number of the following user This value presents the sequence number of the following user
data within the stream S. Valid range is 0x0 to 0xFFFF. data within the stream S. Valid range is 0x0 to 0xFFFF.
Note, when a user message is segmented by SCTP for transport, the Note, when a user message is segmented by SCTP for transport, the
same sequence number MUST be carried in each of the segments of same sequence number MUST be carried in each of the segments of
the message. the message.
Payload Protocol Identifier: 32 bits (32 bit u_int)
This value represents an application (or upper layer) specified
protocol identifier. This value is passed to SCTP by its upper layer
and sent to its peer. This identifier is not used by SCTP but may be
used by certain network entities as well as the peer application to
identify the type of information being carried in this DATA chunk.
The value 0x0 indicates no application identifier is specified by
the upper layer for this payload data.
User Data: variable length User Data: variable length
This is the payload user data. The implementation MUST pad the end This is the payload user data. The implementation MUST pad the end
of the data to a 32 bit boundary with 0 octets. Any padding should of the data to a 32 bit boundary with 0 octets. Any padding should
NOT be included in the length field. NOT be included in the length field.
2.4 Vendor-Specific Chunk Extensions 2.4 Vendor-Specific Chunk Extensions
This Chunk type is available to allow vendors to support their own This Chunk type is available to allow vendors to support their own
extended data formats not defined by the IETF. It MUST not affect the extended data formats not defined by the IETF. It MUST not affect the
operation of SCTP. operation of SCTP. In particular, when adding a Vendor Specific chunk
type, the vendor defined chunks MUST obey the congestion avoidance
rules defined in this document if they carry user data. User data is
defined as any data transported over the association that is delivered
to the upper layer of the receiver.
Endpoints not equipped to interpret the vendor-specific chunk sent by Endpoints not equipped to interpret the vendor-specific chunk sent by
a remote endpoint MUST ignore it. Endpoints that do not receive a remote endpoint MUST ignore it. Endpoints that do not receive
desired vendor specific information SHOULD make an attempt to operate desired vendor specific information SHOULD make an attempt to operate
without it, although they may do so (and report they are doing so) in without it, although they may do so (and report they are doing so) in
a degraded mode. a degraded mode.
A summary of the Vendor-Specific Chunk format is shown below. The A summary of the Vendor-Specific Chunk format is shown below. The
fields are transmitted from left to right. fields are transmitted from left to right.
skipping to change at page 37, line 11 skipping to change at page 37, line 11
The codification of the range of allowed usage of this field is The codification of the range of allowed usage of this field is
outside the scope of this specification. outside the scope of this specification.
3. SCTP Association State Diagram 3. SCTP Association State Diagram
During the lifetime of an SCTP association, the SCTP endpoints During the lifetime of an SCTP association, the SCTP endpoints
progress from one state to another in response to various events. The progress from one state to another in response to various events. The
events that may potentially advance an endpoint's state include: events that may potentially advance an endpoint's state include:
o SCTP user primitive calls, e.g., [open], [shutdown], [abort], o SCTP user primitive calls, e.g., [ASSOCIATE], [TERMINATE], [ABORT],
o reception of INIT, COOKIE, ABORT, SHUTDOWN, etc. control o reception of INIT, COOKIE, ABORT, SHUTDOWN, etc. control
chunks, or chunks, or
o some timeout events. o some timeout events.
The state diagram in the figures below illustrates state changes, The state diagram in the figures below illustrates state changes,
together with the causing events and resulting actions. Note that some together with the causing events and resulting actions. Note that some
of the error conditions are not shown in the state diagram. Full of the error conditions are not shown in the state diagram. Full
description of all special cases should be found in the text. description of all special cases should be found in the text.
Note, chunk names are given in all capital letters, while parameter Note, chunk names are given in all capital letters, while parameter
names have the first letter capitalized, e.g., COOKIE chunk type vs. names have the first letter capitalized, e.g., COOKIE chunk type vs.
Cookie parameter. Cookie parameter.
----- -------- (frm any state) ----- -------- (frm any state)
/ \ / rcv ABORT [abort] / \ / rcv ABORT [ABORT]
rcv INIT | | | ---------- or ---------- rcv INIT | | | ---------- or ----------
--------------- | v v delete TCB snd ABORT --------------- | v v delete TCB snd ABORT
generate Cookie \ +---------+ delete TCB generate Cookie \ +---------+ delete TCB
snd INIT.ACK ---| CLOSED | snd INIT.ACK ---| CLOSED |
+---------+ +---------+
/ \ [open] / \ [ASSOCIATE]
/ \ --------------- / \ ---------------
| | create TCB | | create TCB
| | snd INIT | | snd INIT
| | strt init timer | | strt init timer
rcv valid COOKIE | v rcv valid COOKIE | v
(1) ---------------- | +------------+ (1) ---------------- | +------------+
create TCB | | COOKIE_WAIT| (2) create TCB | | COOKIE_WAIT| (2)
snd COOKIE.ACK | +------------+ snd COOKIE.ACK | +------------+
| | | |
| | rcv INIT.ACK | | rcv INIT.ACK
skipping to change at page 38, line 16 skipping to change at page 38, line 16
| | stop cookie timer | | stop cookie timer
v v v v
+---------------+ +---------------+
| ESTABLISHED | | ESTABLISHED |
+---------------+ +---------------+
(from any state except CLOSED) (from any state except CLOSED)
| |
| |
/--------+--------\ /--------+--------\
[shutdown] / \ [TERMINATE] / \
----------------- | | ----------------- | |
check outstanding | | check outstanding | |
data chunks | | data chunks | |
v | v |
+---------+ | +---------+ |
|SHUTDOWN | | rcv SHUTDOWN |SHUTDOWN | | rcv SHUTDOWN
|PENDING | | ---------------- |PENDING | | ----------------
+---------+ | x +---------+ | x
| | | |
No more outstanding | | No more outstanding | |
skipping to change at page 38, line 51 skipping to change at page 38, line 51
| | | |
\ +---------+ / \ +---------+ /
\-->| CLOSED |<--/ \-->| CLOSED |<--/
+---------+ +---------+
Note: Note:
(1) If the received COOKIE is invalid (i.e., failed to pass the (1) If the received COOKIE is invalid (i.e., failed to pass the
authentication check), the receiver MUST silently discard the authentication check), the receiver MUST silently discard the
datagram. Or, if the received COOKIE is expired (see Section datagram. Or, if the received COOKIE is expired (see Section
4.1.5), the receiver SHALL send an ERROR chunk back. In 4.1.5), the receiver SHALL send back an ERROR chunk. In either
either case, the receiver SHALL stay in the closed state. case, the receiver stays in the CLOSED state.
(2) If the init timer expires, the endpoint SHALL retransmit INIT (2) If the init timer expires, the endpoint SHALL retransmit INIT
and re-start the init timer without changing state. This SHALL be and re-start the init timer without changing state. This SHALL be
repeated up to 'Max.Init.Retransmits' times. After that, the repeated up to 'Max.Init.Retransmits' times. After that, the
endpoint SHALL abort the initialization process and report the endpoint SHALL abort the initialization process and report the
error to SCTP user. error to SCTP user.
(3) If the cookie timer expires, the endpoint SHALL retransmit (3) If the cookie timer expires, the endpoint SHALL retransmit
COOKIE and re-start the cookie timer without changing COOKIE and re-start the cookie timer without changing
state. This SHALL be repeated up to 'Max.Init.Retransmits' state. This SHALL be repeated up to 'Max.Init.Retransmits'
skipping to change at page 39, line 51 skipping to change at page 39, line 51
open for data transfer on both ends (see Section 4.1.1). open for data transfer on both ends (see Section 4.1.1).
4.1 Normal Establishment of an Association 4.1 Normal Establishment of an Association
The initialization process consists of the following steps (assuming The initialization process consists of the following steps (assuming
that SCTP endpoint "A" tries to set up an association with SCTP that SCTP endpoint "A" tries to set up an association with SCTP
endpoint "Z" and "Z" accepts the new association): endpoint "Z" and "Z" accepts the new association):
A) "A" shall first send an INIT message to "Z". In the INIT, "A" must A) "A" shall first send an INIT message to "Z". In the INIT, "A" must
provide its security tag "Tag_A" in the Initiate Tag field. Tag_A provide its security tag "Tag_A" in the Initiate Tag field. Tag_A
shall be a random number in the range of 0x1 to 0xffffffff (see SHOULD be a random number in the range of 0x1 to 0xffffffff (see
4.3.1 for Tag value selection). After sending the INIT, "A" starts 4.3.1 for Tag value selection). After sending the INIT, "A" starts
the T1-init timer and enters the COOKIE-WAIT state. the T1-init timer and enters the COOKIE-WAIT state.
B) "Z" shall respond immediately with an INIT ACK message. In the B) "Z" shall respond immediately with an INIT ACK message. In the
message, besides filling in other parameters, "Z" must set the message, besides filling in other parameters, "Z" must set the
Verification Tag field to Tag_A, and also provide its own security Verification Tag field to Tag_A, and also provide its own security
tag "Tag_Z" in the Initiate Tag field. tag "Tag_Z" in the Initiate Tag field.
Moreover, "Z" shall generate and send along with the INIT ACK a Moreover, "Z" MUST generate and send along with the INIT ACK an
responder cookie. See Section 4.1.3 for responder cookie Encryption Cookie. See Section 4.1.3 for Encryption Cookie
generation. generation.
Note: after sending out INIT ACK with the cookie, "Z" should not Note: after sending out INIT ACK with the cookie, "Z" MUST not
allocate any resources, nor keep any states for the new allocate any resources, nor keep any states for the new
association. Otherwise, "Z" will be vulnerable to resource attacks. association. Otherwise, "Z" will be vulnerable to resource attacks.
C) Upon reception of the INIT ACK from "Z", "A" shall stop the T1-init C) Upon reception of the INIT ACK from "Z", "A" shall stop the T1-init
timer and leave COOKIE-WAIT state. "A" shall then send the cookie timer and leave COOKIE-WAIT state. "A" shall then send the cookie
received in the INIT ACK message in a cookie chunk, restart the received in the INIT ACK message in a cookie chunk, restart the
T1-init timer, and enter the COOKIE-SENT state. T1-init timer, and enter the COOKIE-SENT state.
Note, the cookie chunk can be bundled with any pending outbound Note, the cookie chunk can be bundled with any pending outbound
DATA chunks, but it MUST be the first chunk in the datagram. DATA chunks, but it MUST be the first chunk in the datagram.
skipping to change at page 40, line 44 skipping to change at page 40, line 44
IMPLEMENTATION NOTE: an implementation may choose to send the IMPLEMENTATION NOTE: an implementation may choose to send the
Communication Up notification to the SCTP user upon reception Communication Up notification to the SCTP user upon reception
of a valid COOKIE. of a valid COOKIE.
E) Upon reception of the COOKIE ACK, endpoint "A" will move from the E) Upon reception of the COOKIE ACK, endpoint "A" will move from the
COOKIE-SENT state to the ESTABLISHED state, stopping the T1-init COOKIE-SENT state to the ESTABLISHED state, stopping the T1-init
timer, and it may also notify its ULP about the successful timer, and it may also notify its ULP about the successful
establishment of the associate with a Communication Up notification establishment of the associate with a Communication Up notification
(see Section 9). (see Section 9).
Note: no DATA chunk shall be carried in the INIT or INIT ACK message. Note: DATA chunk MUST NOT be carried in the INIT or INIT ACK message.
Note: T1-init timer shall follow the same rules given in Section 5.3.
Note: if an endpoint receives an INIT, INIT ACK, or COOKIE chunk but Note: if an endpoint receives an INIT, INIT ACK, or COOKIE chunk but
decides not to establish the new association due to lack of resources, decides not to establish the new association due to missing mandatory
etc., it shall respond with an ABORT chunk. The Verification Tag field parameters in the received INIT or INIT ACK, invalid parameter values,
of the common header must be set to equal the Initiate Tag value of or, lack of local resources, it SHALL respond with an ABORT chunk. It
the peer. SHOULD also bundle with the ABORT one or more Operational ERROR chunks
to specify the cause of abort, such as the type(s) of the missing
mandatory parameters, etc. The Verification Tag field in the common
header of the outbound abort datagram MUST be set to equal the
Initiate Tag value of the peer.
Note: After the reception of the first data chunk in an association Note: After the reception of the first data chunk in an association
the receiver MUST immediately respond with a SACK to acknowledge the receiver MUST immediately respond with a SACK to acknowledge
the data chunk, subsequent acknowledgements should be done as the data chunk, subsequent acknowledgements should be done as
described in section 5.2. described in section 5.2.
Note: When a SCTP endpoint sends an INIT or INIT ACK it MUST include Note: When an SCTP endpoint sends an INIT or INIT ACK it SHOULD
all of its transport addresses in the parameter section. This is include all of its transport addresses in the parameter section. This
because it may NOT be possible to control the "sending" address that is because it may NOT be possible to control the "sending" address
a receiver of a SCTP datagram sees. A receiver thus MUST know every that a receiver of an SCTP datagram sees. A receiver thus MUST know
address that may be a source address for a peer SCTP endpoint, this every address that may be a source address for a peer SCTP endpoint,
assures that the inbound SCTP datagram can be matched to the proper this assures that the inbound SCTP datagram can be matched to the
association. proper association.
Note: At the time when the TCB is created, either end MUST set its
internal cumulative TSN acknowledgment point to its peer's Initial TSN
minus one.
4.1.1 Handle Stream Parameters 4.1.1 Handle Stream Parameters
In the INIT and INIT ACK messages, the sender of the message shall In the INIT and INIT ACK messages, the sender of the message shall
indicate the number of outbound streams (OS) it wishes to have in the indicate the number of outbound streams (OS) it wishes to have in the
association, as well as the maximal inbound streams (MIS) it will association, as well as the maximal inbound streams (MIS) it will
accept from the other endpoint. accept from the other endpoint.
After receiving these stream configuration information from the other After receiving these stream configuration information from the other
side, each endpoint shall perform the following check: if the side, each endpoint shall perform the following check: if the peer's
peer's MIS is less than the endpoint's OS, meaning that the peer is MIS is less than the endpoint's OS, meaning that the peer is incapable
incapable of supporting all the outbound streams the endpoint wants to of supporting all the outbound streams the endpoint wants to
configure, the endpoint MUST either settle with MIS outbound streams, configure, the endpoint MUST either settle with MIS outbound streams,
or abort the association and report to its upper layer the resources or abort the association and report to its upper layer the resources
shortage at its peer. shortage at its peer.
After the association is initialized, the valid outbound stream After the association is initialized, the valid outbound stream
identifier range for either endpoint shall be 0 to identifier range for either endpoint shall be 0 to
min(local OS, remote MIS)-1. min(local OS, remote MIS)-1.
4.1.2 Handle Address Parameters 4.1.2 Handle Address Parameters
During the association initialization, an endpoint shall use the During the association initialization, an endpoint shall use the
following rules to discover and collect the destination transport following rules to discover and collect the destination transport
address(es) to its peer. address(es) to its peer.
On reception of an INIT or INIT ACK message, the receiver shall record On reception of an INIT or INIT ACK message, the receiver shall record
any transport addresses specified as parameters in the INIT or INIT any transport addresses specified as parameters in the INIT or INIT
ACK message, and use only these addresses as destination transport ACK message, and use only these addresses as destination transport
addresses when sending subsequent datagrams to its peer. If NO addresses when sending subsequent datagrams to its peer. If no
destination transport addresses are specified in the INIT or INIT ACK destination transport addresses are specified in the INIT or INIT ACK
message, then the source address from which the message arrived should message, then the source address from which the message arrived should
be used as the destination transport address for all datagrams. be considered as the only destination transport address to use.
4.1.3 Generating Responder Cookie An initial primary destination transport address shall be selected
for either endpoint, using the following rules:
For the initiator: any valid transport address obtained from the
INIT ACK message. If no transport address is specified in the INIT
ACK message, use the source transport address from which the INIT
ACK message arrived.
For the responder: any valid transport address obtained from the
INIT message. If no transport address is specified in the INIT
message, use the source transport address from which the INIT
message arrived.
4.1.3 Generating Encryption Cookie
When sending an INIT ACK as a response to an INIT message, the sender When sending an INIT ACK as a response to an INIT message, the sender
of INIT ACK should create a responder cookie and send it as part of of INIT ACK should create an Encryption Cookie and send it as part of
the INIT ACK. Inside this responder cookie, the sender should include the INIT ACK. Inside this Encryption Cookie, the sender should include
a security signature, a time stamp on when the cookie is created, and a security signature, a time stamp on when the cookie is created, and
the lifespan of the cookie, along with all the information necessary the lifespan of the cookie, along with all the information necessary
for it to establish the association. for it to establish the association.
The following steps SHOULD be taken to generate the cookie: The following steps SHOULD be taken to generate the cookie:
1) create an association TCB using information from both the received 1) create an association TCB using information from both the received
INIT and the outgoing INIT ACK messages, INIT and the outgoing INIT ACK messages,
2) in the TCB, set the creation time to the current time of day, and 2) in the TCB, set the creation time to the current time of day, and
the lifespan to the protocol parameter 'Valid.Cookie.Life', the lifespan to the protocol parameter 'Valid.Cookie.Life',
3) attach a private security key to the TCB and generate a 128-bit MD5 3) attach a private security key to the TCB and generate a 128-bit MD5
signature from the key/TCB combination (see [4] for details on signature from the key/TCB combination (see [4] for details on
MD5), and MD5), and
4) generate the responder cookie by combining the TCB and the 4) generate the Encryption Cookie by combining the TCB and the
resultant MD5 signature. resultant MD5 signature.
After sending the INIT ACK with the cookie, the sender SHOULD delete After sending the INIT ACK with the cookie, the sender SHOULD delete
the TCB and any other local resource related to the new association, the TCB and any other local resource related to the new association,
so as to prevent resource attacks. so as to prevent resource attacks.
The private key should be a cryptographic quality random number with The private key should be a cryptographic quality random number with
a sufficient length. Discussion in RFC 1750 [1] can be helpful in a sufficient length. Discussion in RFC 1750 [1] can be helpful in
selection of the key. selection of the key.
4.1.4 Cookie Processing 4.1.4 Cookie Processing
When a cookie is received from its peer in an INIT ACK message, the When an endpoint receives an INIT ACK chunk in response to its INIT
receiver of the INIT ACK MUST immediately send a COOKIE chunk to its chunk, and the INIT ACK contains an Encryption Cookie parameter, it
peer and MAY piggy-back any pending DATA chunks on the outbound COOKIE MUST immediately send a COOKIE chunk to its peer with the received
chunk. The sender shall also start the T1-init timer after sending out cookie. The sender MAY also add any pending DATA chunks to the
message.
The sender shall also start the T1-init timer after sending out
the COOKIE chunk. If the timer expires, the sender shall retransmit the COOKIE chunk. If the timer expires, the sender shall retransmit
the COOKIE chunk and restart the T1-init timer. This is repeated until the COOKIE chunk and restart the T1-init timer. This is repeated until
either a COOKIE ACK is received or the endpoint is marked unreachable. either a COOKIE ACK is received or the endpoint is marked
unreachable (and thus the association enters the CLOSED state).
4.1.5 Cookie Authentication 4.1.5 Cookie Authentication
When an endpoint receives a COOKIE chunk from another endpoint with When an endpoint receives a COOKIE chunk from another endpoint with
which it has no association, it shall take the following actions: which it has no association, it shall take the following actions:
1) compute an MD5 signature using the TCB data carried in the cookie 1) compute an MD5 signature using the TCB data carried in the cookie
along with the receiver's private security key, along with the receiver's private security key,
2) authenticate the cookie by comparing the computed MD5 signature 2) authenticate the cookie as one that it previously generated by
against the one carried in the cookie. If this comparison fails, comparing the computed MD5 signature against the one carried in the
the datagram, including the COOKIE and the attached user data, cookie. If this comparison fails, the datagram, including the
should be silently discarded, COOKIE and the attached user data, should be silently discarded,
3) compare the creation time stamp in the cookie to the current local 3) compare the creation time stamp in the cookie to the current local
time, if the elapsed time is longer than the lifespan carried in time, if the elapsed time is longer than the lifespan carried in
the cookie, then the datagram, including the COOKIE and the the cookie, then the datagram, including the COOKIE and the
attached user data, SHOULD be discarded and the endpoint MUST attached user data, SHOULD be discarded and the endpoint MUST
transmit a stale cookie operational error to the sending endpoint, transmit a stale cookie operational error to the sending endpoint,
4) if the cookie is valid, create an association to the sender of the 4) if the cookie is valid, create an association to the sender of the
COOKIE message with the information in the TCB data carried in the COOKIE message with the information in the TCB data carried in the
COOKIE, and enter the ESTABLISHED state, COOKIE, and enter the ESTABLISHED state,
5) acknowledge any DATA chunk in the datagram following the rules 5) acknowledge any DATA chunk in the datagram following the rules
defined in Section 5.2, and, defined in Section 5.2, and,
6) send a COOKIE ACK chunk to the sender acknowledging reception of 6) send a COOKIE ACK chunk to the sender acknowledging reception of
the cookie. The COOKIE ACK MAY be piggybacked with any outbound the cookie. The COOKIE ACK MAY be piggybacked with any outbound
DATA chunk or SACK chunk. DATA chunk or SACK chunk.
Note that if a COOKIE is received from an endpoint with which the Note that if a COOKIE is received from an endpoint with which the
receiver of the COOKIE has an existing association, the proceedures in receiver of the COOKIE has an existing association, the procedures in
section 4.2 should be followed. section 4.2 should be followed.
4.1.6 An Example of Normal Association Establishment 4.1.6 An Example of Normal Association Establishment
In the following example, "A" initiates the association and then sends In the following example, "A" initiates the association and then sends
a user datagram to "Z", then "Z" sends two user datagrams to "A" a user message to "Z", then "Z" sends two user messages to "A" later
later: (assuming no bundling or segmentation occurs):
Endpoint A Endpoint Z Endpoint A Endpoint Z
{app sets association with Z} {app sets association with Z}
(build TCB) (build TCB)
INIT [INIT Tag=Tag_A INIT [INIT Tag=Tag_A
& other info] --------\ & other info] --------\
(Start T1-init timer) \ (Start T1-init timer) \
(Enter COOKIE-WAIT state) \---> (compose temp TCB and Cookie_Z) (Enter COOKIE-WAIT state) \---> (compose temp TCB and Cookie_Z)
skipping to change at page 44, line 34 skipping to change at page 44, line 34
Frag=0] --------\ / [TSN=init TSN_Z +1, Frag=0] --------\ / [TSN=init TSN_Z +1,
\/ Strm=0,Seq=2 & user data 2] \/ Strm=0,Seq=2 & user data 2]
<------/\ <------/\
\ \
\------> \------>
Note that If T1-init timer expires at "A" after the INIT or COOKIE Note that If T1-init timer expires at "A" after the INIT or COOKIE
chunks are sent, the same INIT or cookie chunk with the same Initiate chunks are sent, the same INIT or cookie chunk with the same Initiate
Tag (i.e., Tag_A) or cookie shall be retransmitted and the timer Tag (i.e., Tag_A) or cookie shall be retransmitted and the timer
restarted. This shall be repeated Max.Init.Retransmits times before "A" restarted. This shall be repeated Max.Init.Retransmits times before "A"
considers "Z" unreachable and reports the failure to its upper layer. considers "Z" unreachable and reports the failure to its upper layer
When retransmitting the INIT, the endpoint SHALL following the rules (and thus the association enters the CLOSED state). When
retransmitting the INIT, the endpoint SHALL following the rules
defined in 5.3 to determine the proper timer value. defined in 5.3 to determine the proper timer value.
4.2 Handle Duplicate INIT, INIT ACK, COOKIE, and COOKIE ACK 4.2 Handle Duplicate INIT, INIT ACK, COOKIE, and COOKIE ACK
At any time during the life of an association (in one of the possible At any time during the life of an association (in one of the possible
states) between an endpoint and its peer, one of the setup chunks states) between an endpoint and its peer, one of the setup chunks
may be received from the peer, the receiver shall process such may be received from the peer, the receiver shall process such
a duplicate has described in this section. a duplicate setup chunk as described in this section.
The following scenarios can cause duplicated chunks: The following scenarios can cause duplicated chunks:
A) The peer has crashed without being detected, and re-started itself A) The peer has crashed without being detected, and re-started itself
and sent out a new Chunk trying to restore the association, and sent out a new INIT Chunk trying to restore the association,
B) Both sides are trying to initialize the association at about the B) Both sides are trying to initialize the association at about the
same time, same time,
C) The chunk is a staled datagram that was used to establish C) The chunk is from a staled datagram that was used to establish
the present association or a past association which is no longer in the present association or a past association which is no longer in
existence, or existence, or
D) The chunk is a false message generated by an attacker. D) The chunk is a false message generated by an attacker.
In case A), the endpoint shall reset the present association and set a In case A), the endpoint shall reset the present association and set a
new association with its peer. Case B) is unique and is discussed in new association with its peer. Case B) is unique and is discussed in
Section 4.2.1. However, in cases C) and D), the endpoint must retain Section 4.2.1. However, in cases C) and D), the endpoint must retain
the present association. the present association.
skipping to change at page 45, line 39 skipping to change at page 45, line 39
message sent out by itself). Each responder shall also generate a message sent out by itself). Each responder shall also generate a
cookie with the INIT ACK. cookie with the INIT ACK.
After that, no other actions shall be taken by either side, i.e., the After that, no other actions shall be taken by either side, i.e., the
endpoint shall not change its state, and the T1-init timer shall be endpoint shall not change its state, and the T1-init timer shall be
let running. The normal procedures for handling cookies will let running. The normal procedures for handling cookies will
resolve the duplicate INITs to a single association. resolve the duplicate INITs to a single association.
4.2.2 Handle Duplicate INIT in Other States 4.2.2 Handle Duplicate INIT in Other States
Upon reception of the duplicated INIT, the receiver shall follow Upon reception of the duplicated INIT, the receiver shall generate an
the normal procedures for handling a INIT message, i.e. generate INIT ACK with an Encryption Cookie.
a INIT ACK with a cookie.
In the outbound INIT ACK, the Verification Tag field of the common In the outbound INIT ACK, the endpoint shall set the Verification Tag
header shall be set to the peer tag value (from the INIT message), and field in the common header to the peer's new tag value (from the
the Initiate Tag field set to its own tag value (unchanged from the duplicated INIT message), and the Initiate Tag field to its own tag
existing association). A cookie should also be included generated value (unchanged from the existing association). The included
with the current time and a updated TCB based upon the INIT message. Encryption Cookie shall be generated using the current time and a
And no further actions shall be taken. temporary TCB constructed with the information provided in the
duplicated INIT message (see Section 4.1.3). This temporary TCB MUST
be destroyed after the outbound INIT ACK is built.
After sending out the INIT ACK, the endpoint shall take no further
actions, i.e., the existing association, including its current state,
and the corresponding TCB MUST not be changed.
4.2.3 Handle Duplicate INIT ACK 4.2.3 Handle Duplicate INIT ACK
If an INIT ACK is received by an endpoint in any state If an INIT ACK is received by an endpoint in any state
other than the COOKIE-WAIT state, the endpoint should discard other than the COOKIE-WAIT state, the endpoint should discard
the INIT ACK message. A duplicate INIT ACK usually indicates the the INIT ACK message. A duplicate INIT ACK usually indicates the
processing of a old INIT or duplicated INIT message. processing of an old INIT or duplicated INIT message.
4.2.4 Handle Duplicate Cookie 4.2.4 Handle Duplicate Cookie
When a duplicated COOKIE chunk is received in any state for an When a duplicated COOKIE chunk is received in any state for an
existing association the following rules shall be applied: existing association the following rules shall be applied:
1) compute an MD5 signature using the TCB data carried in the cookie 1) compute an MD5 signature using the TCB data carried in the cookie
along with the receiver's private security key, along with the receiver's private security key,
2) authenticate the cookie by comparing the computed MD5 signature 2) authenticate the cookie by comparing the computed MD5 signature
skipping to change at page 48, line 27 skipping to change at page 48, line 27
Initiate Tag values should be selected from the range of 0x1 to Initiate Tag values should be selected from the range of 0x1 to
0xffffffff. It is very important that the Tag value be randomized to 0xffffffff. It is very important that the Tag value be randomized to
help protect against "man in the middle" and "sequence number" attacks. help protect against "man in the middle" and "sequence number" attacks.
It is suggested that RFC 1750 [1] be used for the Tag randomization. It is suggested that RFC 1750 [1] be used for the Tag randomization.
Moreover, the tag value used by either endpoint in a given association Moreover, the tag value used by either endpoint in a given association
MUST never be changed during the lifetime of the association. However, MUST never be changed during the lifetime of the association. However,
a new tag value MUST be used each time the endpoint tears-down and a new tag value MUST be used each time the endpoint tears-down and
then re-establishes the association to the same peer. then re-establishes the association to the same peer.
4.3.2 Initiation from behind a NAT
When a NAT is present between two endpoints, the endpoint that is
behind the NAT, i.e., one that does not have a publicly available
network address, shall take one of the following options:
A) Indicate that only one address can be used by including no transport
addresses in the INIT message (Section 2.3.1.1). This will make the
endpoint that receives this Initiation message to consider the sender
as only having that one address. This method can be used for a dynamic
NAT, but any multi-homing configuration at the endpoint that is behind
the NAT will not be visible to its peer, and thus not be taken
advantage of.
B) Indicate all of its networks in the Initiation by specifying all
the actual IP addresses and ports that the NAT will substitute for the
endpoint. This method requires that the endpoint behind the NAT must
have pre-knowledge of all the IP addresses and ports that the NAT will
assign.
5. User Data Transfer 5. User Data Transfer
For transmission efficiency, SCTP defines mechanisms for bundling of For transmission efficiency, SCTP defines mechanisms for bundling of
small user messages and segmentation of large user messages. small user messages and segmentation of large user messages.
The following diagram depicts the flow of user messages through SCTP. The following diagram depicts the flow of user messages through SCTP.
+--------------------------+ +--------------------------+
| User Messages | | User Messages |
+--------------------------+ +--------------------------+
skipping to change at page 49, line 24 skipping to change at page 49, line 24
| SCTP DATA Chunks | |SCTP Control Chunks | | SCTP DATA Chunks | |SCTP Control Chunks |
+------------------+ +--------------------+ +------------------+ +--------------------+
^ | ^ | ^ | ^ |
| v (2) | v (2) | v (2) | v (2)
+--------------------------+ +--------------------------+
| SCTP datagrams | | SCTP datagrams |
+--------------------------+ +--------------------------+
SCTP ^ | SCTP ^ |
===========================|==|=========================== ===========================|==|===========================
| v | v
Unreliable datagram service (e.g., UDP) Unreliable Packet Transfer Service (e.g., IP)
Note: Note:
(1) When converting user messages into Data chunks, SCTP sender (1) When converting user messages into Data chunks, SCTP sender
will segment user messages larger than the current path MTU will segment user messages larger than the current path MTU
into multiple data chunks. The segmented message will be into multiple data chunks. The segmented message will normally
reassembled from data chunks before delivery by the SCTP be reassembled from data chunks before delivery to the user by
receiver. the SCTP receiver (see Section 5.9 for details).
(2) Multiple data and control chunks may be multiplexed by the (2) Multiple data and control chunks may be multiplexed by the
sender into a single SCTP datagram for transmission, as long as sender into a single SCTP datagram for transmission, as long as
the final size of the datagram does not exceed the current path the final size of the datagram does not exceed the current path
MTU. The receiver will de-multiplex the datagram back into MTU. The receiver will de-multiplex the datagram back into
the original chunks. the original chunks.
The bundling and segmentation mechanisms, as detailed in Sections 5.9 The segmentation and bundling mechanisms, as detailed in Sections 5.9
and 5.10, are optional to implement by the data sender, but they MUST and 5.10, are optional to implement by the data sender, but they MUST
be implemented by the data receiver, i.e., a SCTP receiver MUST be be implemented by the data receiver, i.e., an SCTP receiver MUST be
prepared to receive and process bundled or segmented data. prepared to receive and process bundled or segmented data.
5.1 Transmission of DATA Chunks 5.1 Transmission of DATA Chunks
The following general rules SHALL be applied by the sender for The following general rules SHALL be applied by the sender for
transmission and/or retransmission of outbound DATA chunks: transmission and/or retransmission of outbound DATA chunks:
A) At any given time, the sender MUST NOT transmit new data onto any A) At any given time, the sender MUST NOT transmit new data onto any
destination transport address if it has rwnd or more octets of data destination transport address if it has rwnd or more octets of data
outstanding. The outstanding data size is defined as the total size outstanding. The outstanding data size is defined as the total size
skipping to change at page 52, line 10 skipping to change at page 52, line 10
(bundle SACK with DATA) (bundle SACK with DATA)
/----- SACK [TSN Ack=9,Frag=0] \ /----- SACK [TSN Ack=9,Frag=0] \
/ DATA [TSN=6,Strm=1,Seq=2] / DATA [TSN=6,Strm=1,Seq=2]
(cancel T3-rxt timer) <------/ (Start T3-rxt timer) (cancel T3-rxt timer) <------/ (Start T3-rxt timer)
(ack delayed) (ack delayed)
... ...
(send ack) (send ack)
SACK [TSN ACK=6,Frag=0] -------------> (cancel T3-rxt timer) SACK [TSN ACK=6,Frag=0] -------------> (cancel T3-rxt timer)
5.2.1 Tracking Peer's Receive Buffer Space
Whenever a SACK arrives, a new updated a_rwnd arrives with it. This
value represents the amount of buffer space the sender of the SACK, at
the time of transmitting the SACK, has left of its total receive
buffer space (as specified in the INIT/INIT-ACK). After processing the
SACK, the receiver of the SACK must use the following rules to
re-calculate the congestion control rwnd, using the received a_rwnd
value.
A) At the establishment of the association, the endpoint initializes
the congestion control rwnd to the Advertised Receiver Window
Credit (a_rwnd) the peer specified in the INIT or INIT ACK.
B) Any time a new DATA chunk is transmitted to a peer, the endpoint
subtracts the data size of the chunk from the rwnd of that peer.
D) Any time a SACK arrives, the endpoint performs the following:
If all outstanding TSNs are acknowledged by the SACK, adopt
the a_rwnd value in the SACK as the new rwnd.
Otherwise, take the value of the current rwnd, and add to it the
data size of any newly acknowledged TSNs that has its BE bits set
to 11, OR that moved the cumulative TSN point forward. Then, set
the congestion control rwnd to the lesser of the calculated value
and the a_rwnd carried in the SACK.
E) Any time the T3-rxt timer expires causing all outstanding chunks to
be marked for retransmission, add all of the data sizes of those
chunks to the rwnd.
5.3 Management of Retransmission Timer 5.3 Management of Retransmission Timer
SCTP uses a retransmission timer T3-rxt to ensure data delivery in the SCTP uses a retransmission timer T3-rxt to ensure data delivery in the
absence of any feedback from the remote data receiver. The duration of absence of any feedback from the remote data receiver. The duration of
this timer is referred to as RTO (retransmission timeout). this timer is referred to as RTO (retransmission timeout).
When the receiver endpoint is multi-homed, the data sender endpoint When the receiver endpoint is multi-homed, the data sender endpoint
will calculate a separate RTO for each different destination transport will calculate a separate RTO for each different destination transport
addresses of the receiver endpoint. addresses of the receiver endpoint.
skipping to change at page 52, line 40 skipping to change at page 52, line 72
C1) Until an RTT measurement has been made for a packet sent C1) Until an RTT measurement has been made for a packet sent
to the given destination transport address, set RTO to the to the given destination transport address, set RTO to the
protocol parameter 'RTO.Initial'. protocol parameter 'RTO.Initial'.
C2) When the first RTT measurement R is made, set SRTT <- R, C2) When the first RTT measurement R is made, set SRTT <- R,
RTTVAR <- R/2, and RTO <- SRTT + 4 * RTTVAR. RTTVAR <- R/2, and RTO <- SRTT + 4 * RTTVAR.
C3) When a new RTT measurement R' is made, set C3) When a new RTT measurement R' is made, set
RTTVAR <- beta * RTTVAR + (1 - beta) * |SRTT - R'| RTTVAR <- (1 - RTO.Beta) * RTTVAR + RTO.Beta * |SRTT - R'|
SRTT <- alpha * SRTT + (1 - alpha) * R' SRTT <- (1 - RTO.Alpha) * SRTT + RTO.Alpha * R'
(The value of SRTT used in the update to RTTVAR is its value
*before* updating SRTT itself using the second assignment.)
The above are computed using alpha=1/8 and beta=1/4. Note, the value of SRTT used in the update to RTTVAR is its value
*before* updating SRTT itself using the second assignment.
After the computation, update RTO <- SRTT + 4 * RTTVAR. After the computation, update RTO <- SRTT + 4 * RTTVAR.
C4) When data is in flight and when allowed by rule C5 below, a new C4) When data is in flight and when allowed by rule C5 below, a new
RTT measurement MUST be made each round trip. Furthermore, RTT measurement MUST be made each round trip. Furthermore,
it is RECOMMENDED that new RTT measurements should be made no it is RECOMMENDED that new RTT measurements should be made no
more than once per round-trip for a given destination transport more than once per round-trip for a given destination transport
address. There are two reasons for this recommendation: first, address. There are two reasons for this recommendation: first,
it appears that measuring more frequently often does not in it appears that measuring more frequently often does not in
practice yield any significant benefit [5]; second, if practice yield any significant benefit [5]; second, if
measurements are made more often, then the values of alpha and measurements are made more often, then the values of RTO.Alpha and
beta in rule C3 above should be adjusted so that SRTT and RTTVAR RTO.Beta in rule C3 above should be adjusted so that SRTT and
still adjust to changes at roughly the same rate (in terms of RTTVAR still adjust to changes at roughly the same rate (in terms
how many round trips it takes them to reflect new value) as of how many round trips it takes them to reflect new value) as
they would if making only one measurement per round-trip and they would if making only one measurement per round-trip and
using alpha and beta as given in rule C3. However, the exact using RTO.Alpha and RTO.Beta as given in rule C3. However, the
nature of these adjustments remains a research issue. exact nature of these adjustments remains a research issue.
C5) Karn's algorithm: RTT measurements MUST NOT be made using C5) Karn's algorithm: RTT measurements MUST NOT be made using
packets that were retransmitted (and thus for which it is packets that were retransmitted (and thus for which it is
ambiguous whether the reply was for the first instance of the ambiguous whether the reply was for the first instance of the
packet or a later instance). packet or a later instance).
C6) Whenever RTO is computed, if it is less than 1 second then C6) Whenever RTO is computed, if it is less than RTO.Min seconds
it is rounded up to 1 second. The reason for this rule is then it is rounded up to RTO.Min seconds. The reason for this
that RTOs that do not have a high minimum value are susceptible rule is that RTOs that do not have a high minimum value are
to unnecessary timeouts [5]. susceptible to unnecessary timeouts [5].
C7) A maximum value may be placed on RTO provided it is at least C7) A maximum value may be placed on RTO provided it is at least
60 seconds. 60 seconds.
There is no requirement for the clock granularity G used for computing There is no requirement for the clock granularity G used for computing
RTT measurements and the different state variables, other than RTT measurements and the different state variables, other than
G1) Whenever RTTVAR is computed, if RTTVAR = 0, then adjust G1) Whenever RTTVAR is computed, if RTTVAR = 0, then adjust
RTTVAR <- G. RTTVAR <- G.
Experience has shown that finer clock granularities (<= 100 msec) Experience [5] has shown that finer clock granularities (<= 100 msec)
perform somewhat better than more coarse granularities. perform somewhat better than more coarse granularities.
5.3.2 Retransmission Timer Rules 5.3.2 Retransmission Timer Rules
The rules for managing the retransmission timer are as follows: The rules for managing the retransmission timer are as follows:
R1) Every time a packet containing data is sent (including a R1) Every time a packet containing data is sent (including a
retransmission), if the T3-rxt timer is not running, start it retransmission), if the T3-rxt timer is not running, start it
running so that it will expire after RTO seconds. The RTO running so that it will expire after RTO seconds. The RTO
used here is that obtained after any doubling due to used here is that obtained after any doubling due to
skipping to change at page 54, line 50 skipping to change at page 54, line 50
E2) On the destination address where the timer expires, set E2) On the destination address where the timer expires, set
RTO <- RTO * 2 ("back off the timer"). The maximum value discussed RTO <- RTO * 2 ("back off the timer"). The maximum value discussed
in rule C7 above may be used to provide an upper bound to this in rule C7 above may be used to provide an upper bound to this
doubling operation. doubling operation.
E3) Determine how many of the earliest (i.e., lowest TSN) outstanding E3) Determine how many of the earliest (i.e., lowest TSN) outstanding
Data chunks will fit into a single packet, subject to the MTU Data chunks will fit into a single packet, subject to the MTU
constraint for the path corresponding to the destination transport constraint for the path corresponding to the destination transport
address where the retransmission is being sent to (this may be address where the retransmission is being sent to (this may be
different from the address where the timer expires [see Section different from the address where the timer expires [see Section
5.4]). Call this value K. Retransmit those K data chunks in a 5.4]). Call this value K. Bundle and retransmit those K data
single packet to the address. chunks in a single packet to the address. Note, the sender is
allowed not to bundle, but only retransmit the earliest chunk in
the outbound packet.
E4) Start the retransmission timer on the destination address to where E4) Start the retransmission timer T3-rxt on the destination address
the retransmission is sent, if rule R1 above indicates to do so. to where the retransmission is sent, if rule R1 above indicates to
do so. Note, the RTO to be used for starting T3-rxt should be the
one of the destination address to where the retransmission is
sent, which, when the receiver is multi-homed, may be different
from the destination address where the timer expired (see Section
5.4 below).
Note that after retransmitting, once a new RTT measurement is obtained Note that after retransmitting, once a new RTT measurement is obtained
(which can happen only when new data has been sent and acknowledged, (which can happen only when new data has been sent and acknowledged,
per rule C5, or for a measurement made from a Heartbeat [see Section per rule C5, or for a measurement made from a Heartbeat [see Section
7.3]), the computation in rule C3 is performed, including the 7.3]), the computation in rule C3 is performed, including the
computation of RTO, which may result in "collapsing" RTO back down computation of RTO, which may result in "collapsing" RTO back down
after it has been subject to doubling (rule E2). after it has been subject to doubling (rule E2).
The final rule for managing the retransmission timer concerns failover The final rule for managing the retransmission timer concerns failover
(see Section 5.4.1): (see Section 5.4.1):
skipping to change at page 55, line 33 skipping to change at page 55, line 38
do so. do so.
5.4 Multi-homed SCTP Endpoints 5.4 Multi-homed SCTP Endpoints
An SCTP endpoint is considered multi-homed if there are more than one An SCTP endpoint is considered multi-homed if there are more than one
transport addresses that can be used as a destination address to reach transport addresses that can be used as a destination address to reach
that endpoint. that endpoint.
Moreover, at the sender side, one of the multiple destination Moreover, at the sender side, one of the multiple destination
addresses of the multi-homed receiver endpoint shall be selected as addresses of the multi-homed receiver endpoint shall be selected as
the primary destination transport address by the UPL (see Section 9 the primary destination transport address by the UPL (see Sections
for details). 4.1.2 and 9.1 for details).
At association initiation, the initial primary destination transport
addresses are:
- for the sender of the INIT message, the transport address that the
INIT is sent to.
- for the sender of the INTI ACK message, any valid transport address
obtained from the INIT message.
When the SCTP sender is transmitting to the multi-homed receiver, by When the SCTP sender is transmitting to the multi-homed receiver, by
default the transmission SHOULD always take place on the primary default the transmission SHOULD always take place on the primary
transport address, unless the SCTP user explicitly specifies the transport address, unless the SCTP user explicitly specifies the
destination transport address to use. destination transport address to use.
The acknowledgement SHOULD be transmitted to the same destination The acknowledgement SHOULD be transmitted to the same destination
transport address from which the DATA or control chunk being transport address from which the DATA or control chunk being
acknowledged were received. acknowledged were received.
skipping to change at page 56, line 37 skipping to change at page 56, line 37
When there is outbound data to send and the primary destination When there is outbound data to send and the primary destination
transport address becomes inactive (e.g., due to failures), or where transport address becomes inactive (e.g., due to failures), or where
the SCTP user explicitly requests to send data to an inactive the SCTP user explicitly requests to send data to an inactive
destination transport address, before reporting an error to its ULP, destination transport address, before reporting an error to its ULP,
the SCTP sender should try to send the data to an alternate active the SCTP sender should try to send the data to an alternate active
destination transport address if one exists. destination transport address if one exists.
5.5 Stream Identifier and Sequence Number 5.5 Stream Identifier and Sequence Number
Every DATA chunk MUST carry a valid stream identifier. If a DATA chunk Every DATA chunk MUST carry a valid stream identifier. If a DATA chunk
with an invalid stream identifier is received, the receiver shall with an invalid stream identifier is received, the receiver shall,
respond immediately with an ERROR message with cause set to Invalid after acknowledging the reception of the DATA chunk following the normal
Stream Identifier (see Section 2.3.9) and discard the DATA chunk. procedure, respond immediately with an ERROR message with cause set to
Invalid Stream Identifier (see Section 2.3.9) and discard the DATA
chunk.
The stream sequence number in all the streams shall start from 0x0 The stream sequence number in all the streams shall start from 0x0
when the association is established. Also, when the stream sequence when the association is established. Also, when the stream sequence
number reaches the value 0xffff the next sequence number shall be set number reaches the value 0xffff the next sequence number shall be set
to 0x0. to 0x0.
5.6 Ordered and Un-ordered Delivery 5.6 Ordered and Un-ordered Delivery
By default the SCTP receiver shall ensure the DATA chunks within any By default the SCTP receiver shall ensure the DATA chunks within any
given stream be delivered to the upper layer according to the order of given stream be delivered to the upper layer according to the order of
skipping to change at page 58, line 31 skipping to change at page 58, line 31
Note: in order to keep the size of the outbound SCTP datagram not to Note: in order to keep the size of the outbound SCTP datagram not to
exceed the current path MTU, the maximal number of fragments that can exceed the current path MTU, the maximal number of fragments that can
be reported within a single SACK chunk is limited. When a single SACK be reported within a single SACK chunk is limited. When a single SACK
can not cover all the fragments needed to be reported due to the MTU can not cover all the fragments needed to be reported due to the MTU
limitation, the endpoint SHALL send only one SACK, reporting the limitation, the endpoint SHALL send only one SACK, reporting the
fragments from the lowest to highest TSNs, within the size limit set fragments from the lowest to highest TSNs, within the size limit set
by the MTU, and leave the remaining highested TSN fragment numbers by the MTU, and leave the remaining highested TSN fragment numbers
unacknowledged. unacknowledged.
5.8 CRC-16 Utilization 5.8 Adler-32 Checksum Calculation
When sending a datagram, the sender can choose to strengthen the data When sending an SCTP datagram, the sender MUST strengthen the data
integrity of the transmission by including the CRC-16 value calculated integrity of the transmission by including the Adler-32 checksum
on the datagram, as described below. value calculated on the datagram, as described below.
After the datagram is constructed (containing the SCTP common header After the datagram is constructed (containing the SCTP common header
and one or more control or DATA chunks), the sender shall: and one or more control or DATA chunks), the sender shall:
1) fill in the proper Version number and Verification Tag in the 1) fill in the proper Verification Tag in the SCTP common header and
common header, intialize the Adler-32 checksum filed to 0's.
2) set the C Bit to '1' and fill the 16 bit CRC-16 field with '0',
3) calculate the CRC-16 value of the whole datagram, including the
SCTP common header and all the chunks,
It shall be the ones complement of the sum (modulo 2) of:
a) the remainder of x k (x 15 + x 14 + x 13 + x 12 + x 11 + x 10 +
x 9 + x 8 + x 7 + x 6 + x 5 + x 4 + x 3 + x 2 + x + 1) divided
(modulo 2) by the generator polynomial x 16 + x 12 + x 5 + 1,
where k is the number of bits in the SCTP frame not including
the CRC-16 bits, and
b) the remainder of the division (modulo 2) by the generator
polynomial x 16 + x 12 + x 5 + 1, of the product of x 16 by the
content of the frame not including the CRC-16 bits.
4) put the resultant value into the CRC-16 field, and leave the rest of 2) calculate the Adler-32 checksum of the whole datagram, including the
the bits unchanged. SCTP common header and all the chunks. Refer to Sections 8.2 and 9
in [2] for details of the Adler-32 algorithm. And,
When a datagram is received, the receiver MUST first check the C 3) put the resultant value into the Adler-32 checksum field in the
Bit. If the C Bit is set, the receiver SHALL: common header, and leave the rest of the bits unchanged.
1) store the received CRC-16 value aside, When an SCTP datagram is received, the receiver MUST first check the
Adler-32 checksum:
2) replace the 16 bits of the CRC-16 with '0' and calculate a CRC-16 1) store the received Adler-32 checksum value aside,
value of the whole received datagram,
3) verify that the calculated CRC-16 value is the same as the received 2) replace the 32 bits of the Adler-32 checksum field in the received
CRC-16 value, If not, the receiver MUST treat the datagram as an SCTP datagram with all '0's and calculate an Adler-32 checksum
invalid SCTP datagram. value of the whole received datagram. And,
If the C Bit is not set, the receiver MUST NOT perform the above 3) verify that the calculated Adler-32 checksum is the same as the
CRC-16 check. received Adler-32 checksum, If not, the receiver MUST treat the
datagram as an invalid SCTP datagram.
The default procedure of handling invalid SCTP datagrams is to The default procedure of handling invalid SCTP datagrams is to
silently discard them. silently discard them.
5.9 Segmentation 5.9 Segmentation
Segmentation MUST be performed by the data sender if the user message Segmentation MUST be performed by the data sender if the user message
to be sent has a large size that causes the outbound SCTP datagram to be sent has a large size that causes the outbound SCTP datagram
size exceeding the current MTU. size exceeding the current MTU.
skipping to change at page 60, line 18 skipping to change at page 60, line 18
each of the DATA chunks in the series, each of the DATA chunks in the series,
3) the data sender MUST also set the B/E bits of the first DATA chunk 3) the data sender MUST also set the B/E bits of the first DATA chunk
in the series to '10', the B/E bits of the last DATA chunk in the in the series to '10', the B/E bits of the last DATA chunk in the
series to '01', and the B/E bits of all other DATA chunks in the series to '01', and the B/E bits of all other DATA chunks in the
series to '00'. series to '00'.
The data receiver MUST recognize the segmented DATA chunks, by The data receiver MUST recognize the segmented DATA chunks, by
examining the B/E bits in each of the received DATA chunks, and queue examining the B/E bits in each of the received DATA chunks, and queue
the segmented DATA chunks for re-assembly. Then, it shall pass the the segmented DATA chunks for re-assembly. Then, it shall pass the
re-assembled user message to the specific stream for re-ordering and re-assembled user message to the specific stream for possible
final dispatching. re-ordering and final dispatching.
Note, if the data receiver runs out of buffer space while still
waiting for more segments to complete the re-assembly of the message,
it should dispatch part of its inbound message through a partial
delivery API (see Section 9), freeing some of its receive buffer space
so that the rest of the message may be received.
5.10 Bundling and Multiplexing 5.10 Bundling and Multiplexing
An SCTP sender achieves data bundling by simply including multiple An SCTP sender achieves data bundling by simply including multiple
DATA chunks in one outbound SCTP datagram. Note that the total size of DATA chunks in one outbound SCTP datagram. Note that the total size of
the resultant IP datagram, including the SCTP datagram, and the UDP the resultant IP datagram, including the SCTP datagram and IP headers,
and IP headers, MUST be less or equal to the current MTU. MUST be less or equal to the current MTU.
Note, if the data receiver is multi-homed, the sender shall choose a Note, if the data receiver is multi-homed, the sender shall choose a
size no larger than the latest MTU of the current primary destination size no larger than the latest MTU of the current primary destination
address. address.
When multiplexing control chunks with DATA chunks, control chunks have When multiplexing control chunks with DATA chunks, control chunks have
the priority and MUST be placed first in the outbound SCTP datagram the priority and MUST be placed first in the outbound SCTP datagram
and be transmitted first. The transmitter MUST transmit DATA chunks and be transmitted first. The transmitter MUST transmit DATA chunks
within a SCTP datagram in increasing order of TSN. within a SCTP datagram in increasing order of TSN.
skipping to change at page 61, line 13 skipping to change at page 61, line 13
normal operations, that SCTP transmissions encounter severe congestion normal operations, that SCTP transmissions encounter severe congestion
condition. However SCTP must prepare itself for adverse operational condition. However SCTP must prepare itself for adverse operational
conditions, which can develop upon partial network failures or conditions, which can develop upon partial network failures or
unexpected traffic surge. In such situations SCTP must follow correct unexpected traffic surge. In such situations SCTP must follow correct
congestion control steps to recover from congestion quickly in order congestion control steps to recover from congestion quickly in order
to get data delivered as soon as possible. In the absence of network to get data delivered as soon as possible. In the absence of network
congestion, these preventive congestion control algorithms should show congestion, these preventive congestion control algorithms should show
no impact on the protocol performance. no impact on the protocol performance.
IMPLEMENTATION NOTE: as far as its specific performance requirements
are met, an implementation is always allowed to adopt a more
conservative congestion control algorithm than the one defined
below.
The congestion control algorithms used by SCTP are based on RFC 2581 The congestion control algorithms used by SCTP are based on RFC 2581
[3], "TCP Congestion Control". This section describes how the [3], "TCP Congestion Control". This section describes how the
algorithms defined in RFC 2581 are adopted for use in SCTP. We first algorithms defined in RFC 2581 are adopted for use in SCTP. We first
list differences in protocol designs between TCP and SCTP, and then list differences in protocol designs between TCP and SCTP, and then
describe SCTP's congestion control scheme. The description will use describe SCTP's congestion control scheme. The description will use
the same terminology as in TCP congestion control whenever the same terminology as in TCP congestion control whenever
appropriate. appropriate.
6.1 SCTP Differences from TCP Congestion control 6.1 SCTP Differences from TCP Congestion control
One difference from TCP is that Selective Acknowledgment function One difference between SCTP and TCP is that Selective Acknowledgment
(SACK) is designed into SCTP, rather than an enhancement that is added function (SACK) is designed into SCTP, rather than an enhancement that
to the protocol later as is the case for TCP. SCTP SACK carries is added to the protocol later as is the case for TCP. SCTP SACK
different semantic meanings from that of TCP SACK. TCP considers the carries different semantic meanings from that of TCP SACK. TCP
information carried in the SACK as advisory information only. In considers the information carried in the SACK as advisory information
SCTP, any DATA chunk that has been acknowledged by SACK, including only. In SCTP, any DATA chunk that has been acknowledged by SACK,
DATA that arrived at the receiving end out of order, are considered including DATA that arrived at the receiving end out of order, are
having been delivered to the destination application, and the sender considered having been delivered to the destination application, and
is free to discard the local copy. Consequently, the value of cwnd the sender is free to discard the local copy. Consequently, the value
controls the amount of outstanding data, rather than the upper bound of cwnd controls the amount of outstanding data, rather than the upper
between the highest acknowledged sequence number and the latest DATA bound between the highest acknowledged sequence number and the latest
chunk that can be sent within the congestion window, as is the case in DATA chunk that can be sent within the congestion window, as is the
TCP. SCTP SACK leads to different implementations of fast-retransmit case in TCP. SCTP SACK leads to different implementations of
and fast-recovery from that of TCP. fast-retransmit and fast-recovery from that of TCP.
The biggest difference between SCTP and TCP, however, is multi-homing. The biggest difference between SCTP and TCP, however, is multi-homing.
SCTP is designed to establish robust communication associations SCTP is designed to establish robust communication associations
between two end points each of which may be reachable by more than one between two end points each of which may be reachable by more than one
transport address. Potentially different addresses may lead to transport address. Potentially different addresses may lead to
distinguished data paths between the two points, thus ideally one may distinguished data paths between the two points, thus ideally one may
need a separate set of congestion control parameters for each of the need a separate set of congestion control parameters for each of the
paths. The treatment here of congestion control for multihomed paths. The treatment here of congestion control for multihomed
receivers is new with SCTP and may require refinement in the receivers is new with SCTP and may require refinement in the
future. The current algorithms make the following assumptions: future. The current algorithms make the following assumptions:
o The sender does not change the use of source address often,
if at all.
o The sender always uses the same destination address until being o The sender always uses the same destination address until being
instructed by the upper layer otherwise. instructed by the upper layer otherwise.
o The sender keeps a separate congestion control parameter set for each o The sender keeps a separate congestion control parameter set for each
of the destination addresses. The parameters should decay if the of the destination addresses. The parameters should decay if the
address is not used for a long enough time period. address is not used for a long enough time period.
o For each of the destination addresses, do slow-start upon the first o For each of the destination addresses, do slow-start upon the first
transmission to that address. transmission to that address.
6.2 SCTP Slow-Start and Congestion Avoidance 6.2 SCTP Slow-Start and Congestion Avoidance
The slow start and congestion avoidance algorithms MUST be used by a The slow start and congestion avoidance algorithms MUST be used by a
SCTP sender to control the amount of outstanding data being injected SCTP sender to control the amount of outstanding data being injected
into the network. The congestion control in SCTP is employed in regard into the network. The congestion control in SCTP is employed in regard
to the association, not to an individual stream. In some situations it to the association, not to an individual stream. In some situations it
may be beneficial for a SCTP sender to be more conservative than the may be beneficial for an SCTP sender to be more conservative than the
algorithms allow, however a SCTP sender MUST NOT be more aggressive than algorithms allow, however an SCTP sender MUST NOT be more aggressive
the following algorithms allow. than the following algorithms allow.
Like TCP, an SCTP sender uses the following three control variables to Like TCP, an SCTP sender uses the following three control variables to
regulate its transmission rate. regulate its transmission rate.
o Receiver advertised window size (rwnd, in octets), which is set by o Receiver advertised window size (rwnd, in octets), which is set by
the receiver based on its available buffer space for incoming packets. the receiver based on its available buffer space for incoming packets.
o Congestion control window (cwnd, in octets), which is adjusted by o Congestion control window (cwnd, in octets), which is adjusted by
the sender based on observed network conditions. the sender based on observed network conditions.
o Slow-start threshold (ssthresh, in octets), which is also used by o Slow-start threshold (ssthresh, in octets), which is used by the
the sender to distinguish congestion control and congestion sender to distinguish slow start and congestion avoidance phases.
avoidance phases.
SCTP also requires one additional control variable, partial_bytes_acked, SCTP also requires one additional control variable, partial_bytes_acked,
which is used during congestion avoidance phase to facilitate cwnd which is used during congestion avoidance phase to facilitate cwnd
adjustment. adjustment.
6.2.1 Slow-Start 6.2.1 Slow-Start
Beginning data transmission into a network with unknown conditions Beginning data transmission into a network with unknown conditions
requires SCTP to probe the network to determine the available capacity. requires SCTP to probe the network to determine the available capacity.
The slow start algorithm is used for this purpose at the beginning of a The slow start algorithm is used for this purpose at the beginning of a
transfer, or after repairing loss detected by the retransmission timer. transfer, or after repairing loss detected by the retransmission timer.
o The initial value of cwnd MUST be less than or equal to 2*MTU octets. o The initial cwnd before data transmission or after a sufficiently
long idle period MUST be <= 2*MTU.
o The initial cwnd after a retransmission timeout MUST be no more
than 1*MTU.
o The initial value of ssthresh MAY be arbitrarily high (for example, o The initial value of ssthresh MAY be arbitrarily high (for example,
some implementations use the size of the receiver advertised window). some implementations use the size of the receiver advertised window).
o Whenever cwnd is greater than zero, the sender is allowed to have cwnd o Whenever cwnd is greater than zero, the sender is allowed to have cwnd
octets of data outstanding on that transport address. octets of data outstanding on that transport address.
o When cwnd is less than or equal to ssthresh AND the sender has cwnd o When cwnd is less than or equal to ssthresh an SCTP sender MUST use
or more data outstanding on the transport address, cwnd is the slow start algorithm to increase cwnd (assuming the current
incremented by MTU for each SACK received which advances the congestion window is being fully utilized). If the incoming SACK
cumulative TSN of the transport address. advances the cumulative TSN, cwnd MUST be increased by at most the
lesser of 1) the total size of the previously outstanding DATA
chunk(s) covered by this advancement of the cumulative TSN, and 2)
the current MTU. This prevents against the ACK-Splitting attack
outlined in [15].
NOTE: because an SCTP data sender's cwnd is not tied to its
cumulative TSN point, as duplicate SACKs come in, even though they
may not advance the cumulative TSN point an SCTP sender can still
use them to clock out new data. That is, the data newly
acknowledged by the SACK diminishes the amount of data now in
flight to less than cwnd; and so the current, unchanged value of
cwnd now allows new data to be sent. On the other hand, the
increase of cwnd must be tied to the cumulative TSN advancement as
specified above. Otherwise the duplicate SACKs will not only clock
out new data, but also will adversely clock out *more* new data
than what has just left the network, during a time of possible
congestion.
o When the sender does not transmit data on a given transport address, o When the sender does not transmit data on a given transport address,
the cwnd of the transport address should be adjusted to the cwnd of the transport address should be adjusted to
max(cwnd / 2, 2*MTU) per RTO. max(cwnd / 2, 2*MTU) per RTO.
6.2.2 Congestion Avoidance 6.2.2 Congestion Avoidance
Whenever cwnd is increased to be greater than ssthresh, cwnd should be When cwnd is greater than ssthresh, cwnd should be incremented
incremented by MTU per RTT if at time the sender has cwnd or more by 1*MTU per RTT if the sender has cwnd or more octets of data
octets of data outstanding on that transport address. outstanding on the corresponding transport address.
In practice an implementation can achieve this goal in the In practice an implementation can achieve this goal in the
following way: following way:
o partial_bytes_acked is initialized to 0. o partial_bytes_acked is initialized to 0.
o Whenever cwnd is greater than ssthresh, upon each SACK arrival, o Whenever cwnd is greater than ssthresh, upon each SACK arrival,
increase partial_bytes_acked by the total number of octets of all increase partial_bytes_acked by the total number of octets of all
new chunks acknowledged in that SACK. new chunks acknowledged in that SACK.
skipping to change at page 63, line 48 skipping to change at page 63, line 65
6.2.3 Congestion Control 6.2.3 Congestion Control
Upon detection of packet losses from SACK, the sender should do the Upon detection of packet losses from SACK, the sender should do the
following: following:
ssthresh = max(cwnd/2, 2*MTU) ssthresh = max(cwnd/2, 2*MTU)
cwnd = ssthresh cwnd = ssthresh
Basically, a packet loss causes cwnd to be cut in half. Basically, a packet loss causes cwnd to be cut in half.
When the T3-rxt timer expires, SCTP should perform slow start by When the T3-rxt timer expires, SCTP should perform slow start by:
setting cwnd = MTU, and assuring that no more than one data packet
will be in flight until the sender receives acknowledgment for ssthresh = max(cwnd/2, 2*MTU)
successful delivery. cwnd = 1*MTU
and assuring that no more than one data packet will be in flight until
the sender receives acknowledgment for successful delivery.
6.2.4 Fast Retransmit on Gap Reports 6.2.4 Fast Retransmit on Gap Reports
In the absence of data losses, a SCTP receiver performs delayed In the absence of data losses, a SCTP receiver performs delayed
acknowledgment. However whenever a receiver notices a hole in the acknowledgment. However, whenever a receiver notices a hole in the
arriving TSN sequence, it should start sending a SACK for every arriving TSN sequence, it should start sending a SACK back every time
packet arrival. a packet arrives carrying data.
At the sender end, whenever the sender notices a hole in a SACK, it At the sender end, whenever the sender receives a SACK that indicate
should wait for 3 further SACKs before taking action. If the 3 some TSN(s) missing, it SHOULD wait for 3 further miss indications
subsequent SACKs report the same TSN(s) missing, the sender shall: (via subsequent SACKs) on the same TSN(s) before taking action.
When the TSN(s) is reported as missing in consecutive SACKs for the
4th time, the sender shall:
1) Mark the missing DATA chunk(s) for retransmission, 1) Mark the missing DATA chunk(s) for retransmission,
2) Adjust the ssthresh and cwnd of the destination address(es) where 2) Adjust the ssthresh and cwnd of the destination address(es) where
the missing data chunks were last sent, according to the formula the missing data chunks were last sent, according to the formula
described in Section 6.2.3. described in Section 6.2.3.
3) Determine how many of the earliest (i.e., lowest TSN) missing Data 3) Determine how many of the earliest (i.e., lowest TSN) missing Data
chunks will fit into a single packet, subject to constraint of the chunks will fit into a single packet, subject to constraint of the
path MTU of the destination transport address to which the packet path MTU of the destination transport address to which the packet
skipping to change at page 64, line 48 skipping to change at page 65, line 7
keeps a counter for each TSN hole first reported by a SACK; the keeps a counter for each TSN hole first reported by a SACK; the
counter keeps track of whether 3 subsequent SACKs have reported the counter keeps track of whether 3 subsequent SACKs have reported the
same hole. same hole.
Because cwnd in SCTP indirectly bounds the number of outstanding Because cwnd in SCTP indirectly bounds the number of outstanding
TSN's, the effect of TCP fast-recovery is achieved automatically with TSN's, the effect of TCP fast-recovery is achieved automatically with
no adjustment to the congestion control window size. no adjustment to the congestion control window size.
6.3 Path MTU Discovery 6.3 Path MTU Discovery
IMPLEMENTATION NOTE: in some operating systems, protocols sitting on
top of UDP may not have access to the IP "Don't Fragment bit", nor
do they have easy access to the ICMP messages. This can make the path
MTU discovery difficult to realize. It is RECOMMENDED that in such a
case a fixed MTU of at most 512 octets should be used by the SCTP
data sender.
RFC 1191 [11] discusses "Path MTU Discovery", whereby a sender RFC 1191 [11] discusses "Path MTU Discovery", whereby a sender
maintains an estimate of the maximum transmission unit (MTU) along a maintains an estimate of the maximum transmission unit (MTU) along a
given Internet path and refrains from sending datagrams along that given Internet path and refrains from sending datagrams along that
path which exceed the MTU, other than occasional attempts to probe for path which exceed the MTU, other than occasional attempts to probe for
a change in the path MTU. RFC 1191 is thorough in its discussion of a change in the path MTU. RFC 1191 is thorough in its discussion of
the MTU discovery mechanism and strategies for determining the current the MTU discovery mechanism and strategies for determining the current
end-to-end MTU setting as well as detecting changes in this value. end-to-end MTU setting as well as detecting changes in this value.
RFC 1981 discusses applying the same mechanisms for IPv6. RFC 1981 discusses applying the same mechanisms for IPv6.
An SCTP sender SHOULD apply these techniques, and SHOULD do so on a An SCTP sender SHOULD apply these techniques, and SHOULD do so on a
skipping to change at page 66, line 8 skipping to change at page 66, line 8
7.1 Endpoint Failure Detection 7.1 Endpoint Failure Detection
The data sender shall keep a counter on the total number of The data sender shall keep a counter on the total number of
consecutive retransmissions to its peer (including retransmissions to consecutive retransmissions to its peer (including retransmissions to
ALL the destination transport addresses of the peer if it is ALL the destination transport addresses of the peer if it is
multi-homed). multi-homed).
If the value of this counter exceeds the limit indicated in the If the value of this counter exceeds the limit indicated in the
protocol parameter 'Association.Max.Retrans', the data sender shall protocol parameter 'Association.Max.Retrans', the data sender shall
consider the peer endpoint unreachable and shall stop transmitting any consider the peer endpoint unreachable and shall stop transmitting any
more data to it. In addition, the data sender shall report the failure more data to it (and thus the association enters the CLOSED state). In
to the upper layer, and optionally report back all outstanding addition, the data sender shall report the failure to the upper layer,
datagrams remaining in its outbound queue. and optionally report back all outstanding user data remaining in its
outbound queue. The association is automatically terminated when the
peer endpoint becomes unreachable.
The counter shall be reset each time a datagram sent to that The counter shall be reset each time a datagram sent to that
destination address is acknowledged by the peer endpoint. destination address is acknowledged by the peer endpoint.
7.2 Path Failure Detection 7.2 Path Failure Detection
When the remote endpoint is multi-homed, the data sender should keep a When the remote endpoint is multi-homed, the data sender should keep a
'retrans.count' counter for each of the destination transport 'retrans.count' counter for each of the destination transport
addresses of the remote endpoint. addresses of the remote endpoint.
Each time the data sender retransmits an outstanding datagram, the Each time the data sender retransmits an outstanding datagram, the
'retrans.count' counter of the destination address, to which the 'retrans.count' counter of the destination address, to which the
datagram was previously sent, will be incremented. When the value in datagram was previously sent, will be incremented. When the value in
'retrans.count' exceeds the protocol parameter 'Path.Max.Retrans' of 'retrans.count' exceeds the protocol parameter 'Path.Max.Retrans' of
that destination address, the data sender should mark the destination that destination address, the data sender should mark the destination
transport address as inactive, and a notification SHOULD be transport address as inactive, and a notification SHOULD be
sent to the upper layer. sent to the upper layer.
When an outstanding datagram is acknowledged, the data sender shall When an outstanding TSN is acknowledged, the data sender shall clear
clear the 'retrans.count' counter of the destination transport address the 'retrans.count' counter of the destination transport address to
to which the datagram was last sent. which the datagram was last sent. Note, when the data receiver is
multi-homed and the last sent was a retransmission to an alternate
address of the receiver, there exists an ambiguity as to whether or
not the acknowledgment should be credited to the address of the last
sent. However, this ambiguity does not seem to bear any significant
consequence to SCTP behavior. If this ambiguity is undesirable, the
data sender may choose not to clear the 'retrans.count' counter if the
last sent was a retransmission.
Note, when configuring the SCTP endpoint, the user should avoid
having the value of 'Association.Max.Retrans' larger than the
summation of the 'Path.Max.Retrans' of all the destination addresses
for the remote endpoint. Otherwise, all the destination addresses may
become inactive while the endpoint still considers the peer endpoint
reachable. When this condition occurs, how the SCTP chooses to function
is implemenation specific.
Note, when the primary destination address is marked inactive (due to
excessive retransmissions, for instance), the sender MAY automatically
transmit new datagrams to an alternate destination address if one
exists and is active. This is, howerver, an implementation option.
7.3 Path Heartbeat 7.3 Path Heartbeat
By default, an SCTP endpoint shall monitor the reachability of the By default, an SCTP endpoint shall monitor the reachability of the
idle destination transport address(es) of its peer by sending idle destination transport address(es) of its peer by sending
HEARTBEAT messages periodically to the destination transport HEARTBEAT messages periodically to the destination transport
address(es). address(es).
A destination transport address is considered "idle" if no user data A destination transport address is considered "idle" if no new chunk
and no heartbeat has been sent to it within the current heartbeat which can be used for updating path RTT (usually including first
period of that address. This applies to both active and inactive transmission DATA, INIT, COOKIE, etc.) and no heartbeat has been sent
destination addresses. to it within the current heartbeat period of that address. This
applies to both active and inactive destination addresses.
The upper layer can optionally initiate the following functions: The upper layer can optionally initiate the following functions:
A) disable heart beat on a specific destination transport address of a A) disable heart beat on a specific destination transport address of a
given association, given association,
B) re-enable heart beat on a specific destination transport address of B) re-enable heart beat on a specific destination transport address of
a given association, and, a given association, and,
C) request an on-demand heartbeat on a specific destination transport C) request an on-demand heartbeat on a specific destination transport
address of a given association. address of a given association.
The endpoint should keep a 'heartbeat.sent.count' counter for each The endpoint should increment the respective 'retrans.count' counter
destination transport address to record the number of HEARTBEAT of the destination transport address each time a HEARTBEAT is sent to
messages sent to that destination transport address yet not that address.
acknowledged upon.
When the value of this counter reaches the protocol parameter When the value of this counter reaches the protocol parameter
'Path.Max.Retrans', the endpoint should mark the corresponding 'Path.Max.Retrans', the endpoint should mark the corresponding
destination address as inactive if it is not so marked, and may also destination address as inactive if it is not so marked, and may also
optionally report to the upper layer the change of reachability of optionally report to the upper layer the change of reachability of
this destination address. this destination address. After this, the endpoint should continue
heartbeat on this destination address but should stop increasing the
counter.
The sender of the HEARTBEAT message should include in the Heartbeat The sender of the HEARTBEAT message should include in the Heartbeat
Information field of the message the current time when the message is Information field of the message the current time when the message is
sent out and the information on the destination address to which the sent out and the information on the destination address to which the
message is sent. message is sent.
The receiver of the HEARTBEAT should immediately respond with a The receiver of the HEARTBEAT should immediately respond with a
HEARTBEAT ACK that contains the Heartbeat Information field copied out HEARTBEAT ACK that contains the Heartbeat Information field copied out
from the received HEARTBEAT message. from the received HEARTBEAT message.
Upon the receipt of the HEARTBEAT ACK, the sender of the HEARTBEAT Upon the receipt of the HEARTBEAT ACK, the sender of the HEARTBEAT
should clear the 'heartbeat.sent.count' of the destination transport should clear the 'retrans.count' counter of the destination transport
address to which the HEARTBEAT was sent, and mark the destination address to which the HEARTBEAT was sent, and mark the destination
transport address as active if it is not so marked. The endpoint may transport address as active if it is not so marked. The endpoint may
optionally report to the upper layer when an inactive destination optionally report to the upper layer when an inactive destination
address is marked as active due to the reception of the latest address is marked as active due to the reception of the latest
HEARTBEAT ACK. HEARTBEAT ACK.
The receiver of the HEARTBEAT ACK should also perform an RTT The receiver of the HEARTBEAT ACK should also perform an RTT
measurement for that destination transport address using the time measurement for that destination transport address using the time
value carried in the HEARTBEAT ACK message. value carried in the HEARTBEAT ACK message.
On an idle destination address that is allowed to heartbeat, HEARTBEAT On an idle destination address that is allowed to heartbeat, HEARTBEAT
messages is RECOMMENDED to be sent once per RTO of that destination messages is RECOMMENDED to be sent once per RTO of that destination
address, with jittering of +/- 50%, and exponential back-off if the address, with jittering of +/- 50%, and exponential back-off if the
previous HEARTBEAT is unanswered. previous HEARTBEAT is unanswered.
A primitive should been provided for the SCTP user to change the heart A primitive is provided for the SCTP user to change the heart
beat interval and turn on or off the heart beat on a given destination beat interval and turn on or off the heart beat on a given destination
address. Note, the heartbeat interval set by the SCTP user on any of address. Note, the heartbeat interval set by the SCTP user on any of
the idle destination addresses SHOULD be no smaller than the RTO of the idle destination addresses SHOULD be no smaller than the RTO of
that distination address. Separate timers may be used to control the that distination address. Separate timers may be used to control the
heartbeat transmission for different idle destination addresses. heartbeat transmission for different idle destination addresses.
7.4 Verification Tag 7.4 Handle "Out of the blue" Packets
Except for INIT, the sender of any SCTP datagram MUST include the An SCTP datagram is called an "out of the blue" (OOTB) datagram if it
destination endpoint's Tag in the Verification Tag field of the is correctly formed, i.e., passed the receiver's Adler-32 check (see
message. In the case of INIT, the sender should set the Verification Section 5.8), but the receiver is not able to identify the association
to which this datagram belongs.
Tag to 0. The receiver of an OOTB datagram MUST do the following:
When sending a SHUTDOWN ACK message, the sender is allowed to either 1) check if the OOTB datagram contains an ABORT chunk. If so, the
to use the destination endpoint's Tag or fill the Verification Tag receiver MUST silently discarded the OOTB datagram and take no
field with 0. futher action. Otherwise,
When receiving an SCTP datagram (except for INIT and SHUTDOWN ACK), 2) the receiver should respond the sender of the OOTB datagram with an
the receiver MUST ensure that the value in the Verification Tag field ABORT. When sending the ABORT, the receiver of the OOTB datagram
of the received message matches its own Tag. If the values do not MUST fill in the Verification Tag field of the outbound datagram
match, the receiver shall silently discard the datagram and shall NOT with the value found in the Verification Tag field of the OOTB
process it. datagram. After sending this ABORT, the receiver of the OOTB
datagram shall discard the OOTB datagram and take no further
action.
The receiver of a SHUTDOWN ACK message shall accept the message 7.5 Verification Tag
regardless the Verification Tag field is filled with the correct Tag
or 0x0. The Verification Tag rules defined in this section apply when sending
or receiving SCTP datagrams which do NOT contain an INIT, SHUTDOWN
ACK, or ABORT chunk. The rules for sending and receiving SCTP
datagrams containing one of these chunk types are discussed separately
in Section 7.5.1.
When sending an SCTP datagram, the sender MUST fill in the
Verification Tag field of the outbound datagram with the tag value of
the peer endpoint to which this SCTP datagram is destinated.
When receiving an SCTP datagram, the receiver MUST ensure that the
value in the Verification Tag field of the received SCTP datagram
matches its own Tag. If the received tag value does not match the
receiver's own tag value, the receiver shall silently discard the
datagram and shall not process it any further.
7.5.1 Exceptions in Verification Tag Rules
A) Rules for datagram carrying INIT:
- The sender MUST set the Verification Tag of the datagram to 0.
- The receiver, when noticing an incoming SCTP datagram with the
Verification Tag set to 0, should continue to process the datagram
only if an INIT chunk is present. Otherwise, the receiver MUST
silently discard the datagram and take no further action.
B) Rules for datagram carrying ABORT:
- The sender shall always fill in the Verification Tag field of the
outbound datagram with the destination endpoint's tag value if it
is known.
- If the ABORT is sent in response to an OOTB datagram, the sender
MUST follow the procedure described in Section 7.4.
- The receiver MUST accept the datagram IF the Verification Tag
matches either its own tag, OR the tag of one of its existing
peers. Otherwise, the receiver MUST silently discard the datagram
and take no further action.
C) Rules for datagram carrying SHUTDOWN ACK:
- When sending a SHUTDOWN ACK, the sender is allowed to either use
the destination endpoint's tag or set the Verification Tag field
of the outbound datagram to 0.
- The receiver of a SHUTDOWN ACK shall accept the datagram IF the
Verification Tag field of the datagram matches its own tag OR is
set to 0. Otherwise, the receiver MUST silently discard the
datagram and take no further action.
8. Termination of Association 8. Termination of Association
All existing associations should be terminated when an endpoint exits All existing associations should be terminated when an endpoint exits
from service. An association can be terminated by either close or from service. An association can be terminated by either close or
shutdown. shutdown.
8.1 Close of an Association 8.1 Close of an Association
When an endpoint decides to close down an association, it shall send When an endpoint decides to close down an existing association, it
an ABORT message to its peer endpoint. shall send an ABORT message to its peer endpoint. The sender MUST fill
in the peer's Verification Tag in the outbound datagram and MUST NOT
bundle any other chunk with the ABORT.
No acknowledgment is required for ABORT message. When the peer No acknowledgment is required for an ABORT message. In any
endpoint receives the Abort, after checking the Verification Tag, circumstances, an endpoint MUST NOT respond to any received datagram
the peer shall remove the association from its record, and shall that contains an ABORT with its own ABORT (also see Section 7.4).
report the termination to its upper layer.
The receiver shall apply the special Verification Tag check rules
described in Section 7.5.1 when handling the datagram carrying an
ABORT.
After checking the Verification Tag, the peer shall remove the
association from its record, and shall report the termination to its
upper layer.
8.2 Shutdown of an Association 8.2 Shutdown of an Association
An endpoint in an association may decide to gracefully shutdown the Using the TERMINATE primitive (see Section 9.1), the upper layer of an
association. This will guarantee that all outstanding datagrams from endpoint in an association can gracefully shutdown the association.
the peer of the shutdown initiator be delivered before the association This will guarantee that all outstanding datagrams from the peer of
the shutdown initiator be delivered before the association
terminates. terminates.
The initiator shall send a SHUTDOWN message to the peer of the Upon receipt of the TERMINATE primitive from its upper layer, the
association, and shall include the last cumulative TSN it has initiator endpoint enters SHUTDOWN-PENDING state and remains there
received from the peer in the 'Cumulative TSN ACK' field. It until all outstanding TSNs have been acknowledged by the far end. It
shall then start the T2-shutdown timer and enter the Shutdown-SENT accepts no new data from its upper layer, but retransmits data to the
state. If the timer expires, the initiator must re-send the SHUTDOWN far end if necessary to fill gaps.
with the updated last TSN received from its peer. When retransmitting
the SHUTDOWN, the rules in 5.3 SHALL be followed to determine the Once all outstanding TSNs have been acknowledged, the initiator
proper timer value. The sender of the SHUTDOWN message may also endpoint shall send a SHUTDOWN message to the peer of the association,
and shall include the last cumulative TSN it has received from the
peer in the 'Cumulative TSN ACK' field. It shall then start the
T2-shutdown timer and enter the Shutdown-sent state. If the timer
expires, the initiator must re-send the SHUTDOWN with the updated last
TSN received from its peer.
The same rules in 5.3 SHALL be followed to determine the proper timer
value for T2-shutdown. The sender of the SHUTDOWN message may also
optionally include a SACK to indicate any gaps by bundling both the optionally include a SACK to indicate any gaps by bundling both the
SACK and SHUTDOWN message together. SACK and SHUTDOWN message together.
Note the sender of a shutdown should limit the number of Note the sender of a shutdown should limit the number of
retransmissions of the shutdown message to the protocol parameter retransmissions of the shutdown message to the protocol parameter
'Association.Max.Retrans'. If this threshold is exceeded the endpoint 'Association.Max.Retrans'. If this threshold is exceeded the endpoint
should destroy the TCB and may report the endpoint unreachable to the should destroy the TCB and may report the endpoint unreachable to the
upper layer. upper layer (and thus the association enters the CLOSED state).
Upon the reception of the SHUTDOWN, the peer shall enter the Upon the reception of the SHUTDOWN, the peer shall enter the
Shutdown-received state, and shall verify, by checking the TSN ACK Shutdown-received state, and shall verify, by checking the TSN ACK
field of the message, that all its outstanding datagrams have been field of the message, that all its outstanding datagrams have been
received by the initiator. received by the initiator.
If there are still outstanding datagrams left, the peer shall mark If there are still outstanding datagrams left, the peer shall mark
them for retransmission and start the retransmit procedure as defined them for retransmission and start the retransmit procedure as defined
in Section 5.3. in Section 5.3.
While in Shutdown-SENT state, the initiator shall immediately respond While in Shutdown-sent state, the initiator shall immediately respond
to each inbound user datagram from the peer with a SACK and restart to each inbound SCTP datagram containing user data from the peer with
the T2-shutdown timer. a SACK and restart the T2-shutdown timer.
If there is no more outstanding datagrams, the peer shall send a If there is no more outstanding datagrams, the peer shall send a
SHUTDOWN ACK and then remove all record of the association. SHUTDOWN ACK and then remove all record of the association.
Upon the receipt of the SHUTDOWN ACK, the initiator shall stop the Upon the receipt of the SHUTDOWN ACK, the initiator shall stop the
T2-shutdown timer and remove all record of the association. T2-shutdown timer and remove all record of the association.
Note: that it should be the responsibility of the initiator to assure Note: that it should be the responsibility of the initiator to assure
that all the outstanding datagrams on its side have been resolved that all the outstanding datagrams on its side have been resolved
before it initiates the shutdown procedure. before it initiates the shutdown procedure.
Note: an endpoint shall reject any new data request from its upper Note: an endpoint shall reject any new data request from its upper
layer if it is Shutdown-SENT or Shutdown-RECEIVED state until layer if it is in Shutdown-sent or Shutdown-received state until
completion of the sequence. completion of the sequence.
Note: if an endpoint is in a Shutdown-SENT state and receives an INIT Note: if an endpoint is in Shutdown-sent state and receives an INIT
message from its peer, it should discard the INIT message and message from its peer, it should discard the INIT message and
retransmit the shutdown message. The sender of the INIT should respond retransmit the shutdown message. The sender of the INIT should respond
with a stand-alone SHUTDOWN ACK in an SCTP datagram with the with a stand-alone SHUTDOWN ACK in an SCTP datagram with the
Verification Tag field of its common header set to 0, and let the Verification Tag field of its common header set to 0, and let the
normal T1-init timer cause the INIT message to be retransmitted and normal T1-init timer cause the INIT message to be retransmitted and
thus restart the association. thus restart the association.
Note: if an endpoint is in Shutdown-sent state and receives a
SHUTDOWN message from its peer, the endpoint shall respond
immediately with a SHUTDOWN ACK and shall stop the T2-shutdown timer
and remove all record of the association.
9. Interface with Upper Layer 9. Interface with Upper Layer
The Upper Layer Protocols (ULP) shall request for services by passing The Upper Layer Protocols (ULP) shall request for services by passing
primitives to SCTP and shall receive notifications from SCTP for primitives to SCTP and shall receive notifications from SCTP for
various events. various events.
The primitives and notifications described in this section should be The primitives and notifications described in this section should be
used as a guideline for implementing SCTP. The following functional used as a guideline for implementing SCTP. The following functional
description of ULP interface primitives is, at best, fictional. We description of ULP interface primitives is, at best, fictional. We
must warn readers that different SCTP implementations may have must warn readers that different SCTP implementations may have
skipping to change at page 70, line 27 skipping to change at page 70, line 27
The notation used is similar to most procedure or function calls in The notation used is similar to most procedure or function calls in
high level languages. high level languages.
The ULP primitives described below specify the basic functions the The ULP primitives described below specify the basic functions the
SCTP must perform to support inter-process communication. Individual SCTP must perform to support inter-process communication. Individual
implementations must define their own exact format, and may provide implementations must define their own exact format, and may provide
combinations or subsets of the basic functions in single calls. combinations or subsets of the basic functions in single calls.
A) Initialize A) Initialize
Format: INITIALIZE ([local port], [local eligible address list]) Format: INITIALIZE ([local port], [local eligible address ])
-> local SCTP instance name -> local SCTP instance name
This primitive allows SCTP to initialize its internal data structures This primitive allows SCTP to initialize its internal data structures
and allocate necessary resources for setting up its operation and allocate necessary resources for setting up its operation
environment. Note that once SCTP is initialized, ULP can communicate environment. Note that once SCTP is initialized, ULP can communicate
directly with other endpoints without re-invoking this primitive. directly with other endpoints without re-invoking this primitive.
A local SCTP instance name will be returned to the ULP by the SCTP. A local SCTP instance name will be returned to the ULP by the SCTP.
Mandatory attributes: Mandatory attributes:
None. None.
Optional attributes: Optional attributes:
The following types of attributes may be passed along with the The following types of attributes may be passed along with the
primitive: primitive:
o local port - UDP port number, if ULP wants it to be specified; o local port - SCTP port number, if ULP wants it to be specified;
o local eliglible address list - A list of eliglible IP addresses o local eliglible address - A single address that the local SCTP
that the local SCTP endpoint should bind. By default all transport endpoint should bind. By default all transport interface cards
interface cards should be used by the local endpoint if no list is should be used by the local endpoint.
given.
IMPLEMENTAION NOTE: if this optional attribute is supported by an IMPLEMENTAION NOTE: if this optional attribute is supported by an
implementation, it will be the responsibility of the implementation implementation, it will be the responsibility of the implementation
to enforce that the IP source address field of any SCTP datagrams to enforce that the IP source address field of any SCTP datagrams
sent out by this endpoint MUST contain one of the IP addresses sent out by this endpoint MUST contain the IP addresses
indicated on the local eligible address list. This enforcement may indicated in the local eligible address.
be difficult on ceitein operating systems.
B) Associate B) Associate
Format: ASSOCIATE(local SCTP instance name, destination transport Format: ASSOCIATE(local SCTP instance name, destination transport
addr, outbound stream count [,destination eligible transport addr addr, outbound stream count [,destination eligible transport addr
list]) list])
-> association id [,destination transport addr list] [,outbound stream -> association id [,destination transport addr list] [,outbound stream
count] count]
This primitive allows the upper layer to initiate an association to a This primitive allows the upper layer to initiate an association to a
skipping to change at page 72, line 32 skipping to change at page 72, line 32
o destination eligible transport addr list - a list of transport o destination eligible transport addr list - a list of transport
addresses that the local endpoint is allowed to use for sending addresses that the local endpoint is allowed to use for sending
datagrams to this peer. By default, all transport addresses datagrams to this peer. By default, all transport addresses
indicated by the peer in its INIT ACK message can be used. indicated by the peer in its INIT ACK message can be used.
C) Terminate C) Terminate
Format: TERMINATE(association id) Format: TERMINATE(association id)
-> result -> result
Gracefully terminates an association. Any locally queued datagrams Gracefully terminates an association. Any locally queued user data
will be delivered to the peer. The association will be terminated only will be delivered to the peer. The association will be terminated only
after the peer acknowledges all the messages sent. A success code after the peer acknowledges all the messages sent. A success code
will be returned on successful termination of the association. If will be returned on successful termination of the association. If
attempting to terminate the association results in a failure, an error attempting to terminate the association results in a failure, an error
code shall be returned. code shall be returned.
Mandatory attributes: Mandatory attributes:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
Optional attributes: Optional attributes:
None. None.
D) Abort D) Abort
Format: ABORT(association id) Format: ABORT(association id)
-> result -> result
Ungracefully terminates an association. Any locally queued datagrams Ungracefully terminates an association. Any locally queued user data
will be discarded and an ABORT message is sent to the peer. A success will be discarded and an ABORT message is sent to the peer. A success
code will be returned on successful abortion of the association. If code will be returned on successful abortion of the association. If
attempting to abort the association results in a failure, an error attempting to abort the association results in a failure, an error
code shall be returned. code shall be returned.
Mandatory attributes: Mandatory attributes:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
skipping to change at page 73, line 30 skipping to change at page 73, line 30
[,stream id] [,life time] [,destination transport address] [,un-order [,stream id] [,life time] [,destination transport address] [,un-order
flag] [,no-bundle flag]) flag] [,no-bundle flag])
-> result -> result
This is the main method to send user data via SCTP. This is the main method to send user data via SCTP.
Mandatory attributes: Mandatory attributes:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
o buffer address - the location where the user data to be transmitted o buffer address - the location where the user message to be
is stored; transmitted is stored;
o byte count - The size of the user data in number of octets; o byte count - The size of the user data in number of octets;
Optional attributes: Optional attributes:
o context - optional information that will be carried in the o context - optional information that will be carried in the
sending failure notification to the ULP if the transportation of sending failure notification to the ULP if the transportation of
this datagram fails. this datagram fails.
o stream id - to indicate which stream to send the data on. If not o stream id - to indicate which stream to send the data on. If not
specified, stream 0 will be used. specified, stream 0 will be used.
o life time - specifies the life time of the user date. The user data o life time - specifies the life time of the user data. The user data
will not be sent by SCTP after the life time expires. This will not be sent by SCTP after the life time expires. This
parameter can be used to avoid efforts to transmit stale parameter can be used to avoid efforts to transmit stale
datagrams. SCTP notifies the ULP, if the data cannot be user messages. SCTP notifies the ULP, if the data cannot be
initiated to transport (i.e. sent to the destination via SCTP's initiated to transport (i.e. sent to the destination via SCTP's
send primitive) within the life time variable. However, the send primitive) within the life time variable. However, the
user data will be transmitted if a TSN has been assigned to the user data will be transmitted if a TSN has been assigned to the
user data before the life time expired. user data before the life time expired.
o destination transport address - specified as one of the destination o destination transport address - specified as one of the destination
transport addresses of the peer endpoint to which this message transport addresses of the peer endpoint to which this message
should be sent. Whenever possible, SCTP should use this destination should be sent. Whenever possible, SCTP should use this destination
transport address for sending the datagram, instead of the current transport address for sending the datagram, instead of the current
primary destination transport address. primary destination transport address.
skipping to change at page 74, line 39 skipping to change at page 74, line 39
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
o destination transport address - specified as one of the transport o destination transport address - specified as one of the transport
addresses of the peer endpoint, which should be used as primary addresses of the peer endpoint, which should be used as primary
address for sending datagrams. This overrides the current primary address for sending datagrams. This overrides the current primary
address information maintained by the local SCTP endpoint. address information maintained by the local SCTP endpoint.
G) Receive G) Receive
Format: RECEIVE(association id, buffer address, buffer size [,stream id]) Format: RECEIVE(association id, buffer address, buffer size
[,stream id])
-> byte count [,transport address] [,stream id] [,sequence number] -> byte count [,transport address] [,stream id] [,sequence number]
[,partial flag] [, delivery number]
This primitive shall read the first datagram in the SCTP in-queue to This primitive shall read the first user message in the SCTP in-queue
ULP, if there is one available, into the specified buffer. The size of to ULP, if there is one available, into the specified buffer. The size
the datagram read, in octets, will be returned. It may, depending on of the message read, in octets, will be returned. It may, depending on
the specific implementation, also return other information such as the the specific implementation, also return other information such as the
sender's address, the stream id on which it is received, whether there sender's address, the stream id on which it is received, whether there
are more datagrams available for retrieval, etc. For ordered messages, are more messages available for retrieval, etc. For ordered messages,
their sequence number may also be returned. their sequence number may also be returned.
Depending upon the implementation, if this primitive is invoked when Depending upon the implementation, if this primitive is invoked when
no datagram is available the implementation should return an no message is available the implementation should return an indication
indication of this condition or should block the invoking process of this condition or should block the invoking process until data does
until data does become available. become available.
Mandatory attributes: Mandatory attributes:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
o buffer address - the memory location indicated by the ULP to store o buffer address - the memory location indicated by the ULP to store
the received datagram. the received message.
o buffer size - the maximum size of data to be received, in octets. o buffer size - the maximum size of data to be received, in octets.
Optional attributes: Optional attributes:
o stream id - to indicate which stream to receive the data on. o stream id - to indicate which stream to receive the data on.
o sequence number - the stream sequence number assigned by the
sending SCTP peer.
o partial flag - if this returned flag is set to 1, then this
message is a partial delivery of the whole message. When
this flag is set, the stream id and sequence number MUST
accompany this receive. When this flag is set to 0, it indicates
that no more deliveries will be received for this sequence number.
H) Status H) Status
Format: STATUS(association id) Format: STATUS(association id)
-> status data -> status data
This primitive should return a data block containing the following This primitive should return a data block containing the following
information: information:
association connection state, association connection state,
destination transport address list, destination transport address list,
destination transport address reachability state, destination transport address reachability state,
skipping to change at page 76, line 26 skipping to change at page 76, line 26
transport address (either enabled or disabled). transport address (either enabled or disabled).
Optional attributes: Optional attributes:
o interval - if present, indicates the frequence of the heart beat if o interval - if present, indicates the frequence of the heart beat if
this is to enable heart beat on a destination transport this is to enable heart beat on a destination transport
address. Default interval is the RTO of the destination address. address. Default interval is the RTO of the destination address.
J) Request HeartBeat J) Request HeartBeat
Format: REQUESTHEARTBEAT(association id, destination transport address) Format: REQUESTHEARTBEAT(association id, destination transport
address)
-> result -> result
Instructs the local endpoint to perform a HeartBeat on the specified Instructs the local endpoint to perform a HeartBeat on the specified
destination transport address of the given association. The returned destination transport address of the given association. The returned
result should indicate whether the transmission of the HEARTBEAT result should indicate whether the transmission of the HEARTBEAT
message to the destination address is successful. message to the destination address is successful.
Mandatory attributes: Mandatory attributes:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
skipping to change at page 77, line 4 skipping to change at page 77, line 4
-> srtt result -> srtt result
Instructs the local SCTP to report the current SRTT measurement on the Instructs the local SCTP to report the current SRTT measurement on the
specified destination transport address of the given association. The specified destination transport address of the given association. The
returned result can be an intager containing the most recent SRTT in returned result can be an intager containing the most recent SRTT in
milliseconds. milliseconds.
Mandatory attributes: Mandatory attributes:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
o destinatoin transport address - the transport address of the o destination transport address - the transport address of the
association on which the SRTT measurement is to be reported. association on which the SRTT measurement is to be reported.
L) Set Failure Threshould L) Set Failure Threshould
Format: SETFAILURETHRESHOLD(association id, destination transport Format: SETFAILURETHRESHOLD(association id, destination transport
address, failure threshold) address, failure threshold)
-> result -> result
This primitive allows the local SCTP to customize the reachability This primitive allows the local SCTP to customize the reachability
failure detection threshold 'Path.Max.Retrans' for the specified failure detection threshold 'Path.Max.Retrans' for the specified
skipping to change at page 77, line 42 skipping to change at page 77, line 42
This primitive allows the local SCTP to customize the protocol This primitive allows the local SCTP to customize the protocol
parameters. parameters.
Mandatory attributes: Mandatory attributes:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
o protocol parameter list - The specific names and values of the o protocol parameter list - The specific names and values of the
protocol parameters (e.g., RTO.Initial, Association.Max.Retrans protocol parameters (e.g., RTO.Initial, Association.Max.Retrans
[see Section 12]) that the SCTP user wishes to customized. [see Section 12]) that the SCTP user wishes to customize.
Optional attributes: Optional attributes:
o destination transport address - some of the protocol parameters may o destination transport address - some of the protocol parameters may
be set on a per destination transport address basis. be set on a per destination transport address basis.
9.2 SCTP-to-ULP 9.2 SCTP-to-ULP
It is assumed that the operating system or application environment It is assumed that the operating system or application environment
provides a means for the SCTP to asynchronously signal the ULP provides a means for the SCTP to asynchronously signal the ULP
process. When SCTP does signal an ULP process, certain information is process. When SCTP does signal an ULP process, certain information is
passed to the ULP. passed to the ULP.
A) DATA ARRIVE notification A) DATA ARRIVE notification
SCTP shall invoke this notification on the ULP when a datagram is SCTP shall invoke this notification on the ULP when a user message is
successfully received and ready for retrieval. successfully received and ready for retrieval.
The following may be optionally be passed with the notification: The following may be optionally be passed with the notification:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
o stream id - to indicate which stream the data is received on. o stream id - to indicate which stream the data is received on.
B) SEND FAILURE notification B) SEND FAILURE notification
If a datagram can not be delivered SCTP shall invoke this notification If a message can not be delivered SCTP shall invoke this notification
on the ULP. on the ULP.
The following may be optionally be passed with the notification: The following may be optionally be passed with the notification:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
o data - the location ULP can find the un-delivered datagram. o data - the location ULP can find the un-delivered message.
o context - optional information associated with this datagram (see o cause code - indicating the reason of the failure, e.g., size too
D in section 9.1). large, message life-time expiration, etc.
o association id - local handle to the SCTP association o context - optional information associated with this message (see
D in section 9.1).
C) NETWORK STATUS CHANGE notification C) NETWORK STATUS CHANGE notification
When a destination transport address is marked down (e.g., when SCTP When a destination transport address is marked down (e.g., when SCTP
detects a failure), or marked up (e.g., when SCTP detects a recovery), detects a failure), or marked up (e.g., when SCTP detects a recovery),
SCTP shall invoke this notification on the ULP. SCTP shall invoke this notification on the ULP.
The following shall be passed with the notification: The following shall be passed with the notification:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
o destination transport address - This indicates the destination o destination transport address - This indicates the destination
transport address of the peer endpoint affected by the change; transport address of the peer endpoint affected by the change;
o new-status - This indicates the new status. o new-status - This indicates the new status.
D) COMMUNICATION UP notification D) COMMUNICATION UP notification
This notification is used when SCTP becomes ready to send or receive This notification is used when SCTP becomes ready to send or receive
datagrams, or when a lost communication to an endpoint is restored. user messages, or when a lost communication to an endpoint is
restored.
IMPLEMENTATION NOTE: If ASSOCIATE primitive is implemented as a IMPLEMENTATION NOTE: If ASSOCIATE primitive is implemented as a
blocking function call, the association parameters are returned as a blocking function call, the association parameters are returned as a
result of the ASSOCIATE primitive itself. In that case, result of the ASSOCIATE primitive itself. In that case,
COMMUNICATION UP notification is optional at the association COMMUNICATION UP notification is optional at the association
initiator's side. initiator's side.
The following shall be passed with the notification: The following shall be passed with the notification:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
skipping to change at page 79, line 37 skipping to change at page 79, line 37
operation, it shall invoke this notification on the ULP. operation, it shall invoke this notification on the ULP.
The following shall be passed with the notification: The following shall be passed with the notification:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
o status - This indicates what type of event that has occurred; o status - This indicates what type of event that has occurred;
The following may be optionally passed with the notification: The following may be optionally passed with the notification:
o unsent-datagrams - The number and location of un-sent datagrams o unsent-messages - The number and location of un-sent messages
still in hold by SCTP; still in hold by SCTP;
o unacknowledged-datagrams - The number and location of datagrams o unacknowledged-messages - The number and location of messages
that were attempted to be transported to the destination, but were that were attempted to be transported to the destination, but were
not acknowledged when the loss of communication was detected. not acknowledged when the loss of communication was detected.
o last-acked - the sequence number last acked by that peer endpoint; o last-acked - the sequence number last acked by that peer endpoint;
o last-sent - the sequence number last sent to that peer endpoint; o last-sent - the sequence number last sent to that peer endpoint;
o received-but-not-delivered - datagrams that were received by SCTP o received-but-not-delivered - messages that were received by SCTP
but not yet delivered to the ULP. but not yet delivered to the ULP.
Note: the un-send data report may not be accurate for those user Note: the un-send data report may not be accurate for those user
messages which are segmented by SCTP during transmission. messages which are segmented by SCTP during transmission.
F) COMMUNICATION ERROR notification
When SCTP receives an ERROR chunk from its peer and decides to notify
its ULP, it can invoke this notification on the ULP.
The following can be passed with the notification:
o association id - local handle to the SCTP association
o error info - this indicates the type of error and optionally some
additional information received through the ERROR chunk.
10. Security Considerations 10. Security Considerations
10.1 Security Objectives 10.1 Security Objectives
As a common transport protocol designed to reliably carry time- As a common transport protocol designed to reliably carry time-
sensitive user messages, such as billing or signalling messages for sensitive user messages, such as billing or signalling messages for
telephony services, between two networked endpoints, SCTP has the telephony services, between two networked endpoints, SCTP has the
following security objectives. following security objectives.
- availability of reliable and timely data transport services - availability of reliable and timely data transport services
- integrity of the user-to-user information carried by SCTP - integrity of the user-to-user information carried by SCTP
skipping to change at page 81, line 6 skipping to change at page 81, line 6
10.2.2 Protecting against Data Corruption in the Network 10.2.2 Protecting against Data Corruption in the Network
Where the risk of undetected errors in datagrams delivered by the Where the risk of undetected errors in datagrams delivered by the
lower layer transport services is considered to be too great, lower layer transport services is considered to be too great,
additional checksum protection may be required. The question is additional checksum protection may be required. The question is
whether this is appropriately provided as an SCTP service because it whether this is appropriately provided as an SCTP service because it
is needed by most potential users of SCTP, or whether instead it is needed by most potential users of SCTP, or whether instead it
should be provided by the SCTP user application. (The SCTP protocol should be provided by the SCTP user application. (The SCTP protocol
overhead, as opposed to the signalling payload, is protected overhead, as opposed to the signalling payload, is protected
adequately by the UDP checksum and measures taken in SCTP to prevent adequately by the Adler-32 checksum and measures taken in SCTP to prevent
replay attacks and masquerade.) In any event, the checksum must be replay attacks and masquerade.) In any event, the checksum must be
specifically designed to ensure that it detects the errors left specifically designed to ensure that it detects the errors left
behind by the UDP checksum. behind by the Adler-32 checksum.
10.2.3 Protecting Confidentiality 10.2.3 Protecting Confidentiality
In most cases, the risk of breach of confidentiality applies to the In most cases, the risk of breach of confidentiality applies to the
signalling data payload, not to the SCTP or lower-layer protocol signalling data payload, not to the SCTP or lower-layer protocol
overheads. If that is true, encryption of the SCTP user data only overheads. If that is true, encryption of the SCTP user data only
may be considered. As with the supplementary checksum service, user may be considered. As with the supplementary checksum service, user
data encryption may be performed either by the SCTP user application data encryption may be performed by the SCTP user application.
or as a service of SCTP itself. If it is performed by SCTP, the
user data must be encrypted before any checksum is applied.
Particularly for mobile users, the requirement for confidentiality Particularly for mobile users, the requirement for confidentiality
may include the masking of IP addresses and ports. In this case may include the masking of IP addresses and ports. In this case
IPSEC ESP should be used instead of application-level encryption. IPSEC ESP should be used instead of application-level encryption.
Similarly, where other reasons prompt the use of the IPSEC ESP Similarly, where other reasons prompt the use of the IPSEC ESP
service, application-level encryption is unnecessary. It will be up service, application-level encryption is unnecessary. It will be up
to the SCTP system operators to configure the application to the SCTP system operators to configure the application
appropriately. appropriately.
Regardless of which level performs the encryption, the IPSEC ISAKMP Regardless of which level performs the encryption, the IPSEC ISAKMP
skipping to change at page 84, line 24 skipping to change at page 84, line 24
the integrity and the authenticity of the messages passed. the integrity and the authenticity of the messages passed.
SCTP also provides no protection against attacks originating at or SCTP also provides no protection against attacks originating at or
beyond the SCTP node and taking place within the context of an beyond the SCTP node and taking place within the context of an
existing association. Prevention of such attacks should be covered existing association. Prevention of such attacks should be covered
by appropriate security policies at the host site, as discussed in by appropriate security policies at the host site, as discussed in
section 10.2.1. section 10.2.1.
11. IANA Consideration 11. IANA Consideration
This protocol may be extended through IANA in three ways: This protocol will require port reservation like TCP for the use of
"well known" servers within the Internet. It is suggested that all
current TCP ports should be automatically reserved in the SCTP port
address space. New requests should follow IANA's current mechanisms
for TCP.
This protocol may also be extended through IANA in three ways:
-- through definition of additional chunk types, -- through definition of additional chunk types,
-- through definition of additional parameter types, or -- through definition of additional parameter types, or
-- through definition of additional cause codes within Operation -- through definition of additional cause codes within Operation
Error chunks Error chunks
In the case where a particular ULP using SCTP desires to have its own In the case where a particular ULP using SCTP desires to have its own
ports, the ULP should be responsible for registering with IANA for ports, the ULP should be responsible for registering with IANA for
getting its ports assigned. getting its ports assigned.
11.1 IETF-defined Chunk Extension 11.1 IETF-defined Chunk Extension
skipping to change at page 86, line 50 skipping to change at page 86, line 50
(c) Expected action by the SCTP endpoint which receives an Operation (c) Expected action by the SCTP endpoint which receives an Operation
Error chunk containing this cause code. Error chunk containing this cause code.
(d) Detailed description of the structure and content of data fields (d) Detailed description of the structure and content of data fields
which accompany this cause code. which accompany this cause code.
The initial word (32 bits) of a cause code parameter MUST conform to The initial word (32 bits) of a cause code parameter MUST conform to
the format shown in section 2.3.9, i.e.: the format shown in section 2.3.9, i.e.:
-- first two octets contain the cause code value -- first two octets contain the cause code value
-- last two octets contain length of the cause parameter. -- last two octets contain length of the cause parameter.
11.4 Payload Protocol Identifiers
Except for value 0x00000000 which is reserved by SCTP to indicate the
absence of a payload protocol identifier in a DATA chunk, SCTP will
not be responsible for standardizing or verifying any payload protocol
identifiers; SCTP simply receives the identifier from the upper layer
and carries it with the corresponding payload data.
The upper layer, i.e, the SCTP user, SHOULD standardize any specific
protocol identifier with IANA if it is so desired. The use of any
specific payload protocol identifier is out of the scope of SCTP.
12. Suggested SCTP Protocol Parameter Values 12. Suggested SCTP Protocol Parameter Values
The following protocol parameters are recommended: The following protocol parameters are RECOMMENDED:
RTO.Initial - 3 seconds RTO.Initial - 3 seconds
RTO.Min - 1 second
RTO.Alpha - 1/8
RTO.Beta - 1/4
Valid.Cookie.Life - 5 seconds Valid.Cookie.Life - 5 seconds
Association.Max.Retrans - 10 attempts Association.Max.Retrans - 10 attempts
Path.Max.Retrans - 5 attempts (per destination address) Path.Max.Retrans - 5 attempts (per destination address)
Max.Init.Retransmits - 8 attempts Max.Init.Retransmits - 8 attempts
IMPLEMENTATION NOTE: The SCTP implementation SHOULD allow ULP to 'retrans.count' - counter (per destination address)
customize these protocol parameters. 'receiver.buffer' - variable (per peer endpoint)
Miscellaneous protocol variables/counters:
'retrans.count' - per destination transport address counter IMPLEMENTATION NOTE: The SCTP implementation SHOULD allow ULP to
'heartbeat.sent.count' - per destination transport address counter customize some of these protocol parameters (see Section 9).
13. Acknowledgments 13. Acknowledgments
The authors wish to thank Mark Allman, Richard Band, Scott Bradner, The authors wish to thank Mark Allman, Richard Band, Scott Bradner,
Ram Dantu, R. Ezhirpavai, Sally Floyd, Matt Holdrege, Henry Houh, Ram Dantu, R. Ezhirpavai, Sally Floyd, Matt Holdrege, Henry Houh,
Christian Huetima, Gary Lehecka, Lyndon Ong, Kelvin Porter, Heinz Christian Huetima, Gary Lehecka, Lyndon Ong, Kelvin Porter, Heinz
Prantner, Jarno Rajahalme, A. Sankar, Greg Sidebottom, Brian Wyld, and Prantner, Jarno Rajahalme, A. Sankar, Greg Sidebottom, Brian Wyld, and
many others for their invaluable comments. many others for their invaluable comments.
14. Authors' Addresses 14. Authors' Addresses
skipping to change at page 88, line 50 skipping to change at page 88, line 50
ACIRI EMail: vern@aciri.org ACIRI EMail: vern@aciri.org
1947 Center St., Suite 600, 1947 Center St., Suite 600,
Berkeley, CA 94704-1198 Berkeley, CA 94704-1198
USA USA
15. References 15. References
[1] Eastlake , D. (ed.), "Randomness Recommendations for Security", [1] Eastlake , D. (ed.), "Randomness Recommendations for Security",
RFC 1750, December 1994. RFC 1750, December 1994.
[2] ITU-T Recommendation Q.703 "Q.703 - Signaling link", July 1996. [2] Deutsch, P., and Gailly, J-L., "ZLIB Compressed Data Format
Specification version 3.3", RFC 1950, May 1996.
[3] Allman, M., Paxson, V., and Stevens, W., "TCP Congestion [3] Allman, M., Paxson, V., and Stevens, W., "TCP Congestion
Control", RFC 2581, April 1999. Control", RFC 2581, April 1999.
[4] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, [4] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
August 1999. August 1999.
[5] Allman, M., and Paxson, V., "On Estimating End-to-End Network Path [5] Allman, M., and Paxson, V., "On Estimating End-to-End Network
Properties", Proc. SIGCOMM'99, 1999. Path Properties", Proc. SIGCOMM'99, 1999.
[6] Karn, P., and Simpson, W., "Photuris: Session-Key Management [6] Karn, P., and Simpson, W., "Photuris: Session-Key Management
Protocol", RFC 2522, March 1999. Protocol", RFC 2522, March 1999.
[7] Bradner, S., "The Internet Standards Process -- Revision 3", [7] Bradner, S., "The Internet Standards Process -- Revision 3",
RFC 2026, October 1996. RFC 2026, October 1996.
[8] Postel, J. (ed.), "Transmission Control Protocol", RFC 793, [8] Postel, J. (ed.), "Transmission Control Protocol", RFC 793,
September 1981. September 1981.
skipping to change at page 89, line 37 skipping to change at page 89, line 37
[12] McCann, J., Deering, S., and Mogul, J., "Path MTU Discovery for [12] McCann, J., Deering, S., and Mogul, J., "Path MTU Discovery for
IP version 6", RFC 1981, August 1996. IP version 6", RFC 1981, August 1996.
[13] Fraser, B. (ed.), "Site Security Handbook", RFC 2196, September [13] Fraser, B. (ed.), "Site Security Handbook", RFC 2196, September
1997. 1997.
[14] Kent, S., and Atkinson, R., "Security Architecture for the [14] Kent, S., and Atkinson, R., "Security Architecture for the
Internet Protocol", RFC 2401, November 1998. Internet Protocol", RFC 2401, November 1998.
This Internet Draft expires in 6 months from November 1999. [15] Savage, S., Cardwell, N., Wetherall, D., and Anderson, T.,
"TCP Congestion Control with a Misbehaving Receiver", ACM
Computer Communication Review, 29(5), October 1999.
This Internet Draft expires in 6 months from January, 2000
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/