draft-ietf-sigtran-sctp-00.txt   draft-ietf-sigtran-sctp-01.txt 
skipping to change at line 17 skipping to change at line 17
H. J. Schwarzbauer H. J. Schwarzbauer
Siemens Siemens
T. Taylor T. Taylor
Nortel Networks Nortel Networks
I. Rytina I. Rytina
Ericsson Ericsson
M. Kalla M. Kalla
Telcordia Telcordia
L. Zhang L. Zhang
UCLA UCLA
V. Paxson
ACIRI
expires in six months September 23,1999 expires in six months October 15,1999
Simple Control Transmission Protocol Simple Control Transmission Protocol
<draft-ietf-sigtran-sctp-00.txt> <draft-ietf-sigtran-sctp-01.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 RFC2026. Internet-Drafts are working provisions of Section 10 of RFC2026. 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.
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.
Abstract Abstract
This document describes the Simple Control Transmission Protocol This document describes the Simple Control Transmission Protocol
(SCTP). SCTP was 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 application.
SCTP is an application-level datagram transfer protocol operating on SCTP is an application-level datagram transfer protocol operating on
top of an unreliable datagram service such as UDP. It offers the top of an unreliable datagram service such as UDP. It offers the
following services to its users: following 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 -- application-level segmentation to conform to discovered MTU size
-- sequenced delivery of user datagrams within multiple streams, -- sequenced delivery of user datagrams within multiple streams,
with an option for order-of-arrival delivery of individual with an option for order-of-arrival delivery of individual
skipping to change at line 79 skipping to change at line 81
1.3.3 User Data Segmentation 1.3.3 User Data Segmentation
1.3.4 Acknowledgement and Congestion Avoidance 1.3.4 Acknowledgement and Congestion Avoidance
1.3.5 Chunk Multiplex 1.3.5 Chunk Multiplex
1.3.6 Path Management 1.3.6 Path Management
1.3.7 Message Validation 1.3.7 Message Validation
1.4 Recapitulation of Key Terms 1.4 Recapitulation of Key Terms
1.5. Abbreviations 1.5. Abbreviations
2. SCTP Datagram Format 2. SCTP Datagram Format
2.1 SCTP Common Header Field Descriptions 2.1 SCTP Common Header Field Descriptions
2.2 Chunk Field Descriptions 2.2 Chunk Field Descriptions
2.2.1 INIT/INIT ACK Parameter Format 2.2.1 Optional/Variable-length Parameter Format
2.2.1.1 Vendor-Specific Extensions (0xFFFE) 2.2.2 Vendor-Specific Extension Parameter Format
2.3 SCTP Chunk Definitions 2.3 SCTP Chunk Definitions
2.3.1 Initiation (INIT) 2.3.1 Initiation (INIT)
2.3.1.1 Optional or Variable Length Parameters 2.3.1.1 Optional or Variable Length Parameters
2.3.2 Initiation Acknowledgement (INIT ACK) 2.3.2 Initiation Acknowledgement (INIT ACK)
2.3.2.1 Optional or Variable Length Parameters
2.3.3 Selective Acknowledgement (SACK) 2.3.3 Selective Acknowledgement (SACK)
2.3.4 Heartbeat Request (HEARTBEAT) 2.3.4 Heartbeat Request (HEARTBEAT)
2.3.5 Heartbeat Acknowledgment (HEARTBEAT ACK) 2.3.5 Heartbeat Acknowledgment (HEARTBEAT ACK)
2.3.6 Abort Association (ABORT) 2.3.6 Abort Association (ABORT)
2.3.7 Shutdown Association (SHUTDOWN) 2.3.7 Shutdown Association (SHUTDOWN)
2.3.8 Shutdown Acknowledgment (SHUTDOWN ACK) 2.3.8 Shutdown Acknowledgment (SHUTDOWN ACK)
2.3.9 Operation Error (ERROR) 2.3.9 Operation Error (ERROR)
2.3.10 Encryption Cookie (COOKIE) 2.3.10 Encryption Cookie (COOKIE)
2.3.11 Cookie Acknowledgment (COOKIE ACK) 2.3.11 Cookie Acknowledgment (COOKIE ACK)
2.3.12 Payload Data (DATA) 2.3.12 Payload Data (DATA)
2.3.13 Vendor-Specific Chunk 2.4 Vendor-Specific Chunk Extensions
2.4 Bundling
3. SCTP Association State Diagram 3. SCTP Association State Diagram
4. Association Initialization 4. Association Initialization
4.1 Normal Establishment of an Association 4.1 Normal Establishment of an Association
4.1.1 Handle Stream Parameters 4.1.1 Handle Stream Parameters
4.1.2 Handle Address Parameters 4.1.2 Handle Address Parameters
4.1.3 Generating Responder Cookie 4.1.3 Generating Responder Cookie
4.1.4 Cookie Processing 4.1.4 Cookie Processing
4.1.5 Cookie Authentication 4.1.5 Cookie Authentication
4.1.6 An Example of Normal Association Establishment 4.1.6 An Example of Normal Association Establishment
4.2 Handle Duplicate INIT, INIT ACK, COOKIE, and COOKIE ACK 4.2 Handle Duplicate INIT, INIT ACK, COOKIE, and COOKIE ACK
skipping to change at line 119 skipping to change at line 121
4.2.3 Handle Duplicate INIT ACK 4.2.3 Handle Duplicate INIT ACK
4.2.4 Handle Duplicate COOKIE 4.2.4 Handle Duplicate COOKIE
4.2.5 Handle Duplicate COOKIE-ACK 4.2.5 Handle Duplicate COOKIE-ACK
4.2.6 Handle Stale COOKIE Error 4.2.6 Handle Stale COOKIE Error
4.3 Other Initialization Issues 4.3 Other Initialization Issues
4.3.1 Selection of Tag Value 4.3.1 Selection of Tag Value
4.3.2 Initiation from behind a NAT 4.3.2 Initiation from behind a NAT
5. User Data Transfer 5. User Data Transfer
5.1 Transmission of DATA Chunks 5.1 Transmission of DATA Chunks
5.2 Acknowledgment of Reception of DATA Chunks 5.2 Acknowledgment of Reception of DATA Chunks
5.3 Timer Management Rules 5.3 Management Retransmission Timer
5.3.1 T3-rxt Timer Adjustment with RTT 5.3.1 RTO Calculation
5.3.2 Retransmission Timer Rules
5.3.3 Handle T3-rxt Expiration
5.4 Multi-homed SCTP Endpoints 5.4 Multi-homed SCTP Endpoints
5.5 Stream Identifier and Sequence Number 5.5 Stream Identifier and Sequence Number
5.6 Ordered and Un-ordered Delivery 5.6 Ordered and Un-ordered Delivery
5.7 Report Gaps in Received DATA TSNs 5.7 Report Gaps in Received DATA TSNs
5.8 TSN Range Check 5.8 CRC-16 Utilization
5.9 CRC-16 Utilization 5.9 Segmentation
5.10 Segmentation 5.10 Bundling and Multiplexing
5.11 Bundling
5.12 Retransmission
5.12.1 Basic Retransmission Rules
5.12.2 Retransmit on T3-rxt Timer Expiration
5.12.3 T3-rxt Timer Back-off
6. Congestion Control 6. Congestion Control
6.1 SCTP Differences from TCP Congestion Control 6.1 SCTP Differences from TCP Congestion Control
6.2 SCTP Slow-Start and Congestion Avoidance 6.2 SCTP Slow-Start and Congestion Avoidance
6.2.1 Slow-Start 6.2.1 Slow-Start
6.2.2 Congestion Avoidance 6.2.2 Congestion Avoidance
6.2.3 Congestion Control 6.2.3 Congestion Control
6.2.4 Fast Retransmit on Gap Reports 6.2.4 Fast Retransmit on Gap Reports
6.3 Path MTU Discovery 6.3 Path MTU Discovery
6.4 Discussion 6.4 Discussion
7. Fault Management 7. Fault Management
7.1 Endpoint Failure Detection 7.1 Endpoint Failure Detection
7.2 Path Failure Detection 7.2 Path Failure Detection
7.3 Path Heartbeat 7.3 Path Heartbeat
7.4 Verification Tag 7.4 Verification Tag
7.5 RTT/RTO Measurement
8. Termination of Association 8. Termination of Association
8.1 Close of an Association 8.1 Close of an Association
8.2 Shutdown of an Association 8.2 Shutdown of an Association
9. Interface with Upper Layer 9. Interface with Upper Layer
9.1 ULP-to-SCTP 9.1 ULP-to-SCTP
9.2 SCTP-to-ULP 9.2 SCTP-to-ULP
9.3 Interfaces to Layer Management 9.3 Interfaces to Layer Management
9.3.1 LM-to-SCTP 9.3.1 LM-to-SCTP
9.3.2 SCTP-to-LM 9.3.2 SCTP-to-LM
10. Security Considerations 10. Security Considerations
skipping to change at line 169 skipping to change at line 167
10.2 SCTP Responses To Potential Threats 10.2 SCTP Responses To Potential Threats
10.2.1 Countering Insider Attacks 10.2.1 Countering Insider Attacks
10.2.2 Protecting against Data Corruption in the Network 10.2.2 Protecting against Data Corruption in the Network
10.2.3 Protecting Confidentiality 10.2.3 Protecting Confidentiality
10.2.4 Protecting against Blind Denial of Service Attacks 10.2.4 Protecting against Blind Denial of Service Attacks
10.2.4.1 Flooding 10.2.4.1 Flooding
10.2.4.2 Masquerade 10.2.4.2 Masquerade
10.2.4.3 Improper Monopolization of Services 10.2.4.3 Improper Monopolization of Services
10.3 Protection against Fraud and Repudiation 10.3 Protection against Fraud and Repudiation
11. IANA Consideration 11. IANA Consideration
11.1 IETF-defined Chunk Extension
11.2 IETF-defined Chunk Parameter Extension
11.3 IETF-defined Additional Error Causes
12. Suggested SCTP Timer and Protocol Parameter Values 12. Suggested SCTP Timer and Protocol Parameter Values
13. Acknowledgments 13. Acknowledgments
14. Authors' Addresses 14. Authors' Addresses
15. References 15. References
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
skipping to change at line 322 skipping to change at line 323
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 datagrams. This is The term "stream" is used in SCTP to refer to a sequence of
in contrast to its usage in TCP, where it refers to a sequence of bytes. datagrams. This is in contrast to its usage in TCP, where it refers to
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 datagrams 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 datagram 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 datagrams 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. datagram, 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. Datagrams sent using this mechanism are delivered to the SCTP service. Usr datagrams sent using this mechanism are delivered to the
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 datagrams 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 datagrams before being passed to the SCTP
user. user.
1.3.4 Acknowledgement and Congestion Avoidance 1.3.4 Acknowledgement and Congestion Avoidance
skipping to change at line 378 skipping to change at line 380
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 datagram 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 datagram chooses the destination transport address for each outgoing SCTP
based on the SCTP user's instructions and the currently perceived datagram based on the SCTP user's instructions and the currently
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 where 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 The common SCTP header includes a validation tag and an optional CRC
CRC field. A validation tag value is chosen by each end of the field. A validation tag value is chosen by each end of the association
association during association startup. Messages received without the during association startup. Messages received without the validation
validation tag value expected by the receiver are discarded, as a tag value expected by the receiver are discarded, as a protection
protection against blind masquerade attacks and against stale against blind masquerade attacks and against stale datagrams from a
datagrams from a previous association. previous association.
The CRC may optionally be set by the sender, to provide The CRC may optionally be set by the sender, to provide additional
additional protection against data corruption in the network beyond protection against data corruption in the network beyond that provided
that provided by lower layers (e.g. the UDP checksum). by lower layers (e.g. the UDP checksum).
1.4 Recapitulation of Key Terms 1.4 Recapitulation of Key Terms
The language used to describe SCTP has been introduced in the The language used to describe SCTP has been introduced in the previous
previous sections. This section provides a consolidated list of the sections. This section provides a consolidated list of the key terms
key terms and their definitions. and their definitions.
SCTP user application (SCTP user): The logical higher-layer
application entity which uses the services of SCTP.
User datagram (user message): the unit of data delivery across the interface o SCTP user application (SCTP user): The logical higher-layer
between SCTP and its user. application entity which uses the services of SCTP, also called
the Upper-layer Protocol (ULP).
User data: the content of user datagrams. o User datagram (user message): the unit of data delivery across the
interface between SCTP and its user.
SCTP user data: the content of SCTP user datagrams. o User data: the content of user datagrams.
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 datagram service (e.g. UDP) which
it is using. An SCTP datagram includes the common SCTP header, possible SCTP it is using. An SCTP datagram includes the common SCTP header,
control chunks, and user data encapsulated within SCTP DATA chunks. possible SCTP control chunks, and user data encapsulated within
SCTP DATA chunks.
SCTP host: a physical unit within which SCTP is running. o SCTP host: a logical unit within which SCTP is running.
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 datagram 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 a UDP port number.
SCTP endpoint: a logical entity, comprising a set of eligible o SCTP endpoint: a logical entity, comprising a set of eligible
transport addresses at an SCTP host, which SCTP datagrams will be transport addresses at an SCTP host, which SCTP datagrams will be
sent to and received from. Note, a transport address can only be sent to and received from. Note, a 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 transport address appear in more than one have the same SCTP transport address appear in more than one
endpoints. endpoints.
SCTP association: a protocol relationship between SCTP endpoints in o SCTP association: a protocol relationship between SCTP endpoints,
two SCTP hosts, comprising the SCTP endpoint at each host and comprising the two SCTP endpoints and protocol state information
protocol state information including verification tags and the including verification tags and the currently active set of
currently active set of Transmission Sequence Numbers (TSNs). Transmission Sequence Numbers (TSNs), etc.
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.
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.
Stream: a uni-directional logical channel established between SCTP o Stream: a uni-directional logical channel established from one to
user peers, within which all user datagrams are delivered in another associated SCTP endpoints, within which all user datagrams
sequence except for those submitted to the unordered delivery service. are delivered in sequence except for those submitted to the
Note: The relationship between stream numbers in opposite directions is unordered delivery service.
strictly a matter of how the applications use them. It is the
responsiblity of the application to create these correlations if it
is desirable.
Stream sequence number: a 16-bit sequence number used internally by Note: The relationship between stream numbers in opposite
SCTP to assure sequenced delivery of the datagrams within a given directions is strictly a matter of how the applications use
stream. One stream sequence number is attached to each user them. It is the responsiblity of the SCTP user to create these
correlations if they are so desired.
o Stream sequence number: a 16-bit sequence number used internally by
SCTP to assure sequenced delivery of the user datagrams within a
given stream. One stream sequence number is attached to each user
datagram. datagram.
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 datagram may be carried in the same SCTP datagram. Each user
datagram occupies its own DATA chunk. datagram occupies its own DATA chunk.
Outstanding TSN (at an SCTP endpoint): a TSN (and 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.
Unacknowledged TSN (at an SCTP endpoint): a TSN (and 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.
Flight Size (fsize): An SCTP protocol variable indicating the total o Receiver Window (rwnd): The most recently advertised receiver
number of currently outstanding TSNs. window, in number of octets. This gives an indication of the space
available in the receiver's inbound buffer.
[Editors Note: may need to enhance flight size to be specific to
a destination transport address ]
Receiver Window (rwnd): The most recently advertised receiver
window, in number of user DATA chunks (i.e., TSNs). This gives an
indication of the space available in the receiver inbound buffer.
Congestion Window (cwnd): An SCTP variable that limits the number of o Congestion Window (cwnd): An SCTP variable that limits the data, in
user DATA chunks (i.e., TSNs) a sender can send into the network number of octets, a sender can send into the network before
before receiving an acknowledgment on a particular destination Transport receiving an acknowledgment on a particular destination Transport
address. address.
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. transport address. Ssthresh is in number of octets.
Transmission Control Block (TCB): an internal data structure o Transmission Control Block (TCB): an internal data structure
created by an SCTP host for each of its existing SCTP associations created by an SCTP endpoint for each of its existing SCTP
to maintain and manage the association. associations to other SCTP endpoints. TCB contains all the status
and operational information for the endpoint to maintain and manage
the corresponding association.
1.5. Abbreviations 1.5. Abbreviations
MD5 - MD5 Message-Digest Algorithm [4]
NAT - Network Address Translation NAT - Network Address Translation
MD5 - MD5 Message-Digest Algorithm (RFC 1321) RTO - Retransmission Time-out
RTT - Round Trip Time RTT - Round-trip Time
RTTVAR - Round-trip Time Variation
SCTP - Simple Control Transmission Protocol SCTP - Simple Control Transmission Protocol
SRTT - Smoothed RTT
TCB - Transmission Control Block TCB - Transmission Control Block
TLV - Type-Length-Value Coding Format
TSN - Transport Sequence Number TSN - Transport 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:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Common Header | | Common Header |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Chunk #1 | | Chunk #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Chunk #n | | Chunk #n |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Multiple chunks can be multiplexed into one UDP SCTP datagram up to the MTU Multiple chunks can be multiplexed into one UDP SCTP datagram up to
size except for the INIT, INIT ACK, and SHUTDOWN ACK chunks. These the MTU size except for the INIT, INIT ACK, and SHUTDOWN ACK
chunks MUST not be multiplexed with any other chunk in a datagram. chunks. These chunks MUST not be multiplexed with any other chunk in a
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 Section 5.10. segmented into multiple chunks using the procedure defined in Section
5.9.
When determining when to segment, the SCTP implementation MUST take
into account the SCTP datagram header as well as the DATA chunk
header. The implementation MAY also take account of the space required
for a SACK chunk.
When multiplexing Control chunks with DATA chunks, Control chunks MUST
be placed first in the datagram on transmit.
The receiver MUST process the chunks in the order they appear within
the message.
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 | | Vers | Reserved |C| CRC-16 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at line 593 skipping to change at line 592
endpoint during the association initialization. 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 not
INIT or SHUTDOWN ACK, the receiver MUST drop the datagram. INIT or 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:
Reserved bits MUST be set to 0 on transmit and should be ignored Reserved bits MUST be set to 0 on transmit and should be ignored
on receipt. on reception.
C: 1 bit (Octet 2, Bit 8) C: 1 bit (Octet 2, Bit 8)
When the C-bit is set to 1, the CRC-16 field contains the CRC-16 When the C-bit is set to 1, the CRC-16 field contains the CRC-16
(defined below). (defined below).
When the C-bit is set to 0, the CRC-16 field is not used and MUST be When the C-bit is set to 0, the CRC-16 field is not used and MUST be
set to 0. set to 0.
CRC-16: (Octets 3 & 4) CRC-16: (Octets 3 & 4)
When the C Bit is set to 1, this field MUST contain a CRC-16. 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 The CRC-16 used is defined in Section 4.2 of ITU Recommendation
Q.703. Q.703 [2].
Section 5.9 defines the use of CRC-16 in SCTP. Section 5.8 defines the use of CRC-16 in SCTP.
Note: When the C bit is set to 0, an implementation MAY use the fixed IMPLEMENTATION NOTE: When the C bit is set to 0, an implementation
value 0x30000000 as a sanity check on an inbound datagram. If the MAY use the fixed value 0x30000000 as a sanity check on an inbound
first long integer is not the fixed value the datagram MAY be datagram. If the first long integer is not the fixed value the
discarded with no further processing. 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
skipping to change at line 642 skipping to change at line 641
| Chunk ID |Chunk Flags | Chunk Length | | Chunk ID |Chunk Flags | Chunk Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \ \ \
/ Value / / 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 0xFD. 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 are defined in Section 2.3.13?? 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 - COOKIE 00001010 - Responder Cookie (COOKIE)
00001011 - COOKIE ACK 00001011 - Cookie Acknowledgement (COOKIE ACK)
00001100 to 11111101 - reserved for future IETF usage 00001100 to 11111101 - reserved for future IETF usage
11111110 - Vendor-specific chunk extensions 11111110 - Vendor-specific chunk extensions
11111111 - IETF-defined Chunk Extension 11111111 - IETF-defined Chunk Extension
Chunk Flags: 8 bits Chunk Flags: 8 bits
The usage of these bits depends on the chunk type as given by the Chunk ID. The usage of these bits depends on the chunk type as given by the
Unless otherwise specified, they are set to zero on transmit and Chunk ID. Unless otherwise specified, they are set to zero on
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 include any padding.
Chunk Value: Variable 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 dependent on the Chunk ID. The Chunk Value field MUST be is dependent on the Chunk ID. The Chunk Value field MUST be
aligned on 32-bit boundaries. If the length of the aligned on 32-bit boundaries. If the length of the chunk does not
chunk does not align on 32-bit boundaries, it is padded at the end align on 32-bit boundaries, it is padded at the end with all zero
with all zero octets. octets.
2.2.1 INIT/INIT ACK Parameter Format SCTP defined chunks are described in detail in Section 2.3. The
guidelines for Vendor-Specific chunk extensions are discussed in
Section 2.4. And the guidelines for IETF-defined chunk extensions
can be found in Section 11.1 of this document.
The optional and variable-length parameters contained in the INIT and 2.2.1 Optional/Variable-length Parameter Format
INIT ACK are defined in a Type-Length-Value format as shown below. The
actual parameters are defined in the specific chunk section. The optional and variable-length parameters contained in a chunk
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | | Parameter Type | Parameter Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \ \ \
/ Value / / Parameter Value /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type: 16 bit u_int Parameter Type: 16 bit u_int
The Type field is a 16 bit identifier of the type of parameter. It The Type field is a 16 bit identifier of the type of parameter. It
takes a value of 0x0000 to 0xFFFD. The value of 0xFFFE is reserved takes a value of 0x0000 to 0xFFFF.
for vendor-specific extensions. The value of 0xFFFF is reserved for
IETF-defined extensions. The usage of the specific parameter types
is defined in Section 2.3.13??.
The parameters defined in this document are:
Parameter ID Parameter Name The value of 0xFFFE is reserved for vendor-specific extensions if
------------ ----------- the specific chunk allows such extensions. The value of 0xFFFF is
0x0000 - 0x0004 Reserved for use by IETF reserved for IETF-defined extensions. Values other than those
0x0005 IPv4 Address/Port defined in specific SCTP chunk description are reserved for use by
0x0006 IPv6 Address/Port IETF.
0x0007 Cookie
0x0008 Unrecognized Parameters
0x0009 Cookie Preservative
0x000A - 0xFFFD Reserved for use by IETF
0xFFFE Vendor-specific Extensions
0xFFFF IETF extensions
Length: 16 bit u_int Parameter Length: 16 bit u_int
The Length field contains the length of the of the Type, Length and The Length field contains the size of the parameter in octets,
Value fields for this parameter. Thus, a parameter with a zero- including the Type, Length, and Value fields. Thus, a parameter
length Value field would have a Length field of 0x0004. The Length with a zero-length Value field would have a Length field of
does not include any padding octets. 0x0004. The Length does not include any padding octets.
Value: variable-length. Parameter Value: variable-length.
The Value is dependent on the value of the Type field. The value The Value is dependent on the value of the Type field. The value
field MUST be aligned on 32-bit boundaries. If the value field is field MUST be aligned on 32-bit boundaries. If the value field is
not aligned on 32-bit boundaries it is padded at the end with all not aligned on 32-bit boundaries it is padded at the end with all
zero octets. The value field must be an integer number of octets. zero octets. The value field must be an integer number of octets.
The sequence of parameters within an INIT or INIT ACK may be The actual SCTP parameters are defined in the specific SCTP chunk
processed in any order. For example, a receiver of a INIT ACK may section. The guidelines for vendor-specific parameter extensions are
need to scan through the chunk looking for all the address types, to discussed in Section 2.2.2. And the rules for IETF-defined parameter
locate the address to which the INIT was sent, so that the receiver extensions are defined in Section 11.2.
may find the correct Transmission Control Block (TCB).
2.2.1.1 Vendor-Specific Extensions (0xFFFE)
Since Vendor-Specific Extensions are a special case, they are described 2.2.2 Vendor-Specific Extension Parameter Format
here.
This parameter value is available to allow vendors to support their This is to allow vendors to support their own extended parameters not
own extended parameters not defined by the IETF. It MUST not affect defined by the IETF. It MUST not affect the operation of SCTP.
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 reported). sent by a remote endpoint MUST ignore it (although it may be
Endpoints that do not receive desired vendor-specific information reported). Endpoints that do not receive desired vendor-specific
SHOULD make an attempt to operate without it, although they may do information SHOULD make an attempt to operate without it, although
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. A summary of the Vendor-Specific Extension format is shown below. The
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | | Parameter Type = 0xFFFE | Parameter Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Vendor-Id | | Vendor-Id |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \ \ \
/ Value / / Value /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type: 16 bit u_int Type: 16 bit u_int
0xFFFE for Vendor-Specific. 0xFFFE for all Vendor-Specific parameters.
Length: 16 bit u_int Length: 16 bit u_int
>= 8 Indicate the size of the parameter in octets, including the
Type, Length, Vendor-Id, and Value fields.
Vendor-Id: 32 bit u_int Vendor-Id: 32 bit u_int
The high-order octet is 0 and the low-order 3 octets are the The high-order octet is 0 and the low-order 3 octets are the
SMI Network Management Private Enterprise Code of the Vendor SMI Network Management Private Enterprise Code of the Vendor
in network byte order, as defined in the Assigned Numbers (RFC in network byte order, as defined in the Assigned Numbers (RFC
1700). 1700).
Value: Variable length Value: variable length
The Value field is one or more octets. The actual format of the The Value field is one or more octets. The actual format of the
information is site or application specific, and a robust information is site or application specific, and a robust
implementation SHOULD support the field as undistinguished implementation SHOULD support the field as undistinguished
octets. octets.
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.
It SHOULD be encoded as a sequence of vendor type / vendor length It SHOULD be encoded as a sequence of vendor type / vendor length
/ value fields, as follows. The parameter field is / value fields, as follows. The parameter field is
dependent on the vendor's definition of that attribute. An dependent on the vendor's definition of that attribute. An
example encoding of the Vendor-Specific attribute using this example encoding of the Vendor-Specific attribute using this
method follows: method follows:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | | Parameter Type = 0xFFFE | Parameter Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Vendor-Id | | Vendor-Id |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| VS-Type | VS-Length | | VS-Type | VS-Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/ VS-Value / / VS-Value /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
VS-Type: 16 bit u_int VS-Type: 16 bit u_int
skipping to change at line 856 skipping to change at line 844
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Receive Window Credit | | Receive Window Credit |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of Outbound Streams | | Number of Outbound Streams | (Reserved) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of Inbound Streams | | Number of Inbound Streams | (Reserved) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Initial TSN | | Initial TSN |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \ \ \
/ Optional/Variable-Length Parameters / / Optional/Variable-Length Parameters /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The INIT chunk contains the following parameters. Unless otherwise The INIT chunk contains the following parameters. Unless otherwise
noted, each parameter MUST only be included once in the INIT chunk. noted, each parameter MUST only be included once in the INIT chunk.
Parameter Optional/Mandatory 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
IPv4 Address/Port (Note 1) Optional
IPv6 Address/Port (Note 1) Optional
Cookie Preservative Optional
Note 1: The INIT/INIT ACK chunks may contain multiple addresses that Variable Parameters Status Type Value
may be IPv4 and/or IPv6 in any combination. -------------------------------------------------------------
IPv4 Address/Port (Note 1) Optional 0x0005
IPv6 Address/Port (Note 1) Optional 0x0006
Cookie Preservative Optional 0x0009
Vendor-specific parameters MUST be appended to the end of the above Note 1: The INIT chunks may contain multiple addresses that may be
INIT chunk. The format of the vendor-specific parameters MUST follow IPv4 and/or IPv6 in any combination.
the Type-Length-value format of other parameters as defined above.
In case an endpoint does not support the vendor-specific data received, The sequence of parameters within an INIT may be processed in any
it MUST ignore the additional fields. 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 end
transmits within this association. transmits within this association.
The value of this tag must be selected from the range of 0x1 to The valid range for Initiate Tag is from 0x1 to 0xffffffff. See
0xffffffff, and should be randomized as defined in RFC 1750 [11]. Section 4.3.1 for more on selection of the tag value.
The value of 0x00000000 is reserved for the Verification Tag field of
datagrams carrying INIT chunks (or the exceptional case where a If the value of the Initiate Tag in a received INIT chunk is found
SHUTDOWN ACK must be retransmitted after the TCP as been deleted). to be 0x0, the receiver MUST treat it as an error and silently
discard the datagram (or send Abort with tag=0??!).
Receive Window Credit (rwnd): 32 bit u_int Receive Window Credit (rwnd): 32 bit u_int
If non-zero, this field defines the maximum number of TSNs the This field defines the maximum number of octets of outbound data the
receiving end is allowed to have outstanding (i.e. sent receiver of the INIT is allowed to have outstanding (i.e. sent and
and not acknowledged). If set to zero, the default is applied. not acknowledged).
The suggested default is 20.
Number of Outbound Streams (OS): 32 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) : 32 bit u_int Number of Inbound Streams (MIS) : 16 bit u_int
Defines the maximum number of streams the sender of this INIT Defines the maximum number of streams the sender of this INIT chunk
chunk allows the peer end to create in this association. The value 0 allows the peer end to create in this association. The value 0 MUST
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. This field MAY be Defines the initial TSN that the sender will use. This field MAY be
set to the value of the Initiate Tag field. set to the value of the Initiate Tag field.
The Reserved fields must be set to all 0 by the sender and ignored by
the receiver.
2.3.1.1 Optional or Variable Length Parameters 2.3.1.1 Optional or Variable Length Parameters
The following parameters follow the Type-Length-Value format. The IP The following parameters follow the Type-Length-Value format as
Address Fields MUST come after the fixed-length fields. defined in Section 2.2.1. The IP address fields MUST come after the
fixed-length fields.
Any extensions MUST come after the IP address fields. Any extensions MUST come after the IP address fields.
IPv4 Address/Port IPv4 Address/Port
This parameter contains an IPv4 address/port for use as a destination This parameter contains an IPv4 address/port for use as a destination
transport address by the receiver. 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 1 0 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 1 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IPv4 Address | | IPv4 Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Port | Padding = 0 | | Port | Padding = 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IPv4 Address: 32bit u_int IPv4 Address: 32bit u_int
Contains an IPv4 address of this endpoint. It is binary encoded. Contains an IPv4 address of this endpoint. It is binary encoded.
skipping to change at line 964 skipping to change at line 962
Contains the UDP port number which the sender of this INIT wants Contains the UDP port number which the sender of this INIT wants
to use for this address. to use for this address.
Padding: 16 bits Padding: 16 bits
This field is set to 0x00 on transmit and ignored on receive. This field is set to 0x00 on transmit and ignored on receive.
IPv6 Address/Port: IPv6 Address/Port:
This parameter contains an IPv6 address/port for use as a destination This parameter contains an IPv6 address/port for use as a
transport address by the receiver. 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 1 0 0 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 1 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
| IPv6 Address | | IPv6 Address |
| | | |
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Port | Padding = 0 | | Port | Padding = 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IPv6 Address: 128 bit u_int IPv6 Address: 128 bit u_int
Contains an IPv6 address of the sender of this message. It is binary encoded. Contains an IPv6 address of the sender of this message. It is
binary encoded.
Port Number: 16 bit u_int Port Number: 16 bit u_int
Contains the UDP port number which the sender of this INIT wants Contains the UDP port number which the sender of this INIT wants
to use for this address. to use for this address.
Padding: 16 bits Padding: 16 bits
This field is set to 0x00 on transmit and ignored on receive. This field is set to 0x00 on transmit and ignored on receive.
The values passed in the IPv4 and IPv6 Address/Port parameters The values passed in the IPv4 and IPv6 Address/Port parameters
indicate to the other end of the association which transport addresses indicate to the other end of the association which transport
this end will support for the association being initiated. addresses this end will support for the association being
Within the association, any one of these addresses may appear in the initiated. Within the association, any one of these addresses may
source address field of a datagram sent from this (the initiating) end, appear in the source address field of a datagram sent from this (the
and may be used as a destination of a datagram sent from the initiating) end, and may be used as a destination of a datagram sent
other (the responding) end. from the other (the responding) end.
Note that an endpoint MAY be multi-homed. A multi-homed endpoint may Note that an endpoint MAY be multi-homed. A multi-homed endpoint may
have access to different types of network, thus more than one 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 address type may be present in one INIT chunk, i.e., IPv4 and IPv6
addresses are allowed in the same INIT messge. addresses are allowed in the same INIT message.
More than one IP Address parameter can be included in an INIT chunk. More than one IP Address parameter can be included in an INIT chunk.
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 addresses 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 session.
Cookie Preservative Cookie Preservative
This parameter contains a request by the sender for a longer The sender of the INIT shall use this parameter to suggest to the
lifespan on a cookie. receiver of the INIT for a longer life-span of the Responder 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 1 0|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 1 0|0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Additional Life Time (ALT) | | Suggested Cookie Life-span Increment (msec.) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Additional Life Time (ALT): 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 the need for a cookie that
expires in a longer period of time. It is normally added to the INIT expires in a longer period of time than that of the previous one. It
when the responder has reported receiving of a Stale COOKIE chunk. is normally added to the INIT message during the second attempt of
The ALT field is filled in with the number of microseconds that the sender establishing an association with a peer after the first attempt
would like the cookie to be valid for. It is optional for the receiver failed due to a Stale COOKIE report from the same peer. It is
to extend the lifespan of a cookie based upon its local security optional for the receiver to honor the suggested cookie life-span
requirements. increment based upon its local security requirements.
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 a SCTP
association. association.
The parameter part of INIT ACK is formatted the same as the INIT The parameter part of INIT ACK is formatted similarly to the INIT
chunk. It uses two extra parameters: The Responder Cookie and the chunk. It uses two extra variable parameters: The Responder Cookie
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Receive Window Credit | | Receive Window Credit |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of Outbound Streams | | Number of Outbound Streams | (Reserved) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of Inbound Streams | | Number of Inbound Streams | (Reserved) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Initial TSN | | Initial TSN |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \ \ \
/ Optional/Variable-Length Parameters / / Optional/Variable-Length Parameters /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The INIT ACK contains the following parameters: The INIT ACK contains the following parameters. Unless otherwise
Parameter Optional/Mandatory noted, each parameter MUST only be included once in the INIT ACK chunk.
Fixed Parameters Status
----------------------------------------------
Initiate Tag Mandatory Initiate Tag Mandatory
Receiver Window Credit Mandatory Receiver Window Credit Mandatory
Receiver Maximum Datagram Size Mandatory
Number of Outbound Streams Mandatory Number of Outbound Streams Mandatory
Number of Inbound Streams Mandatory Number of Inbound Streams Mandatory
Initial TSN (Note 2) Mandatory Initial TSN Mandatory
Responder Cookie Mandatory
IPv4 Address (Note 1) Optional
IPv6 Address (Note 1) Optional
Unrecognized Parameters Optional
Note 1: The INIT/INIT ACK chunks may contain multiple addresses that Variable Parameters Status Type Value
-------------------------------------------------------------
Responder Cookie Mandatory 0x0007
IPv4 Address (Note 1) Optional 0x0005
IPv6 Address (Note 1) Optional 0x0006
Unrecognized Parameters Optional 0x0008
Note 1: The INIT ACK chunks may contain multiple addresses that
may be IPv4 and/or IPv6 in any combination. may be IPv4 and/or IPv6 in any combination.
The Responder Cookie and Unrecognized Parameters use the Type-Length- The Responder Cookie and Unrecognized Parameters use the Type-Length-
Value format and are defined below. The other fields are defined the Value format as defined in Section 2.2.1 and are described below. The
same as in the INIT message. other fields are defined the same as their counterparts in the INIT
message.
2.3.2.1 Optional or Variable Length Parameters
Responder Cookie: variable size, depending on Size of Cookie Responder 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; otherwise, the
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 parameters in the INIT the receiver does not recognize one or more Optional/Variable-length
chunk. This parameter field will contain the unrecognized parameters in the INIT chunk. This parameter field will contain the
parameters copied from the INIT message complete with TLV. unrecognized parameters copied from the INIT message complete
with TLV.
Vendor-Specific parameters are allowed in INIT ACK. However, they
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
the INIT ACK does not support the vendor-specific parameters 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 Highest Consecutive TSN ACK and Rcv The SACK MUST contain the Highest Consecutive TSN ACK and Rcv Window
Window Credit (rwnd) parameters. By definition, the value of the Credit (rwnd) parameters. By definition, the value of the Highest
Highest Consecutive TSN ACK parameter is the last TSN received at the Consecutive TSN ACK parameter is the last TSN received at the time the
time the Selective ACK is sent, before a break in the sequence of Selective ACK is sent, before a break in the sequence of received TSNs
received TSNs occurs; the next TSN value following this one has not occurs; the next TSN value following this one has not yet been
yet been received at the reporting end. This parameter therefore received at the reporting end. This parameter therefore acknowledges
acknowledges receipt of all TSNs up to and including the value given. receipt of all TSNs up to and including the value given.
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
Highest Consecutive TSN ACK. Highest Consecutive 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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Highest Consecutive TSN ACK | | Highest Consecutive TSN ACK |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Rcv Window Credit (rwnd) | Number of Fragments = N | | Rcv Window Credit (rwnd) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Chunk Flags: Chunk Flags:
Set to all zeros on transmit and ignored on receipt. Set to all zeros on transmit and ignored on receipt.
Highest Consecutive TSN ACK: 32 bit u_int Highest Consecutive 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. Therefore, it must be lower than the sequence before a gap. Therefore, it must be lower than the
Start TSN of the first fragment, if present. Start TSN of the first fragment, if present.
Receive Window Credit (rwnd): 16 bit u_int Receive Window Credit (rwnd): 32 bit u_int
If non-zero, this field defines the maximum number of TSNs the This field defines the new maximum number of octets of outbound data
receiving end is allowed to have outstanding (i.e. sent the receiver of this SACK is allowed to have outstanding (i.e. sent
and not acknowledged). If set to zero, the default is applied. and not acknowledged).
The suggested default is 20.
Number of Fragments: 16 bit u_int Number of Fragments: 16 bit u_int
Indicates the number of TSN fragments included in this Selective ACK. Indicates the number of TSN fragments included in this Selective
ACK.
Reserved: 16 bit
Must be set to all 0 by the sender and ignored by the receiver.
Fragments: Fragments:
These fields contain the ack fragments. They are repeated for each These fields contain the ack fragments. They are repeated for each
fragment up to the number of fragments defined in the Number of fragment up to the number of fragments defined in the Number of
Fragments field. All DATA chunks with TSNs between the (Highest Fragments field. All DATA chunks with TSNs between the (Highest
Consecutive TSN + Fragment Start) and (Highest Consecutive TSN + Consecutive TSN + Fragment Start) and (Highest Consecutive TSN +
Fragment End) of each fragment are assumed to have been received Fragment End) of each fragment are assumed to have been received
correctly. correctly.
skipping to change at line 1210 skipping to change at line 1229
| | <- 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: follows (assuming the new rwnd is set to 0x1234 by the sender):
+---------------+--------------+ +---------------+--------------+
| Highest Consecutive TSN = 12 | | Highest Consecutive TSN = 12 |
----------------+--------------- ----------------+---------------
| rwnd = 0 |num of frag=2 | | rwnd = 0x1234 |
----------------+---------------
| 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):
An endpoint should send this chunk to its peer endpoint of the An endpoint should send this chunk to its peer endpoint of the current
current association to probe the reachability of a particular association to probe the reachability of a particular destination
destination transport address defined in the present association. transport address defined in the present association.
The parameter fields MUST contain the time values. The parameter fields MUST contain the time values.
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 0 0|Chunk Flags |0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0| |0 0 0 0 0 1 0 0|Chunk Flags |0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time Value 1 (sec) | | Time Value 1 (e.g., sec) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time Value 2 (usec) | | Time Value 2 (e.g., usec) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Chunk Flags: Chunk Flags:
Set to zero on transmit and ignored on receipt. Set to zero on transmit and ignored on receipt.
Time Value 1: 32 bit u_int Time Value 1: 32 bit u_int
Time Value 2: 32 bit u_int Time Value 2: 32 bit u_int
The Time Values contain a time value meaningful only to the The Time Values contain a time value meaningful only to the
sender. Time Value 1 is in units of seconds and Time Value 2 is in sender. For example, Time Value 1 may be in units of seconds and
units of microseconds. Their value should be set to the current Time Value 2 in units of microseconds. Their value should be set to
time at which this Heartbeat Request is sent. the current time at which this Heartbeat Request is sent.
IMPLEMENTATION NOTE: For most systems the value is normally IMPLEMENTATION NOTE: For most systems the value is normally set by
set by doing a system call to get the current time. doing a system call to get the current time.
2.3.5 Heartbeat Acknowledgment (HEARTBEAT ACK) (00000101): 2.3.5 Heartbeat Acknowledgment (HEARTBEAT ACK) (00000101):
An endpoint should send this chunk to its peer endpoint as a An endpoint should send this chunk to its peer endpoint as a response
response to a Heartbeat Request (see Section 7.3). to a Heartbeat Request (see Section 7.3).
The parameter field MUST contain the time values. The parameter field MUST contain the time values.
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 0 1|Chunk Flags |0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0| |0 0 0 0 0 1 0 1|Chunk Flags |0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time Value 1 (sec) | | Time Value 1 (e.g., sec) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time Value 2 (usec) | | Time Value 2 (e.g., usec) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Chunk Flags: Chunk Flags:
Set to zero on transmit and ignored on receipt. Set to zero on transmit and ignored on receipt.
Time Value 1: 32 bit u_int Time Value 1: 32 bit u_int
Time Value 2: 32 bit u_int Time Value 2: 32 bit u_int
The values of these two field SHALL be copied from the time values The values of these two field SHALL be copied from the time values
skipping to change at line 1339 skipping to change at line 1361
This chunk MUST be used to acknowledge the receipt of the SHUTDOWN This chunk MUST be used to acknowledge the receipt of the SHUTDOWN
chunk at the completion of the shutdown process, see Section 8.2 for chunk at the completion of the shutdown process, see Section 8.2 for
details. details.
The SHUTDOWN ACK chunk has no parameters. The SHUTDOWN ACK chunk has no parameters.
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 1 0 0 0|Chunk Flags |0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0| |0 0 0 0 1 0 0 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.
Note: if the endpoint that receives the SHUTDOWN message does not have Note: if the endpoint that receives the SHUTDOWN message does not have
a TCB or tag for the sender of the SHUTDOWN, the receiver SHALL still a TCB or tag for the sender of the SHUTDOWN, the receiver SHALL still
respond. In such cases, the receiver SHALL send back a stand-alone respond. In such cases, the receiver SHALL send back a stand-alone
SHUTDOWN ACK chunk in an SCTP datagram with the Verification Tag field SHUTDOWN ACK chunk in an SCTP datagram with the Verification Tag field
of the common header filled with all '0's. of the common header filled with all '0's.
2.3.9 Operation Error (ERROR) (00001001): 2.3.9 Operation Error (ERROR) (00001001):
This chunk is sent to the other endpoint in the association to This chunk is sent to the other endpoint in the association to notify
notify certain error conditions. It has the following parameters: certain error conditions. It contains one or more error causes. It has
the following parameters:
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 1 0 0 1| Chunk Flags | Length | |0 0 0 0 1 0 0 1| Chunk Flags | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cause Code | Cause-Specific Info | \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / one or more Error Causes /
/ Cause-specific Information /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Chunk Flags: Chunk Flags:
Set to zero on transmit and ignored on receipt. Set to zero on transmit and ignored on receipt.
Length: Length:
Set to the length of the chunk. Set to the size of the chunk in octets, including the chunk header
and all the Error Cause fields present.
Error causes are defined as variable-length parameters using the
format described in 2.2.1, i.e.:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cause Code | Cause Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/ Cause-specific Information /
\ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Cause Code: 16 bit u_int Cause Code: 16 bit u_int
Defines the type of error conditions which triggered this ERROR Defines the type of error conditions being reported.
chunk.
Cause-specific Information: depends on Length field Cause Length: 16 bit u_int
Set to the size of the parameter in octets, including the Cause Code,
Cause Length, and Cause-Specific Information fields
Cause-specific Information: variable length
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cause Code=1 | Reserved=0 | | Cause Code=1 | Cause Length=8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream Identifier | | Stream Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Cause of error Cause of error
--------------- ---------------
Missing Mandatory Parameter Missing Mandatory Parameter
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cause Code=2 | Number of missing params=N | | Cause Code=2 | Cause Length=8+N*2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of missing params=N |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Missing Param ID #1 | Missing Param ID #2 | | Missing Param ID #1 | Missing Param ID #2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Missing Param ID #N-1 | Missing Param ID #N | | Missing Param ID #N-1 | Missing Param ID #N |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Each missing mandatory parameter ID should be specified in the Each missing mandatory parameter ID should be specified in the
message. message.
Cause of error Cause of error
-------------- --------------
Stale Cookie Error. Stale Cookie Error: indicating the receiving of a valid cookie
which is however expired.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cause Code=3 | Reserved=0 | | Cause Code=3 | Cause Length=8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Measure of staleness in microseconds | | Measure of Staleness (msec.) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The sender of the stale cookie error may choose to place how long The sender of this error cause MAY choose to report how long
past expiration the cookie is. It does this by placing in the past expiration the cookie is, by putting in the Measure of
'Measure of staleness' variable the difference, in microseconds, Staleness field the difference, in microseconds, between the current
between the current time and the time the cookie expired. If a time and the time the cookie expired. If the sender does not wish to
implementation does not wish to provide this information it should provide this information it should set Measure of staleness to 0.
set 'Measure of staleness' to 0.
Guidelines for IETF-defined Error Cause extensions are discussed in
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
chunks in the same datagram. chunks in the same datagram.
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 1 0 1 0|Chunk Flags | Length | |0 0 0 0 1 0 1 0|Chunk Flags | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cookie | | Cookie |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Chunk Flags: Chunk Flags: 8 bit
Set to zero on transmit and ignored on receipt. Set to zero on transmit and ignored on receipt.
Cookie: variable size, (matching the size in the Cookie parameter Length: 16 bit u_int
received in the INIT ACK from the responder)
Set to the size of the chunk in octets, including the 4 octets of
the chunk header and the size of the Cookie.
Cookie: variable size
This field must contain the exact cookie received in a previous INIT This field must contain the exact cookie received in a previous INIT
ACK. ACK.
2.3.11 Cookie Acknowledgment (COOKIE ACK) (00001011): 2.3.11 Cookie Acknowledgment (COOKIE ACK) (00001011):
This chunk is used only during the initialization of an association. This chunk is used only during the initialization of an association.
It is used to acknowledge the receipt of a COOKIE chunk. This chunk It is used to acknowledge the receipt of a COOKIE chunk. This chunk
MUST precede any DATA chunk sent within the association, but MAY be MUST precede any DATA chunk sent within the association, but MAY be
bundled with one or more DATA chunks in the same datagram. bundled with one or more DATA chunks in the same SCTP datagram.
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 1 0 1 1|Chunk Flags |0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0| |0 0 0 0 1 0 1 1|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.
2.3.12 Payload Data (DATA) (00000000): 2.3.12 Payload Data (DATA) (00000000):
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 |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 | Sequence Number n |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \ \ \
/ User Data (seq n of Stream S) / / User Data (seq n of Stream S) /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note: the TSN, stream identifier, and sequence number MUST be Note: the TSN, stream identifier, and sequence number MUST be
transmitted in network byte order. transmitted in network byte order.
Reserved bits should be set to '0'. Reserved: 5 bits
should be set to all '0's and ignored by the receiver.
U bit: 1 bit
The (U)nordered bit, if set, indicates that this is an unordered
data chunk, and there is NO Sequence Number assigned to this DATA
chunk. Therefore, the receiver MUST ignore the Sequence Number
field.
After reassembly (if necessary), unordered data chunks MUST be
dispatched to the upper layer by the receiver without any attempt of
re-ordering.
Note, if an unordered user message is segmented, each segment MUST
have its U bit set to 1.
B bit: 1 bit B bit: 1 bit
The (B)eginning segment bit is a one bit field set to 1 on the
first segment derived from a SCTP user message and set to 0 for all
other segments from the same SCTP user message.
E bit: 1 bit The (B)eginning segment bit, if set, indicates the first segment of
The (E)nding segment bit is a one bit field set to 1 on the last an SCTP user message.
segment and set to 0 for all other segments.
An unsegmented message has both the B and E bits set to 1. E bit: 1 bit
Both B and E bits set to 0 indicates a continued segment of a SCTP The (E)nding segment bit, if set, indicates the last segment of an
user message. SCTP user message.
B/E Bits and their Definitions 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
multi-segment SCTP 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 SCTP user message. |
+----------------------------------------------------------+ +----------------------------------------------------------+
| 0 0 | Continued piece of a segmented 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 SCTP user message. |
+----------------------------------------------------------+ +----------------------------------------------------------+
| 1 1 | Unsegmented 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 B/E bits, the Length includes the Type field, the Reserved field, the U and B/E bits, the
field, the Stream Identifier, the Stream Sequence Number and the User Length field, TSN, the Stream Identifier, the Stream Sequence
Data fields. It does not include any padding. Number, and the User Data fields. It does not include any padding.
TSN : 32 bits (32 bit u_int) TSN : 32 bits (32 bit u_int)
This value represents the TSN for this DATA chunk. This value represents the TSN for this DATA chunk.
Stream Identifier S: 16 bit u_int Stream Identifier S: 16 bit u_int
Identifies the stream to which the following user data belongs. Identifies the stream to which the following user data belongs.
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. data within the stream S. Valid range is 0x0 to 0xFFFF.
Sequence number 0x0 indicates that the following user data MUST
be treated as unordered, and MUST be dispatched to the upper
layer by the receiver without any attempt of re-ordering.
For ordered datagram, the sequence number MUST wrap around to 0x1 Note, when a user message is segmented by SCTP for transport, the
after 0xffff. same sequence number MUST be carried in each of the segments of
the message.
User Data: variable length User Data: variable length
This is the payload user data. The implementation MUST This is the payload user data. The implementation MUST pad the end
pad the end of the data to a 32 bit boundary with 0 octets. Any of the data to a 32 bit boundary with 0 octets. Any padding should
padding should NOT be included in the length field. NOT be included in the length field.
2.3.13 Vendor-Specific Chunk (0xFE)
Since Vendor-Specific Chunks are a special case, they are described 2.4 Vendor-Specific Chunk Extensions
here.
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 extended data formats not defined by the IETF. It MUST not affect the
affect the operation of SCTP. operation of SCTP.
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. A summary of the Vendor-Specific Chunk format is shown below. The
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Flags | Length | | Type | Flags | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Vendor-Id | | Vendor-Id |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \ \ \
/ Value / / Value /
\ \ \ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type: 8 bit u_int Type: 8 bit u_int
0xFE for Vendor-Specific. 0xFE for all Vendor-Specific chunks.
Flags: 8 bit u_int Flags: 8 bit u_int
Vendor specific flags. Vendor specific flags.
Length: 16 bit u_int Length: 16 bit u_int
>= 8 Size of this Vendor-Specific chunks in octets, including the Type,
Flags, Length, Vendor-Id, and Value fields.
Vendor-Id: 32 bit u_int Vendor-Id: 32 bit u_int
The high-order octet is 0 and the low-order 3 octets are the SMI The high-order octet is 0 and the low-order 3 octets are the SMI
Network Management Private Enterprise Code of the Vendor in Network Management Private Enterprise Code of the Vendor in
network byte order, as defined in the Assigned Numbers (RFC 1700). network byte order, as defined in the Assigned Numbers (RFC 1700).
Value: Variable length Value: Variable length
The Value field is one or more octets. The actual format of the The Value field is one or more octets. The actual format of the
information is site or application specific, and a robust information is site or application specific, and a robust
implementation SHOULD support the field as undistinguished implementation SHOULD support the field as undistinguished
octets. octets.
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.
2.4 Bundling
Multiple chunks can be bundled into one SCTP datagram. Partial chunks
MUST NOT be placed in a datagram.
The transmitter MUST transmit DATA chunks within a datagram in
increasing order of TSN. Control messages MUST be placed at the
beginning of a datagram.
The receiver MUST process the chunks in order in the datagram. The
receiver uses the chunk length field to determine the end of a chunk
and beginning of the next chunk taking account of the fact that all
chunks end on a thirty-two-bit word boundary. If the receiver detects
a partial chunk, it should drop the chunk.
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., [open], [shutdown], [abort],
o reception of INIT, COOKIE, ABORT, SHUTDOWN, etc. control o reception of INIT, COOKIE, ABORT, SHUTDOWN, etc. control
chunks, or chunks, or
skipping to change at line 1751 skipping to change at line 1794
4. Association Initialization 4. Association Initialization
Before the first data transmission can take place from one SCTP Before the first data transmission can take place from one SCTP
endpoint ("A") to another SCTP endpoint ("Z"), the two endpoints must endpoint ("A") to another SCTP endpoint ("Z"), the two endpoints must
complete an initialization process in order to set up an SCTP complete an initialization process in order to set up an SCTP
association between them. association between them.
The SCTP user at an endpoint SHOULD use the ASSOCIATE primitive to The SCTP user at an endpoint SHOULD use the ASSOCIATE primitive to
initialize an SCTP association to another SCTP endpoint. initialize an SCTP association to another SCTP endpoint.
IMPLEMENTATION NOTE: an association may be implicitly opened, IMPLEMENTATION NOTE: From an SCTP-user's point of view, an
without an associate primitive being invoked, by the initiating association may be implicitly opened, without an Associate primitive
endpoint's sending of the first user data to the destination (see 9.1 B) being invoked, by the initiating endpoint's sending of
endpoint. The initiating SCTP will assume default values for all the first user data to the destination endpoint. The initiating SCTP
mandatory and optional parameters for the INIT/INIT ACK. will assume default values for all mandatory and optional parameters
for the INIT/INIT ACK.
Once the association is established, unidirectional streams will be Once the association is established, unidirectional streams will be
open for data transfer on both ends (see Section 4.1.1). open for data transfer on both ends (see Section 4.1.1).
A cookie mechanism is employed during the initialization to provide A cookie mechanism is employed during the initialization to provide
protection against security attacks. The cookie mechanism uses a protection against security attacks. The cookie mechanism uses a
four-way handshaking, but the last two legs of which are allowed to four-way handshaking, but the last two legs of which are allowed to
carry user data for fast setup. carry user data for fast setup.
4.1 Normal Establishment of an Association 4.1 Normal Establishment of an Association
skipping to change at line 1799 skipping to change at line 1843
C) Upon reception of the INIT ACK from "Z", "A" shall leave COOKIE-WAIT C) Upon reception of the INIT ACK from "Z", "A" shall leave COOKIE-WAIT
state and enter the COOKIE-SENT state. "A" now sends the cookie state and enter the COOKIE-SENT state. "A" now sends the cookie
received in the INIT ACK message in a cookie chunk. The cookie received in the INIT ACK message in a cookie chunk. The cookie
chunk can be bundled with any pending DATA chunks, but it MUST chunk can be bundled with any pending DATA chunks, but it MUST
be the first chunk in the datagram. be the first chunk in the datagram.
D) Upon reception of the COOKIE chunk, Endpoint "Z" will reply with D) Upon reception of the COOKIE chunk, Endpoint "Z" will reply with
a COOKIE-ACK chunk after building a TCB and marking itself to a COOKIE-ACK chunk after building a TCB and marking itself to
the established state. A COOKIE-ACK chunk may also be combined with the established state. A COOKIE-ACK chunk may also be combined with
any pending DATA chunks (and/or SACK chunks), but the COOKIE-ACK chunk any pending DATA chunks (and/or SACK chunks), but the COOKIE-ACK
must be the first chunk in the datagram. chunk must be the first chunk in the datagram.
IMPLEMENTATION NOTE: a implementation may choose to send the IMPLEMENTATION NOTE: a implementation may choose to send the
communication up primitive to the SCTP user upon reception communication up primitive 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 its INIT COOKIE-SENT state to the ESTABLISHED state, stopping its INIT
timer. timer.
IMPLEMENTATION NOTE: a implementation may choose to send the IMPLEMENTATION NOTE: a implementation may choose to send the
skipping to change at line 1883 skipping to change at line 1927
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 [15] 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 responder 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 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 a cookie is received from its peer in an INIT ACK message, the
receiver of the INIT ACK MUST immediately send a COOKIE chunk to its receiver of the INIT ACK MUST immediately send a COOKIE chunk to its
peer and MAY piggy-back any pending DATA chunks on the outbound peer and MAY piggy-back any pending DATA chunks on the outbound
cookie chunk. The sender should also start a timer, and retransmit cookie chunk. The sender should also start a timer, and retransmit
the cookie chunk until a COOKIE ACK is received or the endpoint the cookie chunk until a COOKIE ACK is received or the endpoint
is marked unreachable (see section 5.12 for retransmission details). is marked unreachable.
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 by comparing the computed MD5 signature
skipping to change at line 1997 skipping to change at line 2041
\/ 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.Retransmit times before "A" restarted. This shall be repeated Max.Init.Retransmit 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
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 has described in this section.
The following scenarios can cause duplicated chunks: The following scenarios can cause duplicated chunks:
skipping to change at line 2105 skipping to change at line 2151
TCB, then the cookie is a old stale cookie and does TCB, then the cookie is a old stale cookie and does
not correspond to the existing association (case C above). not correspond to the existing association (case C above).
The datagram should be silently discarded. The datagram should be silently discarded.
7) If the Peers Verification Tag in the temporary TCB does not 7) If the Peers Verification Tag in the temporary TCB does not
match the Peers Verification Tag in the existing TCB match the Peers Verification Tag in the existing TCB
then a restart of the peer has occurred (case A above) and the then a restart of the peer has occurred (case A above) and the
endpoint should report the restart and respond with a COOKIE-ACK endpoint should report the restart and respond with a COOKIE-ACK
message; Updating the Verification Tag, starting sequence message; Updating the Verification Tag, starting sequence
number, and network information of its peer from the temporary number, and network information of its peer from the temporary
TCB to the existing TCB. After which the temporary TCB may be discarded. TCB to the existing TCB. After which the temporary TCB may be
discarded.
IMPLEMENTATION NOTE: It is a implementation decision on how IMPLEMENTATION NOTE: It is an implementation decision on how
to handle any pending datagrams. The implementation may elect to handle any pending datagrams. The implementation may elect
to either A) send all messages up to its upper layer with the to either A) send all messages up to its upper layer with the
restart report, or B) automatically requeue any datagrams restart report, or B) automatically requeue any datagrams
pending, marking all to the unsent state and assigning pending, marking all to the unsent state and assigning
new TSN's at the time of initial transmit based upon the new TSN's at the time of initial transmit based upon the
updated starting sequence number (as defined in section 5.5). updated starting sequence number (as defined in section 5.5).
4.2.5 Handle Duplicate COOKIE-ACK. 4.2.5 Handle Duplicate COOKIE-ACK.
At any state other than COOKIE-Sent a endpoint may receive a At any state other than COOKIE-Sent a endpoint may receive a
skipping to change at line 2149 skipping to change at line 2196
If the association is in the COOKIE-SENT state, the endpoint If the association is in the COOKIE-SENT state, the endpoint
may elect one of three alternatives. may elect one of three alternatives.
1) Send a new INIT message to the endpoint, to generate 1) Send a new INIT message to the endpoint, to generate
a new cookie and re-attempt the setup procedure. a new cookie and re-attempt the setup procedure.
2) Discard the TCB and report to the upper layer the 2) Discard the TCB and report to the upper layer the
inability to setup the association. inability to setup the association.
3) Send a new INIT message to the endpoint, adding a 3) Send a new INIT message to the endpoint, adding a cookie
cookie preservative requesting a time extentsion preservative requesting a time extentsion on the life of the
on the life of the cookie. When calculating the cookie. When calculating the time extension, an implementation
time extension, a implementation SHOULD use SHOULD use Round Trip Time (RTT) information generated from
Round Trip Time (RTT) information generated from the original COOKIE <-> Stale COOKIE timing and should add no more
the original COOKIE <-> Stale COOKIE timing and than 1,000,000 microseconds beyond the RTT. Long cookie lives will
should add no more than 1,000,000 microseconds make a endpoint more subject to a replay attack.
beyond the RTT. Long cookie lives will make a endpoint
more subject to a replay attack.
4.3 Other Initialization Issues 4.3 Other Initialization Issues
4.3.1 Selection of Tag Value 4.3.1 Selection of Tag Value
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 [9] 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 4.3.2 Initiation from behind a NAT
When a NAT is present between two endpoints, the endpoint that is 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 behind the NAT, i.e., one that does not have a publicly available
skipping to change at line 2195 skipping to change at line 2240
advantage of. advantage of.
B) Indicate all of its networks in the Initiation by specifying all 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 the actual IP addresses and ports that the NAT will substitute for the
endpoint. This method requires that the endpoint behind the NAT must 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 have pre-knowledge of all the IP addresses and ports that the NAT will
assign. assign.
5. User Data Transfer 5. User Data Transfer
User data is transferred in SCTP DATA Chunks. The format of SCTP data
chunks is defined in Section 2.3.12.
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 bundling and segmentation mechanisms, as defined in Sections 5.10 The following diagram depicts the flow of user messages through SCTP.
and 5.11, are optional to implement by the data sender, but they MUST
+--------------------------+
| User Messages |
+--------------------------+
SCTP user ^ |
==================|==|=======================================
| v (1)
+------------------+ +--------------------+
| SCTP DATA Chunks | |SCTP Control Chunks |
+------------------+ +--------------------+
^ | ^ |
| v (2) | v (2)
+--------------------------+
| SCTP datagrams |
+--------------------------+
SCTP ^ |
===========================|==|===========================
| v
Unreliable datagram service (e.g., UDP)
Note:
(1) When converting user messages into Data chunks, SCTP sender
will segment user messages larger than the current path MTU
into multiple data chunks. The segmented message will be
reassembled from data chunks before delivery by the SCTP
receiver.
(2) Multiple data and control chunks may be multiplexed by the
sender into a single SCTP datagram for transmission, as long as
the final size of the datagram does not exceed the current path
MTU. The receiver will de-multiplex the datagram back into
chunks.
The bundling and segmentation mechanisms, as detailed in Sections 5.9
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., a SCTP receiver MUST be
prepared to 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 have more than A) At any given time, the sender MUST NOT transmit new data onto any
min(cwnd, rwnd) DATA chunks outstanding. destination transport address if it has rwnd or more octets of data
outstanding. The outstanding data size is defined as the total size
of ALL data chunks outstanding.
B) When the time comes for the sender to transmit, before sending B) At any given time, the sender MUST NOT transmit new data onto a
given transport address if it has cwnd or more octets of data
outstanding on that transport address.
C) When the time comes for the sender to transmit, before sending
new DATA chunks, the sender MUST first transmit any outstanding new DATA chunks, the sender MUST first transmit any outstanding
DATA chunks which are marked for retransmission (see Section 5.12 DATA chunks which are marked for retransmission.
for more on retransmission).
C) Then, the sender can send out up to N new DATA chunks, where D) Then, the sender can send out as many new DATA chunks as Rule A and
N = min(cwnd, rwnd) - fsize. The sender shall then update its Rule B above allow.
fsize.
Note: if the window is full (i.e., N is less than or equal to zero), Note: multiple DATA chunks committed for transmission MAY be
the sender may still accept send requests from its upper layer, but bundled in a single packet, unless bundling is explicitly disallowed
SHALL transmit no more DATA chunks until some or all of the by ULP of the data sender. Also, it is implementation specific
outstanding DATA chunks are acknowledged and its fsize decremented. whether to allow the bundling of retransmission DATA chunks with
new DATA chunks.
Note: if there are any unacknowledged DATA chunks (e.g., due to
delayed ack), the sender should create a SACK and bundle it with
the outbound DATA chunk, as long as the size of the final SCTP
datagram does not exceed the current MTU. See Section 5.2.
IMPLEMENTATION Note: if the window is full (i.e., transmission is
disallowed by Rule A and/or Rule B), the sender MAY still accept
send requests from its upper layer, but SHALL transmit no more DATA
chunks until some or all of the outstanding DATA chunks are
acknowledged and transmission is allowed by Rule A and Rule B
again.
In all cases, if a transmission or retransmission of a DATA chunk is In all cases, if a transmission or retransmission of a DATA chunk is
made, the sender shall start the retransmission timer (T3-rxt) if it made, the sender shall start the retransmission timer (T3-rxt) if it
is not currently running. For retransmissions, the T3-rxt timer value is not currently running. The T3-rxt timer value must be adjusted
must be adjusted according to the timer back-off rules defined in according to the timer rules defined in Sections 5.3.2, and 5.3.3.
Section 5.12.3.
Note: If rwnd is set to 0, and all pending DATA chunks are acknowledged, Note: If rwnd is set to 0, and all outstanding DATA chunks are
a sender is allowed to send 1 new DATA chunk to probe the receiver for acknowledged, a sender is allowed to send ONE new DATA chunk up to the
changes to rwnd. size of current path MTU, to probe the receiver for changes to rwnd.
5.2 Acknowledgment on Reception of DATA Chunks 5.2 Acknowledgment on Reception of DATA Chunks
The SCTP receiver MUST always acknowledge the SCTP sender about the The SCTP receiver MUST always acknowledge the SCTP sender about the
reception of each DATA chunk. reception of each DATA chunk.
The guidelines on delayed acknowledgment algorithm specified in The guidelines on delayed acknowledgment algorithm specified in
Section 4.2 of RFC 2581 [14] SHOULD be followed. In particular, a SCTP Section 4.2 of RFC 2581 [3] SHOULD be followed. In particular, a SCTP
receiver MUST NOT excessively delay acknowledgments. Specifically, an receiver MUST NOT excessively delay acknowledgments. Specifically, an
acknowledgement SHOULD be generated for at least every second datagram acknowledgement SHOULD be generated for at least every second datagram
received, and SHOULD be generated within 200 ms of the arrival of any received, and SHOULD be generated within 200 ms of the arrival of any
unacknowledged datagram. unacknowledged datagram.
IMPLEMENTATION NOTE: the maximal delay for generating an IMPLEMENTATION NOTE: the maximal delay for generating an
acknowledgement may need to be configurable by the SCTP user, acknowledgement may need to be configurable by the SCTP user,
either statically or dynamically, in order to meet the specific either statically or dynamically, in order to meet the specific
timing requirement of the signaling protocol being carried. timing requirement of the signaling protocol being carried.
Acknowledgments MUST be sent in SACK control chunks. A SACK chunk can Acknowledgments MUST be sent in SACK control chunks. A SACK chunk can
acknowledge the reception of multiple DATA chunks, see Section 2.3.3 acknowledge the reception of multiple DATA chunks. See Section 2.3.3
for SACK chunk format. In particular, the SCTP receiver MUST fill the for SACK chunk format. In particular, the SCTP receiver MUST fill the
Highest Consecutive TSN ACK field to indicate the highest consecutive Highest Consecutive TSN ACK field to indicate the highest consecutive
TSN number it has received, and any received segments beyond the TSN number it has received, and any received segments beyond the
highest consecutive TSN SHALL also be reported. highest consecutive TSN SHALL also be reported.
Upon reception of the SACK, the data sender MUST adjust its total
outstanding data count and the outstanding data count on those
destination addresses for which one or more data chunks is
acknowledged by the SACK.
The following example illustrates the use of delayed acknowledgments: The following example illustrates the use of delayed acknowledgments:
Endpoint A Endpoint Z Endpoint A Endpoint Z
{App sends 3 messages; strm 0} {App sends 3 messages; strm 0}
DATA [TSN=7,Strm=0,Seq=3] ------------> (ack delayed) DATA [TSN=7,Strm=0,Seq=3] ------------> (ack delayed)
(Start T3-rxt timer) (Start T3-rxt timer)
DATA [TSN=8,Strm=0,Seq=4] ------------> (send ack) DATA [TSN=8,Strm=0,Seq=4] ------------> (send ack)
/------- SACK [TSN ACK=8,Frag=0] /------- SACK [TSN ACK=8,Frag=0]
skipping to change at line 2289 skipping to change at line 2386
{App sends 1 message; strm 1} {App sends 1 message; strm 1}
(bundle SACK with DATA) (bundle SACK with DATA)
/----- SACK [TSN Ack=9,Seg=0] \ /----- SACK [TSN Ack=9,Seg=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,Seg=0] --------------> (cancel T3-rxt timer) SACK [TSN ACK=6,Seg=0] --------------> (cancel T3-rxt timer)
5.3 Timer Management Rules 5.3 Management of Retransmission Timer
Unless otherwise stated, the following rules SHALL be used to manage SCTP uses a retransmission timer T3-rxt to ensure data delivery in the
the timers during normal DATA chunk transfer: absence of any feedback from the remote data receiver. The duration of
this timer is referred to as RTO (retransmission timeout).
A) When a DATA chunk is sent out, the SCTP sender shall start The computation and management of RTO in SCTP follows closely with how
a T3-rxt timer if no T3-rxt timer is currently running. TCP manages its retransmission timer. To compute the current RTO, an
SCTP sender maintains two state variables per destination transport
address: SRTT (smoothed round-trip time) and RTTVAR (round-trip time
variation).
Note, if there are any unacknowledged DATA chunks (e.g., due to 5.3.1 RTO Calculation
delayed ack), the sender should create a SACK and bundle it with
the outbound DATA chunk, as long as the size of the resultant SCTP
datagram does not exceed the current MTU.
B) When the T3-rxt timer expires, the sender shall follow the rules The rules governing the computation of SRTT, RTTVAR, and RTO are
described in Section 5.12 for retransmissions. as follows:
The value of the T3-rxt timer shall be adjusted every time when it C1) Until an RTT measurement has been made for a packet sent
is started with the latest RTT measures. See Section 5.12.3 for to the given destination transport address, set RTO to the
details. protocol parameter 'RTO.Initial'.
C) When all outstanding DATA chunks are acknowledged, the T3-rxt C2) When the first RTT measurement R is made, set SRTT <- R,
timer shall be stopped if it is still running. RTTVAR <- R/2, and RTO <- SRTT + K * RTTVAR, where K = 4.
D) When the data sender has the T3-rxt timer running and receives a C3) When a new RTT measurement R' is made, set
partial acknowledgment (one that acknowledges at least one but not
all outstanding DATA chunks), if the Consecutive TSN ACK is moved RTTVAR <- beta * RTTVAR + (1 - beta) * |SRTT - R'|
forward, the sender shall restart the T3-rxt timer; otherwise T3-rxt SRTT <- alpha * SRTT + (1 - alpha) * R'
timer shall continue running.
(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.
After the computation, update RTO <- SRTT + 4 * RTTVAR.
C4) It is RECOMMENDED that new RTT measurements should be made
no more than once per round-trip for a given destination
transport address. There are two reasons for this recommendation:
first, it appears that measuring more often does not in practice
yield any significant benefit [5]; second, if measurements
are made more often, then the values of alpha and beta in
rule C3 above must be adjusted so that SRTT and RTTVAR still
adjust to changes at roughly the same rate (in terms of
how many round trips it takes them to reflect new value) as
they would if making only one measurement per round-trip
and using alpha and beta as given in rule C3.
C5) Karn's algorithm: RTT measurements MUST NOT be made using
packets that were retransmitted (and thus for which it is
ambiguous whether the reply was for the first instance of the
packet or a later instance).
C6) Whenever RTO is computed, if it is less than 1 second then
it is rounded up to 1 second. The reason for this rule is
that RTOs that do not have a high minimum value are susceptible
to unnecessary timeouts [5].
C7) A maximum value may be placed on RTO provided it is at least
60 seconds.
There is no requirement for the clock granularity G used for computing
RTT measurements and the different state variables, other than
G1) Whenever RTTVAR is computed, if RTTVAR = 0, then adjust
RTTVAR <- G.
Experience has shown that finer clock granularities (<= 100 msec)
perform somewhat better than more coarse granularities.
5.3.2 Retransmission Timer Rules
The rules for managing the retransmission timer are as follows:
R1) Every time a packet containing data is sent (including a
retransmission), if the T3-rxt timer is not running, start it
running so that it will expire after RTO seconds. The RTO
used here is that obtained after any doubling due to
retransmission as discussed in rule E3 below.
R2) Whenever all outstanding data has been acknowledged, turn
off the retransmission timer.
R3) Whenever a SACK is received that acknowledges new data chunks
including the one with the earliest outstanding TSN (i.e., moving
the cumulative ACK point forward),
restart T3-rxt retransmission timer so that it will expire
after RTO seconds (for the current value of RTO).
The following example shows the use of various timer rules (assuming The following example shows the use of various timer rules (assuming
the receiver uses delayed acks). the receiver uses delayed acks).
Endpoint A Endpoint Z Endpoint A Endpoint Z
{App sends 2 messages; strm 0} {App sends 2 messages; strm 0}
Data [TSN=7,Strm=0,Seq=3] ------------> (ack delayed) Data [TSN=7,Strm=0,Seq=3] ------------> (ack delayed)
(Start T3-rxt timer) (Start T3-rxt timer)
{App sends 1 message; strm 1} {App sends 1 message; strm 1}
(bundle ack with data) (bundle ack with data)
skipping to change at line 2341 skipping to change at line 2498
/ \ / \
(Re-start T3-rxt timer) <------/ \--> (ack delayed) (Re-start T3-rxt timer) <------/ \--> (ack delayed)
(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)
.. ..
(send ack) (send ack)
(Cancel T3-rxt timer) <-------------- SACK [TSN ACK=8,Frag=0] (Cancel T3-rxt timer) <-------------- SACK [TSN ACK=8,Frag=0]
5.3.1 T3-rxt Timer Adjustment with RTT 5.3.3 Handle T3-rxt Expiration
The sender shall keep track of the latest RTT measurement for the Whenever the retransmission timer T3-rxt expires, do the following:
destination transport address of its peer (or addresses if the peer is
multi-homed).
Procedures for obtaining RTT measurements are defined in Section 7.5. E1) Adjust ssthresh with rules defined in Section 6.2.3.
Every time when a new DATA chunk is sent for the first time (i.e., E2) Determine how many of the earliest (i.e., lowest TSN)
not a retransmission), the following procedure shall be applied to outstanding Data chunks will fit into a single packet,
determine the T3-rxt timer value: subject to the MTU constraints for the path corresponding to
the destination transport address. Call this value K.
Retransmit those K data chunks in a single packet, and set
cwnd <- MTU.
1. TL3-value = 'TL3-default' E3) Set 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 doubling operation.
2. T3-rxt = TL3-value + network-RTT E4) Start the retransmission timer, per rule R1 above.
where, 'TL3-default' is a protocol parameter configurable by the Note, the data sender MAY use a value smaller than the RTO when
sender, and the network-RTT is the current RTT measurement of the start the retransmission timer IF the sender has fewer than
destination transport address this transmission is to take place. cwnd octets of outstanding data on the transport address to which
the retransmission is being sent.
However, if the previous T3-rxt timer expired and is being re-started [EditorĘs Note: if the receiver is multi-homed and the retrans
for a retransmission, the timer back-off rules defined in Section 5.12 is to be sent to an alternate address, how this rapid retran
shall be used instead. rule should apply??]
Note that after retransmitting, once a new RTT measurement is obtained
(which can only happen when new data has been sent and acknowledged,
per rule C5, or for a measurement made from a Heartbeat [see Section
7.3]), the computation in rule C3 is performed, including the
computation of RTO, which may result in "collapsing" RTO back down
after it has been subject to doubling (rule E3).
The final rule for managing the retransmission timer concerns failover:
F1) Whenever SCTP switches from the current destination transport
address to a different one (per section ???), the current
retransmission timer is left running. As soon as SCTP transmits
a packet containing data to the new transport address, restart the
timer, using the RTO value for the path to the new address.
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 Section 9
for details). for details).
At association initiation, the initial primary destination transport At association initiation, the initial primary destination transport
addresses are: addresses are:
- for the sender of the INIT message, the transport address that the INIT - for the sender of the INIT message, the transport address that the
is sent on. This may be changed upon reception of the destination transport INIT is sent on. This may be changed upon reception of the
adress list in the INIT ACK message. destination transport address list in the INIT ACK message from the
peer.
- for the sender of the INTI ACK message, any valid transport address - for the sender of the INTI ACK message, any valid transport address
obtained from the INIT message. 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 destination transport address, unless the SCTP user explicitly specifies the
transport address to use. destination transport address to use.
If possible, acknowledgements SHOULD be transmitted to the same If possible, acknowledgements SHOULD be transmitted to the same
destination transport address from which the acknowledged DATA or destination transport address from which the acknowledged DATA or
control chunks were received (Note: when acknowledging multiple DATA control chunks were received (Note: when acknowledging multiple DATA
chunks in a single SACK, this may not be possible). chunks in a single SACK, this may not be possible).
Some of the destination transport addresses may become inactive due to Some of the destination transport addresses may become inactive due to
either the occurrance of certain error conditions or adjustments from either the occurrance of certain error conditions or adjustments from
SCTP user. SCTP user.
In the case where the primary destination transport address becomes In the case where the primary destination transport address becomes
inactive, or the SCTP user tries to explicitly send to an inactive inactive, or the SCTP user tries to explicitly send to an inactive
destination transport address, the SCTP sender should either send the destination transport address, the SCTP sender should either send the
chunk to an alternate active destination transport address, or to chunk to an alternate active destination transport address, or to
report an error. This is implementation specific. report an error. This is implementation specific.
Also, when the SCTP receiver is multi-homed, an SCTP sender SHOULD Also, when the SCTP receiver is multi-homed, an SCTP sender SHOULD
always try to retransmit a chunk to an active destination transport always try to retransmit a chunk to an active destination transport
address that is different from the original destination address used address that is different from the original destination address used
to transmit that chunk. to transmit that chunk. Retransmissions do not affect the total
outstanding data count. However, if the data chunk is retransmitted
onto a different destination address, the outstanding data counts on
the new destination address and the old destination address where the
data chunk was originally sent to shall be adjusted accordingly.
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 respond immediately with an ERROR message with cause set to Invalid
Stream Identifier (see Section 2.3.9) and discard the DATA chunk. Stream Identifier (see Section 2.3.9) and discard the DATA chunk.
For ordered DATA chunks, a non-zero stream sequence number MUST be The stream sequence number in all the streams shall start from 0x0
carried. when the association is established. Also, when the stream sequence
number reaches the value 0xffff the next sequence number shall be set
The stream sequence number in all the streams shall start from 1 when to 0x0.
the association is established. Also, when the stream sequence number
reaches the value 0xffff the next sequence number shall be set to 1.
Stream sequence number '0' has special meanings, see Section 5.6
below.
5.6 Ordered and Un-ordered Delivery 5.6 Ordered and Un-ordered Delivery
Normally, the SCTP receiver shall ensure the DATA chunks within any Normally, 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
their stream sequence number. If there are DATA chunks arriving out of their stream sequence number. If there are DATA chunks arriving out of
order of their stream sequence number, the receiver MUST hold the order of their stream sequence number, the receiver MUST hold the
received DATA chunks from delivery until they are re-ordered. received DATA chunks from delivery until they are re-ordered.
However, an SCTP sender can set the stream sequence number of a DATA However, an SCTP sender can indicate that no ordered delivery is
chunk to '0', to indicate that no ordered delivery is required on that required on a particular DATA chunk within the stream by setting the U
particular DATA chunk within the stream. flag of the DATA chunk to 1.
In this case, the receiver must bypass the ordering mechanism and In this case, the receiver must ignore the sequence number field of
immediately delivery the data to the upper layer (after re-assembly if the data chunk, bypass the ordering mechanism and immediately delivery
the data is segmented by the sender).. the data to the upper layer (after re-assembly if the user data is
segmented by the sender).
This provides an effective way to transmit "out-of-band" data in any This provides an effective way of transmitting "out-of-band" data in a
given stream. Also, a stream can be used as an "un-ordered" stream by given stream. Also, a stream can be used as an "unordered" stream by
simply setting the stream sequence number of each outbound DATA chunk simply setting the U flag to 1 in each outbound DATA chunk from that
to 0. stream.
IMPLEMENTATION NOTE: An implementation, when sending an un-ordered IMPLEMENTATION NOTE: An implementation, when sending an unordered
DATA chunk, may choose to place the DATA chunk in an outbound DATA chunk, may choose to place the DATA chunk in an outbound
datagram at the head of the outbound transmission queue if datagram at the head of the outbound transmission queue if
possible. possible.
5.7 Report Gaps in Received DATA TSNs 5.7 Report Gaps in Received DATA TSNs
Upon the reception of a new DATA chunk, an SCTP receiver shall examine Upon the reception of a new DATA chunk, an SCTP receiver shall examine
the continuity of the TSNs received. If the receiver detects that gaps the continuity of the TSNs received. If the receiver detects that gaps
exist in the received DATA chunk sequence, an SACK with fragment exist in the received DATA chunk sequence, an SACK with fragment
reports shall be sent back immediately. reports shall be sent back immediately.
Based on the segment reports from the SACK, the data sender can Based on the segment reports from the SACK, the data sender can
calculate the missing DATA chunks and make decisions on whether to calculate the missing DATA chunks and make decisions on whether to
retransmit them (see Section 5.12 for details). retransmit them (see Section 5.3 for details).
Multiple gaps can be reported in one single SACK (see Section 2.3.3). Multiple gaps can be reported in one single SACK (see Section 2.3.3).
Note that when the data sender is multi-homed, the SCTP receiver Note that when the data sender is multi-homed, the SCTP receiver
SHOULD always try to send the SACK to the same network from where the SHOULD always try to send the SACK to the same network from where the
last DATA chunk was received. last DATA chunk was received.
Upon the reception of the SACK, the data sender SHALL remove all DATA Upon the reception of the SACK, the data sender SHALL remove all DATA
chunks which have been acknowledged by the SACK. The data sender MUST chunks which have been acknowledged by the SACK. The data sender MUST
also treat all the DATA chunks which fall into the gaps between the also treat all the DATA chunks which fall into the gaps between the
fragments reported by the SACK as "missing". The number of "missing" fragments reported by the SACK as "missing". The number of "missing"
reports for each outstanding DATA chunk MUST be recorded by the data reports for each outstanding DATA chunk MUST be recorded by the data
sender in order to make retransmission decision, see Section 6.2.4 sender in order to make retransmission decision, see Section 6.2.4 for
for details. details.
The following example shows the use of SACK to report a gap. The following example shows the use of SACK to report a gap.
Endpoint A Endpoint Z Endpoint A Endpoint Z
{App sends 3 messages; strm 0} {App sends 3 messages; strm 0}
DATA [TSN=6,Strm=0,Seq=2] ---------------> (ack delayed) DATA [TSN=6,Strm=0,Seq=2] ---------------> (ack delayed)
(Start T3-rxt timer) (Start T3-rxt timer)
DATA [TSN=7,Strm=0,Seq=3] --------> X (lost) DATA [TSN=7,Strm=0,Seq=3] --------> X (lost)
skipping to change at line 2502 skipping to change at line 2679
<-----/ <-----/
(remove 6 and 8 from out-queue, (remove 6 and 8 from out-queue,
and strike 7 as "1" missing report) and strike 7 as "1" missing report)
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 unacknowledged. by the MTU, and leave the remaining highested TSN fragment numbers
unacknowledged.
5.8 TSN Range Check
The SCTP receiver must check the range of the TSN in each received
DATA chunk. The algorithm is outlined as follow:
Assume that the highest TSN received from the data sender is T and the
current LOCAL Receiver Window Credit is lrwnd (that is the rwnd last
advertised by the receiver to the data sender). When the next DATA
chunk arrives from the data sender, the receiver MUST discard the DATA
chunk if the TSN carried in the DATA chunk is greater than T + lrwnd
(calculation shall wrap around at 0xffffffff to 0x1). The receiver
shall also immediately send a SACK to the data sender.
Note: the highest TSN received is not necessarily the highest
consecutive TSN received. They becomes the same only when there is no
gap in the received TSN sequence space.
5.9 CRC-16 Utilization 5.8 CRC-16 Utilization
When sending a datagram, the sender can choose to strengthen the data When sending a datagram, the sender can choose to strengthen the data
integrity of the transmission by including the CRC-16 value calculated integrity of the transmission by including the CRC-16 value calculated
on the datagram, as described below. 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 Version number and Verification Tag in the
common header, common header,
skipping to change at line 2569 skipping to change at line 2730
3) verify that the calculated CRC-16 value is the same as the received 3) verify that the calculated CRC-16 value is the same as the received
CRC-16 value, If not, the receiver MUST treat the datagram as an CRC-16 value, If not, the receiver MUST treat the datagram as an
invalid SCTP datagram. invalid SCTP datagram.
If the C Bit is not set, the receiver MUST NOT perform the above If the C Bit is not set, the receiver MUST NOT perform the above
CRC-16 check. CRC-16 check.
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.10 Segmentation 5.9 Segmentation
Segmentation SHALL be performed by the data sender if the user message Segmentation SHALL 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.
When determining when to segment, the SCTP implementation MUST take
into account the SCTP datagram header as well as the DATA chunk
header. The implementation MAY also take account of the space required
for a SACK chunk.
IMPLEMENTATION NOTE: if the data receiver is multi-homed, the
latest MTU of the current primary destination address shall be
used.
IMPLEMENTATION NOTE: if segmentation is not support by the sender, IMPLEMENTATION NOTE: if segmentation is not support by the sender,
an error should be reported to the sender's SCTP user if the data to be an error should be reported to the sender's SCTP user if the data to be
sent has a size exceeding the current MTU. In such cases the Send sent has a size exceeding the current MTU. In such cases the Send
primitive discussed in Section 9.1 would need to return an error primitive discussed in Section 9.1 would need to return an error
to the upper layer. to the upper layer.
Segmentation takes the following steps: Segmentation takes the following steps:
1) the data sender SHALL break the large user message into a series of 1) the data sender SHALL break the large user message into a series of
DATA chunks, each with a total size smaller than the current MTU DATA chunks, each with a total size smaller than the current MTU
skipping to change at line 2601 skipping to change at line 2771
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 re-ordering and
final dispatching. final dispatching.
5.11 Bundling 5.10 Bundling and Multiplexing
An SCTP sender achieves bundling by simply including multiple DATA
chunks in one outbound SCTP datagram, see Section 2 for details. Note
that the total size of the resultant SCTP datagram, including the SCTP
common header, MUST be less or equal to the current MTU.
5.12 Retransmission
5.12.1 Basic Retransmission Rules
The SCTP data sender SHALL follow these rules for retransmit:
A) The data sender should only retransmit up to 'Max.retrans.at.once'
DATA chunks marked for retransmission in one send opportunity. Any
remaining DATA chunks marked for retransmission should be left for
the next send opportunity.
[Editors note: fsize may need to change to total-fsize]
B) Retransmissions does not change the count of outstanding DATA
chunks, i.e., the fsize will not increase on retransmissions.
C) If the data receiver is multi-homed, a retransmission should be
sent to an alternate active destination transport address which
should be different from the one the original transmission took
place.
The state of each destination transport address (active or
inactive) should be maintained and updated by the data sender,
using the failure detection (see Section 7.2) and heartbeat
mechanisms (see Section 7.3).
Note: fast retransmit on gap reports is discussed in Section 6.2.4 as
part of the congestion control.
5.12.2 Retransmit on T3-rxt Timer Expiration
When the T3-rxt timer expires, in addition to the congestion control
adjustments defined in 6.2.3, the data sender SHALL take the following
steps:
1) mark the outstanding DATA chunk for retransmission. If there are
more than one outstanding DATA chunks, the sender should mark both
the oldest and newest ones (in terms of their TSN order) for
retransmission;
2) immediately start retransmitting using the rules described in
Section 5.12.1, and;
3) start the T3-rxt timer after retransmission, if it is not
currently running.
5.12.3 T3-rxt Timer Back-off
When the T3-rxt timer is started or re-started for retransmission, An SCTP sender achieves data bundling by simply including multiple
the following timer back-off rules shall be applied to determine the DATA chunks in one outbound SCTP datagram. Note that the total size of
value of the new timer: the resultant SCTP datagram, including the SCTP common header, MUST be
less or equal to the current MTU.
1. TL3-value = TL3-value * 2 IMPLEMENTATION NOTE: if the data receiver is multi-homed, the
latest MTU of the current primary destination address shall be
used.
2. T3-rxt = TL3-value + network-RTT When multiplexing control chunks with DATA chunks, control chunks have
the priority and MUST be placed first in the outbound SCTP datagram
and be transmitted first. The transmitter MUST transmit DATA chunks
within a SCTP datagram in increasing order of TSN.
where, TL3-value is the protocol variable which keeps the previous Partial chunks MUST NOT be placed in a SCTP datagram.
T3-rxt timer base value, and the network-RTT is the current RTT
measurement of the destination transport address the retransmission is
to be sent to.
Note: the T3-rxt timer base value shall be restored to its default The receiver MUST process the chunks in order in the datagram. The
value 'TL3-default' when an ack is received from the peer endpoint. receiver uses the chunk length field to determine the end of a chunk
and beginning of the next chunk taking account of the fact that all
chunks end on a thirty-two-bit word boundary. If the receiver detects
a partial chunk, it MUST drop the chunk.
6. Congestion control 6. Congestion control
[ Editors Notes.. this section is still being reworked and may [ Editors Notes.. this section is still being reworked and may
have some changes ] have some changes ]
Congestion control is one of the basic functions in the SCTP protocol. Congestion control is one of the basic functions in the SCTP protocol.
It is likely that adequate resources will be allocated to SCTP It is likely that adequate resources will be allocated to SCTP traffic
traffic to assure prompt delivery of time-critical SCTP data, thus it to assure prompt delivery of time-critical SCTP data, thus it would be
would be unlikely, during normal operations, that SCTP transmissions unlikely, during normal operations, that SCTP transmissions encounter
encounter severe congestion condition. However SCTP must prepare itself severe congestion condition. However SCTP must prepare itself for
for adverse operational conditions, which can develop upon partial adverse operational conditions, which can develop upon partial network
network failures or unexpected traffic surge. In such situations SCTP failures or unexpected traffic surge. In such situations SCTP must
must follow correct congestion control steps to recover from congestion follow correct congestion control steps to recover from congestion
quickly in order to get data delivered as soon as possible. In the quickly in order to get data delivered as soon as possible. In the
absence of network congestion, these preventive congestion control absence of network congestion, these preventive congestion control
algorithms will show no impact on the protocol performance. algorithms will show no impact on the protocol performance.
The congestion control algorithms used by SCTP are based on RFC 2581, The congestion control algorithms used by SCTP are based on RFC 2581
"TCP Congestion Control". This section describes how the algorithms [3], "TCP Congestion Control". This section describes how the
defined in RFC 2581 are adopted for use in SCTP. We first list algorithms defined in RFC 2581 are adopted for use in SCTP. We first
differences in protocol designs between TCP and SCTP, and then describe list differences in protocol designs between TCP and SCTP, and then
SCTP's congestion control scheme. The description will use the same describe SCTP's congestion control scheme. The description will use
terminology as in TCP congestion control whenever appropriate. the same terminology as in TCP congestion control whenever
appropriate.
6.1 SCTP Differences from TCP Congestion control 6.1 SCTP Differences from TCP Congestion control
Different from TCP, SCTP controls data transmission in the unit of One difference from TCP is that Selective Acknowledgment function
DATA chunks instead of byte count. Thus the flow control and congestion (SACK) is designed into SCTP, rather than an enhancement that is added
control windows in SCTP are measured and adjusted in the number of to the protocol later as the case for TCP. SCTP SACK carries
DATA chunks. different semantic meanings from that of TCP SACK. TCP considers the
information carried in the SACK as advisory information only. In
Another difference is that Selective Acknowledgment function (SACK) is SCTP, any DATA chunk that has been acknowledged by SACK, including
designed into SCTP, rather than an enhancement that is added to the DATA that arrived at the receiving end out of order, are considered
protocol later as the case for TCP. SCTP SACK carries different having been delivered to the destination application, and the sender
semantic meanings from that of TCP SACK. TCP considers the information is free to discard the local copy. Thus the value of cwnd controls
carried in the SACK as advisory information only. In SCTP, any DATA the number of outstanding data; it is not the upper bound between the
chunk that has been acknowledged by SACK, including DATA that arrived highest acknowledged sequence number and the latest DATA chunk that
at the receiving end out of order, are considered having been delivered can be sent within the congestion window, as the case in TCP. SCTP
to the destination application, and the sender is free to discard the SACK leads to different implementations of fast-retransmit and
local copy. Thus the value of cwnd controls the number of outstanding fast-recovery from that of TCP.
DATA chunks; it is not the upper bound between the highest acknowledged
sequence number and the latest DATA chunk that can be sent within the
congestion window, as the case in TCP. SCTP SACK leads to different
implementations of 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 between SCTP is designed to establish robust communication associations
two end points each of which may be reachable by more than one transport between two end points each of which may be reachable by more than one
address. Potentially different addresses may lead to distinguished data transport address. Potentially different addresses may lead to
paths between the two points, thus ideally one may need a separate set distinguished data paths between the two points, thus ideally one may
of congestion control parameters for each of the paths. Given SCTP is need a separate set of congestion control parameters for each of the
the first transport protocol whose design specifically takes multihoming paths. Given SCTP is the first transport protocol whose design
issue into consideration, however, there is no experience at this point specifically takes multihoming issue into consideration, however,
regarding the use of multiple addresses, or the likelyhood of each there is no experience at this point regarding the use of multiple
address pair representing a separate path. To proceed with caution, we addresses, or the likelyhood of each address pair representing a
make the following assumptions: separate path. To proceed with caution, we make the following
assumptions:
o the sender does not change the use of source address often, if at o the sender does not change the use of source address often, if at
all. 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.
skipping to change at line 2758 skipping to change at line 2879
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), which is set by the o Receiver advertised window size (rwnd), which is set by the
receiver based on its available buffer space for incoming packets. receiver based on its available buffer space for incoming packets.
o Congestion control window (cwnd), which is adjusted by the sender o Congestion control window (cwnd), which is adjusted by the sender
based on observed network conditions. based on observed network conditions.
o Slow-start threshold (ssthresh), which is also used by the sender to o Slow-start threshold (ssthresh), which is also used by the sender to
distinguish congestion control and congestion avoidance phases. distinguish congestion control and congestion avoidance phases.
o Flight size (fsize), an SCTP sender variable that indicates the total
number of outstanding DATA chunks.
SCTP also requires one additional control variable, cwnd2, which is used SCTP also requires one additional control variable, cwnd2, which is used
during congestion avoidance phase to facilitate cwnd adjustment. during congestion avoidance phase to facilitate cwnd 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 (DATA chunks). o The initial value of cwnd MUST be less than or equal to 2*MTU octets.
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 send cwnd o Whenever cwnd is greater than zero, the sender is allowed to have cwnd
number of DATA chunks. octets of data outstanding on that transport address.
o When cwnd is less than or equal to ssthresh, cwnd is incremented by o When cwnd is less than or equal to ssthresh AND the sender has cwnd or more
the number of chunks acknowledged in each SACK received (piggy-backed data outstanding on the transport address, cwnd is incremented by
or stand-alone SACKs). the total number of octets of all new data chunks acknowledged in each
SACK received (piggy-backed or stand-alone SACKs).
o When the sender does not transmit data on a given transport address, the
cwnd of the transport address should be adjusted to
max(cwnd / 2, 2*MTU) per RTT.
Note: a piggy-backed SACK is one that is bundled with a DATA chunk. Note: a piggy-backed SACK is one that is bundled with a DATA chunk.
6.2.2 Congestion Avoidance 6.2.2 Congestion Avoidance
Whenever cwnd is increased to be equal or greater than ssthresh, cwnd Whenever cwnd is increased to be equal or greater than ssthresh, cwnd
should be incremented by 1 per RTT. In practice an implementation can should be incremented by MTU per RTT if at time the sender has cwnd or
more octets of data outstanding on that transport address.
In practice an implementation can
achieve this goal in the following way: achieve this goal in the following way:
o cwnd2 is initialized to 0. o cwnd2 is initialized to 0.
o Whenever cwnd is equal or greater than ssthresh, upon each SACK o Whenever cwnd is equal or greater than ssthresh, upon each SACK
arrival, increase cwnd2 by the number of chunks acknowledged in that arrival, increase cwnd2 by the total number of octets of all new
SACK. chunks acknowledged in that SACK.
o When cwnd2 is equal or greater than cwnd, increase cwnd by 1, and o When cwnd2 is equal or greater than cwnd and before the arrival of the
reset cwnd2 to (cwnd2 - cwnd). SACK the sender has cwnd or more octets of data outstanding,
increase cwnd by MTU, and reset cwnd2 to (cwnd2 - cwnd).
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(fsize/2, 2) ssthresh = max(cwnd/2, 2*MTU)
cwnd = ssthresh/2 cwnd = ssthresh/2
Basically, a packet loss causes cwnd to be cut in half. Basically, a packet loss causes cwnd to be cut in half(or 1/4??).
When the T3-timer expires, SCTP should perform slow start by setting When the T3-rxt timer expires, SCTP should perform slow start by
cwnd = 1, which assures that no more than one DATA chunk will be in setting cwnd = MTU, and assure that no more than one DATA chunk will
flight until the sender receives acknowledgment for successful be in flight until the sender receives acknowledgment for successful
delivery. 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 for every
packet arrival. packet arrival.
At the sender end, whenever the sender notices a hole in a SACK, it At the sender end, whenever the sender notices a hole in a SACK, it
should wait for 3 further SACKs before taking action. If the 3 should wait for 3 further SACKs before taking action. If the 3
subsequent SACKs report the same TSN(s) missing, the sender shall: subsequent SACKs report the same TSN(s) missing, the sender shall:
1) mark the DATA chunk(s) for retransmission, 1) mark the DATA chunk(s) for retransmission,
2) adjust its ssthresh and cwnd according to the formula described in 2) adjust its ssthresh and cwnd according to the formula described in
this section. Section 6.2.3.
3) Restart T3-rxt timer if it is running, and 3) Restart T3-rxt timer if it is running, and
4) start retransmission procedure, as described in Section 5.12.2. 4) start retransmission procedure, as described in Section 5.3.3.
A straightforward implementation of the above requires that the sender A straightforward implementation of the above requires that the sender
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 bounds the number of outstanding TSN's, Because cwnd in SCTP bounds the number of outstanding TSN's,
the effect of TCP fast-recovery is achieved automatically with no the effect of TCP fast-recovery is achieved automatically with no
adjustment to the control window size. adjustment to the control window size. [Is this still true??]
6.3 Path MTU Discovery 6.3 Path MTU Discovery
[Editor's Note: text to be provided by Vern] [Editor's Note: text to be provided by Vern]
6.4 Discussion 6.4 Discussion
[The following discussion needs to be updated for byte-based algorithm]
There is one important difference between the SCTP congestion control, There is one important difference between the SCTP congestion control,
as described above, and TCP congestion control. In the latter the as described above, and TCP congestion control. In the latter the
control behavior is measured in unit of packets. That is, upon slow control behavior is measured in unit of packets. That is, upon slow
start, a TCP connection doubles cwnd value per RTT as measured by the start, a TCP connection doubles cwnd value per RTT as measured by the
number of packets. In SCTP, cwnd value is doubled per RTT as measured number of packets. In SCTP, cwnd value is doubled per RTT as measured
by the number of DATA chunks. Similarly, during congestion avoidance, by the number of DATA chunks. Similarly, during congestion avoidance,
in the absence of packet losses a TCP connection increases cwnd by one in the absence of packet losses a TCP connection increases cwnd by one
data packet per RTT, while a SCTP association increases cwnd by one DATA data packet per RTT, while a SCTP association increases cwnd by one DATA
chunk per RTT. chunk per RTT.
skipping to change at line 2875 skipping to change at line 3004
We suggest that the current design be discussed, and revised if deemed We suggest that the current design be discussed, and revised if deemed
necessary. necessary.
7. Fault Management 7. Fault Management
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 multi-homed). ALL the destination transport addresses of the peer if it is
multi-homed).
If the value of this counter exceeds the limit defined in the protocol If the value of this counter exceeds the limit defined in the protocol
parameter 'Max.Retransmits', the data sender shall consider the peer parameter 'Max.Retransmits', the data sender shall consider the peer
endpoint unreachable and shall stop transmitting any more data to endpoint unreachable and shall stop transmitting any more data to
it. In addition, the data sender shall report the failure to the upper it. In addition, the data sender shall report the failure to the upper
layer, and optionally report back all outstanding datagrams remaining layer, and optionally report back all outstanding datagrams remaining
in its outbound queue. in its outbound queue.
The counter shall be reset each time a datagram is received from the The counter shall be reset each time a datagram is received from the
peer endpoint. peer endpoint.
skipping to change at line 2978 skipping to change at line 3108
When sending a SHUTDOWN ACK message, the sender is allowed to either When sending a SHUTDOWN ACK message, the sender is allowed to either
to use the destination endpoint's Tag or fill the Verification Tag to use the destination endpoint's Tag or fill the Verification Tag
field with 0. field with 0.
When receiving an SCTP datagram (except for INIT and SHUTDOWN ACK), When receiving an SCTP datagram (except for INIT and SHUTDOWN ACK),
the receiver MUST ensure that the value in the Verification Tag field the receiver MUST ensure that the value in the Verification Tag field
of the received message matches its own Tag. If the values do not of the received message matches its own Tag. If the values do not
match, the receiver shall silently discard the datagram and shall NOT match, the receiver shall silently discard the datagram and shall NOT
process it. process it.
The receiver of a SHUTDOWN ACK message shall accept the message if the The receiver of a SHUTDOWN ACK message shall accept the message
Verification Tag field is filled with correct Tag or 0x0. regardless the Verification Tag field is filled with the correct Tag
or 0x0.
7.5 RTT/RTO Measurement
[Editor's Note: text to be added]
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 association, it shall send
skipping to change at line 3012 skipping to change at line 3139
An endpoint in an association may decide to gracefully shutdown the An endpoint in an association may decide to gracefully shutdown the
association. This will guarantee that all outstanding datagrams from association. This will guarantee that all outstanding datagrams from
the peer of the shutdown initiator be delivered before the association 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 The initiator shall send a SHUTDOWN message to the peer of the
association, and shall include the last highest consecutive TSN it has association, and shall include the last highest consecutive TSN it has
received from the peer in the 'Highest Consecutive TSN ACK' field. It received from the peer in the 'Highest Consecutive TSN ACK' field. It
shall then start the T2-shutdown timer and enter the Shutdown-SENT shall then start the T2-shutdown timer and enter the Shutdown-SENT
state (if the timer expires, the initiator must re-send the SHUTDOWN state. If the timer expires, the initiator must re-send the SHUTDOWN
with the updated last TSN received from its peer). The sender of the with the updated last TSN received from its peer. When retransmitting
SHUTDOWN message may also optionally include a SACK to indicate the SHUTDOWN, the rules in 5.3 SHALL be followed to determine the
any gaps by bundling both the SACK and SHUTDOWN message together. proper timer value. The sender of the SHUTDOWN message may also
optionally include a SACK to indicate any gaps by bundling both the
SACK and SHUTDOWN message together.
Note the sender of a shutdown should limit the number of retransmissions Note the sender of a shutdown should limit the number of
of the shutdown message to the protocol parameter 'Max.Retransmits'. retransmissions of the shutdown message to the protocol parameter
If Max.Retransmits is exceeded the endpoint should destroy the TCB 'Max.Retransmits'. If Max.Retransmits is exceeded the endpoint should
and may report the endpoint has unreachable to the upper layer. destroy the TCB and may report the endpoint has unreachable to the
upper layer.
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.12. 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 user datagram from the peer with a SACK and restart
the T2-shutdown timer. 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 completion layer if it is Shutdown-SENT or Shutdown-RECEIVED state until
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 a 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.
9. Interface with Upper Layer 9. Interface with Upper Layer
skipping to change at line 3090 skipping to change at line 3220
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], or [eligible transport address list]) Format: INITIALIZE ([local port], [local eligible transport
address list])
-> 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 following types of attributes may be passed along with
the primitive: the primitive:
o local port - UDP port number, if ULP wants it to be specified; o local port - UDP port number, if ULP wants it to be specified;
o eliglible transport address list - A list of eliglible transport o local eliglible transport address list - A list of eliglible
transport
addresses that the local SCTP endpoint should bind. By default addresses that the local SCTP endpoint should bind. By default
all transport interface cards should be used by the local SCTP all transport interface cards should be used by the local SCTP
host if no list is given. host if no list is given.
B) Associate B) Associate
Format: ASSOCIATE(local SCTP instance name, destination addr info, Format: ASSOCIATE(local SCTP instance name, destination addr info,
stream count [,eligible transport address list] [,timer info]) stream count [,eligible transport address list] [,timer info])
-> association id [,destination net list] [,outbound stream count] -> association id [,destination net list] [,outbound stream count]
skipping to change at line 3133 skipping to change at line 3265
specific peer endpoint. The peer endpoint shall be specified by one of specific peer endpoint. The peer endpoint shall be specified by one of
the transport addresses which define the endpoint (see section 1.1). the transport addresses which define the endpoint (see section 1.1).
If the local SCTP instance has not been initialized, the ASSOCIATE is If the local SCTP instance has not been initialized, the ASSOCIATE is
considered an error. The set of transport addresses specified in the considered an error. The set of transport addresses specified in the
"eligible transport address list" shall be used has valid destinations "eligible transport address list" shall be used has valid destinations
when sending to the peer endpoint. If this parameter is not specified, when sending to the peer endpoint. If this parameter is not specified,
the associate command will consider all of the transport addresses the associate command will consider all of the transport addresses
returned by the INIT ACK message has valid. returned by the INIT ACK message has valid.
An association id, which is a local handle to the SCTP association, An association id, which is a local handle to the SCTP association,
will be returned on successful establishment of the association. will be returned on successful establishment of the association. If
If SCTP is not able to open an SCTP association with the peer endpoint, SCTP is not able to open an SCTP association with the peer endpoint,
an error is returned. an error is returned.
Implementor's Note: If ASSOCIATE primitive is implemented as a blocking Implementor's Note: If ASSOCIATE primitive is implemented as a
function call, the ASSOCIATE primitive can return association parameters blocking function call, the ASSOCIATE primitive can return association
in addition to the association id upon successful establishment. If ASSOCIATE parameters in addition to the association id upon successful
primitive is implemented as a non-blocking call, only the association id establishment. If ASSOCIATE primitive is implemented as a non-blocking
shall be returned and association parameters shall be passed using the call, only the association id shall be returned and association
COMMUNICATION UP notification. parameters shall be passed using the COMMUNICATION UP notification.
The association parameters shall include the destination addresses of the The association parameters shall include the destination addresses of
peer as well as the outbound stream count. the peer as well as the outbound stream count. One of the transport
One of the transport address from the set of destination addresses will address from the set of destination addresses will be used as default
be used as default primary destination address for sending datagrams to this primary destination address for sending datagrams to this peer. The
peer. The returned "destination net list" can be used by the ULP to returned "destination net list" can be used by the ULP to override the
override the default primary destination transport address or to force sending a default primary destination transport address or to force sending a
datagram on a specific network. datagram on a specific network.
Mandatory attributes: Mandatory attributes:
o local SCTP instance name - obtained from the initialize operation. o local SCTP instance name - obtained from the initialize operation.
o destination addr info - specified as one of the transport addresses o destination addr info - specified as one of the transport addresses
of the peer endpoint with which the association is to be established. of the peer endpoint with which the association is to be established.
o stream count - the number of streams the ULP would like to open at the o stream count - the number of streams the ULP would like to open at the
skipping to change at line 3177 skipping to change at line 3309
available. available.
o timer info - Timer selection and its operation syntax -- to indicate o timer info - Timer selection and its operation syntax -- to indicate
to SCTP an alternative timer the SCTP should use for its operation. to SCTP an alternative timer the SCTP should use for its operation.
C) Terminate C) Terminate
Format: TERMINATE(association id) Format: TERMINATE(association id)
-> result -> result
Gracefully terminates an association. Any locally queued datagrams will Gracefully terminates an association. Any locally queued datagrams
be delivered to the peer. The association will be terminated only after will be delivered to the peer. The association will be terminated only
the peer acknowledges all the messages sent. after the peer acknowledges all the messages sent. A success code
A success code will be returned on successful termination of the will be returned on successful termination of the association. If
association. If attempting to terminate the association results in a attempting to terminate the association results in a failure, an error
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 will Ungracefully terminates an association. Any locally queued datagrams
be discarded and an ABORT message is sent to the peer. will be discarded and an ABORT message is sent to the peer. A success
A success code will be returned on successful abortion of the code will be returned on successful abortion of the association. If
association. If attempting to abort the association results in a attempting to abort the association results in a failure, an error
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.
E) Send E) Send
skipping to change at line 3237 skipping to change at line 3369
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 message. The message will not o life time - specifies the life time of the message. The message
be sent by SCTP after the life time expires. This parameter can be used will not be sent by SCTP after the life time expires. This
to avoid efforts to transmit stale datagrams. SCTP notifies the ULP, if parameter can be used to avoid efforts to transmit stale
the datagram cannot be initiated to transport (i.e. sent to the destination datagrams. SCTP notifies the ULP, if the datagram cannot be
via SCTP's send primitive) within the life time variable. initiated to transport (i.e. sent to the destination via SCTP's
send primitive) within the life time variable. How ever, the
message will be transmitted if a TSN has been assigned to the
message 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.
o un-order flag - this flag, if present, indicates that the user o un-order flag - this flag, if present, indicates that the user
would like the data delivered in an un-ordered fashion to the would like the data delivered in an un-ordered fashion to the
remote peer. remote peer.
skipping to change at line 3282 skipping to change at line 3417
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] -> byte count [,transport address] [,stream id] [,sequence number]
This primitive shall read the first datagram in the SCTP in-queue to This primitive shall read the first datagram in the SCTP in-queue to
ULP, if there is one available, in to the specified buffer. The size of ULP, if there is one available, in to the specified buffer. The size of
the datagram read, in octets, will be returned. It may, depending on the the datagram read, in octets, will be returned. It may, depending on
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. Depending upon the are more datagrams available for retrieval, etc. For ordered messages,
implementation, if this primitive is invoked when no datagram is available their sequence number may also be returned.
the implementation should return an indication of this condition or should
block the invoking process until data does become available. Depending upon the implementation, if this primitive is invoked when
no datagram is available the implementation should return an
indication of this condition or should block the invoking process
until data does 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 datagram.
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 stream sequence number - the stream sequence number assigned.
H) Status H) Status
Format: STATUS(association id) -> status data Format: STATUS(association id) -> status data
This primitive shall return a data block containing the following This primitive shall return a data block containing the following
information: information:
receive window size, receive window size,
send window size, send window size,
connection state, connection state,
number of buffers awaiting acknowledgement, number of buffers awaiting acknowledgement,
skipping to change at line 3366 skipping to change at line 3502
transport address of the given association. The results of the transport address of the given association. The results of the
HeartBeat should update the RTT information. HeartBeat should update the RTT information.
Mandatory attributes: Mandatory attributes:
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
o transport address - the transport address of the association o transport address - the transport address of the association
on which a heartbeat should be issued. on which a heartbeat should be issued.
K) Get RTT Report
Format: GETRTTREPORT(association id, transport address)
-> rtt result
Instructs the local SCTP to report the current RTT measurement on the
specified transport address of the given association. The returned
result can be an intager containing the most recent RTT in
milliseconds.
Mandatory attributes:
o association id - local handle to the SCTP association
o transport address - the transport address of the association
on which the RTT measurement is to be reported.
9.2 SCTP-to-ULP 9.2 SCTP-to-ULP
It is assumed that the operating system or application environment provides It is assumed that the operating system or application environment
a means for the SCTP to asynchronously signal the ULP process. When SCTP provides a means for the SCTP to asynchronously signal the ULP
does signal an ULP process, certain information is passed to the ULP. process. When SCTP does signal an ULP process, certain information is
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 datagram 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
skipping to change at line 3415 skipping to change at line 3569
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. datagrams, or when a lost communication to an endpoint is restored.
IMPLEMENTATION NOTE: If ASSOCIATE primitive is implemented as a blocking IMPLEMENTATION NOTE: If ASSOCIATE primitive is implemented as a
function call, the association parameters are returned as a result of the blocking function call, the association parameters are returned as a
ASSOCIATE primitive itself. In that case, COMMUNICATION UP notification is result of the ASSOCIATE primitive itself. In that case,
optional at the association initiator's side. COMMUNICATION UP notification is optional at the association
initiator's side.
The following shall be passed with the notification: The following shall be passed with the notification:
o status - This indicates what type of event that has occurred; o status - This indicates what type of event that has occurred;
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
o destination transport address list - the set of transport addresses of the peer o destination transport address list - the set of transport addresses
of the peer
o outbound stream count - the maximum number of streams allowed to be used o outbound stream count - the maximum number of streams allowed to be
in this association by the ULP used in this association by the ULP
E) COMMUNICATION LOST notification E) COMMUNICATION LOST notification
When SCTP loses communication to an endpoint completely or detects When SCTP loses communication to an endpoint completely or detects
that the endpoint has performed an abort or graceful shutdown that the endpoint has performed an abort or graceful shutdown
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 status - This indicates what type of event that has occurred; o status - This indicates what type of event that has occurred;
o association id - local handle to the SCTP association o association id - local handle to the SCTP association
The following may be optionally passed with the notification: The following may be optionally passed with the notification:
o packets-enqueue - The number and location of un-sent datagrams o unsent-datagrams - The number and location of un-sent datagrams
still in hold by SCTP; still in hold by SCTP;
o unacknowledged-datagrams - The number and location of datagrams
that were attempted to be transported to the destination, but were
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 committed to transport but o received-but-not-delivered - datagrams that were received by SCTP
not acknowledged. but not yet delivered to the ULP.
Note: the un-send data report may not be accurate for those user
messages which are segmented by SCTP during transmission.
9.3 Interfaces to Layer Management 9.3 Interfaces to Layer Management
This section models interfaces to a Layer Management (LM) entity, which This section models interfaces to a Layer Management (LM) entity,
manages resources that have transport layer-wide impact. Layer Management which manages resources that have transport layer-wide impact. Layer
consists of primitives related to the management of SCTP performed as a Management consists of primitives related to the management of SCTP
subset of systems management. performed as a subset of systems management.
9.3.1 LM-to-SCTP 9.3.1 LM-to-SCTP
The following ULP-to-SCTP primitives from section 9.1 could be implemented The following ULP-to-SCTP primitives from section 9.1 could be
as part of the LM entity. implemented as part of the LM entity.
INITIALIZE INITIALIZE
SETPRIMARY SETPRIMARY
ABORT ABORT
STATUS STATUS
9.3.2 SCTP-to-LM 9.3.2 SCTP-to-LM
The following SCTP-to-ULP primitives from section 9.2 could be implemented The following SCTP-to-ULP primitives from section 9.2 could be implemented
as part of the LM entity. as part of the LM entity.
skipping to change at line 3572 skipping to change at line 3735
A blind attack is one where the attacker is unable to intercept or A blind attack is one where the attacker is unable to intercept or
otherwise see the content of data flows passing to and from the otherwise see the content of data flows passing to and from the
target SCTP Host where it is not a party to the association. Blind target SCTP Host where it is not a party to the association. Blind
denial of service attacks may take the form of flooding, masquerade, denial of service attacks may take the form of flooding, masquerade,
or improper monopolization of services. or improper monopolization of services.
10.2.4.1 Flooding 10.2.4.1 Flooding
The objective of flooding is to cause loss of service and incorrect The objective of flooding is to cause loss of service and incorrect
behaviour at target systems through resource exhaustion, behaviour at target systems through resource exhaustion, interference
interference with legitimate transactions, and exploitation of with legitimate transactions, and exploitation of buffer-related
buffer-related software bugs. Flooding may be directed either at software bugs. Flooding may be directed either at the SCTP Host or at
the SCTP Host or at resources in the intervening IP Access Links or resources in the intervening IP Access Links or the Internetwork.
the Internetwork. Where the latter entities are the target, Where the latter entities are the target, flooding will manifest
flooding will manifest itself as loss of network services, including itself as loss of network services, including potentially the breach
potentially the breach of any firewalls in place. of any firewalls in place.
In general, protection against flooding begins at the equipment In general, protection against flooding begins at the equipment
design level, where it includes measures such as: design level, where it includes measures such as:
- avoiding commitment of limited resources before determining that - avoiding commitment of limited resources before determining that
the request for service is legitimate the request for service is legitimate
- giving priority to completion of processing in progress over the - giving priority to completion of processing in progress over the
acceptance of new work acceptance of new work
- identification and removal of duplicate or stale queued requests - identification and removal of duplicate or stale queued requests
for service. for service.
skipping to change at line 3692 skipping to change at line 3855
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 Host and taking place within the context of an beyond the SCTP Host 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
[Editor's Note: text to be added] This protocol may be extended through IANA in three ways:
-- through definition of additional chunk types,
-- through definition of additional parameter types, or
-- through definition of additional cause codes within Operation
Error chunks
12. Suggested SCTP Timer and Protocol Parameter Values 11.1 IETF-defined Chunk Extension
The following are suggested timer values for SCTP: The appropriate use of specific chunk types is an integral part of the
SCTP protocol. In consequence, the intention is that new IETF-defined
chunk types MUST be supported by standards-track RFC documentation.
As a transitional step, a new chunk type MAY be introduced in an
Experimental RFC. Chunk type codes MUST remain permanently associated
with the original documentation on the basis of which they were
allocated. Thus if the RFC supporting a given chunk type is
deprecated in favour of a new document, the corresponding chunk type
code value is also deprecated and a new code value is allocated in
association with the replacement document.
T1-init Timer - 200 ms The documentation for a new chunk code type must include the following
T2-shutdown Timer - 300 ms information:
T3-rxt Timer - 160 ms (TL3-default) (a) a long and short name for the new chunk type;
(b) a detailed description of the structure of the chunk, which MUST
conform to the basic structure defined in section 2.2;
(c) a detailed definition and description of intended use of each field
within the chunk, including the chunk flags if any;
(d) a detailed procedural description of the use of the new chunk type
within the operation of the protocol.
If the primary numbering space reserved for IETF use (0x00 to 0xFD) is
exhausted, new codes shall subsequently be allocated in the extension
range 0x0000 through 0xFFFF. Chunks allocated in this range MUST
conform to the following structure:
First word (32 bits):
as shown in section 2.2, with chunk type code equal to 0xFF.
Second word:
first octet MUST be all 1's (0xFF). Next octet MUST be all 0's
(0x00). Final two octets contain the allocated extension code value.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 1 1 1 1 1 1|Chunk Flags | Chunk Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 1 1 1 1 1 1|0 0 0 0 0 0 0 0| Extension Type Code |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \
/ Value /
\ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11.2 IETF-defined Chunk Parameter Extension
The allocation of a new chunk parameter type code from the IETF
numbering space MUST be supported by RFC documentation. As with chunk
type codes, parameter type codes are uniquely associated with their
supporting document and MUST be replaced if new documentation is
provided. This documentation may be Informational, Experimental, or
standards-track at the discretion of the IESG. It MUST contain the
following information:
(a) Name of the parameter type.
(b) Detailed description of the structure of the parameter field. This
structure MUST conform to the general type-length-value format
described in section 2.2.1.
(c) Detailed definition of each component of the parameter value.
(d) Detailed description of the intended use of this parameter type,
and an indication of whether and under what circumstances
multiple instances of this parameter type may be found within the
same chunk.
Additional parameter type codes may be allocated initially from the
range 0x0000 through 0xFFFD. If this space is exhausted, extension
codes shall be allocated in the range 0x0000 through 0xFFFF. Where an
extension code has been allocated, the format of the parameter must
conform to the following structure:
First word (32 bits):
contains the parameter type code 0xFFFF and parameter length as
described in section 2.2.1.
Second word:
first octet MUST be all 1's (0xFF). Next octet MUST be all 0's
(0x00). Final two octets contain the allocated extension code
value.
The Value portion of the parameter, if any, follows the second word.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 1 1 1 1 1 1|0 0 0 0 0 0 0 0| Extension Type Code |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \
/ Value /
\ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11.3 IETF-defined Additional Error Causes
Additional cause codes may be allocated in the range 0x0004 to 0xFFFF
upon receipt of any permanently-available public documentation
containing the following information:
(a) Name of the error condition.
(b) Detailed description of the conditions under which an SCTP
endpoint should issue an Operation Error with this cause code.
(c) Expected action by the SCTP endpoint which receives an Operation
Error chunk containing this cause code.
(d) Detailed description of the structure and content of data fields
which accompany this cause code.
The initial word (32 bits) of a cause code parameter MUST conform to
the format shown in section 2.3.9, i.e.:
-- first two octets contain the cause code value
-- last two octets contain length of the cause parameter.
12. Suggested SCTP Protocol Parameter Values
The following protocol parameters are recommended: The following protocol parameters are recommended:
RTO.Initial - 3 seconds
Valid.Cookie.Life - 5 seconds
Max.Retransmits - 10 attempts Max.Retransmits - 10 attempts
Max.Init.Retransmit - 8 attempts Max.Init.Retransmit - 8 attempts
Max.HeartBeat.Misses - 3 attempts Max.HeartBeat.Misses - 3 attempts
Max.retrans.at.once - 2 datagrams
Valid.cookie.life - 5 seconds
Protocol variables/counters: Miscellaneous protocol variables/counters:
'retrans.count' - per association counter 'retrans.count' - per association counter
'heartbeat.sent.count' - per destination transport address counter 'heartbeat.sent.count' - per destination transport address counter
13. Acknowledgments 13. Acknowledgments
The authors wish to thank Richard Band, Scott Bradner, Ram Dantu, The authors wish to thank Mark Allman, Richard Band, Scott Bradner,
Matt Holdrege, Henry Houh, Gary Lehecka, Lyndon Ong, Vern Paxson, Ram Dantu, R. Ezhirpavai, Sally Floyd, Matt Holdrege, Henry Houh, Gary
Kelvin Porter, Heinz Prantner, Jarno Rajahalme, A. Sankar, Greg Lehecka, Lyndon Ong, Kelvin Porter, Heinz Prantner, Jarno Rajahalme,
Sidebottom, Brian Wyld, and many others for their invaluable A. Sankar, Greg Sidebottom, Brian Wyld, and many others for their
comments. invaluable comments.
14. Authors' Addresses 14. Authors' Addresses
Randall R. Stewart Tel: +1-847-632-7438 Randall R. Stewart Tel: +1-847-632-7438
Motorola, Inc. EMail: rstewar1@email.mot.com Motorola, Inc. EMail: rstewar1@email.mot.com
1501 W. Shure Drive, #2315 1501 W. Shure Drive, #2315
Arlington Heights, IL 60004 Arlington Heights, IL 60004
USA USA
Qiaobing Xie Tel: +1-847-632-3028 Qiaobing Xie Tel: +1-847-632-3028
skipping to change at line 3757 skipping to change at line 4031
USA USA
Hanns Juergen Schwarzbauer Tel: +49-89-722-24236 Hanns Juergen Schwarzbauer Tel: +49-89-722-24236
SIEMENS AG SIEMENS AG
Hofmannstr. 51 Hofmannstr. 51
81359 Munich 81359 Munich
Germany Germany
EMail: HannsJuergen.Schwarzbauer@icn.siemens.de EMail: HannsJuergen.Schwarzbauer@icn.siemens.de
Tom Taylor Tel: +1-613-736-0961 Tom Taylor Tel: +1-613-736-0961
Nortel Networks EMail:taylor@nortelnetworks.com Nortel Networks
1852 Lorraine Ave. 1852 Lorraine Ave.
Ottawa, Ontario Ottawa, Ontario
Canada K1H 6Z8 Canada K1H 6Z8
EMail:taylor@nortelnetworks.com
Ian Rytina Tel: Ian Rytina Tel:
Ericsson Australia EMail:ian.rytina@ericsson.com Ericsson Australia EMail:ian.rytina@ericsson.com
37/360 Elizabeth Street 37/360 Elizabeth Street
Melbourne, Victoria 3000 Melbourne, Victoria 3000
Australia Australia
Malleswar Kalla Tel: +1-973-829-5212 Malleswar Kalla Tel: +1-973-829-5212
Telcordia Technologies EMail: kalla@research.telcordia.com Telcordia Technologies
MCC 1J211R MCC 1J211R
445 South Street 445 South Street
Morristown, NJ 07960 Morristown, NJ 07960
USA USA
EMail: kalla@research.telcordia.com
Lixia Zhang Tel: +1-310-825-2695 Lixia Zhang Tel: +1-310-825-2695
UCLA Computer Science Department EMail: lixia@cs.ucla.edu UCLA Computer Science Department EMail: lixia@cs.ucla.edu
4531G Boelter Hall 4531G Boelter Hall
Los Angeles, CA 90095-1596 Los Angeles, CA 90095-1596
USA USA
15. References Vern Paxson Tel: +1-510-642-4274 x 302
ACIRI EMail: vern@aciri.org
[Editor's Note: text to be updated] 1947 Center St., Suite 600,
Berkeley, CA 94704-1198
[1] Postel, J. (ed.), "Internet Protocol - DARPA Internet Program USA
Protocol Specification", RFC 791, USC/Information Sciences Institute,
September 1981.
[2] Postel, J. (ed.), "User Datagram Protocol", RFC 768,
USC/Information Sciences Institute, August 1980.
[3] Postel, J. (ed.), "Transmission Control Protocol", RFC 793, USC/
Information Sciences Institute, September 1981.
[4] Jacobson V., "Congestion Avoidance and Control", Proceedings of
SIGCOMM '88, pp 314-329, August 1988.
[5] Comer D., Stevens D., "Interworking with TCP/IP volume II Design
Implementation and Internals", Prentice-Hall, Inc 1994.
[7] Ashworth, J., "The Naming of Hosts", RFC 2100, April 1997.
[8] Braden, R. (ed.), "Requirements for Internet Hosts --
Communication Layers", RFC 1122, October 1989.
[9] Braden, R. (ed.), "Requirements for Internet Hosts --
application and support", RFC 1123, October 1989.
[10] Baker, F. "Requirements for IP Version 4 Routers", RFC1812, June 1995 15. References
[11] Eastlake , D. (ed.), "Randomness Recommendations for Security", [1] Eastlake , D. (ed.), "Randomness Recommendations for Security",
RFC 1750, December 1994. RFC 1750, December 1994.
[12] Bellovin, S., "Defending Against Sequence Number Attacks", [2] ITU-T Recommendation Q.703 "Q.703 - Signaling link", July 1996.
RFC1948, May 1996.
[13] ITU-T Recommendation Q.703 "Q.703 - Signaling link", July 1996.
[14] 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.
[15] Rivest, R., "The MD5 Message-Digest Algorithm", August 1999, [4] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
RFC 1321. August 1999.
This Internet Draft expires in 6 months from September 1999. [5] M. Allman and V. Paxson, "On Estimating End-to-End Network Path
Properties", Proc. SIGCOMM '99, 1999.
This Internet Draft expires in 6 months from October 1999.
 End of changes. 

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