Austin Schuh | 8d0a285 | 2019-12-28 22:54:28 -0800 | [diff] [blame] | 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 | Network Working Group R. Stewart
|
| 8 | Request for Comments: 2960 Q. Xie
|
| 9 | Category: Standards Track Motorola
|
| 10 | K. Morneault
|
| 11 | C. Sharp
|
| 12 | Cisco
|
| 13 | H. Schwarzbauer
|
| 14 | Siemens
|
| 15 | T. Taylor
|
| 16 | Nortel Networks
|
| 17 | I. Rytina
|
| 18 | Ericsson
|
| 19 | M. Kalla
|
| 20 | Telcordia
|
| 21 | L. Zhang
|
| 22 | UCLA
|
| 23 | V. Paxson
|
| 24 | ACIRI
|
| 25 | October 2000
|
| 26 |
|
| 27 |
|
| 28 | Stream Control Transmission Protocol
|
| 29 |
|
| 30 | Status of this Memo
|
| 31 |
|
| 32 | This document specifies an Internet standards track protocol for the
|
| 33 | Internet community, and requests discussion and suggestions for
|
| 34 | improvements. Please refer to the current edition of the "Internet
|
| 35 | Official Protocol Standards" (STD 1) for the standardization state
|
| 36 | and status of this protocol. Distribution of this memo is unlimited.
|
| 37 |
|
| 38 | Copyright Notice
|
| 39 |
|
| 40 | Copyright (C) The Internet Society (2000). All Rights Reserved.
|
| 41 |
|
| 42 | Abstract
|
| 43 |
|
| 44 | This document describes the Stream Control Transmission Protocol
|
| 45 | (SCTP). SCTP is designed to transport PSTN signaling messages over
|
| 46 | IP networks, but is capable of broader applications.
|
| 47 |
|
| 48 | SCTP is a reliable transport protocol operating on top of a
|
| 49 | connectionless packet network such as IP. It offers the following
|
| 50 | services to its users:
|
| 51 |
|
| 52 | -- acknowledged error-free non-duplicated transfer of user data,
|
| 53 | -- data fragmentation to conform to discovered path MTU size,
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 | Stewart, et al. Standards Track [Page 1]
|
| 59 |
|
| 60 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 61 |
|
| 62 |
|
| 63 | -- sequenced delivery of user messages within multiple streams,
|
| 64 | with an option for order-of-arrival delivery of individual user
|
| 65 | messages,
|
| 66 | -- optional bundling of multiple user messages into a single SCTP
|
| 67 | packet, and
|
| 68 | -- network-level fault tolerance through supporting of multi-
|
| 69 | homing at either or both ends of an association.
|
| 70 |
|
| 71 | The design of SCTP includes appropriate congestion avoidance behavior
|
| 72 | and resistance to flooding and masquerade attacks.
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 | Stewart, et al. Standards Track [Page 2]
|
| 115 |
|
| 116 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 117 |
|
| 118 |
|
| 119 | Table of Contents
|
| 120 |
|
| 121 | 1. Introduction.................................................. 5
|
| 122 | 1.1 Motivation.................................................. 6
|
| 123 | 1.2 Architectural View of SCTP.................................. 6
|
| 124 | 1.3 Functional View of SCTP..................................... 7
|
| 125 | 1.3.1 Association Startup and Takedown........................ 8
|
| 126 | 1.3.2 Sequenced Delivery within Streams....................... 9
|
| 127 | 1.3.3 User Data Fragmentation................................. 9
|
| 128 | 1.3.4 Acknowledgement and Congestion Avoidance................ 9
|
| 129 | 1.3.5 Chunk Bundling ......................................... 10
|
| 130 | 1.3.6 Packet Validation....................................... 10
|
| 131 | 1.3.7 Path Management......................................... 11
|
| 132 | 1.4 Key Terms................................................... 11
|
| 133 | 1.5 Abbreviations............................................... 15
|
| 134 | 1.6 Serial Number Arithmetic.................................... 15
|
| 135 | 2. Conventions.................................................... 16
|
| 136 | 3. SCTP packet Format............................................ 16
|
| 137 | 3.1 SCTP Common Header Field Descriptions....................... 17
|
| 138 | 3.2 Chunk Field Descriptions.................................... 18
|
| 139 | 3.2.1 Optional/Variable-length Parameter Format............... 20
|
| 140 | 3.3 SCTP Chunk Definitions...................................... 21
|
| 141 | 3.3.1 Payload Data (DATA)..................................... 22
|
| 142 | 3.3.2 Initiation (INIT)....................................... 24
|
| 143 | 3.3.2.1 Optional or Variable Length Parameters.............. 26
|
| 144 | 3.3.3 Initiation Acknowledgement (INIT ACK)................... 30
|
| 145 | 3.3.3.1 Optional or Variable Length Parameters.............. 33
|
| 146 | 3.3.4 Selective Acknowledgement (SACK)........................ 33
|
| 147 | 3.3.5 Heartbeat Request (HEARTBEAT)........................... 37
|
| 148 | 3.3.6 Heartbeat Acknowledgement (HEARTBEAT ACK)............... 38
|
| 149 | 3.3.7 Abort Association (ABORT)............................... 39
|
| 150 | 3.3.8 Shutdown Association (SHUTDOWN)......................... 40
|
| 151 | 3.3.9 Shutdown Acknowledgement (SHUTDOWN ACK)................. 40
|
| 152 | 3.3.10 Operation Error (ERROR)................................ 41
|
| 153 | 3.3.10.1 Invalid Stream Identifier.......................... 42
|
| 154 | 3.3.10.2 Missing Mandatory Parameter........................ 43
|
| 155 | 3.3.10.3 Stale Cookie Error................................. 43
|
| 156 | 3.3.10.4 Out of Resource.................................... 44
|
| 157 | 3.3.10.5 Unresolvable Address............................... 44
|
| 158 | 3.3.10.6 Unrecognized Chunk Type............................ 44
|
| 159 | 3.3.10.7 Invalid Mandatory Parameter........................ 45
|
| 160 | 3.3.10.8 Unrecognized Parameters............................ 45
|
| 161 | 3.3.10.9 No User Data....................................... 46
|
| 162 | 3.3.10.10 Cookie Received While Shutting Down............... 46
|
| 163 | 3.3.11 Cookie Echo (COOKIE ECHO).............................. 46
|
| 164 | 3.3.12 Cookie Acknowledgement (COOKIE ACK).................... 47
|
| 165 | 3.3.13 Shutdown Complete (SHUTDOWN COMPLETE).................. 48
|
| 166 | 4. SCTP Association State Diagram................................. 48
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 | Stewart, et al. Standards Track [Page 3]
|
| 171 |
|
| 172 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 173 |
|
| 174 |
|
| 175 | 5. Association Initialization..................................... 52
|
| 176 | 5.1 Normal Establishment of an Association...................... 52
|
| 177 | 5.1.1 Handle Stream Parameters................................ 54
|
| 178 | 5.1.2 Handle Address Parameters............................... 54
|
| 179 | 5.1.3 Generating State Cookie................................. 56
|
| 180 | 5.1.4 State Cookie Processing................................. 57
|
| 181 | 5.1.5 State Cookie Authentication............................. 57
|
| 182 | 5.1.6 An Example of Normal Association Establishment.......... 58
|
| 183 | 5.2 Handle Duplicate or unexpected INIT, INIT ACK, COOKIE ECHO,
|
| 184 | and COOKIE ACK.............................................. 60
|
| 185 | 5.2.1 Handle Duplicate INIT in COOKIE-WAIT
|
| 186 | or COOKIE-ECHOED States................................. 60
|
| 187 | 5.2.2 Unexpected INIT in States Other than CLOSED,
|
| 188 | COOKIE-ECHOED, COOKIE-WAIT and SHUTDOWN-ACK-SENT........ 61
|
| 189 | 5.2.3 Unexpected INIT ACK..................................... 61
|
| 190 | 5.2.4 Handle a COOKIE ECHO when a TCB exists.................. 62
|
| 191 | 5.2.4.1 An Example of a Association Restart................. 64
|
| 192 | 5.2.5 Handle Duplicate COOKIE ACK............................. 66
|
| 193 | 5.2.6 Handle Stale COOKIE Error............................... 66
|
| 194 | 5.3 Other Initialization Issues................................. 67
|
| 195 | 5.3.1 Selection of Tag Value.................................. 67
|
| 196 | 6. User Data Transfer............................................. 67
|
| 197 | 6.1 Transmission of DATA Chunks................................. 69
|
| 198 | 6.2 Acknowledgement on Reception of DATA Chunks................. 70
|
| 199 | 6.2.1 Tracking Peer's Receive Buffer Space.................... 73
|
| 200 | 6.3 Management Retransmission Timer............................. 75
|
| 201 | 6.3.1 RTO Calculation......................................... 75
|
| 202 | 6.3.2 Retransmission Timer Rules.............................. 76
|
| 203 | 6.3.3 Handle T3-rtx Expiration................................ 77
|
| 204 | 6.4 Multi-homed SCTP Endpoints.................................. 78
|
| 205 | 6.4.1 Failover from Inactive Destination Address.............. 79
|
| 206 | 6.5 Stream Identifier and Stream Sequence Number................ 80
|
| 207 | 6.6 Ordered and Unordered Delivery.............................. 80
|
| 208 | 6.7 Report Gaps in Received DATA TSNs........................... 81
|
| 209 | 6.8 Adler-32 Checksum Calculation............................... 82
|
| 210 | 6.9 Fragmentation............................................... 83
|
| 211 | 6.10 Bundling .................................................. 84
|
| 212 | 7. Congestion Control .......................................... 85
|
| 213 | 7.1 SCTP Differences from TCP Congestion Control................ 85
|
| 214 | 7.2 SCTP Slow-Start and Congestion Avoidance.................... 87
|
| 215 | 7.2.1 Slow-Start.............................................. 87
|
| 216 | 7.2.2 Congestion Avoidance.................................... 89
|
| 217 | 7.2.3 Congestion Control...................................... 89
|
| 218 | 7.2.4 Fast Retransmit on Gap Reports.......................... 90
|
| 219 | 7.3 Path MTU Discovery.......................................... 91
|
| 220 | 8. Fault Management.............................................. 92
|
| 221 | 8.1 Endpoint Failure Detection.................................. 92
|
| 222 | 8.2 Path Failure Detection...................................... 92
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 | Stewart, et al. Standards Track [Page 4]
|
| 227 |
|
| 228 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 229 |
|
| 230 |
|
| 231 | 8.3 Path Heartbeat.............................................. 93
|
| 232 | 8.4 Handle "Out of the blue" Packets............................ 95
|
| 233 | 8.5 Verification Tag............................................ 96
|
| 234 | 8.5.1 Exceptions in Verification Tag Rules.................... 97
|
| 235 | 9. Termination of Association..................................... 98
|
| 236 | 9.1 Abort of an Association..................................... 98
|
| 237 | 9.2 Shutdown of an Association.................................. 98
|
| 238 | 10. Interface with Upper Layer....................................101
|
| 239 | 10.1 ULP-to-SCTP................................................101
|
| 240 | 10.2 SCTP-to-ULP................................................111
|
| 241 | 11. Security Considerations.......................................114
|
| 242 | 11.1 Security Objectives........................................114
|
| 243 | 11.2 SCTP Responses To Potential Threats........................115
|
| 244 | 11.2.1 Countering Insider Attacks.............................115
|
| 245 | 11.2.2 Protecting against Data Corruption in the Network......115
|
| 246 | 11.2.3 Protecting Confidentiality.............................115
|
| 247 | 11.2.4 Protecting against Blind Denial of Service Attacks.....116
|
| 248 | 11.2.4.1 Flooding...........................................116
|
| 249 | 11.2.4.2 Blind Masquerade...................................118
|
| 250 | 11.2.4.3 Improper Monopolization of Services................118
|
| 251 | 11.3 Protection against Fraud and Repudiation...................119
|
| 252 | 12. Recommended Transmission Control Block (TCB) Parameters.......120
|
| 253 | 12.1 Parameters necessary for the SCTP instance.................120
|
| 254 | 12.2 Parameters necessary per association (i.e. the TCB)........120
|
| 255 | 12.3 Per Transport Address Data.................................122
|
| 256 | 12.4 General Parameters Needed..................................123
|
| 257 | 13. IANA Considerations...........................................123
|
| 258 | 13.1 IETF-defined Chunk Extension...............................123
|
| 259 | 13.2 IETF-defined Chunk Parameter Extension.....................124
|
| 260 | 13.3 IETF-defined Additional Error Causes.......................124
|
| 261 | 13.4 Payload Protocol Identifiers...............................125
|
| 262 | 14. Suggested SCTP Protocol Parameter Values......................125
|
| 263 | 15. Acknowledgements..............................................126
|
| 264 | 16. Authors' Addresses............................................126
|
| 265 | 17. References....................................................128
|
| 266 | 18. Bibliography..................................................129
|
| 267 | Appendix A .......................................................131
|
| 268 | Appendix B .......................................................132
|
| 269 | Full Copyright Statement .........................................134
|
| 270 |
|
| 271 | 1. Introduction
|
| 272 |
|
| 273 | This section explains the reasoning behind the development of the
|
| 274 | Stream Control Transmission Protocol (SCTP), the services it offers,
|
| 275 | and the basic concepts needed to understand the detailed description
|
| 276 | of the protocol.
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 | Stewart, et al. Standards Track [Page 5]
|
| 283 |
|
| 284 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 285 |
|
| 286 |
|
| 287 | 1.1 Motivation
|
| 288 |
|
| 289 | TCP [RFC793] has performed immense service as the primary means of
|
| 290 | reliable data transfer in IP networks. However, an increasing number
|
| 291 | of recent applications have found TCP too limiting, and have
|
| 292 | incorporated their own reliable data transfer protocol on top of UDP
|
| 293 | [RFC768]. The limitations which users have wished to bypass include
|
| 294 | the following:
|
| 295 |
|
| 296 | -- TCP provides both reliable data transfer and strict order-of-
|
| 297 | transmission delivery of data. Some applications need reliable
|
| 298 | transfer without sequence maintenance, while others would be
|
| 299 | satisfied with partial ordering of the data. In both of these
|
| 300 | cases the head-of-line blocking offered by TCP causes unnecessary
|
| 301 | delay.
|
| 302 |
|
| 303 | -- The stream-oriented nature of TCP is often an inconvenience.
|
| 304 | Applications must add their own record marking to delineate their
|
| 305 | messages, and must make explicit use of the push facility to
|
| 306 | ensure that a complete message is transferred in a reasonable
|
| 307 | time.
|
| 308 |
|
| 309 | -- The limited scope of TCP sockets complicates the task of
|
| 310 | providing highly-available data transfer capability using multi-
|
| 311 | homed hosts.
|
| 312 |
|
| 313 | -- TCP is relatively vulnerable to denial of service attacks, such
|
| 314 | as SYN attacks.
|
| 315 |
|
| 316 | Transport of PSTN signaling across the IP network is an application
|
| 317 | for which all of these limitations of TCP are relevant. While this
|
| 318 | application directly motivated the development of SCTP, other
|
| 319 | applications may find SCTP a good match to their requirements.
|
| 320 |
|
| 321 | 1.2 Architectural View of SCTP
|
| 322 |
|
| 323 | SCTP is viewed as a layer between the SCTP user application ("SCTP
|
| 324 | user" for short) and a connectionless packet network service such as
|
| 325 | IP. The remainder of this document assumes SCTP runs on top of IP.
|
| 326 | The basic service offered by SCTP is the reliable transfer of user
|
| 327 | messages between peer SCTP users. It performs this service within
|
| 328 | the context of an association between two SCTP endpoints. Section 10
|
| 329 | of this document sketches the API which should exist at the boundary
|
| 330 | between the SCTP and the SCTP user layers.
|
| 331 |
|
| 332 | SCTP is connection-oriented in nature, but the SCTP association is a
|
| 333 | broader concept than the TCP connection. SCTP provides the means for
|
| 334 | each SCTP endpoint (Section 1.4) to provide the other endpoint
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 | Stewart, et al. Standards Track [Page 6]
|
| 339 |
|
| 340 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 341 |
|
| 342 |
|
| 343 | (during association startup) with a list of transport addresses
|
| 344 | (i.e., multiple IP addresses in combination with an SCTP port)
|
| 345 | through which that endpoint can be reached and from which it will
|
| 346 | originate SCTP packets. The association spans transfers over all of
|
| 347 | the possible source/destination combinations which may be generated
|
| 348 | from each endpoint's lists.
|
| 349 |
|
| 350 | _____________ _____________
|
| 351 | | SCTP User | | SCTP User |
|
| 352 | | Application | | Application |
|
| 353 | |-------------| |-------------|
|
| 354 | | SCTP | | SCTP |
|
| 355 | | Transport | | Transport |
|
| 356 | | Service | | Service |
|
| 357 | |-------------| |-------------|
|
| 358 | | |One or more ---- One or more| |
|
| 359 | | IP Network |IP address \/ IP address| IP Network |
|
| 360 | | Service |appearances /\ appearances| Service |
|
| 361 | |_____________| ---- |_____________|
|
| 362 |
|
| 363 | SCTP Node A |<-------- Network transport ------->| SCTP Node B
|
| 364 |
|
| 365 | Figure 1: An SCTP Association
|
| 366 |
|
| 367 | 1.3 Functional View of SCTP
|
| 368 |
|
| 369 | The SCTP transport service can be decomposed into a number of
|
| 370 | functions. These are depicted in Figure 2 and explained in the
|
| 371 | remainder of this section.
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 | Stewart, et al. Standards Track [Page 7]
|
| 395 |
|
| 396 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 397 |
|
| 398 |
|
| 399 | SCTP User Application
|
| 400 |
|
| 401 | -----------------------------------------------------
|
| 402 | _____________ ____________________
|
| 403 | | | | Sequenced delivery |
|
| 404 | | Association | | within streams |
|
| 405 | | | |____________________|
|
| 406 | | startup |
|
| 407 | | | ____________________________
|
| 408 | | and | | User Data Fragmentation |
|
| 409 | | | |____________________________|
|
| 410 | | takedown |
|
| 411 | | | ____________________________
|
| 412 | | | | Acknowledgement |
|
| 413 | | | | and |
|
| 414 | | | | Congestion Avoidance |
|
| 415 | | | |____________________________|
|
| 416 | | |
|
| 417 | | | ____________________________
|
| 418 | | | | Chunk Bundling |
|
| 419 | | | |____________________________|
|
| 420 | | |
|
| 421 | | | ________________________________
|
| 422 | | | | Packet Validation |
|
| 423 | | | |________________________________|
|
| 424 | | |
|
| 425 | | | ________________________________
|
| 426 | | | | Path Management |
|
| 427 | |_____________| |________________________________|
|
| 428 |
|
| 429 | Figure 2: Functional View of the SCTP Transport Service
|
| 430 |
|
| 431 | 1.3.1 Association Startup and Takedown
|
| 432 |
|
| 433 | An association is initiated by a request from the SCTP user (see the
|
| 434 | description of the ASSOCIATE (or SEND) primitive in Section 10).
|
| 435 |
|
| 436 | A cookie mechanism, similar to one described by Karn and Simpson in
|
| 437 | [RFC2522], is employed during the initialization to provide
|
| 438 | protection against security attacks. The cookie mechanism uses a
|
| 439 | four-way handshake, the last two legs of which are allowed to carry
|
| 440 | user data for fast setup. The startup sequence is described in
|
| 441 | Section 5 of this document.
|
| 442 |
|
| 443 | SCTP provides for graceful close (i.e., shutdown) of an active
|
| 444 | association on request from the SCTP user. See the description of
|
| 445 | the SHUTDOWN primitive in Section 10. SCTP also allows ungraceful
|
| 446 | close (i.e., abort), either on request from the user (ABORT
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 | Stewart, et al. Standards Track [Page 8]
|
| 451 |
|
| 452 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 453 |
|
| 454 |
|
| 455 | primitive) or as a result of an error condition detected within the
|
| 456 | SCTP layer. Section 9 describes both the graceful and the ungraceful
|
| 457 | close procedures.
|
| 458 |
|
| 459 | SCTP does not support a half-open state (like TCP) wherein one side
|
| 460 | may continue sending data while the other end is closed. When either
|
| 461 | endpoint performs a shutdown, the association on each peer will stop
|
| 462 | accepting new data from its user and only deliver data in queue at
|
| 463 | the time of the graceful close (see Section 9).
|
| 464 |
|
| 465 | 1.3.2 Sequenced Delivery within Streams
|
| 466 |
|
| 467 | The term "stream" is used in SCTP to refer to a sequence of user
|
| 468 | messages that are to be delivered to the upper-layer protocol in
|
| 469 | order with respect to other messages within the same stream. This is
|
| 470 | in contrast to its usage in TCP, where it refers to a sequence of
|
| 471 | bytes (in this document a byte is assumed to be eight bits).
|
| 472 |
|
| 473 | The SCTP user can specify at association startup time the number of
|
| 474 | streams to be supported by the association. This number is
|
| 475 | negotiated with the remote end (see Section 5.1.1). User messages
|
| 476 | are associated with stream numbers (SEND, RECEIVE primitives, Section
|
| 477 | 10). Internally, SCTP assigns a stream sequence number to each
|
| 478 | message passed to it by the SCTP user. On the receiving side, SCTP
|
| 479 | ensures that messages are delivered to the SCTP user in sequence
|
| 480 | within a given stream. However, while one stream may be blocked
|
| 481 | waiting for the next in-sequence user message, delivery from other
|
| 482 | streams may proceed.
|
| 483 |
|
| 484 | SCTP provides a mechanism for bypassing the sequenced delivery
|
| 485 | service. User messages sent using this mechanism are delivered to
|
| 486 | the SCTP user as soon as they are received.
|
| 487 |
|
| 488 | 1.3.3 User Data Fragmentation
|
| 489 |
|
| 490 | When needed, SCTP fragments user messages to ensure that the SCTP
|
| 491 | packet passed to the lower layer conforms to the path MTU. On
|
| 492 | receipt, fragments are reassembled into complete messages before
|
| 493 | being passed to the SCTP user.
|
| 494 |
|
| 495 | 1.3.4 Acknowledgement and Congestion Avoidance
|
| 496 |
|
| 497 | SCTP assigns a Transmission Sequence Number (TSN) to each user data
|
| 498 | fragment or unfragmented message. The TSN is independent of any
|
| 499 | stream sequence number assigned at the stream level. The receiving
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
|
| 506 | Stewart, et al. Standards Track [Page 9]
|
| 507 |
|
| 508 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 509 |
|
| 510 |
|
| 511 | end acknowledges all TSNs received, even if there are gaps in the
|
| 512 | sequence. In this way, reliable delivery is kept functionally
|
| 513 | separate from sequenced stream delivery.
|
| 514 |
|
| 515 | The acknowledgement and congestion avoidance function is responsible
|
| 516 | for packet retransmission when timely acknowledgement has not been
|
| 517 | received. Packet retransmission is conditioned by congestion
|
| 518 | avoidance procedures similar to those used for TCP. See Sections 6
|
| 519 | and 7 for a detailed description of the protocol procedures
|
| 520 | associated with this function.
|
| 521 |
|
| 522 | 1.3.5 Chunk Bundling
|
| 523 |
|
| 524 | As described in Section 3, the SCTP packet as delivered to the lower
|
| 525 | layer consists of a common header followed by one or more chunks.
|
| 526 | Each chunk may contain either user data or SCTP control information.
|
| 527 | The SCTP user has the option to request bundling of more than one
|
| 528 | user messages into a single SCTP packet. The chunk bundling function
|
| 529 | of SCTP is responsible for assembly of the complete SCTP packet and
|
| 530 | its disassembly at the receiving end.
|
| 531 |
|
| 532 | During times of congestion an SCTP implementation MAY still perform
|
| 533 | bundling even if the user has requested that SCTP not bundle. The
|
| 534 | user's disabling of bundling only affects SCTP implementations that
|
| 535 | may delay a small period of time before transmission (to attempt to
|
| 536 | encourage bundling). When the user layer disables bundling, this
|
| 537 | small delay is prohibited but not bundling that is performed during
|
| 538 | congestion or retransmission.
|
| 539 |
|
| 540 | 1.3.6 Packet Validation
|
| 541 |
|
| 542 | A mandatory Verification Tag field and a 32 bit checksum field (see
|
| 543 | Appendix B for a description of the Adler-32 checksum) are included
|
| 544 | in the SCTP common header. The Verification Tag value is chosen by
|
| 545 | each end of the association during association startup. Packets
|
| 546 | received without the expected Verification Tag value are discarded,
|
| 547 | as a protection against blind masquerade attacks and against stale
|
| 548 | SCTP packets from a previous association. The Adler-32 checksum
|
| 549 | should be set by the sender of each SCTP packet to provide additional
|
| 550 | protection against data corruption in the network. The receiver of
|
| 551 | an SCTP packet with an invalid Adler-32 checksum silently discards
|
| 552 | the packet.
|
| 553 |
|
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
|
| 562 | Stewart, et al. Standards Track [Page 10]
|
| 563 |
|
| 564 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 565 |
|
| 566 |
|
| 567 | 1.3.7 Path Management
|
| 568 |
|
| 569 | The sending SCTP user is able to manipulate the set of transport
|
| 570 | addresses used as destinations for SCTP packets through the
|
| 571 | primitives described in Section 10. The SCTP path management
|
| 572 | function chooses the destination transport address for each outgoing
|
| 573 | SCTP packet based on the SCTP user's instructions and the currently
|
| 574 | perceived reachability status of the eligible destination set. The
|
| 575 | path management function monitors reachability through heartbeats
|
| 576 | when other packet traffic is inadequate to provide this information
|
| 577 | and advises the SCTP user when reachability of any far-end transport
|
| 578 | address changes. The path management function is also responsible
|
| 579 | for reporting the eligible set of local transport addresses to the
|
| 580 | far end during association startup, and for reporting the transport
|
| 581 | addresses returned from the far end to the SCTP user.
|
| 582 |
|
| 583 | At association start-up, a primary path is defined for each SCTP
|
| 584 | endpoint, and is used for normal sending of SCTP packets.
|
| 585 |
|
| 586 | On the receiving end, the path management is responsible for
|
| 587 | verifying the existence of a valid SCTP association to which the
|
| 588 | inbound SCTP packet belongs before passing it for further processing.
|
| 589 |
|
| 590 | Note: Path Management and Packet Validation are done at the same
|
| 591 | time, so although described separately above, in reality they cannot
|
| 592 | be performed as separate items.
|
| 593 |
|
| 594 | 1.4 Key Terms
|
| 595 |
|
| 596 | Some of the language used to describe SCTP has been introduced in the
|
| 597 | previous sections. This section provides a consolidated list of the
|
| 598 | key terms and their definitions.
|
| 599 |
|
| 600 | o Active destination transport address: A transport address on a
|
| 601 | peer endpoint which a transmitting endpoint considers available
|
| 602 | for receiving user messages.
|
| 603 |
|
| 604 | o Bundling: An optional multiplexing operation, whereby more than
|
| 605 | one user message may be carried in the same SCTP packet. Each
|
| 606 | user message occupies its own DATA chunk.
|
| 607 |
|
| 608 | o Chunk: A unit of information within an SCTP packet, consisting of
|
| 609 | a chunk header and chunk-specific content.
|
| 610 |
|
| 611 | o Congestion Window (cwnd): An SCTP variable that limits the data,
|
| 612 | in number of bytes, a sender can send to a particular destination
|
| 613 | transport address before receiving an acknowledgement.
|
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
|
| 618 | Stewart, et al. Standards Track [Page 11]
|
| 619 |
|
| 620 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 621 |
|
| 622 |
|
| 623 | o Cumulative TSN Ack Point: The TSN of the last DATA chunk
|
| 624 | acknowledged via the Cumulative TSN Ack field of a SACK.
|
| 625 |
|
| 626 | o Idle destination address: An address that has not had user
|
| 627 | messages sent to it within some length of time, normally the
|
| 628 | HEARTBEAT interval or greater.
|
| 629 |
|
| 630 | o Inactive destination transport address: An address which is
|
| 631 | considered inactive due to errors and unavailable to transport
|
| 632 | user messages.
|
| 633 |
|
| 634 | o Message = user message: Data submitted to SCTP by the Upper Layer
|
| 635 | Protocol (ULP).
|
| 636 |
|
| 637 | o Message Authentication Code (MAC): An integrity check mechanism
|
| 638 | based on cryptographic hash functions using a secret key.
|
| 639 | Typically, message authentication codes are used between two
|
| 640 | parties that share a secret key in order to validate information
|
| 641 | transmitted between these parties. In SCTP it is used by an
|
| 642 | endpoint to validate the State Cookie information that is returned
|
| 643 | from the peer in the COOKIE ECHO chunk. The term "MAC" has
|
| 644 | different meanings in different contexts. SCTP uses this term
|
| 645 | with the same meaning as in [RFC2104].
|
| 646 |
|
| 647 | o Network Byte Order: Most significant byte first, a.k.a., Big
|
| 648 | Endian.
|
| 649 |
|
| 650 | o Ordered Message: A user message that is delivered in order with
|
| 651 | respect to all previous user messages sent within the stream the
|
| 652 | message was sent on.
|
| 653 |
|
| 654 | o Outstanding TSN (at an SCTP endpoint): A TSN (and the associated
|
| 655 | DATA chunk) that has been sent by the endpoint but for which it
|
| 656 | has not yet received an acknowledgement.
|
| 657 |
|
| 658 | o Path: The route taken by the SCTP packets sent by one SCTP
|
| 659 | endpoint to a specific destination transport address of its peer
|
| 660 | SCTP endpoint. Sending to different destination transport
|
| 661 | addresses does not necessarily guarantee getting separate paths.
|
| 662 |
|
| 663 | o Primary Path: The primary path is the destination and source
|
| 664 | address that will be put into a packet outbound to the peer
|
| 665 | endpoint by default. The definition includes the source address
|
| 666 | since an implementation MAY wish to specify both destination and
|
| 667 | source address to better control the return path taken by reply
|
| 668 | chunks and on which interface the packet is transmitted when the
|
| 669 | data sender is multi-homed.
|
| 670 |
|
| 671 |
|
| 672 |
|
| 673 |
|
| 674 | Stewart, et al. Standards Track [Page 12]
|
| 675 |
|
| 676 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 677 |
|
| 678 |
|
| 679 | o Receiver Window (rwnd): An SCTP variable a data sender uses to
|
| 680 | store the most recently calculated receiver window of its peer, in
|
| 681 | number of bytes. This gives the sender an indication of the space
|
| 682 | available in the receiver's inbound buffer.
|
| 683 |
|
| 684 | o SCTP association: A protocol relationship between SCTP endpoints,
|
| 685 | composed of the two SCTP endpoints and protocol state information
|
| 686 | including Verification Tags and the currently active set of
|
| 687 | Transmission Sequence Numbers (TSNs), etc. An association can be
|
| 688 | uniquely identified by the transport addresses used by the
|
| 689 | endpoints in the association. Two SCTP endpoints MUST NOT have
|
| 690 | more than one SCTP association between them at any given time.
|
| 691 |
|
| 692 | o SCTP endpoint: The logical sender/receiver of SCTP packets. On a
|
| 693 | multi-homed host, an SCTP endpoint is represented to its peers as
|
| 694 | a combination of a set of eligible destination transport addresses
|
| 695 | to which SCTP packets can be sent and a set of eligible source
|
| 696 | transport addresses from which SCTP packets can be received. All
|
| 697 | transport addresses used by an SCTP endpoint must use the same
|
| 698 | port number, but can use multiple IP addresses. A transport
|
| 699 | address used by an SCTP endpoint must not be used by another SCTP
|
| 700 | endpoint. In other words, a transport address is unique to an
|
| 701 | SCTP endpoint.
|
| 702 |
|
| 703 | o SCTP packet (or packet): The unit of data delivery across the
|
| 704 | interface between SCTP and the connectionless packet network
|
| 705 | (e.g., IP). An SCTP packet includes the common SCTP header,
|
| 706 | possible SCTP control chunks, and user data encapsulated within
|
| 707 | SCTP DATA chunks.
|
| 708 |
|
| 709 | o SCTP user application (SCTP user): The logical higher-layer
|
| 710 | application entity which uses the services of SCTP, also called
|
| 711 | the Upper-layer Protocol (ULP).
|
| 712 |
|
| 713 | o Slow Start Threshold (ssthresh): An SCTP variable. This is the
|
| 714 | threshold which the endpoint will use to determine whether to
|
| 715 | perform slow start or congestion avoidance on a particular
|
| 716 | destination transport address. Ssthresh is in number of bytes.
|
| 717 |
|
| 718 | o Stream: A uni-directional logical channel established from one to
|
| 719 | another associated SCTP endpoint, within which all user messages
|
| 720 | are delivered in sequence except for those submitted to the
|
| 721 | unordered delivery service.
|
| 722 |
|
| 723 | Note: The relationship between stream numbers in opposite directions
|
| 724 | is strictly a matter of how the applications use them. It is the
|
| 725 | responsibility of the SCTP user to create and manage these
|
| 726 | correlations if they are so desired.
|
| 727 |
|
| 728 |
|
| 729 |
|
| 730 | Stewart, et al. Standards Track [Page 13]
|
| 731 |
|
| 732 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 733 |
|
| 734 |
|
| 735 | o Stream Sequence Number: A 16-bit sequence number used internally
|
| 736 | by SCTP to assure sequenced delivery of the user messages within a
|
| 737 | given stream. One stream sequence number is attached to each user
|
| 738 | message.
|
| 739 |
|
| 740 | o Tie-Tags: Verification Tags from a previous association. These
|
| 741 | Tags are used within a State Cookie so that the newly restarting
|
| 742 | association can be linked to the original association within the
|
| 743 | endpoint that did not restart.
|
| 744 |
|
| 745 | o Transmission Control Block (TCB): An internal data structure
|
| 746 | created by an SCTP endpoint for each of its existing SCTP
|
| 747 | associations to other SCTP endpoints. TCB contains all the status
|
| 748 | and operational information for the endpoint to maintain and
|
| 749 | manage the corresponding association.
|
| 750 |
|
| 751 | o Transmission Sequence Number (TSN): A 32-bit sequence number used
|
| 752 | internally by SCTP. One TSN is attached to each chunk containing
|
| 753 | user data to permit the receiving SCTP endpoint to acknowledge its
|
| 754 | receipt and detect duplicate deliveries.
|
| 755 |
|
| 756 | o Transport address: A Transport Address is traditionally defined
|
| 757 | by Network Layer address, Transport Layer protocol and Transport
|
| 758 | Layer port number. In the case of SCTP running over IP, a
|
| 759 | transport address is defined by the combination of an IP address
|
| 760 | and an SCTP port number (where SCTP is the Transport protocol).
|
| 761 |
|
| 762 | o Unacknowledged TSN (at an SCTP endpoint): A TSN (and the associated
|
| 763 | DATA chunk) which has been received by the endpoint but for which
|
| 764 | an acknowledgement has not yet been sent. Or in the opposite case,
|
| 765 | for a packet that has been sent but no acknowledgement has been
|
| 766 | received.
|
| 767 |
|
| 768 | o Unordered Message: Unordered messages are "unordered" with respect
|
| 769 | to any other message, this includes both other unordered messages
|
| 770 | as well as other ordered messages. Unordered message might be
|
| 771 | delivered prior to or later than ordered messages sent on the same
|
| 772 | stream.
|
| 773 |
|
| 774 | o User message: The unit of data delivery across the interface
|
| 775 | between SCTP and its user.
|
| 776 |
|
| 777 | o Verification Tag: A 32 bit unsigned integer that is randomly
|
| 778 | generated. The Verification Tag provides a key that allows a
|
| 779 | receiver to verify that the SCTP packet belongs to the current
|
| 780 | association and is not an old or stale packet from a previous
|
| 781 | association.
|
| 782 |
|
| 783 |
|
| 784 |
|
| 785 |
|
| 786 | Stewart, et al. Standards Track [Page 14]
|
| 787 |
|
| 788 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 789 |
|
| 790 |
|
| 791 | 1.5. Abbreviations
|
| 792 |
|
| 793 | MAC - Message Authentication Code [RFC2104]
|
| 794 |
|
| 795 | RTO - Retransmission Time-out
|
| 796 |
|
| 797 | RTT - Round-trip Time
|
| 798 |
|
| 799 | RTTVAR - Round-trip Time Variation
|
| 800 |
|
| 801 | SCTP - Stream Control Transmission Protocol
|
| 802 |
|
| 803 | SRTT - Smoothed RTT
|
| 804 |
|
| 805 | TCB - Transmission Control Block
|
| 806 |
|
| 807 | TLV - Type-Length-Value Coding Format
|
| 808 |
|
| 809 | TSN - Transmission Sequence Number
|
| 810 |
|
| 811 | ULP - Upper-layer Protocol
|
| 812 |
|
| 813 | 1.6 Serial Number Arithmetic
|
| 814 |
|
| 815 | It is essential to remember that the actual Transmission Sequence
|
| 816 | Number space is finite, though very large. This space ranges from 0
|
| 817 | to 2**32 - 1. Since the space is finite, all arithmetic dealing with
|
| 818 | Transmission Sequence Numbers must be performed modulo 2**32. This
|
| 819 | unsigned arithmetic preserves the relationship of sequence numbers as
|
| 820 | they cycle from 2**32 - 1 to 0 again. There are some subtleties to
|
| 821 | computer modulo arithmetic, so great care should be taken in
|
| 822 | programming the comparison of such values. When referring to TSNs,
|
| 823 | the symbol "=<" means "less than or equal"(modulo 2**32).
|
| 824 |
|
| 825 | Comparisons and arithmetic on TSNs in this document SHOULD use Serial
|
| 826 | Number Arithmetic as defined in [RFC1982] where SERIAL_BITS = 32.
|
| 827 |
|
| 828 | An endpoint SHOULD NOT transmit a DATA chunk with a TSN that is more
|
| 829 | than 2**31 - 1 above the beginning TSN of its current send window.
|
| 830 | Doing so will cause problems in comparing TSNs.
|
| 831 |
|
| 832 | Transmission Sequence Numbers wrap around when they reach 2**32 - 1.
|
| 833 | That is, the next TSN a DATA chunk MUST use after transmitting TSN =
|
| 834 | 2*32 - 1 is TSN = 0.
|
| 835 |
|
| 836 | Any arithmetic done on Stream Sequence Numbers SHOULD use Serial
|
| 837 | Number Arithmetic as defined in [RFC1982] where SERIAL_BITS = 16.
|
| 838 |
|
| 839 |
|
| 840 |
|
| 841 |
|
| 842 | Stewart, et al. Standards Track [Page 15]
|
| 843 |
|
| 844 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 845 |
|
| 846 |
|
| 847 | All other arithmetic and comparisons in this document uses normal
|
| 848 | arithmetic.
|
| 849 |
|
| 850 | 2. Conventions
|
| 851 |
|
| 852 | The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
|
| 853 | SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY, and OPTIONAL, when
|
| 854 | they appear in this document, are to be interpreted as described in
|
| 855 | [RFC2119].
|
| 856 |
|
| 857 | 3. SCTP packet Format
|
| 858 |
|
| 859 | An SCTP packet is composed of a common header and chunks. A chunk
|
| 860 | contains either control information or user data.
|
| 861 |
|
| 862 | The SCTP packet format is shown below:
|
| 863 |
|
| 864 | 0 1 2 3
|
| 865 | 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
|
| 866 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 867 | | Common Header |
|
| 868 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 869 | | Chunk #1 |
|
| 870 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 871 | | ... |
|
| 872 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 873 | | Chunk #n |
|
| 874 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 875 |
|
| 876 | Multiple chunks can be bundled into one SCTP packet up to the MTU
|
| 877 | size, except for the INIT, INIT ACK, and SHUTDOWN COMPLETE chunks.
|
| 878 | These chunks MUST NOT be bundled with any other chunk in a packet.
|
| 879 | See Section 6.10 for more details on chunk bundling.
|
| 880 |
|
| 881 | If a user data message doesn't fit into one SCTP packet it can be
|
| 882 | fragmented into multiple chunks using the procedure defined in
|
| 883 | Section 6.9.
|
| 884 |
|
| 885 | All integer fields in an SCTP packet MUST be transmitted in network
|
| 886 | byte order, unless otherwise stated.
|
| 887 |
|
| 888 |
|
| 889 |
|
| 890 |
|
| 891 |
|
| 892 |
|
| 893 |
|
| 894 |
|
| 895 |
|
| 896 |
|
| 897 |
|
| 898 | Stewart, et al. Standards Track [Page 16]
|
| 899 |
|
| 900 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 901 |
|
| 902 |
|
| 903 | 3.1 SCTP Common Header Field Descriptions
|
| 904 |
|
| 905 | SCTP Common Header Format
|
| 906 |
|
| 907 | 0 1 2 3
|
| 908 | 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
|
| 909 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 910 | | Source Port Number | Destination Port Number |
|
| 911 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 912 | | Verification Tag |
|
| 913 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 914 | | Checksum |
|
| 915 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 916 |
|
| 917 | Source Port Number: 16 bits (unsigned integer)
|
| 918 |
|
| 919 | This is the SCTP sender's port number. It can be used by the
|
| 920 | receiver in combination with the source IP address, the SCTP
|
| 921 | destination port and possibly the destination IP address to
|
| 922 | identify the association to which this packet belongs.
|
| 923 |
|
| 924 | Destination Port Number: 16 bits (unsigned integer)
|
| 925 |
|
| 926 | This is the SCTP port number to which this packet is destined.
|
| 927 | The receiving host will use this port number to de-multiplex the
|
| 928 | SCTP packet to the correct receiving endpoint/application.
|
| 929 |
|
| 930 | Verification Tag: 32 bits (unsigned integer)
|
| 931 |
|
| 932 | The receiver of this packet uses the Verification Tag to validate
|
| 933 | the sender of this SCTP packet. On transmit, the value of this
|
| 934 | Verification Tag MUST be set to the value of the Initiate Tag
|
| 935 | received from the peer endpoint during the association
|
| 936 | initialization, with the following exceptions:
|
| 937 |
|
| 938 | - A packet containing an INIT chunk MUST have a zero Verification
|
| 939 | Tag.
|
| 940 | - A packet containing a SHUTDOWN-COMPLETE chunk with the T-bit
|
| 941 | set MUST have the Verification Tag copied from the packet with
|
| 942 | the SHUTDOWN-ACK chunk.
|
| 943 | - A packet containing an ABORT chunk may have the verification
|
| 944 | tag copied from the packet which caused the ABORT to be sent.
|
| 945 | For details see Section 8.4 and 8.5.
|
| 946 |
|
| 947 | An INIT chunk MUST be the only chunk in the SCTP packet carrying it.
|
| 948 |
|
| 949 |
|
| 950 |
|
| 951 |
|
| 952 |
|
| 953 |
|
| 954 | Stewart, et al. Standards Track [Page 17]
|
| 955 |
|
| 956 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 957 |
|
| 958 |
|
| 959 | Checksum: 32 bits (unsigned integer)
|
| 960 |
|
| 961 | This field contains the checksum of this SCTP packet. Its
|
| 962 | calculation is discussed in Section 6.8. SCTP uses the Adler-
|
| 963 | 32 algorithm as described in Appendix B for calculating the
|
| 964 | checksum
|
| 965 |
|
| 966 | 3.2 Chunk Field Descriptions
|
| 967 |
|
| 968 | The figure below illustrates the field format for the chunks to be
|
| 969 | transmitted in the SCTP packet. Each chunk is formatted with a Chunk
|
| 970 | Type field, a chunk-specific Flag field, a Chunk Length field, and a
|
| 971 | Value field.
|
| 972 |
|
| 973 | 0 1 2 3
|
| 974 | 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
|
| 975 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 976 | | Chunk Type | Chunk Flags | Chunk Length |
|
| 977 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 978 | \ \
|
| 979 | / Chunk Value /
|
| 980 | \ \
|
| 981 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 982 |
|
| 983 | Chunk Type: 8 bits (unsigned integer)
|
| 984 |
|
| 985 | This field identifies the type of information contained in the
|
| 986 | Chunk Value field. It takes a value from 0 to 254. The value of
|
| 987 | 255 is reserved for future use as an extension field.
|
| 988 |
|
| 989 | The values of Chunk Types are defined as follows:
|
| 990 |
|
| 991 | ID Value Chunk Type
|
| 992 | ----- ----------
|
| 993 | 0 - Payload Data (DATA)
|
| 994 | 1 - Initiation (INIT)
|
| 995 | 2 - Initiation Acknowledgement (INIT ACK)
|
| 996 | 3 - Selective Acknowledgement (SACK)
|
| 997 | 4 - Heartbeat Request (HEARTBEAT)
|
| 998 | 5 - Heartbeat Acknowledgement (HEARTBEAT ACK)
|
| 999 | 6 - Abort (ABORT)
|
| 1000 | 7 - Shutdown (SHUTDOWN)
|
| 1001 | 8 - Shutdown Acknowledgement (SHUTDOWN ACK)
|
| 1002 | 9 - Operation Error (ERROR)
|
| 1003 | 10 - State Cookie (COOKIE ECHO)
|
| 1004 | 11 - Cookie Acknowledgement (COOKIE ACK)
|
| 1005 | 12 - Reserved for Explicit Congestion Notification Echo (ECNE)
|
| 1006 | 13 - Reserved for Congestion Window Reduced (CWR)
|
| 1007 |
|
| 1008 |
|
| 1009 |
|
| 1010 | Stewart, et al. Standards Track [Page 18]
|
| 1011 |
|
| 1012 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1013 |
|
| 1014 |
|
| 1015 | 14 - Shutdown Complete (SHUTDOWN COMPLETE)
|
| 1016 | 15 to 62 - reserved by IETF
|
| 1017 | 63 - IETF-defined Chunk Extensions
|
| 1018 | 64 to 126 - reserved by IETF
|
| 1019 | 127 - IETF-defined Chunk Extensions
|
| 1020 | 128 to 190 - reserved by IETF
|
| 1021 | 191 - IETF-defined Chunk Extensions
|
| 1022 | 192 to 254 - reserved by IETF
|
| 1023 | 255 - IETF-defined Chunk Extensions
|
| 1024 |
|
| 1025 | Chunk Types are encoded such that the highest-order two bits specify
|
| 1026 | the action that must be taken if the processing endpoint does not
|
| 1027 | recognize the Chunk Type.
|
| 1028 |
|
| 1029 | 00 - Stop processing this SCTP packet and discard it, do not process
|
| 1030 | any further chunks within it.
|
| 1031 |
|
| 1032 | 01 - Stop processing this SCTP packet and discard it, do not process
|
| 1033 | any further chunks within it, and report the unrecognized
|
| 1034 | parameter in an 'Unrecognized Parameter Type' (in either an
|
| 1035 | ERROR or in the INIT ACK).
|
| 1036 |
|
| 1037 | 10 - Skip this chunk and continue processing.
|
| 1038 |
|
| 1039 | 11 - Skip this chunk and continue processing, but report in an ERROR
|
| 1040 | Chunk using the 'Unrecognized Chunk Type' cause of error.
|
| 1041 |
|
| 1042 | Note: The ECNE and CWR chunk types are reserved for future use of
|
| 1043 | Explicit Congestion Notification (ECN).
|
| 1044 |
|
| 1045 | Chunk Flags: 8 bits
|
| 1046 |
|
| 1047 | The usage of these bits depends on the chunk type as given by the
|
| 1048 | Chunk Type. Unless otherwise specified, they are set to zero on
|
| 1049 | transmit and are ignored on receipt.
|
| 1050 |
|
| 1051 | Chunk Length: 16 bits (unsigned integer)
|
| 1052 |
|
| 1053 | This value represents the size of the chunk in bytes including the
|
| 1054 | Chunk Type, Chunk Flags, Chunk Length, and Chunk Value fields.
|
| 1055 | Therefore, if the Chunk Value field is zero-length, the Length
|
| 1056 | field will be set to 4. The Chunk Length field does not count any
|
| 1057 | padding.
|
| 1058 |
|
| 1059 |
|
| 1060 |
|
| 1061 |
|
| 1062 |
|
| 1063 |
|
| 1064 |
|
| 1065 |
|
| 1066 | Stewart, et al. Standards Track [Page 19]
|
| 1067 |
|
| 1068 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1069 |
|
| 1070 |
|
| 1071 | Chunk Value: variable length
|
| 1072 |
|
| 1073 | The Chunk Value field contains the actual information to be
|
| 1074 | transferred in the chunk. The usage and format of this field is
|
| 1075 | dependent on the Chunk Type.
|
| 1076 |
|
| 1077 | The total length of a chunk (including Type, Length and Value fields)
|
| 1078 | MUST be a multiple of 4 bytes. If the length of the chunk is not a
|
| 1079 | multiple of 4 bytes, the sender MUST pad the chunk with all zero
|
| 1080 | bytes and this padding is not included in the chunk length field.
|
| 1081 | The sender should never pad with more than 3 bytes. The receiver
|
| 1082 | MUST ignore the padding bytes.
|
| 1083 |
|
| 1084 | SCTP defined chunks are described in detail in Section 3.3. The
|
| 1085 | guidelines for IETF-defined chunk extensions can be found in Section
|
| 1086 | 13.1 of this document.
|
| 1087 |
|
| 1088 | 3.2.1 Optional/Variable-length Parameter Format
|
| 1089 |
|
| 1090 | Chunk values of SCTP control chunks consist of a chunk-type-specific
|
| 1091 | header of required fields, followed by zero or more parameters. The
|
| 1092 | optional and variable-length parameters contained in a chunk are
|
| 1093 | defined in a Type-Length-Value format as shown below.
|
| 1094 |
|
| 1095 | 0 1 2 3
|
| 1096 | 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
|
| 1097 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1098 | | Parameter Type | Parameter Length |
|
| 1099 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1100 | \ \
|
| 1101 | / Parameter Value /
|
| 1102 | \ \
|
| 1103 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1104 |
|
| 1105 | Chunk Parameter Type: 16 bits (unsigned integer)
|
| 1106 |
|
| 1107 | The Type field is a 16 bit identifier of the type of parameter.
|
| 1108 | It takes a value of 0 to 65534.
|
| 1109 |
|
| 1110 | The value of 65535 is reserved for IETF-defined extensions. Values
|
| 1111 | other than those defined in specific SCTP chunk description are
|
| 1112 | reserved for use by IETF.
|
| 1113 |
|
| 1114 |
|
| 1115 |
|
| 1116 |
|
| 1117 |
|
| 1118 |
|
| 1119 |
|
| 1120 |
|
| 1121 |
|
| 1122 | Stewart, et al. Standards Track [Page 20]
|
| 1123 |
|
| 1124 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1125 |
|
| 1126 |
|
| 1127 | Chunk Parameter Length: 16 bits (unsigned integer)
|
| 1128 |
|
| 1129 | The Parameter Length field contains the size of the parameter in
|
| 1130 | bytes, including the Parameter Type, Parameter Length, and
|
| 1131 | Parameter Value fields. Thus, a parameter with a zero-length
|
| 1132 | Parameter Value field would have a Length field of 4. The
|
| 1133 | Parameter Length does not include any padding bytes.
|
| 1134 |
|
| 1135 | Chunk Parameter Value: variable-length.
|
| 1136 |
|
| 1137 | The Parameter Value field contains the actual information to be
|
| 1138 | transferred in the parameter.
|
| 1139 |
|
| 1140 | The total length of a parameter (including Type, Parameter Length and
|
| 1141 | Value fields) MUST be a multiple of 4 bytes. If the length of the
|
| 1142 | parameter is not a multiple of 4 bytes, the sender pads the Parameter
|
| 1143 | at the end (i.e., after the Parameter Value field) with all zero
|
| 1144 | bytes. The length of the padding is not included in the parameter
|
| 1145 | length field. A sender SHOULD NOT pad with more than 3 bytes. The
|
| 1146 | receiver MUST ignore the padding bytes.
|
| 1147 |
|
| 1148 | The Parameter Types are encoded such that the highest-order two bits
|
| 1149 | specify the action that must be taken if the processing endpoint does
|
| 1150 | not recognize the Parameter Type.
|
| 1151 |
|
| 1152 | 00 - Stop processing this SCTP packet and discard it, do not process
|
| 1153 | any further chunks within it.
|
| 1154 |
|
| 1155 | 01 - Stop processing this SCTP packet and discard it, do not process
|
| 1156 | any further chunks within it, and report the unrecognized
|
| 1157 | parameter in an 'Unrecognized Parameter Type' (in either an
|
| 1158 | ERROR or in the INIT ACK).
|
| 1159 |
|
| 1160 | 10 - Skip this parameter and continue processing.
|
| 1161 |
|
| 1162 | 11 - Skip this parameter and continue processing but report the
|
| 1163 | unrecognized parameter in an 'Unrecognized Parameter Type' (in
|
| 1164 | either an ERROR or in the INIT ACK).
|
| 1165 |
|
| 1166 | The actual SCTP parameters are defined in the specific SCTP chunk
|
| 1167 | sections. The rules for IETF-defined parameter extensions are
|
| 1168 | defined in Section 13.2.
|
| 1169 |
|
| 1170 | 3.3 SCTP Chunk Definitions
|
| 1171 |
|
| 1172 | This section defines the format of the different SCTP chunk types.
|
| 1173 |
|
| 1174 |
|
| 1175 |
|
| 1176 |
|
| 1177 |
|
| 1178 | Stewart, et al. Standards Track [Page 21]
|
| 1179 |
|
| 1180 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1181 |
|
| 1182 |
|
| 1183 | 3.3.1 Payload Data (DATA) (0)
|
| 1184 |
|
| 1185 | The following format MUST be used for the DATA chunk:
|
| 1186 |
|
| 1187 | 0 1 2 3
|
| 1188 | 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
|
| 1189 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1190 | | Type = 0 | Reserved|U|B|E| Length |
|
| 1191 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1192 | | TSN |
|
| 1193 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1194 | | Stream Identifier S | Stream Sequence Number n |
|
| 1195 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1196 | | Payload Protocol Identifier |
|
| 1197 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1198 | \ \
|
| 1199 | / User Data (seq n of Stream S) /
|
| 1200 | \ \
|
| 1201 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1202 |
|
| 1203 | Reserved: 5 bits
|
| 1204 |
|
| 1205 | Should be set to all '0's and ignored by the receiver.
|
| 1206 |
|
| 1207 | U bit: 1 bit
|
| 1208 |
|
| 1209 | The (U)nordered bit, if set to '1', indicates that this is an
|
| 1210 | unordered DATA chunk, and there is no Stream Sequence Number
|
| 1211 | assigned to this DATA chunk. Therefore, the receiver MUST ignore
|
| 1212 | the Stream Sequence Number field.
|
| 1213 |
|
| 1214 | After re-assembly (if necessary), unordered DATA chunks MUST be
|
| 1215 | dispatched to the upper layer by the receiver without any attempt
|
| 1216 | to re-order.
|
| 1217 |
|
| 1218 | If an unordered user message is fragmented, each fragment of the
|
| 1219 | message MUST have its U bit set to '1'.
|
| 1220 |
|
| 1221 | B bit: 1 bit
|
| 1222 |
|
| 1223 | The (B)eginning fragment bit, if set, indicates the first fragment
|
| 1224 | of a user message.
|
| 1225 |
|
| 1226 | E bit: 1 bit
|
| 1227 |
|
| 1228 | The (E)nding fragment bit, if set, indicates the last fragment of
|
| 1229 | a user message.
|
| 1230 |
|
| 1231 |
|
| 1232 |
|
| 1233 |
|
| 1234 | Stewart, et al. Standards Track [Page 22]
|
| 1235 |
|
| 1236 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1237 |
|
| 1238 |
|
| 1239 | An unfragmented user message shall have both the B and E bits set to
|
| 1240 | '1'. Setting both B and E bits to '0' indicates a middle fragment of
|
| 1241 | a multi-fragment user message, as summarized in the following table:
|
| 1242 |
|
| 1243 | B E Description
|
| 1244 | ============================================================
|
| 1245 | | 1 0 | First piece of a fragmented user message |
|
| 1246 | +----------------------------------------------------------+
|
| 1247 | | 0 0 | Middle piece of a fragmented user message |
|
| 1248 | +----------------------------------------------------------+
|
| 1249 | | 0 1 | Last piece of a fragmented user message |
|
| 1250 | +----------------------------------------------------------+
|
| 1251 | | 1 1 | Unfragmented Message |
|
| 1252 | ============================================================
|
| 1253 | | Table 1: Fragment Description Flags |
|
| 1254 | ============================================================
|
| 1255 |
|
| 1256 | When a user message is fragmented into multiple chunks, the TSNs are
|
| 1257 | used by the receiver to reassemble the message. This means that the
|
| 1258 | TSNs for each fragment of a fragmented user message MUST be strictly
|
| 1259 | sequential.
|
| 1260 |
|
| 1261 | Length: 16 bits (unsigned integer)
|
| 1262 |
|
| 1263 | This field indicates the length of the DATA chunk in bytes from
|
| 1264 | the beginning of the type field to the end of the user data field
|
| 1265 | excluding any padding. A DATA chunk with no user data field will
|
| 1266 | have Length set to 16 (indicating 16 bytes).
|
| 1267 |
|
| 1268 | TSN : 32 bits (unsigned integer)
|
| 1269 |
|
| 1270 | This value represents the TSN for this DATA chunk. The valid
|
| 1271 | range of TSN is from 0 to 4294967295 (2**32 - 1). TSN wraps back
|
| 1272 | to 0 after reaching 4294967295.
|
| 1273 |
|
| 1274 | Stream Identifier S: 16 bits (unsigned integer)
|
| 1275 |
|
| 1276 | Identifies the stream to which the following user data belongs.
|
| 1277 |
|
| 1278 | Stream Sequence Number n: 16 bits (unsigned integer)
|
| 1279 |
|
| 1280 | This value represents the stream sequence number of the following
|
| 1281 | user data within the stream S. Valid range is 0 to 65535.
|
| 1282 |
|
| 1283 | When a user message is fragmented by SCTP for transport, the same
|
| 1284 | stream sequence number MUST be carried in each of the fragments of
|
| 1285 | the message.
|
| 1286 |
|
| 1287 |
|
| 1288 |
|
| 1289 |
|
| 1290 | Stewart, et al. Standards Track [Page 23]
|
| 1291 |
|
| 1292 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1293 |
|
| 1294 |
|
| 1295 | Payload Protocol Identifier: 32 bits (unsigned integer)
|
| 1296 |
|
| 1297 | This value represents an application (or upper layer) specified
|
| 1298 | protocol identifier. This value is passed to SCTP by its upper
|
| 1299 | layer and sent to its peer. This identifier is not used by SCTP
|
| 1300 | but can be used by certain network entities as well as the peer
|
| 1301 | application to identify the type of information being carried in
|
| 1302 | this DATA chunk. This field must be sent even in fragmented DATA
|
| 1303 | chunks (to make sure it is available for agents in the middle of
|
| 1304 | the network).
|
| 1305 |
|
| 1306 | The value 0 indicates no application identifier is specified by
|
| 1307 | the upper layer for this payload data.
|
| 1308 |
|
| 1309 | User Data: variable length
|
| 1310 |
|
| 1311 | This is the payload user data. The implementation MUST pad the
|
| 1312 | end of the data to a 4 byte boundary with all-zero bytes. Any
|
| 1313 | padding MUST NOT be included in the length field. A sender MUST
|
| 1314 | never add more than 3 bytes of padding.
|
| 1315 |
|
| 1316 | 3.3.2 Initiation (INIT) (1)
|
| 1317 |
|
| 1318 | This chunk is used to initiate a SCTP association between two
|
| 1319 | endpoints. The format of the INIT chunk is shown below:
|
| 1320 |
|
| 1321 | 0 1 2 3
|
| 1322 | 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
|
| 1323 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1324 | | Type = 1 | Chunk Flags | Chunk Length |
|
| 1325 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1326 | | Initiate Tag |
|
| 1327 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1328 | | Advertised Receiver Window Credit (a_rwnd) |
|
| 1329 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1330 | | Number of Outbound Streams | Number of Inbound Streams |
|
| 1331 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1332 | | Initial TSN |
|
| 1333 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1334 | \ \
|
| 1335 | / Optional/Variable-Length Parameters /
|
| 1336 | \ \
|
| 1337 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1338 |
|
| 1339 | The INIT chunk contains the following parameters. Unless otherwise
|
| 1340 | noted, each parameter MUST only be included once in the INIT chunk.
|
| 1341 |
|
| 1342 |
|
| 1343 |
|
| 1344 |
|
| 1345 |
|
| 1346 | Stewart, et al. Standards Track [Page 24]
|
| 1347 |
|
| 1348 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1349 |
|
| 1350 |
|
| 1351 | Fixed Parameters Status
|
| 1352 | ----------------------------------------------
|
| 1353 | Initiate Tag Mandatory
|
| 1354 | Advertised Receiver Window Credit Mandatory
|
| 1355 | Number of Outbound Streams Mandatory
|
| 1356 | Number of Inbound Streams Mandatory
|
| 1357 | Initial TSN Mandatory
|
| 1358 |
|
| 1359 | Variable Parameters Status Type Value
|
| 1360 | -------------------------------------------------------------
|
| 1361 | IPv4 Address (Note 1) Optional 5
|
| 1362 | IPv6 Address (Note 1) Optional 6
|
| 1363 | Cookie Preservative Optional 9
|
| 1364 | Reserved for ECN Capable (Note 2) Optional 32768 (0x8000)
|
| 1365 | Host Name Address (Note 3) Optional 11
|
| 1366 | Supported Address Types (Note 4) Optional 12
|
| 1367 |
|
| 1368 | Note 1: The INIT chunks can contain multiple addresses that can be
|
| 1369 | IPv4 and/or IPv6 in any combination.
|
| 1370 |
|
| 1371 | Note 2: The ECN capable field is reserved for future use of Explicit
|
| 1372 | Congestion Notification.
|
| 1373 |
|
| 1374 | Note 3: An INIT chunk MUST NOT contain more than one Host Name
|
| 1375 | address parameter. Moreover, the sender of the INIT MUST NOT combine
|
| 1376 | any other address types with the Host Name address in the INIT. The
|
| 1377 | receiver of INIT MUST ignore any other address types if the Host Name
|
| 1378 | address parameter is present in the received INIT chunk.
|
| 1379 |
|
| 1380 | Note 4: This parameter, when present, specifies all the address types
|
| 1381 | the sending endpoint can support. The absence of this parameter
|
| 1382 | indicates that the sending endpoint can support any address type.
|
| 1383 |
|
| 1384 | The Chunk Flags field in INIT is reserved and all bits in it should
|
| 1385 | be set to 0 by the sender and ignored by the receiver. The sequence
|
| 1386 | of parameters within an INIT can be processed in any order.
|
| 1387 |
|
| 1388 | Initiate Tag: 32 bits (unsigned integer)
|
| 1389 |
|
| 1390 | The receiver of the INIT (the responding end) records the value of
|
| 1391 | the Initiate Tag parameter. This value MUST be placed into the
|
| 1392 | Verification Tag field of every SCTP packet that the receiver of
|
| 1393 | the INIT transmits within this association.
|
| 1394 |
|
| 1395 | The Initiate Tag is allowed to have any value except 0. See
|
| 1396 | Section 5.3.1 for more on the selection of the tag value.
|
| 1397 |
|
| 1398 |
|
| 1399 |
|
| 1400 |
|
| 1401 |
|
| 1402 | Stewart, et al. Standards Track [Page 25]
|
| 1403 |
|
| 1404 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1405 |
|
| 1406 |
|
| 1407 | If the value of the Initiate Tag in a received INIT chunk is found
|
| 1408 | to be 0, the receiver MUST treat it as an error and close the
|
| 1409 | association by transmitting an ABORT.
|
| 1410 |
|
| 1411 | Advertised Receiver Window Credit (a_rwnd): 32 bits (unsigned
|
| 1412 | integer)
|
| 1413 |
|
| 1414 | This value represents the dedicated buffer space, in number of
|
| 1415 | bytes, the sender of the INIT has reserved in association with
|
| 1416 | this window. During the life of the association this buffer space
|
| 1417 | SHOULD not be lessened (i.e. dedicated buffers taken away from
|
| 1418 | this association); however, an endpoint MAY change the value of
|
| 1419 | a_rwnd it sends in SACK chunks.
|
| 1420 |
|
| 1421 | Number of Outbound Streams (OS): 16 bits (unsigned integer)
|
| 1422 |
|
| 1423 | Defines the number of outbound streams the sender of this INIT
|
| 1424 | chunk wishes to create in this association. The value of 0 MUST
|
| 1425 | NOT be used.
|
| 1426 |
|
| 1427 | Note: A receiver of an INIT with the OS value set to 0 SHOULD
|
| 1428 | abort the association.
|
| 1429 |
|
| 1430 | Number of Inbound Streams (MIS) : 16 bits (unsigned integer)
|
| 1431 |
|
| 1432 | Defines the maximum number of streams the sender of this INIT
|
| 1433 | chunk allows the peer end to create in this association. The
|
| 1434 | value 0 MUST NOT be used.
|
| 1435 |
|
| 1436 | Note: There is no negotiation of the actual number of streams but
|
| 1437 | instead the two endpoints will use the min(requested, offered).
|
| 1438 | See Section 5.1.1 for details.
|
| 1439 |
|
| 1440 | Note: A receiver of an INIT with the MIS value of 0 SHOULD abort
|
| 1441 | the association.
|
| 1442 |
|
| 1443 | Initial TSN (I-TSN) : 32 bits (unsigned integer)
|
| 1444 |
|
| 1445 | Defines the initial TSN that the sender will use. The valid range
|
| 1446 | is from 0 to 4294967295. This field MAY be set to the value of
|
| 1447 | the Initiate Tag field.
|
| 1448 |
|
| 1449 | 3.3.2.1 Optional/Variable Length Parameters in INIT
|
| 1450 |
|
| 1451 | The following parameters follow the Type-Length-Value format as
|
| 1452 | defined in Section 3.2.1. Any Type-Length-Value fields MUST come
|
| 1453 | after the fixed-length fields defined in the previous section.
|
| 1454 |
|
| 1455 |
|
| 1456 |
|
| 1457 |
|
| 1458 | Stewart, et al. Standards Track [Page 26]
|
| 1459 |
|
| 1460 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1461 |
|
| 1462 |
|
| 1463 | IPv4 Address Parameter (5)
|
| 1464 |
|
| 1465 | 0 1 2 3
|
| 1466 | 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
|
| 1467 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1468 | | Type = 5 | Length = 8 |
|
| 1469 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1470 | | IPv4 Address |
|
| 1471 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1472 |
|
| 1473 |
|
| 1474 | IPv4 Address: 32 bits (unsigned integer)
|
| 1475 |
|
| 1476 | Contains an IPv4 address of the sending endpoint. It is binary
|
| 1477 | encoded.
|
| 1478 |
|
| 1479 | IPv6 Address Parameter (6)
|
| 1480 |
|
| 1481 | 0 1 2 3
|
| 1482 | 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
|
| 1483 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1484 | | Type = 6 | Length = 20 |
|
| 1485 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1486 | | |
|
| 1487 | | IPv6 Address |
|
| 1488 | | |
|
| 1489 | | |
|
| 1490 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1491 |
|
| 1492 | IPv6 Address: 128 bit (unsigned integer)
|
| 1493 |
|
| 1494 | Contains an IPv6 address of the sending endpoint. It is binary
|
| 1495 | encoded.
|
| 1496 |
|
| 1497 | Note: A sender MUST NOT use an IPv4-mapped IPv6 address [RFC2373]
|
| 1498 | but should instead use an IPv4 Address Parameter for an IPv4
|
| 1499 | address.
|
| 1500 |
|
| 1501 | Combined with the Source Port Number in the SCTP common header,
|
| 1502 | the value passed in an IPv4 or IPv6 Address parameter indicates a
|
| 1503 | transport address the sender of the INIT will support for the
|
| 1504 | association being initiated. That is, during the lifetime of this
|
| 1505 | association, this IP address can appear in the source address
|
| 1506 | field of an IP datagram sent from the sender of the INIT, and can
|
| 1507 | be used as a destination address of an IP datagram sent from the
|
| 1508 | receiver of the INIT.
|
| 1509 |
|
| 1510 |
|
| 1511 |
|
| 1512 |
|
| 1513 |
|
| 1514 | Stewart, et al. Standards Track [Page 27]
|
| 1515 |
|
| 1516 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1517 |
|
| 1518 |
|
| 1519 | More than one IP Address parameter can be included in an INIT
|
| 1520 | chunk when the INIT sender is multi-homed. Moreover, a multi-
|
| 1521 | homed endpoint may have access to different types of network, thus
|
| 1522 | more than one address type can be present in one INIT chunk, i.e.,
|
| 1523 | IPv4 and IPv6 addresses are allowed in the same INIT chunk.
|
| 1524 |
|
| 1525 | If the INIT contains at least one IP Address parameter, then the
|
| 1526 | source address of the IP datagram containing the INIT chunk and
|
| 1527 | any additional address(es) provided within the INIT can be used as
|
| 1528 | destinations by the endpoint receiving the INIT. If the INIT does
|
| 1529 | not contain any IP Address parameters, the endpoint receiving the
|
| 1530 | INIT MUST use the source address associated with the received IP
|
| 1531 | datagram as its sole destination address for the association.
|
| 1532 |
|
| 1533 | Note that not using any IP address parameters in the INIT and
|
| 1534 | INIT-ACK is an alternative to make an association more likely to
|
| 1535 | work across a NAT box.
|
| 1536 |
|
| 1537 | Cookie Preservative (9)
|
| 1538 |
|
| 1539 | The sender of the INIT shall use this parameter to suggest to the
|
| 1540 | receiver of the INIT for a longer life-span of the State Cookie.
|
| 1541 |
|
| 1542 | 0 1 2 3
|
| 1543 | 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
|
| 1544 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1545 | | Type = 9 | Length = 8 |
|
| 1546 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1547 | | Suggested Cookie Life-span Increment (msec.) |
|
| 1548 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1549 |
|
| 1550 | Suggested Cookie Life-span Increment: 32 bits (unsigned integer)
|
| 1551 |
|
| 1552 | This parameter indicates to the receiver how much increment in
|
| 1553 | milliseconds the sender wishes the receiver to add to its default
|
| 1554 | cookie life-span.
|
| 1555 |
|
| 1556 | This optional parameter should be added to the INIT chunk by the
|
| 1557 | sender when it re-attempts establishing an association with a peer
|
| 1558 | to which its previous attempt of establishing the association failed
|
| 1559 | due to a stale cookie operation error. The receiver MAY choose to
|
| 1560 | ignore the suggested cookie life-span increase for its own security
|
| 1561 | reasons.
|
| 1562 |
|
| 1563 |
|
| 1564 |
|
| 1565 |
|
| 1566 |
|
| 1567 |
|
| 1568 |
|
| 1569 |
|
| 1570 | Stewart, et al. Standards Track [Page 28]
|
| 1571 |
|
| 1572 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1573 |
|
| 1574 |
|
| 1575 | Host Name Address (11)
|
| 1576 |
|
| 1577 | The sender of INIT uses this parameter to pass its Host Name (in
|
| 1578 | place of its IP addresses) to its peer. The peer is responsible
|
| 1579 | for resolving the name. Using this parameter might make it more
|
| 1580 | likely for the association to work across a NAT box.
|
| 1581 |
|
| 1582 | 0 1 2 3
|
| 1583 | 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
|
| 1584 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1585 | | Type = 11 | Length |
|
| 1586 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1587 | / Host Name /
|
| 1588 | \ \
|
| 1589 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1590 |
|
| 1591 | Host Name: variable length
|
| 1592 |
|
| 1593 | This field contains a host name in "host name syntax" per RFC1123
|
| 1594 | Section 2.1 [RFC1123]. The method for resolving the host name is
|
| 1595 | out of scope of SCTP.
|
| 1596 |
|
| 1597 | Note: At least one null terminator is included in the Host Name
|
| 1598 | string and must be included in the length.
|
| 1599 |
|
| 1600 | Supported Address Types (12)
|
| 1601 |
|
| 1602 | The sender of INIT uses this parameter to list all the address
|
| 1603 | types it can support.
|
| 1604 |
|
| 1605 | 0 1 2 3
|
| 1606 | 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
|
| 1607 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1608 | | Type = 12 | Length |
|
| 1609 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1610 | | Address Type #1 | Address Type #2 |
|
| 1611 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1612 | | ......
|
| 1613 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1614 |
|
| 1615 | Address Type: 16 bits (unsigned integer)
|
| 1616 |
|
| 1617 | This is filled with the type value of the corresponding address
|
| 1618 | TLV (e.g., IPv4 = 5, IPv6 = 6, Hostname = 11).
|
| 1619 |
|
| 1620 |
|
| 1621 |
|
| 1622 |
|
| 1623 |
|
| 1624 |
|
| 1625 |
|
| 1626 | Stewart, et al. Standards Track [Page 29]
|
| 1627 |
|
| 1628 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1629 |
|
| 1630 |
|
| 1631 | 3.3.3 Initiation Acknowledgement (INIT ACK) (2):
|
| 1632 |
|
| 1633 | The INIT ACK chunk is used to acknowledge the initiation of an SCTP
|
| 1634 | association.
|
| 1635 |
|
| 1636 | The parameter part of INIT ACK is formatted similarly to the INIT
|
| 1637 | chunk. It uses two extra variable parameters: The State Cookie and
|
| 1638 | the Unrecognized Parameter:
|
| 1639 |
|
| 1640 | The format of the INIT ACK chunk is shown below:
|
| 1641 |
|
| 1642 | 0 1 2 3
|
| 1643 | 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
|
| 1644 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1645 | | Type = 2 | Chunk Flags | Chunk Length |
|
| 1646 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1647 | | Initiate Tag |
|
| 1648 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1649 | | Advertised Receiver Window Credit |
|
| 1650 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1651 | | Number of Outbound Streams | Number of Inbound Streams |
|
| 1652 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1653 | | Initial TSN |
|
| 1654 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1655 | \ \
|
| 1656 | / Optional/Variable-Length Parameters /
|
| 1657 | \ \
|
| 1658 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1659 |
|
| 1660 | Initiate Tag: 32 bits (unsigned integer)
|
| 1661 |
|
| 1662 | The receiver of the INIT ACK records the value of the Initiate Tag
|
| 1663 | parameter. This value MUST be placed into the Verification Tag
|
| 1664 | field of every SCTP packet that the INIT ACK receiver transmits
|
| 1665 | within this association.
|
| 1666 |
|
| 1667 | The Initiate Tag MUST NOT take the value 0. See Section 5.3.1 for
|
| 1668 | more on the selection of the Initiate Tag value.
|
| 1669 |
|
| 1670 | If the value of the Initiate Tag in a received INIT ACK chunk is
|
| 1671 | found to be 0, the receiver MUST treat it as an error and close
|
| 1672 | the association by transmitting an ABORT.
|
| 1673 |
|
| 1674 |
|
| 1675 |
|
| 1676 |
|
| 1677 |
|
| 1678 |
|
| 1679 |
|
| 1680 |
|
| 1681 |
|
| 1682 | Stewart, et al. Standards Track [Page 30]
|
| 1683 |
|
| 1684 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1685 |
|
| 1686 |
|
| 1687 | Advertised Receiver Window Credit (a_rwnd): 32 bits (unsigned
|
| 1688 | integer)
|
| 1689 |
|
| 1690 | This value represents the dedicated buffer space, in number of
|
| 1691 | bytes, the sender of the INIT ACK has reserved in association with
|
| 1692 | this window. During the life of the association this buffer space
|
| 1693 | SHOULD not be lessened (i.e. dedicated buffers taken away from
|
| 1694 | this association).
|
| 1695 |
|
| 1696 | Number of Outbound Streams (OS): 16 bits (unsigned integer)
|
| 1697 |
|
| 1698 | Defines the number of outbound streams the sender of this INIT ACK
|
| 1699 | chunk wishes to create in this association. The value of 0 MUST
|
| 1700 | NOT be used.
|
| 1701 |
|
| 1702 | Note: A receiver of an INIT ACK with the OS value set to 0 SHOULD
|
| 1703 | destroy the association discarding its TCB.
|
| 1704 |
|
| 1705 | Number of Inbound Streams (MIS) : 16 bits (unsigned integer)
|
| 1706 |
|
| 1707 | Defines the maximum number of streams the sender of this INIT ACK
|
| 1708 | chunk allows the peer end to create in this association. The
|
| 1709 | value 0 MUST NOT be used.
|
| 1710 |
|
| 1711 | Note: There is no negotiation of the actual number of streams but
|
| 1712 | instead the two endpoints will use the min(requested, offered).
|
| 1713 | See Section 5.1.1 for details.
|
| 1714 |
|
| 1715 | Note: A receiver of an INIT ACK with the MIS value set to 0
|
| 1716 | SHOULD destroy the association discarding its TCB.
|
| 1717 |
|
| 1718 | Initial TSN (I-TSN) : 32 bits (unsigned integer)
|
| 1719 |
|
| 1720 | Defines the initial TSN that the INIT-ACK sender will use. The
|
| 1721 | valid range is from 0 to 4294967295. This field MAY be set to the
|
| 1722 | value of the Initiate Tag field.
|
| 1723 |
|
| 1724 | Fixed Parameters Status
|
| 1725 | ----------------------------------------------
|
| 1726 | Initiate Tag Mandatory
|
| 1727 | Advertised Receiver Window Credit Mandatory
|
| 1728 | Number of Outbound Streams Mandatory
|
| 1729 | Number of Inbound Streams Mandatory
|
| 1730 | Initial TSN Mandatory
|
| 1731 |
|
| 1732 |
|
| 1733 |
|
| 1734 |
|
| 1735 |
|
| 1736 |
|
| 1737 |
|
| 1738 | Stewart, et al. Standards Track [Page 31]
|
| 1739 |
|
| 1740 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1741 |
|
| 1742 |
|
| 1743 | Variable Parameters Status Type Value
|
| 1744 | -------------------------------------------------------------
|
| 1745 | State Cookie Mandatory 7
|
| 1746 | IPv4 Address (Note 1) Optional 5
|
| 1747 | IPv6 Address (Note 1) Optional 6
|
| 1748 | Unrecognized Parameters Optional 8
|
| 1749 | Reserved for ECN Capable (Note 2) Optional 32768 (0x8000)
|
| 1750 | Host Name Address (Note 3) Optional 11
|
| 1751 |
|
| 1752 | Note 1: The INIT ACK chunks can contain any number of IP address
|
| 1753 | parameters that can be IPv4 and/or IPv6 in any combination.
|
| 1754 |
|
| 1755 | Note 2: The ECN capable field is reserved for future use of Explicit
|
| 1756 | Congestion Notification.
|
| 1757 |
|
| 1758 | Note 3: The INIT ACK chunks MUST NOT contain more than one Host Name
|
| 1759 | address parameter. Moreover, the sender of the INIT ACK MUST NOT
|
| 1760 | combine any other address types with the Host Name address in the
|
| 1761 | INIT ACK. The receiver of the INIT ACK MUST ignore any other address
|
| 1762 | types if the Host Name address parameter is present.
|
| 1763 |
|
| 1764 | IMPLEMENTATION NOTE: An implementation MUST be prepared to receive a
|
| 1765 | INIT ACK that is quite large (more than 1500 bytes) due to the
|
| 1766 | variable size of the state cookie AND the variable address list. For
|
| 1767 | example if a responder to the INIT has 1000 IPv4 addresses it wishes
|
| 1768 | to send, it would need at least 8,000 bytes to encode this in the
|
| 1769 | INIT ACK.
|
| 1770 |
|
| 1771 | In combination with the Source Port carried in the SCTP common
|
| 1772 | header, each IP Address parameter in the INIT ACK indicates to the
|
| 1773 | receiver of the INIT ACK a valid transport address supported by the
|
| 1774 | sender of the INIT ACK for the lifetime of the association being
|
| 1775 | initiated.
|
| 1776 |
|
| 1777 | If the INIT ACK contains at least one IP Address parameter, then the
|
| 1778 | source address of the IP datagram containing the INIT ACK and any
|
| 1779 | additional address(es) provided within the INIT ACK may be used as
|
| 1780 | destinations by the receiver of the INIT-ACK. If the INIT ACK does
|
| 1781 | not contain any IP Address parameters, the receiver of the INIT-ACK
|
| 1782 | MUST use the source address associated with the received IP datagram
|
| 1783 | as its sole destination address for the association.
|
| 1784 |
|
| 1785 | The State Cookie and Unrecognized Parameters use the Type-Length-
|
| 1786 | Value format as defined in Section 3.2.1 and are described below.
|
| 1787 | The other fields are defined the same as their counterparts in the
|
| 1788 | INIT chunk.
|
| 1789 |
|
| 1790 |
|
| 1791 |
|
| 1792 |
|
| 1793 |
|
| 1794 | Stewart, et al. Standards Track [Page 32]
|
| 1795 |
|
| 1796 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1797 |
|
| 1798 |
|
| 1799 | 3.3.3.1 Optional or Variable Length Parameters
|
| 1800 |
|
| 1801 | State Cookie
|
| 1802 |
|
| 1803 | Parameter Type Value: 7
|
| 1804 |
|
| 1805 | Parameter Length: variable size, depending on Size of Cookie
|
| 1806 |
|
| 1807 | Parameter Value:
|
| 1808 |
|
| 1809 | This parameter value MUST contain all the necessary state and
|
| 1810 | parameter information required for the sender of this INIT ACK
|
| 1811 | to create the association, along with a Message Authentication
|
| 1812 | Code (MAC). See Section 5.1.3 for details on State Cookie
|
| 1813 | definition.
|
| 1814 |
|
| 1815 | Unrecognized Parameters:
|
| 1816 |
|
| 1817 | Parameter Type Value: 8
|
| 1818 |
|
| 1819 | Parameter Length: Variable Size.
|
| 1820 |
|
| 1821 | Parameter Value:
|
| 1822 |
|
| 1823 | This parameter is returned to the originator of the INIT chunk
|
| 1824 | when the INIT contains an unrecognized parameter which has a
|
| 1825 | value that indicates that it should be reported to the sender.
|
| 1826 | This parameter value field will contain unrecognized parameters
|
| 1827 | copied from the INIT chunk complete with Parameter Type, Length
|
| 1828 | and Value fields.
|
| 1829 |
|
| 1830 | 3.3.4 Selective Acknowledgement (SACK) (3):
|
| 1831 |
|
| 1832 | This chunk is sent to the peer endpoint to acknowledge received DATA
|
| 1833 | chunks and to inform the peer endpoint of gaps in the received
|
| 1834 | subsequences of DATA chunks as represented by their TSNs.
|
| 1835 |
|
| 1836 | The SACK MUST contain the Cumulative TSN Ack and Advertised Receiver
|
| 1837 | Window Credit (a_rwnd) parameters.
|
| 1838 |
|
| 1839 | By definition, the value of the Cumulative TSN Ack parameter is the
|
| 1840 | last TSN received before a break in the sequence of received TSNs
|
| 1841 | occurs; the next TSN value following this one has not yet been
|
| 1842 | received at the endpoint sending the SACK. This parameter therefore
|
| 1843 | acknowledges receipt of all TSNs less than or equal to its value.
|
| 1844 |
|
| 1845 | The handling of a_rwnd by the receiver of the SACK is discussed in
|
| 1846 | detail in Section 6.2.1.
|
| 1847 |
|
| 1848 |
|
| 1849 |
|
| 1850 | Stewart, et al. Standards Track [Page 33]
|
| 1851 |
|
| 1852 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1853 |
|
| 1854 |
|
| 1855 | The SACK also contains zero or more Gap Ack Blocks. Each Gap Ack
|
| 1856 | Block acknowledges a subsequence of TSNs received following a break
|
| 1857 | in the sequence of received TSNs. By definition, all TSNs
|
| 1858 | acknowledged by Gap Ack Blocks are greater than the value of the
|
| 1859 | Cumulative TSN Ack.
|
| 1860 |
|
| 1861 | 0 1 2 3
|
| 1862 | 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
|
| 1863 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1864 | | Type = 3 |Chunk Flags | Chunk Length |
|
| 1865 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1866 | | Cumulative TSN Ack |
|
| 1867 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1868 | | Advertised Receiver Window Credit (a_rwnd) |
|
| 1869 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1870 | | Number of Gap Ack Blocks = N | Number of Duplicate TSNs = X |
|
| 1871 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1872 | | Gap Ack Block #1 Start | Gap Ack Block #1 End |
|
| 1873 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1874 | / /
|
| 1875 | \ ... \
|
| 1876 | / /
|
| 1877 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1878 | | Gap Ack Block #N Start | Gap Ack Block #N End |
|
| 1879 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1880 | | Duplicate TSN 1 |
|
| 1881 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1882 | / /
|
| 1883 | \ ... \
|
| 1884 | / /
|
| 1885 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1886 | | Duplicate TSN X |
|
| 1887 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 1888 |
|
| 1889 | Chunk Flags: 8 bits
|
| 1890 |
|
| 1891 | Set to all zeros on transmit and ignored on receipt.
|
| 1892 |
|
| 1893 | Cumulative TSN Ack: 32 bits (unsigned integer)
|
| 1894 |
|
| 1895 | This parameter contains the TSN of the last DATA chunk received in
|
| 1896 | sequence before a gap.
|
| 1897 |
|
| 1898 | Advertised Receiver Window Credit (a_rwnd): 32 bits (unsigned
|
| 1899 | integer)
|
| 1900 |
|
| 1901 | This field indicates the updated receive buffer space in bytes of
|
| 1902 | the sender of this SACK, see Section 6.2.1 for details.
|
| 1903 |
|
| 1904 |
|
| 1905 |
|
| 1906 | Stewart, et al. Standards Track [Page 34]
|
| 1907 |
|
| 1908 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1909 |
|
| 1910 |
|
| 1911 | Number of Gap Ack Blocks: 16 bits (unsigned integer)
|
| 1912 |
|
| 1913 | Indicates the number of Gap Ack Blocks included in this SACK.
|
| 1914 |
|
| 1915 | Number of Duplicate TSNs: 16 bit
|
| 1916 |
|
| 1917 | This field contains the number of duplicate TSNs the endpoint has
|
| 1918 | received. Each duplicate TSN is listed following the Gap Ack
|
| 1919 | Block list.
|
| 1920 |
|
| 1921 | Gap Ack Blocks:
|
| 1922 |
|
| 1923 | These fields contain the Gap Ack Blocks. They are repeated for
|
| 1924 | each Gap Ack Block up to the number of Gap Ack Blocks defined in
|
| 1925 | the Number of Gap Ack Blocks field. All DATA chunks with TSNs
|
| 1926 | greater than or equal to (Cumulative TSN Ack + Gap Ack Block
|
| 1927 | Start) and less than or equal to (Cumulative TSN Ack + Gap Ack
|
| 1928 | Block End) of each Gap Ack Block are assumed to have been received
|
| 1929 | correctly.
|
| 1930 |
|
| 1931 | Gap Ack Block Start: 16 bits (unsigned integer)
|
| 1932 |
|
| 1933 | Indicates the Start offset TSN for this Gap Ack Block. To
|
| 1934 | calculate the actual TSN number the Cumulative TSN Ack is added to
|
| 1935 | this offset number. This calculated TSN identifies the first TSN
|
| 1936 | in this Gap Ack Block that has been received.
|
| 1937 |
|
| 1938 | Gap Ack Block End: 16 bits (unsigned integer)
|
| 1939 |
|
| 1940 | Indicates the End offset TSN for this Gap Ack Block. To calculate
|
| 1941 | the actual TSN number the Cumulative TSN Ack is added to this
|
| 1942 | offset number. This calculated TSN identifies the TSN of the last
|
| 1943 | DATA chunk received in this Gap Ack Block.
|
| 1944 |
|
| 1945 | For example, assume the receiver has the following DATA chunks newly
|
| 1946 | arrived at the time when it decides to send a Selective ACK,
|
| 1947 |
|
| 1948 |
|
| 1949 |
|
| 1950 |
|
| 1951 |
|
| 1952 |
|
| 1953 |
|
| 1954 |
|
| 1955 |
|
| 1956 |
|
| 1957 |
|
| 1958 |
|
| 1959 |
|
| 1960 |
|
| 1961 |
|
| 1962 | Stewart, et al. Standards Track [Page 35]
|
| 1963 |
|
| 1964 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 1965 |
|
| 1966 |
|
| 1967 | ----------
|
| 1968 | | TSN=17 |
|
| 1969 | ----------
|
| 1970 | | | <- still missing
|
| 1971 | ----------
|
| 1972 | | TSN=15 |
|
| 1973 | ----------
|
| 1974 | | TSN=14 |
|
| 1975 | ----------
|
| 1976 | | | <- still missing
|
| 1977 | ----------
|
| 1978 | | TSN=12 |
|
| 1979 | ----------
|
| 1980 | | TSN=11 |
|
| 1981 | ----------
|
| 1982 | | TSN=10 |
|
| 1983 | ----------
|
| 1984 |
|
| 1985 | then, the parameter part of the SACK MUST be constructed as follows
|
| 1986 | (assuming the new a_rwnd is set to 4660 by the sender):
|
| 1987 |
|
| 1988 | +--------------------------------+
|
| 1989 | | Cumulative TSN Ack = 12 |
|
| 1990 | +--------------------------------+
|
| 1991 | | a_rwnd = 4660 |
|
| 1992 | +----------------+---------------+
|
| 1993 | | num of block=2 | num of dup=0 |
|
| 1994 | +----------------+---------------+
|
| 1995 | |block #1 strt=2 |block #1 end=3 |
|
| 1996 | +----------------+---------------+
|
| 1997 | |block #2 strt=5 |block #2 end=5 |
|
| 1998 | +----------------+---------------+
|
| 1999 |
|
| 2000 |
|
| 2001 | Duplicate TSN: 32 bits (unsigned integer)
|
| 2002 |
|
| 2003 | Indicates the number of times a TSN was received in duplicate
|
| 2004 | since the last SACK was sent. Every time a receiver gets a
|
| 2005 | duplicate TSN (before sending the SACK) it adds it to the list of
|
| 2006 | duplicates. The duplicate count is re-initialized to zero after
|
| 2007 | sending each SACK.
|
| 2008 |
|
| 2009 | For example, if a receiver were to get the TSN 19 three times it
|
| 2010 | would list 19 twice in the outbound SACK. After sending the SACK
|
| 2011 | if it received yet one more TSN 19 it would list 19 as a duplicate
|
| 2012 | once in the next outgoing SACK.
|
| 2013 |
|
| 2014 |
|
| 2015 |
|
| 2016 |
|
| 2017 |
|
| 2018 | Stewart, et al. Standards Track [Page 36]
|
| 2019 |
|
| 2020 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2021 |
|
| 2022 |
|
| 2023 | 3.3.5 Heartbeat Request (HEARTBEAT) (4):
|
| 2024 |
|
| 2025 | An endpoint should send this chunk to its peer endpoint to probe the
|
| 2026 | reachability of a particular destination transport address defined in
|
| 2027 | the present association.
|
| 2028 |
|
| 2029 | The parameter field contains the Heartbeat Information which is a
|
| 2030 | variable length opaque data structure understood only by the sender.
|
| 2031 |
|
| 2032 | 0 1 2 3
|
| 2033 | 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
|
| 2034 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2035 | | Type = 4 | Chunk Flags | Heartbeat Length |
|
| 2036 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2037 | \ \
|
| 2038 | / Heartbeat Information TLV (Variable-Length) /
|
| 2039 | \ \
|
| 2040 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2041 |
|
| 2042 | Chunk Flags: 8 bits
|
| 2043 |
|
| 2044 | Set to zero on transmit and ignored on receipt.
|
| 2045 |
|
| 2046 | Heartbeat Length: 16 bits (unsigned integer)
|
| 2047 |
|
| 2048 | Set to the size of the chunk in bytes, including the chunk header
|
| 2049 | and the Heartbeat Information field.
|
| 2050 |
|
| 2051 | Heartbeat Information: variable length
|
| 2052 |
|
| 2053 | Defined as a variable-length parameter using the format described
|
| 2054 | in Section 3.2.1, i.e.:
|
| 2055 |
|
| 2056 | Variable Parameters Status Type Value
|
| 2057 | -------------------------------------------------------------
|
| 2058 | Heartbeat Info Mandatory 1
|
| 2059 |
|
| 2060 | 0 1 2 3
|
| 2061 | 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
|
| 2062 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2063 | | Heartbeat Info Type=1 | HB Info Length |
|
| 2064 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2065 | / Sender-specific Heartbeat Info /
|
| 2066 | \ \
|
| 2067 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2068 |
|
| 2069 |
|
| 2070 |
|
| 2071 |
|
| 2072 |
|
| 2073 |
|
| 2074 | Stewart, et al. Standards Track [Page 37]
|
| 2075 |
|
| 2076 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2077 |
|
| 2078 |
|
| 2079 | The Sender-specific Heartbeat Info field should normally include
|
| 2080 | information about the sender's current time when this HEARTBEAT
|
| 2081 | chunk is sent and the destination transport address to which this
|
| 2082 | HEARTBEAT is sent (see Section 8.3).
|
| 2083 |
|
| 2084 | 3.3.6 Heartbeat Acknowledgement (HEARTBEAT ACK) (5):
|
| 2085 |
|
| 2086 | An endpoint should send this chunk to its peer endpoint as a response
|
| 2087 | to a HEARTBEAT chunk (see Section 8.3). A HEARTBEAT ACK is always
|
| 2088 | sent to the source IP address of the IP datagram containing the
|
| 2089 | HEARTBEAT chunk to which this ack is responding.
|
| 2090 |
|
| 2091 | The parameter field contains a variable length opaque data structure.
|
| 2092 |
|
| 2093 | 0 1 2 3
|
| 2094 | 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
|
| 2095 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2096 | | Type = 5 | Chunk Flags | Heartbeat Ack Length |
|
| 2097 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2098 | \ \
|
| 2099 | / Heartbeat Information TLV (Variable-Length) /
|
| 2100 | \ \
|
| 2101 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2102 |
|
| 2103 | Chunk Flags: 8 bits
|
| 2104 |
|
| 2105 | Set to zero on transmit and ignored on receipt.
|
| 2106 |
|
| 2107 | Heartbeat Ack Length: 16 bits (unsigned integer)
|
| 2108 |
|
| 2109 | Set to the size of the chunk in bytes, including the chunk header
|
| 2110 | and the Heartbeat Information field.
|
| 2111 |
|
| 2112 | Heartbeat Information: variable length
|
| 2113 |
|
| 2114 | This field MUST contain the Heartbeat Information parameter of
|
| 2115 | the Heartbeat Request to which this Heartbeat Acknowledgement is
|
| 2116 | responding.
|
| 2117 |
|
| 2118 | Variable Parameters Status Type Value
|
| 2119 | -------------------------------------------------------------
|
| 2120 | Heartbeat Info Mandatory 1
|
| 2121 |
|
| 2122 |
|
| 2123 |
|
| 2124 |
|
| 2125 |
|
| 2126 |
|
| 2127 |
|
| 2128 |
|
| 2129 |
|
| 2130 | Stewart, et al. Standards Track [Page 38]
|
| 2131 |
|
| 2132 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2133 |
|
| 2134 |
|
| 2135 | 3.3.7 Abort Association (ABORT) (6):
|
| 2136 |
|
| 2137 | The ABORT chunk is sent to the peer of an association to close the
|
| 2138 | association. The ABORT chunk may contain Cause Parameters to inform
|
| 2139 | the receiver the reason of the abort. DATA chunks MUST NOT be
|
| 2140 | bundled with ABORT. Control chunks (except for INIT, INIT ACK and
|
| 2141 | SHUTDOWN COMPLETE) MAY be bundled with an ABORT but they MUST be
|
| 2142 | placed before the ABORT in the SCTP packet, or they will be ignored
|
| 2143 | by the receiver.
|
| 2144 |
|
| 2145 | If an endpoint receives an ABORT with a format error or for an
|
| 2146 | association that doesn't exist, it MUST silently discard it.
|
| 2147 | Moreover, under any circumstances, an endpoint that receives an ABORT
|
| 2148 | MUST NOT respond to that ABORT by sending an ABORT of its own.
|
| 2149 |
|
| 2150 | 0 1 2 3
|
| 2151 | 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
|
| 2152 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2153 | | Type = 6 |Reserved |T| Length |
|
| 2154 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2155 | \ \
|
| 2156 | / zero or more Error Causes /
|
| 2157 | \ \
|
| 2158 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2159 |
|
| 2160 | Chunk Flags: 8 bits
|
| 2161 |
|
| 2162 | Reserved: 7 bits
|
| 2163 |
|
| 2164 | Set to 0 on transmit and ignored on receipt.
|
| 2165 |
|
| 2166 | T bit: 1 bit
|
| 2167 |
|
| 2168 | The T bit is set to 0 if the sender had a TCB that it destroyed.
|
| 2169 | If the sender did not have a TCB it should set this bit to 1.
|
| 2170 |
|
| 2171 | Note: Special rules apply to this chunk for verification, please see
|
| 2172 | Section 8.5.1 for details.
|
| 2173 |
|
| 2174 | Length: 16 bits (unsigned integer)
|
| 2175 |
|
| 2176 | Set to the size of the chunk in bytes, including the chunk header
|
| 2177 | and all the Error Cause fields present.
|
| 2178 |
|
| 2179 | See Section 3.3.10 for Error Cause definitions.
|
| 2180 |
|
| 2181 |
|
| 2182 |
|
| 2183 |
|
| 2184 |
|
| 2185 |
|
| 2186 | Stewart, et al. Standards Track [Page 39]
|
| 2187 |
|
| 2188 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2189 |
|
| 2190 |
|
| 2191 | 3.3.8 Shutdown Association (SHUTDOWN) (7):
|
| 2192 |
|
| 2193 | An endpoint in an association MUST use this chunk to initiate a
|
| 2194 | graceful close of the association with its peer. This chunk has the
|
| 2195 | following format.
|
| 2196 |
|
| 2197 | 0 1 2 3
|
| 2198 | 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
|
| 2199 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2200 | | Type = 7 | Chunk Flags | Length = 8 |
|
| 2201 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2202 | | Cumulative TSN Ack |
|
| 2203 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2204 |
|
| 2205 | Chunk Flags: 8 bits
|
| 2206 |
|
| 2207 | Set to zero on transmit and ignored on receipt.
|
| 2208 |
|
| 2209 | Length: 16 bits (unsigned integer)
|
| 2210 |
|
| 2211 | Indicates the length of the parameter. Set to 8.
|
| 2212 |
|
| 2213 | Cumulative TSN Ack: 32 bits (unsigned integer)
|
| 2214 |
|
| 2215 | This parameter contains the TSN of the last chunk received in
|
| 2216 | sequence before any gaps.
|
| 2217 |
|
| 2218 | Note: Since the SHUTDOWN message does not contain Gap Ack Blocks,
|
| 2219 | it cannot be used to acknowledge TSNs received out of order. In a
|
| 2220 | SACK, lack of Gap Ack Blocks that were previously included
|
| 2221 | indicates that the data receiver reneged on the associated DATA
|
| 2222 | chunks. Since SHUTDOWN does not contain Gap Ack Blocks, the
|
| 2223 | receiver of the SHUTDOWN shouldn't interpret the lack of a Gap Ack
|
| 2224 | Block as a renege. (see Section 6.2 for information on reneging)
|
| 2225 |
|
| 2226 | 3.3.9 Shutdown Acknowledgement (SHUTDOWN ACK) (8):
|
| 2227 |
|
| 2228 | This chunk MUST be used to acknowledge the receipt of the SHUTDOWN
|
| 2229 | chunk at the completion of the shutdown process, see Section 9.2 for
|
| 2230 | details.
|
| 2231 |
|
| 2232 | The SHUTDOWN ACK chunk has no parameters.
|
| 2233 |
|
| 2234 | 0 1 2 3
|
| 2235 | 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
|
| 2236 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2237 | | Type = 8 |Chunk Flags | Length = 4 |
|
| 2238 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2239 |
|
| 2240 |
|
| 2241 |
|
| 2242 | Stewart, et al. Standards Track [Page 40]
|
| 2243 |
|
| 2244 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2245 |
|
| 2246 |
|
| 2247 | Chunk Flags: 8 bits
|
| 2248 |
|
| 2249 | Set to zero on transmit and ignored on receipt.
|
| 2250 |
|
| 2251 | 3.3.10 Operation Error (ERROR) (9):
|
| 2252 |
|
| 2253 | An endpoint sends this chunk to its peer endpoint to notify it of
|
| 2254 | certain error conditions. It contains one or more error causes. An
|
| 2255 | Operation Error is not considered fatal in and of itself, but may be
|
| 2256 | used with an ABORT chunk to report a fatal condition. It has the
|
| 2257 | following parameters:
|
| 2258 |
|
| 2259 | 0 1 2 3
|
| 2260 | 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
|
| 2261 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2262 | | Type = 9 | Chunk Flags | Length |
|
| 2263 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2264 | \ \
|
| 2265 | / one or more Error Causes /
|
| 2266 | \ \
|
| 2267 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2268 |
|
| 2269 | Chunk Flags: 8 bits
|
| 2270 |
|
| 2271 | Set to zero on transmit and ignored on receipt.
|
| 2272 |
|
| 2273 | Length: 16 bits (unsigned integer)
|
| 2274 |
|
| 2275 | Set to the size of the chunk in bytes, including the chunk header
|
| 2276 | and all the Error Cause fields present.
|
| 2277 |
|
| 2278 | Error causes are defined as variable-length parameters using the
|
| 2279 | format described in 3.2.1, i.e.:
|
| 2280 |
|
| 2281 | 0 1 2 3
|
| 2282 | 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
|
| 2283 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2284 | | Cause Code | Cause Length |
|
| 2285 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2286 | / Cause-specific Information /
|
| 2287 | \ \
|
| 2288 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2289 |
|
| 2290 | Cause Code: 16 bits (unsigned integer)
|
| 2291 |
|
| 2292 | Defines the type of error conditions being reported.
|
| 2293 |
|
| 2294 |
|
| 2295 |
|
| 2296 |
|
| 2297 |
|
| 2298 | Stewart, et al. Standards Track [Page 41]
|
| 2299 |
|
| 2300 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2301 |
|
| 2302 |
|
| 2303 | Cause Code
|
| 2304 | Value Cause Code
|
| 2305 | --------- ----------------
|
| 2306 | 1 Invalid Stream Identifier
|
| 2307 | 2 Missing Mandatory Parameter
|
| 2308 | 3 Stale Cookie Error
|
| 2309 | 4 Out of Resource
|
| 2310 | 5 Unresolvable Address
|
| 2311 | 6 Unrecognized Chunk Type
|
| 2312 | 7 Invalid Mandatory Parameter
|
| 2313 | 8 Unrecognized Parameters
|
| 2314 | 9 No User Data
|
| 2315 | 10 Cookie Received While Shutting Down
|
| 2316 |
|
| 2317 | Cause Length: 16 bits (unsigned integer)
|
| 2318 |
|
| 2319 | Set to the size of the parameter in bytes, including the Cause
|
| 2320 | Code, Cause Length, and Cause-Specific Information fields
|
| 2321 |
|
| 2322 | Cause-specific Information: variable length
|
| 2323 |
|
| 2324 | This field carries the details of the error condition.
|
| 2325 |
|
| 2326 | Sections 3.3.10.1 - 3.3.10.10 define error causes for SCTP.
|
| 2327 | Guidelines for the IETF to define new error cause values are
|
| 2328 | discussed in Section 13.3.
|
| 2329 |
|
| 2330 | 3.3.10.1 Invalid Stream Identifier (1)
|
| 2331 |
|
| 2332 | Cause of error
|
| 2333 | ---------------
|
| 2334 | Invalid Stream Identifier: Indicates endpoint received a DATA chunk
|
| 2335 | sent to a nonexistent stream.
|
| 2336 |
|
| 2337 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2338 | | Cause Code=1 | Cause Length=8 |
|
| 2339 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2340 | | Stream Identifier | (Reserved) |
|
| 2341 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2342 |
|
| 2343 | Stream Identifier: 16 bits (unsigned integer)
|
| 2344 |
|
| 2345 | Contains the Stream Identifier of the DATA chunk received in
|
| 2346 | error.
|
| 2347 |
|
| 2348 |
|
| 2349 |
|
| 2350 |
|
| 2351 |
|
| 2352 |
|
| 2353 |
|
| 2354 | Stewart, et al. Standards Track [Page 42]
|
| 2355 |
|
| 2356 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2357 |
|
| 2358 |
|
| 2359 | Reserved: 16 bits
|
| 2360 |
|
| 2361 | This field is reserved. It is set to all 0's on transmit and
|
| 2362 | Ignored on receipt.
|
| 2363 |
|
| 2364 | 3.3.10.2 Missing Mandatory Parameter (2)
|
| 2365 |
|
| 2366 | Cause of error
|
| 2367 | ---------------
|
| 2368 | Missing Mandatory Parameter: Indicates that one or more mandatory
|
| 2369 | TLV parameters are missing in a received INIT or INIT ACK.
|
| 2370 |
|
| 2371 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2372 | | Cause Code=2 | Cause Length=8+N*2 |
|
| 2373 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2374 | | Number of missing params=N |
|
| 2375 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2376 | | Missing Param Type #1 | Missing Param Type #2 |
|
| 2377 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2378 | | Missing Param Type #N-1 | Missing Param Type #N |
|
| 2379 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2380 |
|
| 2381 | Number of Missing params: 32 bits (unsigned integer)
|
| 2382 |
|
| 2383 | This field contains the number of parameters contained in the
|
| 2384 | Cause-specific Information field.
|
| 2385 |
|
| 2386 | Missing Param Type: 16 bits (unsigned integer)
|
| 2387 |
|
| 2388 | Each field will contain the missing mandatory parameter number.
|
| 2389 |
|
| 2390 | 3.3.10.3 Stale Cookie Error (3)
|
| 2391 |
|
| 2392 | Cause of error
|
| 2393 | --------------
|
| 2394 | Stale Cookie Error: Indicates the receipt of a valid State Cookie
|
| 2395 | that has expired.
|
| 2396 |
|
| 2397 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2398 | | Cause Code=3 | Cause Length=8 |
|
| 2399 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2400 | | Measure of Staleness (usec.) |
|
| 2401 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2402 |
|
| 2403 | Measure of Staleness: 32 bits (unsigned integer)
|
| 2404 |
|
| 2405 | This field contains the difference, in microseconds, between the
|
| 2406 | current time and the time the State Cookie expired.
|
| 2407 |
|
| 2408 |
|
| 2409 |
|
| 2410 | Stewart, et al. Standards Track [Page 43]
|
| 2411 |
|
| 2412 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2413 |
|
| 2414 |
|
| 2415 | The sender of this error cause MAY choose to report how long past
|
| 2416 | expiration the State Cookie is by including a non-zero value in
|
| 2417 | the Measure of Staleness field. If the sender does not wish to
|
| 2418 | provide this information it should set the Measure of Staleness
|
| 2419 | field to the value of zero.
|
| 2420 |
|
| 2421 | 3.3.10.4 Out of Resource (4)
|
| 2422 |
|
| 2423 | Cause of error
|
| 2424 | ---------------
|
| 2425 | Out of Resource: Indicates that the sender is out of resource. This
|
| 2426 | is usually sent in combination with or within an ABORT.
|
| 2427 |
|
| 2428 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2429 | | Cause Code=4 | Cause Length=4 |
|
| 2430 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2431 |
|
| 2432 | 3.3.10.5 Unresolvable Address (5)
|
| 2433 |
|
| 2434 | Cause of error
|
| 2435 | ---------------
|
| 2436 | Unresolvable Address: Indicates that the sender is not able to
|
| 2437 | resolve the specified address parameter (e.g., type of address is not
|
| 2438 | supported by the sender). This is usually sent in combination with
|
| 2439 | or within an ABORT.
|
| 2440 |
|
| 2441 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2442 | | Cause Code=5 | Cause Length |
|
| 2443 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2444 | / Unresolvable Address /
|
| 2445 | \ \
|
| 2446 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2447 |
|
| 2448 | Unresolvable Address: variable length
|
| 2449 |
|
| 2450 | The unresolvable address field contains the complete Type, Length
|
| 2451 | and Value of the address parameter (or Host Name parameter) that
|
| 2452 | contains the unresolvable address or host name.
|
| 2453 |
|
| 2454 | 3.3.10.6 Unrecognized Chunk Type (6)
|
| 2455 |
|
| 2456 | Cause of error
|
| 2457 | ---------------
|
| 2458 | Unrecognized Chunk Type: This error cause is returned to the
|
| 2459 | originator of the chunk if the receiver does not understand the chunk
|
| 2460 | and the upper bits of the 'Chunk Type' are set to 01 or 11.
|
| 2461 |
|
| 2462 |
|
| 2463 |
|
| 2464 |
|
| 2465 |
|
| 2466 | Stewart, et al. Standards Track [Page 44]
|
| 2467 |
|
| 2468 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2469 |
|
| 2470 |
|
| 2471 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2472 | | Cause Code=6 | Cause Length |
|
| 2473 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2474 | / Unrecognized Chunk /
|
| 2475 | \ \
|
| 2476 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2477 |
|
| 2478 | Unrecognized Chunk: variable length
|
| 2479 |
|
| 2480 | The Unrecognized Chunk field contains the unrecognized Chunk from
|
| 2481 | the SCTP packet complete with Chunk Type, Chunk Flags and Chunk
|
| 2482 | Length.
|
| 2483 |
|
| 2484 | 3.3.10.7 Invalid Mandatory Parameter (7)
|
| 2485 |
|
| 2486 | Cause of error
|
| 2487 | ---------------
|
| 2488 | Invalid Mandatory Parameter: This error cause is returned to the
|
| 2489 | originator of an INIT or INIT ACK chunk when one of the mandatory
|
| 2490 | parameters is set to a invalid value.
|
| 2491 |
|
| 2492 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2493 | | Cause Code=7 | Cause Length=4 |
|
| 2494 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2495 |
|
| 2496 | 3.3.10.8 Unrecognized Parameters (8)
|
| 2497 |
|
| 2498 | Cause of error
|
| 2499 | ---------------
|
| 2500 | Unrecognized Parameters: This error cause is returned to the
|
| 2501 | originator of the INIT ACK chunk if the receiver does not recognize
|
| 2502 | one or more Optional TLV parameters in the INIT ACK chunk.
|
| 2503 |
|
| 2504 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2505 | | Cause Code=8 | Cause Length |
|
| 2506 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2507 | / Unrecognized Parameters /
|
| 2508 | \ \
|
| 2509 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2510 |
|
| 2511 | Unrecognized Parameters: variable length
|
| 2512 |
|
| 2513 | The Unrecognized Parameters field contains the unrecognized
|
| 2514 | parameters copied from the INIT ACK chunk complete with TLV. This
|
| 2515 | error cause is normally contained in an ERROR chunk bundled with
|
| 2516 | the COOKIE ECHO chunk when responding to the INIT ACK, when the
|
| 2517 | sender of the COOKIE ECHO chunk wishes to report unrecognized
|
| 2518 | parameters.
|
| 2519 |
|
| 2520 |
|
| 2521 |
|
| 2522 | Stewart, et al. Standards Track [Page 45]
|
| 2523 |
|
| 2524 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2525 |
|
| 2526 |
|
| 2527 | 3.3.10.9 No User Data (9)
|
| 2528 |
|
| 2529 | Cause of error
|
| 2530 | ---------------
|
| 2531 | No User Data: This error cause is returned to the originator of a
|
| 2532 | DATA chunk if a received DATA chunk has no user data.
|
| 2533 |
|
| 2534 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2535 | | Cause Code=9 | Cause Length=8 |
|
| 2536 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2537 | / TSN value /
|
| 2538 | \ \
|
| 2539 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2540 |
|
| 2541 | TSN value: 32 bits (+unsigned integer)
|
| 2542 |
|
| 2543 | The TSN value field contains the TSN of the DATA chunk received
|
| 2544 | with no user data field.
|
| 2545 |
|
| 2546 | This cause code is normally returned in an ABORT chunk (see
|
| 2547 | Section 6.2)
|
| 2548 |
|
| 2549 | 3.3.10.10 Cookie Received While Shutting Down (10)
|
| 2550 |
|
| 2551 | Cause of error
|
| 2552 | ---------------
|
| 2553 | Cookie Received While Shutting Down: A COOKIE ECHO was received
|
| 2554 | While the endpoint was in SHUTDOWN-ACK-SENT state. This error is
|
| 2555 | usually returned in an ERROR chunk bundled with the retransmitted
|
| 2556 | SHUTDOWN ACK.
|
| 2557 |
|
| 2558 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2559 | | Cause Code=10 | Cause Length=4 |
|
| 2560 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2561 |
|
| 2562 | 3.3.11 Cookie Echo (COOKIE ECHO) (10):
|
| 2563 |
|
| 2564 | This chunk is used only during the initialization of an association.
|
| 2565 | It is sent by the initiator of an association to its peer to complete
|
| 2566 | the initialization process. This chunk MUST precede any DATA chunk
|
| 2567 | sent within the association, but MAY be bundled with one or more DATA
|
| 2568 | chunks in the same packet.
|
| 2569 |
|
| 2570 |
|
| 2571 |
|
| 2572 |
|
| 2573 |
|
| 2574 |
|
| 2575 |
|
| 2576 |
|
| 2577 |
|
| 2578 | Stewart, et al. Standards Track [Page 46]
|
| 2579 |
|
| 2580 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2581 |
|
| 2582 |
|
| 2583 | 0 1 2 3
|
| 2584 | 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
|
| 2585 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2586 | | Type = 10 |Chunk Flags | Length |
|
| 2587 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2588 | / Cookie /
|
| 2589 | \ \
|
| 2590 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2591 |
|
| 2592 | Chunk Flags: 8 bit
|
| 2593 |
|
| 2594 | Set to zero on transmit and ignored on receipt.
|
| 2595 |
|
| 2596 | Length: 16 bits (unsigned integer)
|
| 2597 |
|
| 2598 | Set to the size of the chunk in bytes, including the 4 bytes of
|
| 2599 | the chunk header and the size of the Cookie.
|
| 2600 |
|
| 2601 | Cookie: variable size
|
| 2602 |
|
| 2603 | This field must contain the exact cookie received in the State
|
| 2604 | Cookie parameter from the previous INIT ACK.
|
| 2605 |
|
| 2606 | An implementation SHOULD make the cookie as small as possible to
|
| 2607 | insure interoperability.
|
| 2608 |
|
| 2609 | 3.3.12 Cookie Acknowledgement (COOKIE ACK) (11):
|
| 2610 |
|
| 2611 | This chunk is used only during the initialization of an association.
|
| 2612 | It is used to acknowledge the receipt of a COOKIE ECHO chunk. This
|
| 2613 | chunk MUST precede any DATA or SACK chunk sent within the
|
| 2614 | association, but MAY be bundled with one or more DATA chunks or SACK
|
| 2615 | chunk in the same SCTP packet.
|
| 2616 |
|
| 2617 | 0 1 2 3
|
| 2618 | 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
|
| 2619 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2620 | | Type = 11 |Chunk Flags | Length = 4 |
|
| 2621 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2622 |
|
| 2623 | Chunk Flags: 8 bits
|
| 2624 |
|
| 2625 | Set to zero on transmit and ignored on receipt.
|
| 2626 |
|
| 2627 |
|
| 2628 |
|
| 2629 |
|
| 2630 |
|
| 2631 |
|
| 2632 |
|
| 2633 |
|
| 2634 | Stewart, et al. Standards Track [Page 47]
|
| 2635 |
|
| 2636 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2637 |
|
| 2638 |
|
| 2639 | 3.3.13 Shutdown Complete (SHUTDOWN COMPLETE) (14):
|
| 2640 |
|
| 2641 | This chunk MUST be used to acknowledge the receipt of the SHUTDOWN
|
| 2642 | ACK chunk at the completion of the shutdown process, see Section 9.2
|
| 2643 | for details.
|
| 2644 |
|
| 2645 | The SHUTDOWN COMPLETE chunk has no parameters.
|
| 2646 |
|
| 2647 | 0 1 2 3
|
| 2648 | 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
|
| 2649 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2650 | | Type = 14 |Reserved |T| Length = 4 |
|
| 2651 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 2652 |
|
| 2653 | Chunk Flags: 8 bits
|
| 2654 |
|
| 2655 | Reserved: 7 bits
|
| 2656 |
|
| 2657 | Set to 0 on transmit and ignored on receipt.
|
| 2658 |
|
| 2659 | T bit: 1 bit
|
| 2660 |
|
| 2661 | The T bit is set to 0 if the sender had a TCB that it destroyed.
|
| 2662 | If the sender did not have a TCB it should set this bit to 1.
|
| 2663 |
|
| 2664 | Note: Special rules apply to this chunk for verification, please see
|
| 2665 | Section 8.5.1 for details.
|
| 2666 |
|
| 2667 | 4. SCTP Association State Diagram
|
| 2668 |
|
| 2669 | During the lifetime of an SCTP association, the SCTP endpoint's
|
| 2670 | association progress from one state to another in response to various
|
| 2671 | events. The events that may potentially advance an association's
|
| 2672 | state include:
|
| 2673 |
|
| 2674 | o SCTP user primitive calls, e.g., [ASSOCIATE], [SHUTDOWN], [ABORT],
|
| 2675 |
|
| 2676 | o Reception of INIT, COOKIE ECHO, ABORT, SHUTDOWN, etc., control
|
| 2677 | chunks, or
|
| 2678 |
|
| 2679 | o Some timeout events.
|
| 2680 |
|
| 2681 | The state diagram in the figures below illustrates state changes,
|
| 2682 | together with the causing events and resulting actions. Note that
|
| 2683 | some of the error conditions are not shown in the state diagram.
|
| 2684 | Full description of all special cases should be found in the text.
|
| 2685 |
|
| 2686 |
|
| 2687 |
|
| 2688 |
|
| 2689 |
|
| 2690 | Stewart, et al. Standards Track [Page 48]
|
| 2691 |
|
| 2692 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2693 |
|
| 2694 |
|
| 2695 | Note: Chunk names are given in all capital letters, while parameter
|
| 2696 | names have the first letter capitalized, e.g., COOKIE ECHO chunk type
|
| 2697 | vs. State Cookie parameter. If more than one event/message can occur
|
| 2698 | which causes a state transition it is labeled (A), (B) etc.
|
| 2699 |
|
| 2700 | ----- -------- (frm any state)
|
| 2701 | / \ / rcv ABORT [ABORT]
|
| 2702 | rcv INIT | | | ---------- or ----------
|
| 2703 | --------------- | v v delete TCB snd ABORT
|
| 2704 | generate Cookie \ +---------+ delete TCB
|
| 2705 | snd INIT ACK ---| CLOSED |
|
| 2706 | +---------+
|
| 2707 | / \ [ASSOCIATE]
|
| 2708 | / \ ---------------
|
| 2709 | | | create TCB
|
| 2710 | | | snd INIT
|
| 2711 | | | strt init timer
|
| 2712 | rcv valid | |
|
| 2713 | COOKIE ECHO | v
|
| 2714 | (1) ---------------- | +------------+
|
| 2715 | create TCB | | COOKIE-WAIT| (2)
|
| 2716 | snd COOKIE ACK | +------------+
|
| 2717 | | |
|
| 2718 | | | rcv INIT ACK
|
| 2719 | | | -----------------
|
| 2720 | | | snd COOKIE ECHO
|
| 2721 | | | stop init timer
|
| 2722 | | | strt cookie timer
|
| 2723 | | v
|
| 2724 | | +--------------+
|
| 2725 | | | COOKIE-ECHOED| (3)
|
| 2726 | | +--------------+
|
| 2727 | | |
|
| 2728 | | | rcv COOKIE ACK
|
| 2729 | | | -----------------
|
| 2730 | | | stop cookie timer
|
| 2731 | v v
|
| 2732 | +---------------+
|
| 2733 | | ESTABLISHED |
|
| 2734 | +---------------+
|
| 2735 |
|
| 2736 |
|
| 2737 |
|
| 2738 |
|
| 2739 |
|
| 2740 |
|
| 2741 |
|
| 2742 |
|
| 2743 |
|
| 2744 |
|
| 2745 |
|
| 2746 | Stewart, et al. Standards Track [Page 49]
|
| 2747 |
|
| 2748 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2749 |
|
| 2750 |
|
| 2751 | (from the ESTABLISHED state only)
|
| 2752 | |
|
| 2753 | |
|
| 2754 | /--------+--------\
|
| 2755 | [SHUTDOWN] / \
|
| 2756 | -------------------| |
|
| 2757 | check outstanding | |
|
| 2758 | DATA chunks | |
|
| 2759 | v |
|
| 2760 | +---------+ |
|
| 2761 | |SHUTDOWN-| | rcv SHUTDOWN/check
|
| 2762 | |PENDING | | outstanding DATA
|
| 2763 | +---------+ | chunks
|
| 2764 | | |------------------
|
| 2765 | No more outstanding | |
|
| 2766 | ---------------------| |
|
| 2767 | snd SHUTDOWN | |
|
| 2768 | strt shutdown timer | |
|
| 2769 | v v
|
| 2770 | +---------+ +-----------+
|
| 2771 | (4) |SHUTDOWN-| | SHUTDOWN- | (5,6)
|
| 2772 | |SENT | | RECEIVED |
|
| 2773 | +---------+ +-----------+
|
| 2774 | | \ |
|
| 2775 | (A) rcv SHUTDOWN ACK | \ |
|
| 2776 | ----------------------| \ |
|
| 2777 | stop shutdown timer | \rcv:SHUTDOWN |
|
| 2778 | send SHUTDOWN COMPLETE| \ (B) |
|
| 2779 | delete TCB | \ |
|
| 2780 | | \ | No more outstanding
|
| 2781 | | \ |-----------------
|
| 2782 | | \ | send SHUTDOWN ACK
|
| 2783 | (B)rcv SHUTDOWN | \ | strt shutdown timer
|
| 2784 | ----------------------| \ |
|
| 2785 | send SHUTDOWN ACK | \ |
|
| 2786 | start shutdown timer | \ |
|
| 2787 | move to SHUTDOWN- | \ |
|
| 2788 | ACK-SENT | | |
|
| 2789 | | v |
|
| 2790 | | +-----------+
|
| 2791 | | | SHUTDOWN- | (7)
|
| 2792 | | | ACK-SENT |
|
| 2793 | | +----------+-
|
| 2794 | | | (C)rcv SHUTDOWN COMPLETE
|
| 2795 | | |-----------------
|
| 2796 | | | stop shutdown timer
|
| 2797 | | | delete TCB
|
| 2798 | | |
|
| 2799 |
|
| 2800 |
|
| 2801 |
|
| 2802 | Stewart, et al. Standards Track [Page 50]
|
| 2803 |
|
| 2804 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2805 |
|
| 2806 |
|
| 2807 | | | (D)rcv SHUTDOWN ACK
|
| 2808 | | |--------------
|
| 2809 | | | stop shutdown timer
|
| 2810 | | | send SHUTDOWN COMPLETE
|
| 2811 | | | delete TCB
|
| 2812 | | |
|
| 2813 | \ +---------+ /
|
| 2814 | \-->| CLOSED |<--/
|
| 2815 | +---------+
|
| 2816 |
|
| 2817 | Figure 3: State Transition Diagram of SCTP
|
| 2818 |
|
| 2819 | Notes:
|
| 2820 |
|
| 2821 | 1) If the State Cookie in the received COOKIE ECHO is invalid (i.e.,
|
| 2822 | failed to pass the integrity check), the receiver MUST silently
|
| 2823 | discard the packet. Or, if the received State Cookie is expired
|
| 2824 | (see Section 5.1.5), the receiver MUST send back an ERROR chunk.
|
| 2825 | In either case, the receiver stays in the CLOSED state.
|
| 2826 |
|
| 2827 | 2) If the T1-init timer expires, the endpoint MUST retransmit INIT
|
| 2828 | and re-start the T1-init timer without changing state. This MUST
|
| 2829 | be repeated up to 'Max.Init.Retransmits' times. After that, the
|
| 2830 | endpoint MUST abort the initialization process and report the
|
| 2831 | error to SCTP user.
|
| 2832 |
|
| 2833 | 3) If the T1-cookie timer expires, the endpoint MUST retransmit
|
| 2834 | COOKIE ECHO and re-start the T1-cookie timer without changing
|
| 2835 | state. This MUST be repeated up to 'Max.Init.Retransmits' times.
|
| 2836 | After that, the endpoint MUST abort the initialization process and
|
| 2837 | report the error to SCTP user.
|
| 2838 |
|
| 2839 | 4) In SHUTDOWN-SENT state the endpoint MUST acknowledge any received
|
| 2840 | DATA chunks without delay.
|
| 2841 |
|
| 2842 | 5) In SHUTDOWN-RECEIVED state, the endpoint MUST NOT accept any new
|
| 2843 | send request from its SCTP user.
|
| 2844 |
|
| 2845 | 6) In SHUTDOWN-RECEIVED state, the endpoint MUST transmit or
|
| 2846 | retransmit data and leave this state when all data in queue is
|
| 2847 | transmitted.
|
| 2848 |
|
| 2849 | 7) In SHUTDOWN-ACK-SENT state, the endpoint MUST NOT accept any new
|
| 2850 | send request from its SCTP user.
|
| 2851 |
|
| 2852 | The CLOSED state is used to indicate that an association is not
|
| 2853 | created (i.e., doesn't exist).
|
| 2854 |
|
| 2855 |
|
| 2856 |
|
| 2857 |
|
| 2858 | Stewart, et al. Standards Track [Page 51]
|
| 2859 |
|
| 2860 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2861 |
|
| 2862 |
|
| 2863 | 5. Association Initialization
|
| 2864 |
|
| 2865 | Before the first data transmission can take place from one SCTP
|
| 2866 | endpoint ("A") to another SCTP endpoint ("Z"), the two endpoints must
|
| 2867 | complete an initialization process in order to set up an SCTP
|
| 2868 | association between them.
|
| 2869 |
|
| 2870 | The SCTP user at an endpoint should use the ASSOCIATE primitive to
|
| 2871 | initialize an SCTP association to another SCTP endpoint.
|
| 2872 |
|
| 2873 | IMPLEMENTATION NOTE: From an SCTP-user's point of view, an
|
| 2874 | association may be implicitly opened, without an ASSOCIATE primitive
|
| 2875 | (see 10.1 B) being invoked, by the initiating endpoint's sending of
|
| 2876 | the first user data to the destination endpoint. The initiating SCTP
|
| 2877 | will assume default values for all mandatory and optional parameters
|
| 2878 | for the INIT/INIT ACK.
|
| 2879 |
|
| 2880 | Once the association is established, unidirectional streams are open
|
| 2881 | for data transfer on both ends (see Section 5.1.1).
|
| 2882 |
|
| 2883 | 5.1 Normal Establishment of an Association
|
| 2884 |
|
| 2885 | The initialization process consists of the following steps (assuming
|
| 2886 | that SCTP endpoint "A" tries to set up an association with SCTP
|
| 2887 | endpoint "Z" and "Z" accepts the new association):
|
| 2888 |
|
| 2889 | A) "A" first sends an INIT chunk to "Z". In the INIT, "A" must
|
| 2890 | provide its Verification Tag (Tag_A) in the Initiate Tag field.
|
| 2891 | Tag_A SHOULD be a random number in the range of 1 to 4294967295
|
| 2892 | (see 5.3.1 for Tag value selection). After sending the INIT, "A"
|
| 2893 | starts the T1-init timer and enters the COOKIE-WAIT state.
|
| 2894 |
|
| 2895 | B) "Z" shall respond immediately with an INIT ACK chunk. The
|
| 2896 | destination IP address of the INIT ACK MUST be set to the source
|
| 2897 | IP address of the INIT to which this INIT ACK is responding. In
|
| 2898 | the response, besides filling in other parameters, "Z" must set
|
| 2899 | the Verification Tag field to Tag_A, and also provide its own
|
| 2900 | Verification Tag (Tag_Z) in the Initiate Tag field.
|
| 2901 |
|
| 2902 | Moreover, "Z" MUST generate and send along with the INIT ACK a
|
| 2903 | State Cookie. See Section 5.1.3 for State Cookie generation.
|
| 2904 |
|
| 2905 | Note: After sending out INIT ACK with the State Cookie parameter,
|
| 2906 | "Z" MUST NOT allocate any resources, nor keep any states for the
|
| 2907 | new association. Otherwise, "Z" will be vulnerable to resource
|
| 2908 | attacks.
|
| 2909 |
|
| 2910 |
|
| 2911 |
|
| 2912 |
|
| 2913 |
|
| 2914 | Stewart, et al. Standards Track [Page 52]
|
| 2915 |
|
| 2916 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2917 |
|
| 2918 |
|
| 2919 | C) Upon reception of the INIT ACK from "Z", "A" shall stop the T1-
|
| 2920 | init timer and leave COOKIE-WAIT state. "A" shall then send the
|
| 2921 | State Cookie received in the INIT ACK chunk in a COOKIE ECHO
|
| 2922 | chunk, start the T1-cookie timer, and enter the COOKIE-ECHOED
|
| 2923 | state.
|
| 2924 |
|
| 2925 | Note: The COOKIE ECHO chunk can be bundled with any pending
|
| 2926 | outbound DATA chunks, but it MUST be the first chunk in the packet
|
| 2927 | and until the COOKIE ACK is returned the sender MUST NOT send any
|
| 2928 | other packets to the peer.
|
| 2929 |
|
| 2930 | D) Upon reception of the COOKIE ECHO chunk, Endpoint "Z" will reply
|
| 2931 | with a COOKIE ACK chunk after building a TCB and moving to the
|
| 2932 | ESTABLISHED state. A COOKIE ACK chunk may be bundled with any
|
| 2933 | pending DATA chunks (and/or SACK chunks), but the COOKIE ACK chunk
|
| 2934 | MUST be the first chunk in the packet.
|
| 2935 |
|
| 2936 | IMPLEMENTATION NOTE: An implementation may choose to send the
|
| 2937 | Communication Up notification to the SCTP user upon reception of a
|
| 2938 | valid COOKIE ECHO chunk.
|
| 2939 |
|
| 2940 | E) Upon reception of the COOKIE ACK, endpoint "A" will move from the
|
| 2941 | COOKIE-ECHOED state to the ESTABLISHED state, stopping the T1-
|
| 2942 | cookie timer. It may also notify its ULP about the successful
|
| 2943 | establishment of the association with a Communication Up
|
| 2944 | notification (see Section 10).
|
| 2945 |
|
| 2946 | An INIT or INIT ACK chunk MUST NOT be bundled with any other chunk.
|
| 2947 | They MUST be the only chunks present in the SCTP packets that carry
|
| 2948 | them.
|
| 2949 |
|
| 2950 | An endpoint MUST send the INIT ACK to the IP address from which it
|
| 2951 | received the INIT.
|
| 2952 |
|
| 2953 | Note: T1-init timer and T1-cookie timer shall follow the same rules
|
| 2954 | given in Section 6.3.
|
| 2955 |
|
| 2956 | If an endpoint receives an INIT, INIT ACK, or COOKIE ECHO chunk but
|
| 2957 | decides not to establish the new association due to missing mandatory
|
| 2958 | parameters in the received INIT or INIT ACK, invalid parameter
|
| 2959 | values, or lack of local resources, it MUST respond with an ABORT
|
| 2960 | chunk. It SHOULD also specify the cause of abort, such as the type
|
| 2961 | of the missing mandatory parameters, etc., by including the error
|
| 2962 | cause parameters with the ABORT chunk. The Verification Tag field in
|
| 2963 | the common header of the outbound SCTP packet containing the ABORT
|
| 2964 | chunk MUST be set to the Initiate Tag value of the peer.
|
| 2965 |
|
| 2966 |
|
| 2967 |
|
| 2968 |
|
| 2969 |
|
| 2970 | Stewart, et al. Standards Track [Page 53]
|
| 2971 |
|
| 2972 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 2973 |
|
| 2974 |
|
| 2975 | After the reception of the first DATA chunk in an association the
|
| 2976 | endpoint MUST immediately respond with a SACK to acknowledge the DATA
|
| 2977 | chunk. Subsequent acknowledgements should be done as described in
|
| 2978 | Section 6.2.
|
| 2979 |
|
| 2980 | When the TCB is created, each endpoint MUST set its internal
|
| 2981 | Cumulative TSN Ack Point to the value of its transmitted Initial TSN
|
| 2982 | minus one.
|
| 2983 |
|
| 2984 | IMPLEMENTATION NOTE: The IP addresses and SCTP port are generally
|
| 2985 | used as the key to find the TCB within an SCTP instance.
|
| 2986 |
|
| 2987 | 5.1.1 Handle Stream Parameters
|
| 2988 |
|
| 2989 | In the INIT and INIT ACK chunks, the sender of the chunk shall
|
| 2990 | indicate the number of outbound streams (OS) it wishes to have in the
|
| 2991 | association, as well as the maximum inbound streams (MIS) it will
|
| 2992 | accept from the other endpoint.
|
| 2993 |
|
| 2994 | After receiving the stream configuration information from the other
|
| 2995 | side, each endpoint shall perform the following check: If the peer's
|
| 2996 | MIS is less than the endpoint's OS, meaning that the peer is
|
| 2997 | incapable of supporting all the outbound streams the endpoint wants
|
| 2998 | to configure, the endpoint MUST either use MIS outbound streams, or
|
| 2999 | abort the association and report to its upper layer the resources
|
| 3000 | shortage at its peer.
|
| 3001 |
|
| 3002 | After the association is initialized, the valid outbound stream
|
| 3003 | identifier range for either endpoint shall be 0 to min(local OS,
|
| 3004 | remote MIS)-1.
|
| 3005 |
|
| 3006 | 5.1.2 Handle Address Parameters
|
| 3007 |
|
| 3008 | During the association initialization, an endpoint shall use the
|
| 3009 | following rules to discover and collect the destination transport
|
| 3010 | address(es) of its peer.
|
| 3011 |
|
| 3012 | A) If there are no address parameters present in the received INIT or
|
| 3013 | INIT ACK chunk, the endpoint shall take the source IP address from
|
| 3014 | which the chunk arrives and record it, in combination with the
|
| 3015 | SCTP source port number, as the only destination transport address
|
| 3016 | for this peer.
|
| 3017 |
|
| 3018 | B) If there is a Host Name parameter present in the received INIT or
|
| 3019 | INIT ACK chunk, the endpoint shall resolve that host name to a
|
| 3020 | list of IP address(es) and derive the transport address(es) of
|
| 3021 | this peer by combining the resolved IP address(es) with the SCTP
|
| 3022 | source port.
|
| 3023 |
|
| 3024 |
|
| 3025 |
|
| 3026 | Stewart, et al. Standards Track [Page 54]
|
| 3027 |
|
| 3028 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3029 |
|
| 3030 |
|
| 3031 | The endpoint MUST ignore any other IP address parameters if they
|
| 3032 | are also present in the received INIT or INIT ACK chunk.
|
| 3033 |
|
| 3034 | The time at which the receiver of an INIT resolves the host name
|
| 3035 | has potential security implications to SCTP. If the receiver of
|
| 3036 | an INIT resolves the host name upon the reception of the chunk,
|
| 3037 | and the mechanism the receiver uses to resolve the host name
|
| 3038 | involves potential long delay (e.g. DNS query), the receiver may
|
| 3039 | open itself up to resource attacks for the period of time while it
|
| 3040 | is waiting for the name resolution results before it can build the
|
| 3041 | State Cookie and release local resources.
|
| 3042 |
|
| 3043 | Therefore, in cases where the name translation involves potential
|
| 3044 | long delay, the receiver of the INIT MUST postpone the name
|
| 3045 | resolution till the reception of the COOKIE ECHO chunk from the
|
| 3046 | peer. In such a case, the receiver of the INIT SHOULD build the
|
| 3047 | State Cookie using the received Host Name (instead of destination
|
| 3048 | transport addresses) and send the INIT ACK to the source IP
|
| 3049 | address from which the INIT was received.
|
| 3050 |
|
| 3051 | The receiver of an INIT ACK shall always immediately attempt to
|
| 3052 | resolve the name upon the reception of the chunk.
|
| 3053 |
|
| 3054 | The receiver of the INIT or INIT ACK MUST NOT send user data
|
| 3055 | (piggy-backed or stand-alone) to its peer until the host name is
|
| 3056 | successfully resolved.
|
| 3057 |
|
| 3058 | If the name resolution is not successful, the endpoint MUST
|
| 3059 | immediately send an ABORT with "Unresolvable Address" error cause
|
| 3060 | to its peer. The ABORT shall be sent to the source IP address
|
| 3061 | from which the last peer packet was received.
|
| 3062 |
|
| 3063 | C) If there are only IPv4/IPv6 addresses present in the received INIT
|
| 3064 | or INIT ACK chunk, the receiver shall derive and record all the
|
| 3065 | transport address(es) from the received chunk AND the source IP
|
| 3066 | address that sent the INIT or INIT ACK. The transport address(es)
|
| 3067 | are derived by the combination of SCTP source port (from the
|
| 3068 | common header) and the IP address parameter(s) carried in the INIT
|
| 3069 | or INIT ACK chunk and the source IP address of the IP datagram.
|
| 3070 | The receiver should use only these transport addresses as
|
| 3071 | destination transport addresses when sending subsequent packets to
|
| 3072 | its peer.
|
| 3073 |
|
| 3074 | IMPLEMENTATION NOTE: In some cases (e.g., when the implementation
|
| 3075 | doesn't control the source IP address that is used for
|
| 3076 | transmitting), an endpoint might need to include in its INIT or
|
| 3077 | INIT ACK all possible IP addresses from which packets to the peer
|
| 3078 | could be transmitted.
|
| 3079 |
|
| 3080 |
|
| 3081 |
|
| 3082 | Stewart, et al. Standards Track [Page 55]
|
| 3083 |
|
| 3084 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3085 |
|
| 3086 |
|
| 3087 | After all transport addresses are derived from the INIT or INIT ACK
|
| 3088 | chunk using the above rules, the endpoint shall select one of the
|
| 3089 | transport addresses as the initial primary path.
|
| 3090 |
|
| 3091 | Note: The INIT-ACK MUST be sent to the source address of the INIT.
|
| 3092 |
|
| 3093 | The sender of INIT may include a 'Supported Address Types' parameter
|
| 3094 | in the INIT to indicate what types of address are acceptable. When
|
| 3095 | this parameter is present, the receiver of INIT (initiatee) MUST
|
| 3096 | either use one of the address types indicated in the Supported
|
| 3097 | Address Types parameter when responding to the INIT, or abort the
|
| 3098 | association with an "Unresolvable Address" error cause if it is
|
| 3099 | unwilling or incapable of using any of the address types indicated by
|
| 3100 | its peer.
|
| 3101 |
|
| 3102 | IMPLEMENTATION NOTE: In the case that the receiver of an INIT ACK
|
| 3103 | fails to resolve the address parameter due to an unsupported type, it
|
| 3104 | can abort the initiation process and then attempt a re-initiation by
|
| 3105 | using a 'Supported Address Types' parameter in the new INIT to
|
| 3106 | indicate what types of address it prefers.
|
| 3107 |
|
| 3108 | 5.1.3 Generating State Cookie
|
| 3109 |
|
| 3110 | When sending an INIT ACK as a response to an INIT chunk, the sender
|
| 3111 | of INIT ACK creates a State Cookie and sends it in the State Cookie
|
| 3112 | parameter of the INIT ACK. Inside this State Cookie, the sender
|
| 3113 | should include a MAC (see [RFC2104] for an example), a time stamp on
|
| 3114 | when the State Cookie is created, and the lifespan of the State
|
| 3115 | Cookie, along with all the information necessary for it to establish
|
| 3116 | the association.
|
| 3117 |
|
| 3118 | The following steps SHOULD be taken to generate the State Cookie:
|
| 3119 |
|
| 3120 | 1) Create an association TCB using information from both the received
|
| 3121 | INIT and the outgoing INIT ACK chunk,
|
| 3122 |
|
| 3123 | 2) In the TCB, set the creation time to the current time of day, and
|
| 3124 | the lifespan to the protocol parameter 'Valid.Cookie.Life',
|
| 3125 |
|
| 3126 | 3) From the TCB, identify and collect the minimal subset of
|
| 3127 | information needed to re-create the TCB, and generate a MAC using
|
| 3128 | this subset of information and a secret key (see [RFC2104] for an
|
| 3129 | example of generating a MAC), and
|
| 3130 |
|
| 3131 | 4) Generate the State Cookie by combining this subset of information
|
| 3132 | and the resultant MAC.
|
| 3133 |
|
| 3134 |
|
| 3135 |
|
| 3136 |
|
| 3137 |
|
| 3138 | Stewart, et al. Standards Track [Page 56]
|
| 3139 |
|
| 3140 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3141 |
|
| 3142 |
|
| 3143 | After sending the INIT ACK with the State Cookie parameter, the
|
| 3144 | sender SHOULD delete the TCB and any other local resource related to
|
| 3145 | the new association, so as to prevent resource attacks.
|
| 3146 |
|
| 3147 | The hashing method used to generate the MAC is strictly a private
|
| 3148 | matter for the receiver of the INIT chunk. The use of a MAC is
|
| 3149 | mandatory to prevent denial of service attacks. The secret key
|
| 3150 | SHOULD be random ([RFC1750] provides some information on randomness
|
| 3151 | guidelines); it SHOULD be changed reasonably frequently, and the
|
| 3152 | timestamp in the State Cookie MAY be used to determine which key
|
| 3153 | should be used to verify the MAC.
|
| 3154 |
|
| 3155 | An implementation SHOULD make the cookie as small as possible to
|
| 3156 | insure interoperability.
|
| 3157 |
|
| 3158 | 5.1.4 State Cookie Processing
|
| 3159 |
|
| 3160 | When an endpoint (in the COOKIE WAIT state) receives an INIT ACK
|
| 3161 | chunk with a State Cookie parameter, it MUST immediately send a
|
| 3162 | COOKIE ECHO chunk to its peer with the received State Cookie. The
|
| 3163 | sender MAY also add any pending DATA chunks to the packet after the
|
| 3164 | COOKIE ECHO chunk.
|
| 3165 |
|
| 3166 | The endpoint shall also start the T1-cookie timer after sending out
|
| 3167 | the COOKIE ECHO chunk. If the timer expires, the endpoint shall
|
| 3168 | retransmit the COOKIE ECHO chunk and restart the T1-cookie timer.
|
| 3169 | This is repeated until either a COOKIE ACK is received or '
|
| 3170 | Max.Init.Retransmits' is reached causing the peer endpoint to be
|
| 3171 | marked unreachable (and thus the association enters the CLOSED
|
| 3172 | state).
|
| 3173 |
|
| 3174 | 5.1.5 State Cookie Authentication
|
| 3175 |
|
| 3176 | When an endpoint receives a COOKIE ECHO chunk from another endpoint
|
| 3177 | with which it has no association, it shall take the following
|
| 3178 | actions:
|
| 3179 |
|
| 3180 | 1) Compute a MAC using the TCB data carried in the State Cookie and
|
| 3181 | the secret key (note the timestamp in the State Cookie MAY be used
|
| 3182 | to determine which secret key to use). Reference [RFC2104] can be
|
| 3183 | used as a guideline for generating the MAC,
|
| 3184 |
|
| 3185 | 2) Authenticate the State Cookie as one that it previously generated
|
| 3186 | by comparing the computed MAC against the one carried in the State
|
| 3187 | Cookie. If this comparison fails, the SCTP packet, including the
|
| 3188 | COOKIE ECHO and any DATA chunks, should be silently discarded,
|
| 3189 |
|
| 3190 |
|
| 3191 |
|
| 3192 |
|
| 3193 |
|
| 3194 | Stewart, et al. Standards Track [Page 57]
|
| 3195 |
|
| 3196 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3197 |
|
| 3198 |
|
| 3199 | 3) Compare the creation timestamp in the State Cookie to the current
|
| 3200 | local time. If the elapsed time is longer than the lifespan
|
| 3201 | carried in the State Cookie, then the packet, including the COOKIE
|
| 3202 | ECHO and any attached DATA chunks, SHOULD be discarded and the
|
| 3203 | endpoint MUST transmit an ERROR chunk with a "Stale Cookie" error
|
| 3204 | cause to the peer endpoint,
|
| 3205 |
|
| 3206 | 4) If the State Cookie is valid, create an association to the sender
|
| 3207 | of the COOKIE ECHO chunk with the information in the TCB data
|
| 3208 | carried in the COOKIE ECHO, and enter the ESTABLISHED state,
|
| 3209 |
|
| 3210 | 5) Send a COOKIE ACK chunk to the peer acknowledging reception of the
|
| 3211 | COOKIE ECHO. The COOKIE ACK MAY be bundled with an outbound DATA
|
| 3212 | chunk or SACK chunk; however, the COOKIE ACK MUST be the first
|
| 3213 | chunk in the SCTP packet.
|
| 3214 |
|
| 3215 | 6) Immediately acknowledge any DATA chunk bundled with the COOKIE
|
| 3216 | ECHO with a SACK (subsequent DATA chunk acknowledgement should
|
| 3217 | follow the rules defined in Section 6.2). As mentioned in step
|
| 3218 | 5), if the SACK is bundled with the COOKIE ACK, the COOKIE ACK
|
| 3219 | MUST appear first in the SCTP packet.
|
| 3220 |
|
| 3221 | If a COOKIE ECHO is received from an endpoint with which the receiver
|
| 3222 | of the COOKIE ECHO has an existing association, the procedures in
|
| 3223 | Section 5.2 should be followed.
|
| 3224 |
|
| 3225 | 5.1.6 An Example of Normal Association Establishment
|
| 3226 |
|
| 3227 | In the following example, "A" initiates the association and then
|
| 3228 | sends a user message to "Z", then "Z" sends two user messages to "A"
|
| 3229 | later (assuming no bundling or fragmentation occurs):
|
| 3230 |
|
| 3231 |
|
| 3232 |
|
| 3233 |
|
| 3234 |
|
| 3235 |
|
| 3236 |
|
| 3237 |
|
| 3238 |
|
| 3239 |
|
| 3240 |
|
| 3241 |
|
| 3242 |
|
| 3243 |
|
| 3244 |
|
| 3245 |
|
| 3246 |
|
| 3247 |
|
| 3248 |
|
| 3249 |
|
| 3250 | Stewart, et al. Standards Track [Page 58]
|
| 3251 |
|
| 3252 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3253 |
|
| 3254 |
|
| 3255 | Endpoint A Endpoint Z
|
| 3256 | {app sets association with Z}
|
| 3257 | (build TCB)
|
| 3258 | INIT [I-Tag=Tag_A
|
| 3259 | & other info] --------\
|
| 3260 | (Start T1-init timer) \
|
| 3261 | (Enter COOKIE-WAIT state) \---> (compose temp TCB and Cookie_Z)
|
| 3262 |
|
| 3263 | /--- INIT ACK [Veri Tag=Tag_A,
|
| 3264 | / I-Tag=Tag_Z,
|
| 3265 | (Cancel T1-init timer) <------/ Cookie_Z, & other info]
|
| 3266 | (destroy temp TCB)
|
| 3267 | COOKIE ECHO [Cookie_Z] ------\
|
| 3268 | (Start T1-init timer) \
|
| 3269 | (Enter COOKIE-ECHOED state) \---> (build TCB enter ESTABLISHED
|
| 3270 | state)
|
| 3271 |
|
| 3272 |
|
| 3273 | /---- COOKIE-ACK
|
| 3274 | /
|
| 3275 | (Cancel T1-init timer, <-----/
|
| 3276 | Enter ESTABLISHED state)
|
| 3277 | {app sends 1st user data; strm 0}
|
| 3278 | DATA [TSN=initial TSN_A
|
| 3279 | Strm=0,Seq=1 & user data]--\
|
| 3280 | (Start T3-rtx timer) \
|
| 3281 | \->
|
| 3282 | /----- SACK [TSN Ack=init
|
| 3283 | TSN_A,Block=0]
|
| 3284 | (Cancel T3-rtx timer) <------/
|
| 3285 |
|
| 3286 | ...
|
| 3287 | {app sends 2 messages;strm 0}
|
| 3288 | /---- DATA
|
| 3289 | / [TSN=init TSN_Z
|
| 3290 | <--/ Strm=0,Seq=1 & user data 1]
|
| 3291 | SACK [TSN Ack=init TSN_Z, /---- DATA
|
| 3292 | Block=0] --------\ / [TSN=init TSN_Z +1,
|
| 3293 | \/ Strm=0,Seq=2 & user data 2]
|
| 3294 | <------/\
|
| 3295 | \
|
| 3296 | \------>
|
| 3297 |
|
| 3298 | Figure 4: INITiation Example
|
| 3299 |
|
| 3300 | If the T1-init timer expires at "A" after the INIT or COOKIE ECHO
|
| 3301 | chunks are sent, the same INIT or COOKIE ECHO chunk with the same
|
| 3302 | Initiate Tag (i.e., Tag_A) or State Cookie shall be retransmitted and
|
| 3303 |
|
| 3304 |
|
| 3305 |
|
| 3306 | Stewart, et al. Standards Track [Page 59]
|
| 3307 |
|
| 3308 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3309 |
|
| 3310 |
|
| 3311 | the timer restarted. This shall be repeated Max.Init.Retransmits
|
| 3312 | times before "A" considers "Z" unreachable and reports the failure to
|
| 3313 | its upper layer (and thus the association enters the CLOSED state).
|
| 3314 | When retransmitting the INIT, the endpoint MUST follow the rules
|
| 3315 | defined in 6.3 to determine the proper timer value.
|
| 3316 |
|
| 3317 | 5.2 Handle Duplicate or Unexpected INIT, INIT ACK, COOKIE ECHO, and
|
| 3318 | COOKIE ACK
|
| 3319 |
|
| 3320 | During the lifetime of an association (in one of the possible
|
| 3321 | states), an endpoint may receive from its peer endpoint one of the
|
| 3322 | setup chunks (INIT, INIT ACK, COOKIE ECHO, and COOKIE ACK). The
|
| 3323 | receiver shall treat such a setup chunk as a duplicate and process it
|
| 3324 | as described in this section.
|
| 3325 |
|
| 3326 | Note: An endpoint will not receive the chunk unless the chunk was
|
| 3327 | sent to a SCTP transport address and is from a SCTP transport address
|
| 3328 | associated with this endpoint. Therefore, the endpoint processes
|
| 3329 | such a chunk as part of its current association.
|
| 3330 |
|
| 3331 | The following scenarios can cause duplicated or unexpected chunks:
|
| 3332 |
|
| 3333 | A) The peer has crashed without being detected, re-started itself and
|
| 3334 | sent out a new INIT chunk trying to restore the association,
|
| 3335 |
|
| 3336 | B) Both sides are trying to initialize the association at about the
|
| 3337 | same time,
|
| 3338 |
|
| 3339 | C) The chunk is from a stale packet that was used to establish the
|
| 3340 | present association or a past association that is no longer in
|
| 3341 | existence,
|
| 3342 |
|
| 3343 | D) The chunk is a false packet generated by an attacker, or
|
| 3344 |
|
| 3345 | E) The peer never received the COOKIE ACK and is retransmitting its
|
| 3346 | COOKIE ECHO.
|
| 3347 |
|
| 3348 | The rules in the following sections shall be applied in order to
|
| 3349 | identify and correctly handle these cases.
|
| 3350 |
|
| 3351 | 5.2.1 INIT received in COOKIE-WAIT or COOKIE-ECHOED State (Item B)
|
| 3352 |
|
| 3353 | This usually indicates an initialization collision, i.e., each
|
| 3354 | endpoint is attempting, at about the same time, to establish an
|
| 3355 | association with the other endpoint.
|
| 3356 |
|
| 3357 | Upon receipt of an INIT in the COOKIE-WAIT or COOKIE-ECHOED state, an
|
| 3358 | endpoint MUST respond with an INIT ACK using the same parameters it
|
| 3359 |
|
| 3360 |
|
| 3361 |
|
| 3362 | Stewart, et al. Standards Track [Page 60]
|
| 3363 |
|
| 3364 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3365 |
|
| 3366 |
|
| 3367 | sent in its original INIT chunk (including its Initiation Tag,
|
| 3368 | unchanged). These original parameters are combined with those from
|
| 3369 | the newly received INIT chunk. The endpoint shall also generate a
|
| 3370 | State Cookie with the INIT ACK. The endpoint uses the parameters
|
| 3371 | sent in its INIT to calculate the State Cookie.
|
| 3372 |
|
| 3373 | After that, the endpoint MUST NOT change its state, the T1-init timer
|
| 3374 | shall be left running and the corresponding TCB MUST NOT be
|
| 3375 | destroyed. The normal procedures for handling State Cookies when a
|
| 3376 | TCB exists will resolve the duplicate INITs to a single association.
|
| 3377 |
|
| 3378 | For an endpoint that is in the COOKIE-ECHOED state it MUST populate
|
| 3379 | its Tie-Tags with the Tag information of itself and its peer (see
|
| 3380 | section 5.2.2 for a description of the Tie-Tags).
|
| 3381 |
|
| 3382 | 5.2.2 Unexpected INIT in States Other than CLOSED, COOKIE-ECHOED,
|
| 3383 | COOKIE-WAIT and SHUTDOWN-ACK-SENT
|
| 3384 |
|
| 3385 | Unless otherwise stated, upon reception of an unexpected INIT for
|
| 3386 | this association, the endpoint shall generate an INIT ACK with a
|
| 3387 | State Cookie. In the outbound INIT ACK the endpoint MUST copy its
|
| 3388 | current Verification Tag and peer's Verification Tag into a reserved
|
| 3389 | place within the state cookie. We shall refer to these locations as
|
| 3390 | the Peer's-Tie-Tag and the Local-Tie-Tag. The outbound SCTP packet
|
| 3391 | containing this INIT ACK MUST carry a Verification Tag value equal to
|
| 3392 | the Initiation Tag found in the unexpected INIT. And the INIT ACK
|
| 3393 | MUST contain a new Initiation Tag (randomly generated see Section
|
| 3394 | 5.3.1). Other parameters for the endpoint SHOULD be copied from the
|
| 3395 | existing parameters of the association (e.g. number of outbound
|
| 3396 | streams) into the INIT ACK and cookie.
|
| 3397 |
|
| 3398 | After sending out the INIT ACK, the endpoint shall take no further
|
| 3399 | actions, i.e., the existing association, including its current state,
|
| 3400 | and the corresponding TCB MUST NOT be changed.
|
| 3401 |
|
| 3402 | Note: Only when a TCB exists and the association is not in a COOKIE-
|
| 3403 | WAIT state are the Tie-Tags populated. For a normal association INIT
|
| 3404 | (i.e. the endpoint is in a COOKIE-WAIT state), the Tie-Tags MUST be
|
| 3405 | set to 0 (indicating that no previous TCB existed). The INIT ACK and
|
| 3406 | State Cookie are populated as specified in section 5.2.1.
|
| 3407 |
|
| 3408 | 5.2.3 Unexpected INIT ACK
|
| 3409 |
|
| 3410 | If an INIT ACK is received by an endpoint in any state other than the
|
| 3411 | COOKIE-WAIT state, the endpoint should discard the INIT ACK chunk.
|
| 3412 | An unexpected INIT ACK usually indicates the processing of an old or
|
| 3413 | duplicated INIT chunk.
|
| 3414 |
|
| 3415 |
|
| 3416 |
|
| 3417 |
|
| 3418 | Stewart, et al. Standards Track [Page 61]
|
| 3419 |
|
| 3420 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3421 |
|
| 3422 |
|
| 3423 | 5.2.4 Handle a COOKIE ECHO when a TCB exists
|
| 3424 |
|
| 3425 | When a COOKIE ECHO chunk is received by an endpoint in any state for
|
| 3426 | an existing association (i.e., not in the CLOSED state) the following
|
| 3427 | rules shall be applied:
|
| 3428 |
|
| 3429 | 1) Compute a MAC as described in Step 1 of Section 5.1.5,
|
| 3430 |
|
| 3431 | 2) Authenticate the State Cookie as described in Step 2 of Section
|
| 3432 | 5.1.5 (this is case C or D above).
|
| 3433 |
|
| 3434 | 3) Compare the timestamp in the State Cookie to the current time. If
|
| 3435 | the State Cookie is older than the lifespan carried in the State
|
| 3436 | Cookie and the Verification Tags contained in the State Cookie do
|
| 3437 | not match the current association's Verification Tags, the packet,
|
| 3438 | including the COOKIE ECHO and any DATA chunks, should be
|
| 3439 | discarded. The endpoint also MUST transmit an ERROR chunk with a
|
| 3440 | "Stale Cookie" error cause to the peer endpoint (this is case C or
|
| 3441 | D in section 5.2).
|
| 3442 |
|
| 3443 | If both Verification Tags in the State Cookie match the
|
| 3444 | Verification Tags of the current association, consider the State
|
| 3445 | Cookie valid (this is case E of section 5.2) even if the lifespan
|
| 3446 | is exceeded.
|
| 3447 |
|
| 3448 | 4) If the State Cookie proves to be valid, unpack the TCB into a
|
| 3449 | temporary TCB.
|
| 3450 |
|
| 3451 | 5) Refer to Table 2 to determine the correct action to be taken.
|
| 3452 |
|
| 3453 |
|
| 3454 |
|
| 3455 |
|
| 3456 |
|
| 3457 |
|
| 3458 |
|
| 3459 |
|
| 3460 |
|
| 3461 |
|
| 3462 |
|
| 3463 |
|
| 3464 |
|
| 3465 |
|
| 3466 |
|
| 3467 |
|
| 3468 |
|
| 3469 |
|
| 3470 |
|
| 3471 |
|
| 3472 |
|
| 3473 |
|
| 3474 | Stewart, et al. Standards Track [Page 62]
|
| 3475 |
|
| 3476 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3477 |
|
| 3478 |
|
| 3479 | +------------+------------+---------------+--------------+-------------+
|
| 3480 | | Local Tag | Peer's Tag | Local-Tie-Tag |Peer's-Tie-Tag| Action/ |
|
| 3481 | | | | | | Description |
|
| 3482 | +------------+------------+---------------+--------------+-------------+
|
| 3483 | | X | X | M | M | (A) |
|
| 3484 | +------------+------------+---------------+--------------+-------------+
|
| 3485 | | M | X | A | A | (B) |
|
| 3486 | +------------+------------+---------------+--------------+-------------+
|
| 3487 | | M | 0 | A | A | (B) |
|
| 3488 | +------------+------------+---------------+--------------+-------------+
|
| 3489 | | X | M | 0 | 0 | (C) |
|
| 3490 | +------------+------------+---------------+--------------+-------------+
|
| 3491 | | M | M | A | A | (D) |
|
| 3492 | +======================================================================+
|
| 3493 | | Table 2: Handling of a COOKIE ECHO when a TCB exists |
|
| 3494 | +======================================================================+
|
| 3495 |
|
| 3496 | Legend:
|
| 3497 |
|
| 3498 | X - Tag does not match the existing TCB
|
| 3499 | M - Tag matches the existing TCB.
|
| 3500 | 0 - No Tie-Tag in Cookie (unknown).
|
| 3501 | A - All cases, i.e. M, X or 0.
|
| 3502 |
|
| 3503 | Note: For any case not shown in Table 2, the cookie should be
|
| 3504 | silently discarded.
|
| 3505 |
|
| 3506 | Action
|
| 3507 |
|
| 3508 | A) In this case, the peer may have restarted. When the endpoint
|
| 3509 | recognizes this potential 'restart', the existing session is
|
| 3510 | treated the same as if it received an ABORT followed by a new
|
| 3511 | COOKIE ECHO with the following exceptions:
|
| 3512 |
|
| 3513 | - Any SCTP DATA Chunks MAY be retained (this is an implementation
|
| 3514 | specific option).
|
| 3515 |
|
| 3516 | - A notification of RESTART SHOULD be sent to the ULP instead of
|
| 3517 | a "COMMUNICATION LOST" notification.
|
| 3518 |
|
| 3519 | All the congestion control parameters (e.g., cwnd, ssthresh)
|
| 3520 | related to this peer MUST be reset to their initial values (see
|
| 3521 | Section 6.2.1).
|
| 3522 |
|
| 3523 | After this the endpoint shall enter the ESTABLISHED state.
|
| 3524 |
|
| 3525 |
|
| 3526 |
|
| 3527 |
|
| 3528 |
|
| 3529 |
|
| 3530 | Stewart, et al. Standards Track [Page 63]
|
| 3531 |
|
| 3532 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3533 |
|
| 3534 |
|
| 3535 | If the endpoint is in the SHUTDOWN-ACK-SENT state and recognizes
|
| 3536 | the peer has restarted (Action A), it MUST NOT setup a new
|
| 3537 | association but instead resend the SHUTDOWN ACK and send an ERROR
|
| 3538 | chunk with a "Cookie Received while Shutting Down" error cause to
|
| 3539 | its peer.
|
| 3540 |
|
| 3541 | B) In this case, both sides may be attempting to start an association
|
| 3542 | at about the same time but the peer endpoint started its INIT
|
| 3543 | after responding to the local endpoint's INIT. Thus it may have
|
| 3544 | picked a new Verification Tag not being aware of the previous Tag
|
| 3545 | it had sent this endpoint. The endpoint should stay in or enter
|
| 3546 | the ESTABLISHED state but it MUST update its peer's Verification
|
| 3547 | Tag from the State Cookie, stop any init or cookie timers that may
|
| 3548 | running and send a COOKIE ACK.
|
| 3549 |
|
| 3550 | C) In this case, the local endpoint's cookie has arrived late.
|
| 3551 | Before it arrived, the local endpoint sent an INIT and received an
|
| 3552 | INIT-ACK and finally sent a COOKIE ECHO with the peer's same tag
|
| 3553 | but a new tag of its own. The cookie should be silently
|
| 3554 | discarded. The endpoint SHOULD NOT change states and should leave
|
| 3555 | any timers running.
|
| 3556 |
|
| 3557 | D) When both local and remote tags match the endpoint should always
|
| 3558 | enter the ESTABLISHED state, if it has not already done so. It
|
| 3559 | should stop any init or cookie timers that may be running and send
|
| 3560 | a COOKIE ACK.
|
| 3561 |
|
| 3562 | Note: The "peer's Verification Tag" is the tag received in the
|
| 3563 | Initiate Tag field of the INIT or INIT ACK chunk.
|
| 3564 |
|
| 3565 | 5.2.4.1 An Example of a Association Restart
|
| 3566 |
|
| 3567 | In the following example, "A" initiates the association after a
|
| 3568 | restart has occurred. Endpoint "Z" had no knowledge of the restart
|
| 3569 | until the exchange (i.e. Heartbeats had not yet detected the failure
|
| 3570 | of "A"). (assuming no bundling or fragmentation occurs):
|
| 3571 |
|
| 3572 |
|
| 3573 |
|
| 3574 |
|
| 3575 |
|
| 3576 |
|
| 3577 |
|
| 3578 |
|
| 3579 |
|
| 3580 |
|
| 3581 |
|
| 3582 |
|
| 3583 |
|
| 3584 |
|
| 3585 |
|
| 3586 | Stewart, et al. Standards Track [Page 64]
|
| 3587 |
|
| 3588 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3589 |
|
| 3590 |
|
| 3591 | Endpoint A Endpoint Z
|
| 3592 | <-------------- Association is established---------------------->
|
| 3593 | Tag=Tag_A Tag=Tag_Z
|
| 3594 | <--------------------------------------------------------------->
|
| 3595 | {A crashes and restarts}
|
| 3596 | {app sets up a association with Z}
|
| 3597 | (build TCB)
|
| 3598 | INIT [I-Tag=Tag_A'
|
| 3599 | & other info] --------\
|
| 3600 | (Start T1-init timer) \
|
| 3601 | (Enter COOKIE-WAIT state) \---> (find a existing TCB
|
| 3602 | compose temp TCB and Cookie_Z
|
| 3603 | with Tie-Tags to previous
|
| 3604 | association)
|
| 3605 | /--- INIT ACK [Veri Tag=Tag_A',
|
| 3606 | / I-Tag=Tag_Z',
|
| 3607 | (Cancel T1-init timer) <------/ Cookie_Z[TieTags=
|
| 3608 | Tag_A,Tag_Z
|
| 3609 | & other info]
|
| 3610 | (destroy temp TCB,leave original
|
| 3611 | in place)
|
| 3612 | COOKIE ECHO [Veri=Tag_Z',
|
| 3613 | Cookie_Z
|
| 3614 | Tie=Tag_A,
|
| 3615 | Tag_Z]----------\
|
| 3616 | (Start T1-init timer) \
|
| 3617 | (Enter COOKIE-ECHOED state) \---> (Find existing association,
|
| 3618 | Tie-Tags match old tags,
|
| 3619 | Tags do not match i.e.
|
| 3620 | case X X M M above,
|
| 3621 | Announce Restart to ULP
|
| 3622 | and reset association).
|
| 3623 | /---- COOKIE-ACK
|
| 3624 | /
|
| 3625 | (Cancel T1-init timer, <-----/
|
| 3626 | Enter ESTABLISHED state)
|
| 3627 | {app sends 1st user data; strm 0}
|
| 3628 | DATA [TSN=initial TSN_A
|
| 3629 | Strm=0,Seq=1 & user data]--\
|
| 3630 | (Start T3-rtx timer) \
|
| 3631 | \->
|
| 3632 | /----- SACK [TSN Ack=init TSN_A,Block=0]
|
| 3633 | (Cancel T3-rtx timer) <------/
|
| 3634 |
|
| 3635 | Figure 5: A Restart Example
|
| 3636 |
|
| 3637 |
|
| 3638 |
|
| 3639 |
|
| 3640 |
|
| 3641 |
|
| 3642 | Stewart, et al. Standards Track [Page 65]
|
| 3643 |
|
| 3644 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3645 |
|
| 3646 |
|
| 3647 | 5.2.5 Handle Duplicate COOKIE-ACK.
|
| 3648 |
|
| 3649 | At any state other than COOKIE-ECHOED, an endpoint should silently
|
| 3650 | discard a received COOKIE ACK chunk.
|
| 3651 |
|
| 3652 | 5.2.6 Handle Stale COOKIE Error
|
| 3653 |
|
| 3654 | Receipt of an ERROR chunk with a "Stale Cookie" error cause indicates
|
| 3655 | one of a number of possible events:
|
| 3656 |
|
| 3657 | A) That the association failed to completely setup before the State
|
| 3658 | Cookie issued by the sender was processed.
|
| 3659 |
|
| 3660 | B) An old State Cookie was processed after setup completed.
|
| 3661 |
|
| 3662 | C) An old State Cookie is received from someone that the receiver is
|
| 3663 | not interested in having an association with and the ABORT chunk
|
| 3664 | was lost.
|
| 3665 |
|
| 3666 | When processing an ERROR chunk with a "Stale Cookie" error cause an
|
| 3667 | endpoint should first examine if an association is in the process of
|
| 3668 | being setup, i.e. the association is in the COOKIE-ECHOED state. In
|
| 3669 | all cases if the association is not in the COOKIE-ECHOED state, the
|
| 3670 | ERROR chunk should be silently discarded.
|
| 3671 |
|
| 3672 | If the association is in the COOKIE-ECHOED state, the endpoint may
|
| 3673 | elect one of the following three alternatives.
|
| 3674 |
|
| 3675 | 1) Send a new INIT chunk to the endpoint to generate a new State
|
| 3676 | Cookie and re-attempt the setup procedure.
|
| 3677 |
|
| 3678 | 2) Discard the TCB and report to the upper layer the inability to
|
| 3679 | setup the association.
|
| 3680 |
|
| 3681 | 3) Send a new INIT chunk to the endpoint, adding a Cookie
|
| 3682 | Preservative parameter requesting an extension to the lifetime of
|
| 3683 | the State Cookie. When calculating the time extension, an
|
| 3684 | implementation SHOULD use the RTT information measured based on
|
| 3685 | the previous COOKIE ECHO / ERROR exchange, and should add no more
|
| 3686 | than 1 second beyond the measured RTT, due to long State Cookie
|
| 3687 | lifetimes making the endpoint more subject to a replay attack.
|
| 3688 |
|
| 3689 |
|
| 3690 |
|
| 3691 |
|
| 3692 |
|
| 3693 |
|
| 3694 |
|
| 3695 |
|
| 3696 |
|
| 3697 |
|
| 3698 | Stewart, et al. Standards Track [Page 66]
|
| 3699 |
|
| 3700 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3701 |
|
| 3702 |
|
| 3703 | 5.3 Other Initialization Issues
|
| 3704 |
|
| 3705 | 5.3.1 Selection of Tag Value
|
| 3706 |
|
| 3707 | Initiate Tag values should be selected from the range of 1 to 2**32 -
|
| 3708 | 1. It is very important that the Initiate Tag value be randomized to
|
| 3709 | help protect against "man in the middle" and "sequence number"
|
| 3710 | attacks. The methods described in [RFC1750] can be used for the
|
| 3711 | Initiate Tag randomization. Careful selection of Initiate Tags is
|
| 3712 | also necessary to prevent old duplicate packets from previous
|
| 3713 | associations being mistakenly processed as belonging to the current
|
| 3714 | association.
|
| 3715 |
|
| 3716 | Moreover, the Verification Tag value used by either endpoint in a
|
| 3717 | given association MUST NOT change during the lifetime of an
|
| 3718 | association. A new Verification Tag value MUST be used each time the
|
| 3719 | endpoint tears-down and then re-establishes an association to the
|
| 3720 | same peer.
|
| 3721 |
|
| 3722 | 6. User Data Transfer
|
| 3723 |
|
| 3724 | Data transmission MUST only happen in the ESTABLISHED, SHUTDOWN-
|
| 3725 | PENDING, and SHUTDOWN-RECEIVED states. The only exception to this is
|
| 3726 | that DATA chunks are allowed to be bundled with an outbound COOKIE
|
| 3727 | ECHO chunk when in COOKIE-WAIT state.
|
| 3728 |
|
| 3729 | DATA chunks MUST only be received according to the rules below in
|
| 3730 | ESTABLISHED, SHUTDOWN-PENDING, SHUTDOWN-SENT. A DATA chunk received
|
| 3731 | in CLOSED is out of the blue and SHOULD be handled per 8.4. A DATA
|
| 3732 | chunk received in any other state SHOULD be discarded.
|
| 3733 |
|
| 3734 | A SACK MUST be processed in ESTABLISHED, SHUTDOWN-PENDING, and
|
| 3735 | SHUTDOWN-RECEIVED. An incoming SACK MAY be processed in COOKIE-
|
| 3736 | ECHOED. A SACK in the CLOSED state is out of the blue and SHOULD be
|
| 3737 | processed according to the rules in 8.4. A SACK chunk received in
|
| 3738 | any other state SHOULD be discarded.
|
| 3739 |
|
| 3740 |
|
| 3741 | A SCTP receiver MUST be able to receive a minimum of 1500 bytes in
|
| 3742 | one SCTP packet. This means that a SCTP endpoint MUST NOT indicate
|
| 3743 | less than 1500 bytes in its Initial a_rwnd sent in the INIT or INIT
|
| 3744 | ACK.
|
| 3745 |
|
| 3746 | For transmission efficiency, SCTP defines mechanisms for bundling of
|
| 3747 | small user messages and fragmentation of large user messages. The
|
| 3748 | following diagram depicts the flow of user messages through SCTP.
|
| 3749 |
|
| 3750 |
|
| 3751 |
|
| 3752 |
|
| 3753 |
|
| 3754 | Stewart, et al. Standards Track [Page 67]
|
| 3755 |
|
| 3756 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3757 |
|
| 3758 |
|
| 3759 | In this section the term "data sender" refers to the endpoint that
|
| 3760 | transmits a DATA chunk and the term "data receiver" refers to the
|
| 3761 | endpoint that receives a DATA chunk. A data receiver will transmit
|
| 3762 | SACK chunks.
|
| 3763 |
|
| 3764 | +--------------------------+
|
| 3765 | | User Messages |
|
| 3766 | +--------------------------+
|
| 3767 | SCTP user ^ |
|
| 3768 | ==================|==|=======================================
|
| 3769 | | v (1)
|
| 3770 | +------------------+ +--------------------+
|
| 3771 | | SCTP DATA Chunks | |SCTP Control Chunks |
|
| 3772 | +------------------+ +--------------------+
|
| 3773 | ^ | ^ |
|
| 3774 | | v (2) | v (2)
|
| 3775 | +--------------------------+
|
| 3776 | | SCTP packets |
|
| 3777 | +--------------------------+
|
| 3778 | SCTP ^ |
|
| 3779 | ===========================|==|===========================
|
| 3780 | | v
|
| 3781 | Connectionless Packet Transfer Service (e.g., IP)
|
| 3782 |
|
| 3783 | Notes:
|
| 3784 |
|
| 3785 | 1) When converting user messages into DATA chunks, an endpoint
|
| 3786 | will fragment user messages larger than the current association
|
| 3787 | path MTU into multiple DATA chunks. The data receiver will
|
| 3788 | normally reassemble the fragmented message from DATA chunks
|
| 3789 | before delivery to the user (see Section 6.9 for details).
|
| 3790 |
|
| 3791 | 2) Multiple DATA and control chunks may be bundled by the sender
|
| 3792 | into a single SCTP packet for transmission, as long as the
|
| 3793 | final size of the packet does not exceed the current path MTU.
|
| 3794 | The receiver will unbundle the packet back into the original
|
| 3795 | chunks. Control chunks MUST come before DATA chunks in the
|
| 3796 | packet.
|
| 3797 |
|
| 3798 | Figure 6: Illustration of User Data Transfer
|
| 3799 |
|
| 3800 | The fragmentation and bundling mechanisms, as detailed in Sections
|
| 3801 | 6.9 and 6.10, are OPTIONAL to implement by the data sender, but they
|
| 3802 | MUST be implemented by the data receiver, i.e., an endpoint MUST
|
| 3803 | properly receive and process bundled or fragmented data.
|
| 3804 |
|
| 3805 |
|
| 3806 |
|
| 3807 |
|
| 3808 |
|
| 3809 |
|
| 3810 | Stewart, et al. Standards Track [Page 68]
|
| 3811 |
|
| 3812 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3813 |
|
| 3814 |
|
| 3815 | 6.1 Transmission of DATA Chunks
|
| 3816 |
|
| 3817 | This document is specified as if there is a single retransmission
|
| 3818 | timer per destination transport address, but implementations MAY have
|
| 3819 | a retransmission timer for each DATA chunk.
|
| 3820 |
|
| 3821 | The following general rules MUST be applied by the data sender for
|
| 3822 | transmission and/or retransmission of outbound DATA chunks:
|
| 3823 |
|
| 3824 | A) At any given time, the data sender MUST NOT transmit new data to
|
| 3825 | any destination transport address if its peer's rwnd indicates
|
| 3826 | that the peer has no buffer space (i.e. rwnd is 0, see Section
|
| 3827 | 6.2.1). However, regardless of the value of rwnd (including if it
|
| 3828 | is 0), the data sender can always have one DATA chunk in flight to
|
| 3829 | the receiver if allowed by cwnd (see rule B below). This rule
|
| 3830 | allows the sender to probe for a change in rwnd that the sender
|
| 3831 | missed due to the SACK having been lost in transit from the data
|
| 3832 | receiver to the data sender.
|
| 3833 |
|
| 3834 | B) At any given time, the sender MUST NOT transmit new data to a
|
| 3835 | given transport address if it has cwnd or more bytes of data
|
| 3836 | outstanding to that transport address.
|
| 3837 |
|
| 3838 | C) When the time comes for the sender to transmit, before sending new
|
| 3839 | DATA chunks, the sender MUST first transmit any outstanding DATA
|
| 3840 | chunks which are marked for retransmission (limited by the current
|
| 3841 | cwnd).
|
| 3842 |
|
| 3843 | D) Then, the sender can send out as many new DATA chunks as Rule A
|
| 3844 | and Rule B above allow.
|
| 3845 |
|
| 3846 | Multiple DATA chunks committed for transmission MAY be bundled in a
|
| 3847 | single packet. Furthermore, DATA chunks being retransmitted MAY be
|
| 3848 | bundled with new DATA chunks, as long as the resulting packet size
|
| 3849 | does not exceed the path MTU. A ULP may request that no bundling is
|
| 3850 | performed but this should only turn off any delays that a SCTP
|
| 3851 | implementation may be using to increase bundling efficiency. It does
|
| 3852 | not in itself stop all bundling from occurring (i.e. in case of
|
| 3853 | congestion or retransmission).
|
| 3854 |
|
| 3855 | Before an endpoint transmits a DATA chunk, if any received DATA
|
| 3856 | chunks have not been acknowledged (e.g., due to delayed ack), the
|
| 3857 | sender should create a SACK and bundle it with the outbound DATA
|
| 3858 | chunk, as long as the size of the final SCTP packet does not exceed
|
| 3859 | the current MTU. See Section 6.2.
|
| 3860 |
|
| 3861 |
|
| 3862 |
|
| 3863 |
|
| 3864 |
|
| 3865 |
|
| 3866 | Stewart, et al. Standards Track [Page 69]
|
| 3867 |
|
| 3868 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3869 |
|
| 3870 |
|
| 3871 | IMPLEMENTATION NOTE: When the window is full (i.e., transmission is
|
| 3872 | disallowed by Rule A and/or Rule B), the sender MAY still accept send
|
| 3873 | requests from its upper layer, but MUST transmit no more DATA chunks
|
| 3874 | until some or all of the outstanding DATA chunks are acknowledged and
|
| 3875 | transmission is allowed by Rule A and Rule B again.
|
| 3876 |
|
| 3877 | Whenever a transmission or retransmission is made to any address, if
|
| 3878 | the T3-rtx timer of that address is not currently running, the sender
|
| 3879 | MUST start that timer. If the timer for that address is already
|
| 3880 | running, the sender MUST restart the timer if the earliest (i.e.,
|
| 3881 | lowest TSN) outstanding DATA chunk sent to that address is being
|
| 3882 | retransmitted. Otherwise, the data sender MUST NOT restart the
|
| 3883 | timer.
|
| 3884 |
|
| 3885 | When starting or restarting the T3-rtx timer, the timer value must be
|
| 3886 | adjusted according to the timer rules defined in Sections 6.3.2, and
|
| 3887 | 6.3.3.
|
| 3888 |
|
| 3889 | Note: The data sender SHOULD NOT use a TSN that is more than 2**31 -
|
| 3890 | 1 above the beginning TSN of the current send window.
|
| 3891 |
|
| 3892 | 6.2 Acknowledgement on Reception of DATA Chunks
|
| 3893 |
|
| 3894 | The SCTP endpoint MUST always acknowledge the reception of each valid
|
| 3895 | DATA chunk.
|
| 3896 |
|
| 3897 | The guidelines on delayed acknowledgement algorithm specified in
|
| 3898 | Section 4.2 of [RFC2581] SHOULD be followed. Specifically, an
|
| 3899 | acknowledgement SHOULD be generated for at least every second packet
|
| 3900 | (not every second DATA chunk) received, and SHOULD be generated
|
| 3901 | within 200 ms of the arrival of any unacknowledged DATA chunk. In
|
| 3902 | some situations it may be beneficial for an SCTP transmitter to be
|
| 3903 | more conservative than the algorithms detailed in this document
|
| 3904 | allow. However, an SCTP transmitter MUST NOT be more aggressive than
|
| 3905 | the following algorithms allow.
|
| 3906 |
|
| 3907 | A SCTP receiver MUST NOT generate more than one SACK for every
|
| 3908 | incoming packet, other than to update the offered window as the
|
| 3909 | receiving application consumes new data.
|
| 3910 |
|
| 3911 | IMPLEMENTATION NOTE: The maximum delay for generating an
|
| 3912 | acknowledgement may be configured by the SCTP administrator, either
|
| 3913 | statically or dynamically, in order to meet the specific timing
|
| 3914 | requirement of the protocol being carried.
|
| 3915 |
|
| 3916 | An implementation MUST NOT allow the maximum delay to be configured
|
| 3917 | to be more than 500 ms. In other words an implementation MAY lower
|
| 3918 | this value below 500ms but MUST NOT raise it above 500ms.
|
| 3919 |
|
| 3920 |
|
| 3921 |
|
| 3922 | Stewart, et al. Standards Track [Page 70]
|
| 3923 |
|
| 3924 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3925 |
|
| 3926 |
|
| 3927 | Acknowledgements MUST be sent in SACK chunks unless shutdown was
|
| 3928 | requested by the ULP in which case an endpoint MAY send an
|
| 3929 | acknowledgement in the SHUTDOWN chunk. A SACK chunk can acknowledge
|
| 3930 | the reception of multiple DATA chunks. See Section 3.3.4 for SACK
|
| 3931 | chunk format. In particular, the SCTP endpoint MUST fill in the
|
| 3932 | Cumulative TSN Ack field to indicate the latest sequential TSN (of a
|
| 3933 | valid DATA chunk) it has received. Any received DATA chunks with TSN
|
| 3934 | greater than the value in the Cumulative TSN Ack field SHOULD also be
|
| 3935 | reported in the Gap Ack Block fields.
|
| 3936 |
|
| 3937 | Note: The SHUTDOWN chunk does not contain Gap Ack Block fields.
|
| 3938 | Therefore, the endpoint should use a SACK instead of the SHUTDOWN
|
| 3939 | chunk to acknowledge DATA chunks received out of order .
|
| 3940 |
|
| 3941 | When a packet arrives with duplicate DATA chunk(s) and with no new
|
| 3942 | DATA chunk(s), the endpoint MUST immediately send a SACK with no
|
| 3943 | delay. If a packet arrives with duplicate DATA chunk(s) bundled with
|
| 3944 | new DATA chunks, the endpoint MAY immediately send a SACK. Normally
|
| 3945 | receipt of duplicate DATA chunks will occur when the original SACK
|
| 3946 | chunk was lost and the peer's RTO has expired. The duplicate TSN
|
| 3947 | number(s) SHOULD be reported in the SACK as duplicate.
|
| 3948 |
|
| 3949 | When an endpoint receives a SACK, it MAY use the Duplicate TSN
|
| 3950 | information to determine if SACK loss is occurring. Further use of
|
| 3951 | this data is for future study.
|
| 3952 |
|
| 3953 | The data receiver is responsible for maintaining its receive buffers.
|
| 3954 | The data receiver SHOULD notify the data sender in a timely manner of
|
| 3955 | changes in its ability to receive data. How an implementation
|
| 3956 | manages its receive buffers is dependent on many factors (e.g.,
|
| 3957 | Operating System, memory management system, amount of memory, etc.).
|
| 3958 | However, the data sender strategy defined in Section 6.2.1 is based
|
| 3959 | on the assumption of receiver operation similar to the following:
|
| 3960 |
|
| 3961 | A) At initialization of the association, the endpoint tells the
|
| 3962 | peer how much receive buffer space it has allocated to the
|
| 3963 | association in the INIT or INIT ACK. The endpoint sets a_rwnd
|
| 3964 | to this value.
|
| 3965 |
|
| 3966 | B) As DATA chunks are received and buffered, decrement a_rwnd by
|
| 3967 | the number of bytes received and buffered. This is, in effect,
|
| 3968 | closing rwnd at the data sender and restricting the amount of
|
| 3969 | data it can transmit.
|
| 3970 |
|
| 3971 | C) As DATA chunks are delivered to the ULP and released from the
|
| 3972 | receive buffers, increment a_rwnd by the number of bytes
|
| 3973 | delivered to the upper layer. This is, in effect, opening up
|
| 3974 | rwnd on the data sender and allowing it to send more data. The
|
| 3975 |
|
| 3976 |
|
| 3977 |
|
| 3978 | Stewart, et al. Standards Track [Page 71]
|
| 3979 |
|
| 3980 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 3981 |
|
| 3982 |
|
| 3983 | data receiver SHOULD NOT increment a_rwnd unless it has
|
| 3984 | released bytes from its receive buffer. For example, if the
|
| 3985 | receiver is holding fragmented DATA chunks in a reassembly
|
| 3986 | queue, it should not increment a_rwnd.
|
| 3987 |
|
| 3988 | D) When sending a SACK, the data receiver SHOULD place the current
|
| 3989 | value of a_rwnd into the a_rwnd field. The data receiver
|
| 3990 | SHOULD take into account that the data sender will not
|
| 3991 | retransmit DATA chunks that are acked via the Cumulative TSN
|
| 3992 | Ack (i.e., will drop from its retransmit queue).
|
| 3993 |
|
| 3994 | Under certain circumstances, the data receiver may need to drop DATA
|
| 3995 | chunks that it has received but hasn't released from its receive
|
| 3996 | buffers (i.e., delivered to the ULP). These DATA chunks may have
|
| 3997 | been acked in Gap Ack Blocks. For example, the data receiver may be
|
| 3998 | holding data in its receive buffers while reassembling a fragmented
|
| 3999 | user message from its peer when it runs out of receive buffer space.
|
| 4000 | It may drop these DATA chunks even though it has acknowledged them in
|
| 4001 | Gap Ack Blocks. If a data receiver drops DATA chunks, it MUST NOT
|
| 4002 | include them in Gap Ack Blocks in subsequent SACKs until they are
|
| 4003 | received again via retransmission. In addition, the endpoint should
|
| 4004 | take into account the dropped data when calculating its a_rwnd.
|
| 4005 |
|
| 4006 | An endpoint SHOULD NOT revoke a SACK and discard data. Only in
|
| 4007 | extreme circumstance should an endpoint use this procedure (such as
|
| 4008 | out of buffer space). The data receiver should take into account
|
| 4009 | that dropping data that has been acked in Gap Ack Blocks can result
|
| 4010 | in suboptimal retransmission strategies in the data sender and thus
|
| 4011 | in suboptimal performance.
|
| 4012 |
|
| 4013 | The following example illustrates the use of delayed
|
| 4014 | acknowledgements:
|
| 4015 |
|
| 4016 |
|
| 4017 |
|
| 4018 |
|
| 4019 |
|
| 4020 |
|
| 4021 |
|
| 4022 |
|
| 4023 |
|
| 4024 |
|
| 4025 |
|
| 4026 |
|
| 4027 |
|
| 4028 |
|
| 4029 |
|
| 4030 |
|
| 4031 |
|
| 4032 |
|
| 4033 |
|
| 4034 | Stewart, et al. Standards Track [Page 72]
|
| 4035 |
|
| 4036 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4037 |
|
| 4038 |
|
| 4039 | Endpoint A Endpoint Z
|
| 4040 |
|
| 4041 | {App sends 3 messages; strm 0}
|
| 4042 | DATA [TSN=7,Strm=0,Seq=3] ------------> (ack delayed)
|
| 4043 | (Start T3-rtx timer)
|
| 4044 |
|
| 4045 | DATA [TSN=8,Strm=0,Seq=4] ------------> (send ack)
|
| 4046 | /------- SACK [TSN Ack=8,block=0]
|
| 4047 | (cancel T3-rtx timer) <-----/
|
| 4048 |
|
| 4049 | DATA [TSN=9,Strm=0,Seq=5] ------------> (ack delayed)
|
| 4050 | (Start T3-rtx timer)
|
| 4051 | ...
|
| 4052 | {App sends 1 message; strm 1}
|
| 4053 | (bundle SACK with DATA)
|
| 4054 | /----- SACK [TSN Ack=9,block=0] \
|
| 4055 | / DATA [TSN=6,Strm=1,Seq=2]
|
| 4056 | (cancel T3-rtx timer) <------/ (Start T3-rtx timer)
|
| 4057 |
|
| 4058 | (ack delayed)
|
| 4059 | (send ack)
|
| 4060 | SACK [TSN Ack=6,block=0] -------------> (cancel T3-rtx timer)
|
| 4061 |
|
| 4062 | Figure 7: Delayed Acknowledgment Example
|
| 4063 |
|
| 4064 | If an endpoint receives a DATA chunk with no user data (i.e., the
|
| 4065 | Length field is set to 16) it MUST send an ABORT with error cause set
|
| 4066 | to "No User Data".
|
| 4067 |
|
| 4068 | An endpoint SHOULD NOT send a DATA chunk with no user data part.
|
| 4069 |
|
| 4070 | 6.2.1 Processing a Received SACK
|
| 4071 |
|
| 4072 | Each SACK an endpoint receives contains an a_rwnd value. This value
|
| 4073 | represents the amount of buffer space the data receiver, at the time
|
| 4074 | of transmitting the SACK, has left of its total receive buffer space
|
| 4075 | (as specified in the INIT/INIT ACK). Using a_rwnd, Cumulative TSN
|
| 4076 | Ack and Gap Ack Blocks, the data sender can develop a representation
|
| 4077 | of the peer's receive buffer space.
|
| 4078 |
|
| 4079 | One of the problems the data sender must take into account when
|
| 4080 | processing a SACK is that a SACK can be received out of order. That
|
| 4081 | is, a SACK sent by the data receiver can pass an earlier SACK and be
|
| 4082 | received first by the data sender. If a SACK is received out of
|
| 4083 | order, the data sender can develop an incorrect view of the peer's
|
| 4084 | receive buffer space.
|
| 4085 |
|
| 4086 |
|
| 4087 |
|
| 4088 |
|
| 4089 |
|
| 4090 | Stewart, et al. Standards Track [Page 73]
|
| 4091 |
|
| 4092 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4093 |
|
| 4094 |
|
| 4095 | Since there is no explicit identifier that can be used to detect
|
| 4096 | out-of-order SACKs, the data sender must use heuristics to determine
|
| 4097 | if a SACK is new.
|
| 4098 |
|
| 4099 | An endpoint SHOULD use the following rules to calculate the rwnd,
|
| 4100 | using the a_rwnd value, the Cumulative TSN Ack and Gap Ack Blocks in
|
| 4101 | a received SACK.
|
| 4102 |
|
| 4103 | A) At the establishment of the association, the endpoint initializes
|
| 4104 | the rwnd to the Advertised Receiver Window Credit (a_rwnd) the
|
| 4105 | peer specified in the INIT or INIT ACK.
|
| 4106 |
|
| 4107 | B) Any time a DATA chunk is transmitted (or retransmitted) to a peer,
|
| 4108 | the endpoint subtracts the data size of the chunk from the rwnd of
|
| 4109 | that peer.
|
| 4110 |
|
| 4111 | C) Any time a DATA chunk is marked for retransmission (via either
|
| 4112 | T3-rtx timer expiration (Section 6.3.3)or via fast retransmit
|
| 4113 | (Section 7.2.4)), add the data size of those chunks to the rwnd.
|
| 4114 |
|
| 4115 | Note: If the implementation is maintaining a timer on each DATA
|
| 4116 | chunk then only DATA chunks whose timer expired would be marked
|
| 4117 | for retransmission.
|
| 4118 |
|
| 4119 | D) Any time a SACK arrives, the endpoint performs the following:
|
| 4120 |
|
| 4121 | i) If Cumulative TSN Ack is less than the Cumulative TSN Ack
|
| 4122 | Point, then drop the SACK. Since Cumulative TSN Ack is
|
| 4123 | monotonically increasing, a SACK whose Cumulative TSN Ack is
|
| 4124 | less than the Cumulative TSN Ack Point indicates an out-of-
|
| 4125 | order SACK.
|
| 4126 |
|
| 4127 | ii) Set rwnd equal to the newly received a_rwnd minus the
|
| 4128 | number of bytes still outstanding after processing the
|
| 4129 | Cumulative TSN Ack and the Gap Ack Blocks.
|
| 4130 |
|
| 4131 | iii) If the SACK is missing a TSN that was previously
|
| 4132 | acknowledged via a Gap Ack Block (e.g., the data receiver
|
| 4133 | reneged on the data), then mark the corresponding DATA chunk as
|
| 4134 | available for retransmit: Mark it as missing for fast
|
| 4135 | retransmit as described in Section 7.2.4 and if no retransmit
|
| 4136 | timer is running for the destination address to which the DATA
|
| 4137 | chunk was originally transmitted, then T3-rtx is started for
|
| 4138 | that destination address.
|
| 4139 |
|
| 4140 |
|
| 4141 |
|
| 4142 |
|
| 4143 |
|
| 4144 |
|
| 4145 |
|
| 4146 | Stewart, et al. Standards Track [Page 74]
|
| 4147 |
|
| 4148 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4149 |
|
| 4150 |
|
| 4151 | 6.3 Management of Retransmission Timer
|
| 4152 |
|
| 4153 | An SCTP endpoint uses a retransmission timer T3-rtx to ensure data
|
| 4154 | delivery in the absence of any feedback from its peer. The duration
|
| 4155 | of this timer is referred to as RTO (retransmission timeout).
|
| 4156 |
|
| 4157 | When an endpoint's peer is multi-homed, the endpoint will calculate a
|
| 4158 | separate RTO for each different destination transport address of its
|
| 4159 | peer endpoint.
|
| 4160 |
|
| 4161 | The computation and management of RTO in SCTP follows closely how TCP
|
| 4162 | manages its retransmission timer. To compute the current RTO, an
|
| 4163 | endpoint maintains two state variables per destination transport
|
| 4164 | address: SRTT (smoothed round-trip time) and RTTVAR (round-trip time
|
| 4165 | variation).
|
| 4166 |
|
| 4167 | 6.3.1 RTO Calculation
|
| 4168 |
|
| 4169 | The rules governing the computation of SRTT, RTTVAR, and RTO are as
|
| 4170 | follows:
|
| 4171 |
|
| 4172 | C1) Until an RTT measurement has been made for a packet sent to the
|
| 4173 | given destination transport address, set RTO to the protocol
|
| 4174 | parameter 'RTO.Initial'.
|
| 4175 |
|
| 4176 | C2) When the first RTT measurement R is made, set SRTT <- R, RTTVAR
|
| 4177 | <- R/2, and RTO <- SRTT + 4 * RTTVAR.
|
| 4178 |
|
| 4179 | C3) When a new RTT measurement R' is made, set
|
| 4180 |
|
| 4181 | RTTVAR <- (1 - RTO.Beta) * RTTVAR + RTO.Beta * |SRTT - R'| SRTT
|
| 4182 | <- (1 - RTO.Alpha) * SRTT + RTO.Alpha * R'
|
| 4183 |
|
| 4184 | Note: The value of SRTT used in the update to RTTVAR is its value
|
| 4185 | before updating SRTT itself using the second assignment.
|
| 4186 |
|
| 4187 | After the computation, update RTO <- SRTT + 4 * RTTVAR.
|
| 4188 |
|
| 4189 | C4) When data is in flight and when allowed by rule C5 below, a new
|
| 4190 | RTT measurement MUST be made each round trip. Furthermore, new
|
| 4191 | RTT measurements SHOULD be made no more than once per round-trip
|
| 4192 | for a given destination transport address. There are two reasons
|
| 4193 | for this recommendation: First, it appears that measuring more
|
| 4194 | frequently often does not in practice yield any significant
|
| 4195 | benefit [ALLMAN99]; second, if measurements are made more often,
|
| 4196 | then the values of RTO.Alpha and RTO.Beta in rule C3 above should
|
| 4197 | be adjusted so that SRTT and RTTVAR still adjust to changes at
|
| 4198 | roughly the same rate (in terms of how many round trips it takes
|
| 4199 |
|
| 4200 |
|
| 4201 |
|
| 4202 | Stewart, et al. Standards Track [Page 75]
|
| 4203 |
|
| 4204 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4205 |
|
| 4206 |
|
| 4207 | them to reflect new values) as they would if making only one
|
| 4208 | measurement per round-trip and using RTO.Alpha and RTO.Beta as
|
| 4209 | given in rule C3. However, the exact nature of these adjustments
|
| 4210 | remains a research issue.
|
| 4211 |
|
| 4212 | C5) Karn's algorithm: RTT measurements MUST NOT be made using packets
|
| 4213 | that were retransmitted (and thus for which it is ambiguous
|
| 4214 | whether the reply was for the first instance of the packet or a
|
| 4215 | later instance).
|
| 4216 |
|
| 4217 | C6) Whenever RTO is computed, if it is less than RTO.Min seconds then
|
| 4218 | it is rounded up to RTO.Min seconds. The reason for this rule is
|
| 4219 | that RTOs that do not have a high minimum value are susceptible
|
| 4220 | to unnecessary timeouts [ALLMAN99].
|
| 4221 |
|
| 4222 | C7) A maximum value may be placed on RTO provided it is at least
|
| 4223 | RTO.max seconds.
|
| 4224 |
|
| 4225 | There is no requirement for the clock granularity G used for
|
| 4226 | computing RTT measurements and the different state variables, other
|
| 4227 | than:
|
| 4228 |
|
| 4229 | G1) Whenever RTTVAR is computed, if RTTVAR = 0, then adjust RTTVAR <-
|
| 4230 | G.
|
| 4231 |
|
| 4232 | Experience [ALLMAN99] has shown that finer clock granularities (<=
|
| 4233 | 100 msec) perform somewhat better than more coarse granularities.
|
| 4234 |
|
| 4235 | 6.3.2 Retransmission Timer Rules
|
| 4236 |
|
| 4237 | The rules for managing the retransmission timer are as follows:
|
| 4238 |
|
| 4239 | R1) Every time a DATA chunk is sent to any address (including a
|
| 4240 | retransmission), if the T3-rtx timer of that address is not
|
| 4241 | running, start it running so that it will expire after the RTO of
|
| 4242 | that address. The RTO used here is that obtained after any
|
| 4243 | doubling due to previous T3-rtx timer expirations on the
|
| 4244 | corresponding destination address as discussed in rule E2 below.
|
| 4245 |
|
| 4246 | R2) Whenever all outstanding data sent to an address have been
|
| 4247 | acknowledged, turn off the T3-rtx timer of that address.
|
| 4248 |
|
| 4249 | R3) Whenever a SACK is received that acknowledges the DATA chunk with
|
| 4250 | the earliest outstanding TSN for that address, restart T3-rtx
|
| 4251 | timer for that address with its current RTO (if there is still
|
| 4252 | outstanding data on that address).
|
| 4253 |
|
| 4254 |
|
| 4255 |
|
| 4256 |
|
| 4257 |
|
| 4258 | Stewart, et al. Standards Track [Page 76]
|
| 4259 |
|
| 4260 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4261 |
|
| 4262 |
|
| 4263 | R4) Whenever a SACK is received missing a TSN that was previously
|
| 4264 | acknowledged via a Gap Ack Block, start T3-rtx for the
|
| 4265 | destination address to which the DATA chunk was originally
|
| 4266 | transmitted if it is not already running.
|
| 4267 |
|
| 4268 | The following example shows the use of various timer rules (assuming
|
| 4269 | the receiver uses delayed acks).
|
| 4270 |
|
| 4271 | Endpoint A Endpoint Z
|
| 4272 | {App begins to send}
|
| 4273 | Data [TSN=7,Strm=0,Seq=3] ------------> (ack delayed)
|
| 4274 | (Start T3-rtx timer)
|
| 4275 | {App sends 1 message; strm 1}
|
| 4276 | (bundle ack with data)
|
| 4277 | DATA [TSN=8,Strm=0,Seq=4] ----\ /-- SACK [TSN Ack=7,Block=0]
|
| 4278 | \ / DATA [TSN=6,Strm=1,Seq=2]
|
| 4279 | \ / (Start T3-rtx timer)
|
| 4280 | \
|
| 4281 | / \
|
| 4282 | (Re-start T3-rtx timer) <------/ \--> (ack delayed)
|
| 4283 | (ack delayed)
|
| 4284 | {send ack}
|
| 4285 | SACK [TSN Ack=6,Block=0] --------------> (Cancel T3-rtx timer)
|
| 4286 | ..
|
| 4287 | (send ack)
|
| 4288 | (Cancel T3-rtx timer) <-------------- SACK [TSN Ack=8,Block=0]
|
| 4289 |
|
| 4290 | Figure 8 - Timer Rule Examples
|
| 4291 |
|
| 4292 | 6.3.3 Handle T3-rtx Expiration
|
| 4293 |
|
| 4294 | Whenever the retransmission timer T3-rtx expires for a destination
|
| 4295 | address, do the following:
|
| 4296 |
|
| 4297 | E1) For the destination address for which the timer expires, adjust
|
| 4298 | its ssthresh with rules defined in Section 7.2.3 and set the cwnd
|
| 4299 | <- MTU.
|
| 4300 |
|
| 4301 | E2) For the destination address for which the timer expires, set RTO
|
| 4302 | <- RTO * 2 ("back off the timer"). The maximum value discussed
|
| 4303 | in rule C7 above (RTO.max) may be used to provide an upper bound
|
| 4304 | to this doubling operation.
|
| 4305 |
|
| 4306 | E3) Determine how many of the earliest (i.e., lowest TSN) outstanding
|
| 4307 | DATA chunks for the address for which the T3-rtx has expired will
|
| 4308 | fit into a single packet, subject to the MTU constraint for the
|
| 4309 | path corresponding to the destination transport address to which
|
| 4310 | the retransmission is being sent (this may be different from the
|
| 4311 |
|
| 4312 |
|
| 4313 |
|
| 4314 | Stewart, et al. Standards Track [Page 77]
|
| 4315 |
|
| 4316 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4317 |
|
| 4318 |
|
| 4319 | address for which the timer expires [see Section 6.4]). Call
|
| 4320 | this value K. Bundle and retransmit those K DATA chunks in a
|
| 4321 | single packet to the destination endpoint.
|
| 4322 |
|
| 4323 | E4) Start the retransmission timer T3-rtx on the destination address
|
| 4324 | to which the retransmission is sent, if rule R1 above indicates
|
| 4325 | to do so. The RTO to be used for starting T3-rtx should be the
|
| 4326 | one for the destination address to which the retransmission is
|
| 4327 | sent, which, when the receiver is multi-homed, may be different
|
| 4328 | from the destination address for which the timer expired (see
|
| 4329 | Section 6.4 below).
|
| 4330 |
|
| 4331 | After retransmitting, once a new RTT measurement is obtained (which
|
| 4332 | can happen only when new data has been sent and acknowledged, per
|
| 4333 | rule C5, or for a measurement made from a HEARTBEAT [see Section
|
| 4334 | 8.3]), the computation in rule C3 is performed, including the
|
| 4335 | computation of RTO, which may result in "collapsing" RTO back down
|
| 4336 | after it has been subject to doubling (rule E2).
|
| 4337 |
|
| 4338 | Note: Any DATA chunks that were sent to the address for which the
|
| 4339 | T3-rtx timer expired but did not fit in one MTU (rule E3 above),
|
| 4340 | should be marked for retransmission and sent as soon as cwnd allows
|
| 4341 | (normally when a SACK arrives).
|
| 4342 |
|
| 4343 | The final rule for managing the retransmission timer concerns
|
| 4344 | failover (see Section 6.4.1):
|
| 4345 |
|
| 4346 | F1) Whenever an endpoint switches from the current destination
|
| 4347 | transport address to a different one, the current retransmission
|
| 4348 | timers are left running. As soon as the endpoint transmits a
|
| 4349 | packet containing DATA chunk(s) to the new transport address,
|
| 4350 | start the timer on that transport address, using the RTO value of
|
| 4351 | the destination address to which the data is being sent, if rule
|
| 4352 | R1 indicates to do so.
|
| 4353 |
|
| 4354 | 6.4 Multi-homed SCTP Endpoints
|
| 4355 |
|
| 4356 | An SCTP endpoint is considered multi-homed if there are more than one
|
| 4357 | transport address that can be used as a destination address to reach
|
| 4358 | that endpoint.
|
| 4359 |
|
| 4360 | Moreover, the ULP of an endpoint shall select one of the multiple
|
| 4361 | destination addresses of a multi-homed peer endpoint as the primary
|
| 4362 | path (see Sections 5.1.2 and 10.1 for details).
|
| 4363 |
|
| 4364 | By default, an endpoint SHOULD always transmit to the primary path,
|
| 4365 | unless the SCTP user explicitly specifies the destination transport
|
| 4366 | address (and possibly source transport address) to use.
|
| 4367 |
|
| 4368 |
|
| 4369 |
|
| 4370 | Stewart, et al. Standards Track [Page 78]
|
| 4371 |
|
| 4372 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4373 |
|
| 4374 |
|
| 4375 | An endpoint SHOULD transmit reply chunks (e.g., SACK, HEARTBEAT ACK,
|
| 4376 | etc.) to the same destination transport address from which it
|
| 4377 | received the DATA or control chunk to which it is replying. This
|
| 4378 | rule should also be followed if the endpoint is bundling DATA chunks
|
| 4379 | together with the reply chunk.
|
| 4380 |
|
| 4381 | However, when acknowledging multiple DATA chunks received in packets
|
| 4382 | from different source addresses in a single SACK, the SACK chunk may
|
| 4383 | be transmitted to one of the destination transport addresses from
|
| 4384 | which the DATA or control chunks being acknowledged were received.
|
| 4385 |
|
| 4386 | When a receiver of a duplicate DATA chunk sends a SACK to a multi-
|
| 4387 | homed endpoint it MAY be beneficial to vary the destination address
|
| 4388 | and not use the source address of the DATA chunk. The reason being
|
| 4389 | that receiving a duplicate from a multi-homed endpoint might indicate
|
| 4390 | that the return path (as specified in the source address of the DATA
|
| 4391 | chunk) for the SACK is broken.
|
| 4392 |
|
| 4393 | Furthermore, when its peer is multi-homed, an endpoint SHOULD try to
|
| 4394 | retransmit a chunk to an active destination transport address that is
|
| 4395 | different from the last destination address to which the DATA chunk
|
| 4396 | was sent.
|
| 4397 |
|
| 4398 | Retransmissions do not affect the total outstanding data count.
|
| 4399 | However, if the DATA chunk is retransmitted onto a different
|
| 4400 | destination address, both the outstanding data counts on the new
|
| 4401 | destination address and the old destination address to which the data
|
| 4402 | chunk was last sent shall be adjusted accordingly.
|
| 4403 |
|
| 4404 | 6.4.1 Failover from Inactive Destination Address
|
| 4405 |
|
| 4406 | Some of the transport addresses of a multi-homed SCTP endpoint may
|
| 4407 | become inactive due to either the occurrence of certain error
|
| 4408 | conditions (see Section 8.2) or adjustments from SCTP user.
|
| 4409 |
|
| 4410 | When there is outbound data to send and the primary path becomes
|
| 4411 | inactive (e.g., due to failures), or where the SCTP user explicitly
|
| 4412 | requests to send data to an inactive destination transport address,
|
| 4413 | before reporting an error to its ULP, the SCTP endpoint should try to
|
| 4414 | send the data to an alternate active destination transport address if
|
| 4415 | one exists.
|
| 4416 |
|
| 4417 | When retransmitting data, if the endpoint is multi-homed, it should
|
| 4418 | consider each source-destination address pair in its retransmission
|
| 4419 | selection policy. When retransmitting the endpoint should attempt to
|
| 4420 | pick the most divergent source-destination pair from the original
|
| 4421 | source-destination pair to which the packet was transmitted.
|
| 4422 |
|
| 4423 |
|
| 4424 |
|
| 4425 |
|
| 4426 | Stewart, et al. Standards Track [Page 79]
|
| 4427 |
|
| 4428 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4429 |
|
| 4430 |
|
| 4431 | Note: Rules for picking the most divergent source-destination pair
|
| 4432 | are an implementation decision and is not specified within this
|
| 4433 | document.
|
| 4434 |
|
| 4435 | 6.5 Stream Identifier and Stream Sequence Number
|
| 4436 |
|
| 4437 | Every DATA chunk MUST carry a valid stream identifier. If an
|
| 4438 | endpoint receives a DATA chunk with an invalid stream identifier, it
|
| 4439 | shall acknowledge the reception of the DATA chunk following the
|
| 4440 | normal procedure, immediately send an ERROR chunk with cause set to
|
| 4441 | "Invalid Stream Identifier" (see Section 3.3.10) and discard the DATA
|
| 4442 | chunk. The endpoint may bundle the ERROR chunk in the same packet as
|
| 4443 | the SACK as long as the ERROR follows the SACK.
|
| 4444 |
|
| 4445 | The stream sequence number in all the streams shall start from 0 when
|
| 4446 | the association is established. Also, when the stream sequence
|
| 4447 | number reaches the value 65535 the next stream sequence number shall
|
| 4448 | be set to 0.
|
| 4449 |
|
| 4450 | 6.6 Ordered and Unordered Delivery
|
| 4451 |
|
| 4452 | Within a stream, an endpoint MUST deliver DATA chunks received with
|
| 4453 | the U flag set to 0 to the upper layer according to the order of
|
| 4454 | their stream sequence number. If DATA chunks arrive out of order of
|
| 4455 | their stream sequence number, the endpoint MUST hold the received
|
| 4456 | DATA chunks from delivery to the ULP until they are re-ordered.
|
| 4457 |
|
| 4458 | However, an SCTP endpoint can indicate that no ordered delivery is
|
| 4459 | required for a particular DATA chunk transmitted within the stream by
|
| 4460 | setting the U flag of the DATA chunk to 1.
|
| 4461 |
|
| 4462 | When an endpoint receives a DATA chunk with the U flag set to 1, it
|
| 4463 | must bypass the ordering mechanism and immediately deliver the data
|
| 4464 | to the upper layer (after re-assembly if the user data is fragmented
|
| 4465 | by the data sender).
|
| 4466 |
|
| 4467 | This provides an effective way of transmitting "out-of-band" data in
|
| 4468 | a given stream. Also, a stream can be used as an "unordered" stream
|
| 4469 | by simply setting the U flag to 1 in all DATA chunks sent through
|
| 4470 | that stream.
|
| 4471 |
|
| 4472 | IMPLEMENTATION NOTE: When sending an unordered DATA chunk, an
|
| 4473 | implementation may choose to place the DATA chunk in an outbound
|
| 4474 | packet that is at the head of the outbound transmission queue if
|
| 4475 | possible.
|
| 4476 |
|
| 4477 |
|
| 4478 |
|
| 4479 |
|
| 4480 |
|
| 4481 |
|
| 4482 | Stewart, et al. Standards Track [Page 80]
|
| 4483 |
|
| 4484 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4485 |
|
| 4486 |
|
| 4487 | The 'Stream Sequence Number' field in a DATA chunk with U flag set to
|
| 4488 | 1 has no significance. The sender can fill it with arbitrary value,
|
| 4489 | but the receiver MUST ignore the field.
|
| 4490 |
|
| 4491 | Note: When transmitting ordered and unordered data, an endpoint does
|
| 4492 | not increment its Stream Sequence Number when transmitting a DATA
|
| 4493 | chunk with U flag set to 1.
|
| 4494 |
|
| 4495 | 6.7 Report Gaps in Received DATA TSNs
|
| 4496 |
|
| 4497 | Upon the reception of a new DATA chunk, an endpoint shall examine the
|
| 4498 | continuity of the TSNs received. If the endpoint detects a gap in
|
| 4499 | the received DATA chunk sequence, it SHOULD send a SACK with Gap Ack
|
| 4500 | Blocks immediately. The data receiver continues sending a SACK after
|
| 4501 | receipt of each SCTP packet that doesn't fill the gap.
|
| 4502 |
|
| 4503 | Based on the Gap Ack Block from the received SACK, the endpoint can
|
| 4504 | calculate the missing DATA chunks and make decisions on whether to
|
| 4505 | retransmit them (see Section 6.2.1 for details).
|
| 4506 |
|
| 4507 | Multiple gaps can be reported in one single SACK (see Section 3.3.4).
|
| 4508 |
|
| 4509 | When its peer is multi-homed, the SCTP endpoint SHOULD always try to
|
| 4510 | send the SACK to the same destination address from which the last
|
| 4511 | DATA chunk was received.
|
| 4512 |
|
| 4513 | Upon the reception of a SACK, the endpoint MUST remove all DATA
|
| 4514 | chunks which have been acknowledged by the SACK's Cumulative TSN Ack
|
| 4515 | from its transmit queue. The endpoint MUST also treat all the DATA
|
| 4516 | chunks with TSNs not included in the Gap Ack Blocks reported by the
|
| 4517 | SACK as "missing". The number of "missing" reports for each
|
| 4518 | outstanding DATA chunk MUST be recorded by the data sender in order
|
| 4519 | to make retransmission decisions. See Section 7.2.4 for details.
|
| 4520 |
|
| 4521 | The following example shows the use of SACK to report a gap.
|
| 4522 |
|
| 4523 |
|
| 4524 |
|
| 4525 |
|
| 4526 |
|
| 4527 |
|
| 4528 |
|
| 4529 |
|
| 4530 |
|
| 4531 |
|
| 4532 |
|
| 4533 |
|
| 4534 |
|
| 4535 |
|
| 4536 |
|
| 4537 |
|
| 4538 | Stewart, et al. Standards Track [Page 81]
|
| 4539 |
|
| 4540 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4541 |
|
| 4542 |
|
| 4543 | Endpoint A Endpoint Z
|
| 4544 | {App sends 3 messages; strm 0}
|
| 4545 | DATA [TSN=6,Strm=0,Seq=2] ---------------> (ack delayed)
|
| 4546 | (Start T3-rtx timer)
|
| 4547 |
|
| 4548 | DATA [TSN=7,Strm=0,Seq=3] --------> X (lost)
|
| 4549 |
|
| 4550 | DATA [TSN=8,Strm=0,Seq=4] ---------------> (gap detected,
|
| 4551 | immediately send ack)
|
| 4552 | /----- SACK [TSN Ack=6,Block=1,
|
| 4553 | / Strt=2,End=2]
|
| 4554 | <-----/
|
| 4555 | (remove 6 from out-queue,
|
| 4556 | and mark 7 as "1" missing report)
|
| 4557 |
|
| 4558 | Figure 9 - Reporting a Gap using SACK
|
| 4559 |
|
| 4560 | The maximum number of Gap Ack Blocks that can be reported within a
|
| 4561 | single SACK chunk is limited by the current path MTU. When a single
|
| 4562 | SACK can not cover all the Gap Ack Blocks needed to be reported due
|
| 4563 | to the MTU limitation, the endpoint MUST send only one SACK,
|
| 4564 | reporting the Gap Ack Blocks from the lowest to highest TSNs, within
|
| 4565 | the size limit set by the MTU, and leave the remaining highest TSN
|
| 4566 | numbers unacknowledged.
|
| 4567 |
|
| 4568 | 6.8 Adler-32 Checksum Calculation
|
| 4569 |
|
| 4570 | When sending an SCTP packet, the endpoint MUST strengthen the data
|
| 4571 | integrity of the transmission by including the Adler-32 checksum
|
| 4572 | value calculated on the packet, as described below.
|
| 4573 |
|
| 4574 | After the packet is constructed (containing the SCTP common header
|
| 4575 | and one or more control or DATA chunks), the transmitter shall:
|
| 4576 |
|
| 4577 | 1) Fill in the proper Verification Tag in the SCTP common header and
|
| 4578 | initialize the checksum field to 0's.
|
| 4579 |
|
| 4580 | 2) Calculate the Adler-32 checksum of the whole packet, including the
|
| 4581 | SCTP common header and all the chunks. Refer to appendix B for
|
| 4582 | details of the Adler-32 algorithm. And,
|
| 4583 |
|
| 4584 | 3) Put the resultant value into the checksum field in the common
|
| 4585 | header, and leave the rest of the bits unchanged.
|
| 4586 |
|
| 4587 | When an SCTP packet is received, the receiver MUST first check the
|
| 4588 | Adler-32 checksum:
|
| 4589 |
|
| 4590 | 1) Store the received Adler-32 checksum value aside,
|
| 4591 |
|
| 4592 |
|
| 4593 |
|
| 4594 | Stewart, et al. Standards Track [Page 82]
|
| 4595 |
|
| 4596 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4597 |
|
| 4598 |
|
| 4599 | 2) Replace the 32 bits of the checksum field in the received SCTP
|
| 4600 | packet with all '0's and calculate an Adler-32 checksum value of
|
| 4601 | the whole received packet. And,
|
| 4602 |
|
| 4603 | 3) Verify that the calculated Adler-32 checksum is the same as the
|
| 4604 | received Adler-32 checksum. If not, the receiver MUST treat the
|
| 4605 | packet as an invalid SCTP packet.
|
| 4606 |
|
| 4607 | The default procedure for handling invalid SCTP packets is to
|
| 4608 | silently discard them.
|
| 4609 |
|
| 4610 | 6.9 Fragmentation and Reassembly
|
| 4611 |
|
| 4612 | An endpoint MAY support fragmentation when sending DATA chunks, but
|
| 4613 | MUST support reassembly when receiving DATA chunks. If an endpoint
|
| 4614 | supports fragmentation, it MUST fragment a user message if the size
|
| 4615 | of the user message to be sent causes the outbound SCTP packet size
|
| 4616 | to exceed the current MTU. If an implementation does not support
|
| 4617 | fragmentation of outbound user messages, the endpoint must return an
|
| 4618 | error to its upper layer and not attempt to send the user message.
|
| 4619 |
|
| 4620 | IMPLEMENTATION NOTE: In this error case, the Send primitive
|
| 4621 | discussed in Section 10.1 would need to return an error to the upper
|
| 4622 | layer.
|
| 4623 |
|
| 4624 | If its peer is multi-homed, the endpoint shall choose a size no
|
| 4625 | larger than the association Path MTU. The association Path MTU is
|
| 4626 | the smallest Path MTU of all destination addresses.
|
| 4627 |
|
| 4628 | Note: Once a message is fragmented it cannot be re-fragmented.
|
| 4629 | Instead if the PMTU has been reduced, then IP fragmentation must be
|
| 4630 | used. Please see Section 7.3 for details of PMTU discovery.
|
| 4631 |
|
| 4632 | When determining when to fragment, the SCTP implementation MUST take
|
| 4633 | into account the SCTP packet header as well as the DATA chunk
|
| 4634 | header(s). The implementation MUST also take into account the space
|
| 4635 | required for a SACK chunk if bundling a SACK chunk with the DATA
|
| 4636 | chunk.
|
| 4637 |
|
| 4638 | Fragmentation takes the following steps:
|
| 4639 |
|
| 4640 | 1) The data sender MUST break the user message into a series of DATA
|
| 4641 | chunks such that each chunk plus SCTP overhead fits into an IP
|
| 4642 | datagram smaller than or equal to the association Path MTU.
|
| 4643 |
|
| 4644 | 2) The transmitter MUST then assign, in sequence, a separate TSN to
|
| 4645 | each of the DATA chunks in the series. The transmitter assigns
|
| 4646 | the same SSN to each of the DATA chunks. If the user indicates
|
| 4647 |
|
| 4648 |
|
| 4649 |
|
| 4650 | Stewart, et al. Standards Track [Page 83]
|
| 4651 |
|
| 4652 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4653 |
|
| 4654 |
|
| 4655 | that the user message is to be delivered using unordered delivery,
|
| 4656 | then the U flag of each DATA chunk of the user message MUST be set
|
| 4657 | to 1.
|
| 4658 |
|
| 4659 | 3) The transmitter MUST also set the B/E bits of the first DATA chunk
|
| 4660 | in the series to '10', the B/E bits of the last DATA chunk in the
|
| 4661 | series to '01', and the B/E bits of all other DATA chunks in the
|
| 4662 | series to '00'.
|
| 4663 |
|
| 4664 | An endpoint MUST recognize fragmented DATA chunks by examining the
|
| 4665 | B/E bits in each of the received DATA chunks, and queue the
|
| 4666 | fragmented DATA chunks for re-assembly. Once the user message is
|
| 4667 | reassembled, SCTP shall pass the re-assembled user message to the
|
| 4668 | specific stream for possible re-ordering and final dispatching.
|
| 4669 |
|
| 4670 | Note: If the data receiver runs out of buffer space while still
|
| 4671 | waiting for more fragments to complete the re-assembly of the
|
| 4672 | message, it should dispatch part of its inbound message through a
|
| 4673 | partial delivery API (see Section 10), freeing some of its receive
|
| 4674 | buffer space so that the rest of the message may be received.
|
| 4675 |
|
| 4676 | 6.10 Bundling
|
| 4677 |
|
| 4678 | An endpoint bundles chunks by simply including multiple chunks in one
|
| 4679 | outbound SCTP packet. The total size of the resultant IP datagram,
|
| 4680 | including the SCTP packet and IP headers, MUST be less or equal to
|
| 4681 | the current Path MTU.
|
| 4682 |
|
| 4683 | If its peer endpoint is multi-homed, the sending endpoint shall
|
| 4684 | choose a size no larger than the latest MTU of the current primary
|
| 4685 | path.
|
| 4686 |
|
| 4687 | When bundling control chunks with DATA chunks, an endpoint MUST place
|
| 4688 | control chunks first in the outbound SCTP packet. The transmitter
|
| 4689 | MUST transmit DATA chunks within a SCTP packet in increasing order of
|
| 4690 | TSN.
|
| 4691 |
|
| 4692 | Note: Since control chunks must be placed first in a packet and
|
| 4693 | since DATA chunks must be transmitted before SHUTDOWN or SHUTDOWN ACK
|
| 4694 | chunks, DATA chunks cannot be bundled with SHUTDOWN or SHUTDOWN ACK
|
| 4695 | chunks.
|
| 4696 |
|
| 4697 | Partial chunks MUST NOT be placed in an SCTP packet.
|
| 4698 |
|
| 4699 |
|
| 4700 |
|
| 4701 |
|
| 4702 |
|
| 4703 |
|
| 4704 |
|
| 4705 |
|
| 4706 | Stewart, et al. Standards Track [Page 84]
|
| 4707 |
|
| 4708 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4709 |
|
| 4710 |
|
| 4711 | An endpoint MUST process received chunks in their order in the
|
| 4712 | packet. The receiver uses the chunk length field to determine the end
|
| 4713 | of a chunk and beginning of the next chunk taking account of the fact
|
| 4714 | that all chunks end on a 4 byte boundary. If the receiver detects a
|
| 4715 | partial chunk, it MUST drop the chunk.
|
| 4716 |
|
| 4717 | An endpoint MUST NOT bundle INIT, INIT ACK or SHUTDOWN COMPLETE with
|
| 4718 | any other chunks.
|
| 4719 |
|
| 4720 | 7. Congestion control
|
| 4721 |
|
| 4722 | Congestion control is one of the basic functions in SCTP. For some
|
| 4723 | applications, it may be likely that adequate resources will be
|
| 4724 | allocated to SCTP traffic to assure prompt delivery of time-critical
|
| 4725 | data - thus it would appear to be unlikely, during normal operations,
|
| 4726 | that transmissions encounter severe congestion conditions. However
|
| 4727 | SCTP must operate under adverse operational conditions, which can
|
| 4728 | develop upon partial network failures or unexpected traffic surges.
|
| 4729 | In such situations SCTP must follow correct congestion control steps
|
| 4730 | to recover from congestion quickly in order to get data delivered as
|
| 4731 | soon as possible. In the absence of network congestion, these
|
| 4732 | preventive congestion control algorithms should show no impact on the
|
| 4733 | protocol performance.
|
| 4734 |
|
| 4735 | IMPLEMENTATION NOTE: As far as its specific performance requirements
|
| 4736 | are met, an implementation is always allowed to adopt a more
|
| 4737 | conservative congestion control algorithm than the one defined below.
|
| 4738 |
|
| 4739 | The congestion control algorithms used by SCTP are based on
|
| 4740 | [RFC2581]. This section describes how the algorithms defined in
|
| 4741 | RFC2581 are adapted for use in SCTP. We first list differences in
|
| 4742 | protocol designs between TCP and SCTP, and then describe SCTP's
|
| 4743 | congestion control scheme. The description will use the same
|
| 4744 | terminology as in TCP congestion control whenever appropriate.
|
| 4745 |
|
| 4746 | SCTP congestion control is always applied to the entire association,
|
| 4747 | and not to individual streams.
|
| 4748 |
|
| 4749 | 7.1 SCTP Differences from TCP Congestion control
|
| 4750 |
|
| 4751 | Gap Ack Blocks in the SCTP SACK carry the same semantic meaning as
|
| 4752 | the TCP SACK. TCP considers the information carried in the SACK as
|
| 4753 | advisory information only. SCTP considers the information carried in
|
| 4754 | the Gap Ack Blocks in the SACK chunk as advisory. In SCTP, any DATA
|
| 4755 | chunk that has been acknowledged by SACK, including DATA that arrived
|
| 4756 | at the receiving end out of order, are not considered fully delivered
|
| 4757 | until the Cumulative TSN Ack Point passes the TSN of the DATA chunk
|
| 4758 | (i.e., the DATA chunk has been acknowledged by the Cumulative TSN Ack
|
| 4759 |
|
| 4760 |
|
| 4761 |
|
| 4762 | Stewart, et al. Standards Track [Page 85]
|
| 4763 |
|
| 4764 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4765 |
|
| 4766 |
|
| 4767 | field in the SACK). Consequently, the value of cwnd controls the
|
| 4768 | amount of outstanding data, rather than (as in the case of non-SACK
|
| 4769 | TCP) the upper bound between the highest acknowledged sequence number
|
| 4770 | and the latest DATA chunk that can be sent within the congestion
|
| 4771 | window. SCTP SACK leads to different implementations of fast-
|
| 4772 | retransmit and fast-recovery than non-SACK TCP. As an example see
|
| 4773 | [FALL96].
|
| 4774 |
|
| 4775 | The biggest difference between SCTP and TCP, however, is multi-
|
| 4776 | homing. SCTP is designed to establish robust communication
|
| 4777 | associations between two endpoints each of which may be reachable by
|
| 4778 | more than one transport address. Potentially different addresses may
|
| 4779 | lead to different data paths between the two endpoints, thus ideally
|
| 4780 | one may need a separate set of congestion control parameters for each
|
| 4781 | of the paths. The treatment here of congestion control for multi-
|
| 4782 | homed receivers is new with SCTP and may require refinement in the
|
| 4783 | future. The current algorithms make the following assumptions:
|
| 4784 |
|
| 4785 | o The sender usually uses the same destination address until being
|
| 4786 | instructed by the upper layer otherwise; however, SCTP may change
|
| 4787 | to an alternate destination in the event an address is marked
|
| 4788 | inactive (see Section 8.2). Also, SCTP may retransmit to a
|
| 4789 | different transport address than the original transmission.
|
| 4790 |
|
| 4791 | o The sender keeps a separate congestion control parameter set for
|
| 4792 | each of the destination addresses it can send to (not each
|
| 4793 | source-destination pair but for each destination). The parameters
|
| 4794 | should decay if the address is not used for a long enough time
|
| 4795 | period.
|
| 4796 |
|
| 4797 | o For each of the destination addresses, an endpoint does slow-start
|
| 4798 | upon the first transmission to that address.
|
| 4799 |
|
| 4800 | Note: TCP guarantees in-sequence delivery of data to its upper-layer
|
| 4801 | protocol within a single TCP session. This means that when TCP
|
| 4802 | notices a gap in the received sequence number, it waits until the gap
|
| 4803 | is filled before delivering the data that was received with sequence
|
| 4804 | numbers higher than that of the missing data. On the other hand,
|
| 4805 | SCTP can deliver data to its upper-layer protocol even if there is a
|
| 4806 | gap in TSN if the Stream Sequence Numbers are in sequence for a
|
| 4807 | particular stream (i.e., the missing DATA chunks are for a different
|
| 4808 | stream) or if unordered delivery is indicated. Although this does
|
| 4809 | not affect cwnd, it might affect rwnd calculation.
|
| 4810 |
|
| 4811 |
|
| 4812 |
|
| 4813 |
|
| 4814 |
|
| 4815 |
|
| 4816 |
|
| 4817 |
|
| 4818 | Stewart, et al. Standards Track [Page 86]
|
| 4819 |
|
| 4820 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4821 |
|
| 4822 |
|
| 4823 | 7.2 SCTP Slow-Start and Congestion Avoidance
|
| 4824 |
|
| 4825 | The slow start and congestion avoidance algorithms MUST be used by an
|
| 4826 | endpoint to control the amount of data being injected into the
|
| 4827 | network. The congestion control in SCTP is employed in regard to the
|
| 4828 | association, not to an individual stream. In some situations it may
|
| 4829 | be beneficial for an SCTP sender to be more conservative than the
|
| 4830 | algorithms allow; however, an SCTP sender MUST NOT be more aggressive
|
| 4831 | than the following algorithms allow.
|
| 4832 |
|
| 4833 | Like TCP, an SCTP endpoint uses the following three control variables
|
| 4834 | to regulate its transmission rate.
|
| 4835 |
|
| 4836 | o Receiver advertised window size (rwnd, in bytes), which is set by
|
| 4837 | the receiver based on its available buffer space for incoming
|
| 4838 | packets.
|
| 4839 |
|
| 4840 | Note: This variable is kept on the entire association.
|
| 4841 |
|
| 4842 | o Congestion control window (cwnd, in bytes), which is adjusted by
|
| 4843 | the sender based on observed network conditions.
|
| 4844 |
|
| 4845 | Note: This variable is maintained on a per-destination address
|
| 4846 | basis.
|
| 4847 |
|
| 4848 | o Slow-start threshold (ssthresh, in bytes), which is used by the
|
| 4849 | sender to distinguish slow start and congestion avoidance phases.
|
| 4850 |
|
| 4851 | Note: This variable is maintained on a per-destination address
|
| 4852 | basis.
|
| 4853 |
|
| 4854 | SCTP also requires one additional control variable,
|
| 4855 | partial_bytes_acked, which is used during congestion avoidance phase
|
| 4856 | to facilitate cwnd adjustment.
|
| 4857 |
|
| 4858 | Unlike TCP, an SCTP sender MUST keep a set of these control variables
|
| 4859 | cwnd, ssthresh and partial_bytes_acked for EACH destination address
|
| 4860 | of its peer (when its peer is multi-homed). Only one rwnd is kept
|
| 4861 | for the whole association (no matter if the peer is multi-homed or
|
| 4862 | has a single address).
|
| 4863 |
|
| 4864 | 7.2.1 Slow-Start
|
| 4865 |
|
| 4866 | Beginning data transmission into a network with unknown conditions or
|
| 4867 | after a sufficiently long idle period requires SCTP to probe the
|
| 4868 | network to determine the available capacity. The slow start
|
| 4869 | algorithm is used for this purpose at the beginning of a transfer, or
|
| 4870 | after repairing loss detected by the retransmission timer.
|
| 4871 |
|
| 4872 |
|
| 4873 |
|
| 4874 | Stewart, et al. Standards Track [Page 87]
|
| 4875 |
|
| 4876 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4877 |
|
| 4878 |
|
| 4879 | o The initial cwnd before DATA transmission or after a sufficiently
|
| 4880 | long idle period MUST be <= 2*MTU.
|
| 4881 |
|
| 4882 | o The initial cwnd after a retransmission timeout MUST be no more
|
| 4883 | than 1*MTU.
|
| 4884 |
|
| 4885 | o The initial value of ssthresh MAY be arbitrarily high (for
|
| 4886 | example, implementations MAY use the size of the receiver
|
| 4887 | advertised window).
|
| 4888 |
|
| 4889 | o Whenever cwnd is greater than zero, the endpoint is allowed to
|
| 4890 | have cwnd bytes of data outstanding on that transport address.
|
| 4891 |
|
| 4892 | o When cwnd is less than or equal to ssthresh an SCTP endpoint MUST
|
| 4893 | use the slow start algorithm to increase cwnd (assuming the
|
| 4894 | current congestion window is being fully utilized). If an
|
| 4895 | incoming SACK advances the Cumulative TSN Ack Point, cwnd MUST be
|
| 4896 | increased by at most the lesser of 1) the total size of the
|
| 4897 | previously outstanding DATA chunk(s) acknowledged, and 2) the
|
| 4898 | destination's path MTU. This protects against the ACK-Splitting
|
| 4899 | attack outlined in [SAVAGE99].
|
| 4900 |
|
| 4901 | In instances where its peer endpoint is multi-homed, if an endpoint
|
| 4902 | receives a SACK that advances its Cumulative TSN Ack Point, then it
|
| 4903 | should update its cwnd (or cwnds) apportioned to the destination
|
| 4904 | addresses to which it transmitted the acknowledged data. However if
|
| 4905 | the received SACK does not advance the Cumulative TSN Ack Point, the
|
| 4906 | endpoint MUST NOT adjust the cwnd of any of the destination
|
| 4907 | addresses.
|
| 4908 |
|
| 4909 | Because an endpoint's cwnd is not tied to its Cumulative TSN Ack
|
| 4910 | Point, as duplicate SACKs come in, even though they may not advance
|
| 4911 | the Cumulative TSN Ack Point an endpoint can still use them to clock
|
| 4912 | out new data. That is, the data newly acknowledged by the SACK
|
| 4913 | diminishes the amount of data now in flight to less than cwnd; and so
|
| 4914 | the current, unchanged value of cwnd now allows new data to be sent.
|
| 4915 | On the other hand, the increase of cwnd must be tied to the
|
| 4916 | Cumulative TSN Ack Point advancement as specified above. Otherwise
|
| 4917 | the duplicate SACKs will not only clock out new data, but also will
|
| 4918 | adversely clock out more new data than what has just left the
|
| 4919 | network, during a time of possible congestion.
|
| 4920 |
|
| 4921 | o When the endpoint does not transmit data on a given transport
|
| 4922 | address, the cwnd of the transport address should be adjusted to
|
| 4923 | max(cwnd/2, 2*MTU) per RTO.
|
| 4924 |
|
| 4925 |
|
| 4926 |
|
| 4927 |
|
| 4928 |
|
| 4929 |
|
| 4930 | Stewart, et al. Standards Track [Page 88]
|
| 4931 |
|
| 4932 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4933 |
|
| 4934 |
|
| 4935 | 7.2.2 Congestion Avoidance
|
| 4936 |
|
| 4937 | When cwnd is greater than ssthresh, cwnd should be incremented by
|
| 4938 | 1*MTU per RTT if the sender has cwnd or more bytes of data
|
| 4939 | outstanding for the corresponding transport address.
|
| 4940 |
|
| 4941 | In practice an implementation can achieve this goal in the following
|
| 4942 | way:
|
| 4943 |
|
| 4944 | o partial_bytes_acked is initialized to 0.
|
| 4945 |
|
| 4946 | o Whenever cwnd is greater than ssthresh, upon each SACK arrival
|
| 4947 | that advances the Cumulative TSN Ack Point, increase
|
| 4948 | partial_bytes_acked by the total number of bytes of all new chunks
|
| 4949 | acknowledged in that SACK including chunks acknowledged by the new
|
| 4950 | Cumulative TSN Ack and by Gap Ack Blocks.
|
| 4951 |
|
| 4952 | o When partial_bytes_acked is equal to or greater than cwnd and
|
| 4953 | before the arrival of the SACK the sender had cwnd or more bytes
|
| 4954 | of data outstanding (i.e., before arrival of the SACK, flightsize
|
| 4955 | was greater than or equal to cwnd), increase cwnd by MTU, and
|
| 4956 | reset partial_bytes_acked to (partial_bytes_acked - cwnd).
|
| 4957 |
|
| 4958 | o Same as in the slow start, when the sender does not transmit DATA
|
| 4959 | on a given transport address, the cwnd of the transport address
|
| 4960 | should be adjusted to max(cwnd / 2, 2*MTU) per RTO.
|
| 4961 |
|
| 4962 | o When all of the data transmitted by the sender has been
|
| 4963 | acknowledged by the receiver, partial_bytes_acked is initialized
|
| 4964 | to 0.
|
| 4965 |
|
| 4966 | 7.2.3 Congestion Control
|
| 4967 |
|
| 4968 | Upon detection of packet losses from SACK (see Section 7.2.4), An
|
| 4969 | endpoint should do the following:
|
| 4970 |
|
| 4971 | ssthresh = max(cwnd/2, 2*MTU)
|
| 4972 | cwnd = ssthresh
|
| 4973 |
|
| 4974 | Basically, a packet loss causes cwnd to be cut in half.
|
| 4975 |
|
| 4976 | When the T3-rtx timer expires on an address, SCTP should perform slow
|
| 4977 | start by:
|
| 4978 |
|
| 4979 | ssthresh = max(cwnd/2, 2*MTU)
|
| 4980 | cwnd = 1*MTU
|
| 4981 |
|
| 4982 |
|
| 4983 |
|
| 4984 |
|
| 4985 |
|
| 4986 | Stewart, et al. Standards Track [Page 89]
|
| 4987 |
|
| 4988 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 4989 |
|
| 4990 |
|
| 4991 | and assure that no more than one SCTP packet will be in flight for
|
| 4992 | that address until the endpoint receives acknowledgement for
|
| 4993 | successful delivery of data to that address.
|
| 4994 |
|
| 4995 | 7.2.4 Fast Retransmit on Gap Reports
|
| 4996 |
|
| 4997 | In the absence of data loss, an endpoint performs delayed
|
| 4998 | acknowledgement. However, whenever an endpoint notices a hole in the
|
| 4999 | arriving TSN sequence, it SHOULD start sending a SACK back every time
|
| 5000 | a packet arrives carrying data until the hole is filled.
|
| 5001 |
|
| 5002 | Whenever an endpoint receives a SACK that indicates some TSN(s)
|
| 5003 | missing, it SHOULD wait for 3 further miss indications (via
|
| 5004 | subsequent SACK's) on the same TSN(s) before taking action with
|
| 5005 | regard to Fast Retransmit.
|
| 5006 |
|
| 5007 | When the TSN(s) is reported as missing in the fourth consecutive
|
| 5008 | SACK, the data sender shall:
|
| 5009 |
|
| 5010 | 1) Mark the missing DATA chunk(s) for retransmission,
|
| 5011 |
|
| 5012 | 2) Adjust the ssthresh and cwnd of the destination address(es) to
|
| 5013 | which the missing DATA chunks were last sent, according to the
|
| 5014 | formula described in Section 7.2.3.
|
| 5015 |
|
| 5016 | 3) Determine how many of the earliest (i.e., lowest TSN) DATA chunks
|
| 5017 | marked for retransmission will fit into a single packet, subject
|
| 5018 | to constraint of the path MTU of the destination transport address
|
| 5019 | to which the packet is being sent. Call this value K. Retransmit
|
| 5020 | those K DATA chunks in a single packet.
|
| 5021 |
|
| 5022 | 4) Restart T3-rtx timer only if the last SACK acknowledged the lowest
|
| 5023 | outstanding TSN number sent to that address, or the endpoint is
|
| 5024 | retransmitting the first outstanding DATA chunk sent to that
|
| 5025 | address.
|
| 5026 |
|
| 5027 | Note: Before the above adjustments, if the received SACK also
|
| 5028 | acknowledges new DATA chunks and advances the Cumulative TSN Ack
|
| 5029 | Point, the cwnd adjustment rules defined in Sections 7.2.1 and 7.2.2
|
| 5030 | must be applied first.
|
| 5031 |
|
| 5032 | A straightforward implementation of the above keeps a counter for
|
| 5033 | each TSN hole reported by a SACK. The counter increments for each
|
| 5034 | consecutive SACK reporting the TSN hole. After reaching 4 and
|
| 5035 | starting the fast retransmit procedure, the counter resets to 0.
|
| 5036 |
|
| 5037 |
|
| 5038 |
|
| 5039 |
|
| 5040 |
|
| 5041 |
|
| 5042 | Stewart, et al. Standards Track [Page 90]
|
| 5043 |
|
| 5044 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5045 |
|
| 5046 |
|
| 5047 | Because cwnd in SCTP indirectly bounds the number of outstanding
|
| 5048 | TSN's, the effect of TCP fast-recovery is achieved automatically with
|
| 5049 | no adjustment to the congestion control window size.
|
| 5050 |
|
| 5051 | 7.3 Path MTU Discovery
|
| 5052 |
|
| 5053 | [RFC1191] specifies "Path MTU Discovery", whereby an endpoint
|
| 5054 | maintains an estimate of the maximum transmission unit (MTU) along a
|
| 5055 | given Internet path and refrains from sending packets along that path
|
| 5056 | which exceed the MTU, other than occasional attempts to probe for a
|
| 5057 | change in the Path MTU (PMTU). RFC 1191 is thorough in its
|
| 5058 | discussion of the MTU discovery mechanism and strategies for
|
| 5059 | determining the current end-to-end MTU setting as well as detecting
|
| 5060 | changes in this value. [RFC1981] specifies the same mechanisms for
|
| 5061 | IPv6. An SCTP sender using IPv6 MUST use Path MTU Discovery unless
|
| 5062 | all packets are less than the minimum IPv6 MTU [RFC2460].
|
| 5063 |
|
| 5064 | An endpoint SHOULD apply these techniques, and SHOULD do so on a
|
| 5065 | per-destination-address basis.
|
| 5066 |
|
| 5067 | There are 4 ways in which SCTP differs from the description in RFC
|
| 5068 | 1191 of applying MTU discovery to TCP:
|
| 5069 |
|
| 5070 | 1) SCTP associations can span multiple addresses. An endpoint MUST
|
| 5071 | maintain separate MTU estimates for each destination address of
|
| 5072 | its peer.
|
| 5073 |
|
| 5074 | 2) Elsewhere in this document, when the term "MTU" is discussed, it
|
| 5075 | refers to the MTU associated with the destination address
|
| 5076 | corresponding to the context of the discussion.
|
| 5077 |
|
| 5078 | 3) Unlike TCP, SCTP does not have a notion of "Maximum Segment Size".
|
| 5079 | Accordingly, the MTU for each destination address SHOULD be
|
| 5080 | initialized to a value no larger than the link MTU for the local
|
| 5081 | interface to which packets for that remote destination address
|
| 5082 | will be routed.
|
| 5083 |
|
| 5084 | 4) Since data transmission in SCTP is naturally structured in terms
|
| 5085 | of TSNs rather than bytes (as is the case for TCP), the discussion
|
| 5086 | in Section 6.5 of RFC 1191 applies: When retransmitting an IP
|
| 5087 | datagram to a remote address for which the IP datagram appears too
|
| 5088 | large for the path MTU to that address, the IP datagram SHOULD be
|
| 5089 | retransmitted without the DF bit set, allowing it to possibly be
|
| 5090 | fragmented. Transmissions of new IP datagrams MUST have DF set.
|
| 5091 |
|
| 5092 |
|
| 5093 |
|
| 5094 |
|
| 5095 |
|
| 5096 |
|
| 5097 |
|
| 5098 | Stewart, et al. Standards Track [Page 91]
|
| 5099 |
|
| 5100 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5101 |
|
| 5102 |
|
| 5103 | 5) The sender should track an association PMTU which will be the
|
| 5104 | smallest PMTU discovered for all of the peer's destination
|
| 5105 | addresses. When fragmenting messages into multiple parts this
|
| 5106 | association PMTU should be used to calculate the size of each
|
| 5107 | fragment. This will allow retransmissions to be seamlessly sent
|
| 5108 | to an alternate address without encountering IP fragmentation.
|
| 5109 |
|
| 5110 | Other than these differences, the discussion of TCP's use of MTU
|
| 5111 | discovery in RFCs 1191 and 1981 applies to SCTP on a per-
|
| 5112 | destination-address basis.
|
| 5113 |
|
| 5114 | Note: For IPv6 destination addresses the DF bit does not exist,
|
| 5115 | instead the IP datagram must be fragmented as described in [RFC2460].
|
| 5116 |
|
| 5117 | 8. Fault Management
|
| 5118 |
|
| 5119 | 8.1 Endpoint Failure Detection
|
| 5120 |
|
| 5121 | An endpoint shall keep a counter on the total number of consecutive
|
| 5122 | retransmissions to its peer (including retransmissions to all the
|
| 5123 | destination transport addresses of the peer if it is multi-homed).
|
| 5124 | If the value of this counter exceeds the limit indicated in the
|
| 5125 | protocol parameter 'Association.Max.Retrans', the endpoint shall
|
| 5126 | consider the peer endpoint unreachable and shall stop transmitting
|
| 5127 | any more data to it (and thus the association enters the CLOSED
|
| 5128 | state). In addition, the endpoint shall report the failure to the
|
| 5129 | upper layer, and optionally report back all outstanding user data
|
| 5130 | remaining in its outbound queue. The association is automatically
|
| 5131 | closed when the peer endpoint becomes unreachable.
|
| 5132 |
|
| 5133 | The counter shall be reset each time a DATA chunk sent to that peer
|
| 5134 | endpoint is acknowledged (by the reception of a SACK), or a
|
| 5135 | HEARTBEAT-ACK is received from the peer endpoint.
|
| 5136 |
|
| 5137 | 8.2 Path Failure Detection
|
| 5138 |
|
| 5139 | When its peer endpoint is multi-homed, an endpoint should keep a
|
| 5140 | error counter for each of the destination transport addresses of the
|
| 5141 | peer endpoint.
|
| 5142 |
|
| 5143 | Each time the T3-rtx timer expires on any address, or when a
|
| 5144 | HEARTBEAT sent to an idle address is not acknowledged within a RTO,
|
| 5145 | the error counter of that destination address will be incremented.
|
| 5146 | When the value in the error counter exceeds the protocol parameter
|
| 5147 | 'Path.Max.Retrans' of that destination address, the endpoint should
|
| 5148 | mark the destination transport address as inactive, and a
|
| 5149 | notification SHOULD be sent to the upper layer.
|
| 5150 |
|
| 5151 |
|
| 5152 |
|
| 5153 |
|
| 5154 | Stewart, et al. Standards Track [Page 92]
|
| 5155 |
|
| 5156 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5157 |
|
| 5158 |
|
| 5159 | When an outstanding TSN is acknowledged or a HEARTBEAT sent to that
|
| 5160 | address is acknowledged with a HEARTBEAT ACK, the endpoint shall
|
| 5161 | clear the error counter of the destination transport address to which
|
| 5162 | the DATA chunk was last sent (or HEARTBEAT was sent). When the peer
|
| 5163 | endpoint is multi-homed and the last chunk sent to it was a
|
| 5164 | retransmission to an alternate address, there exists an ambiguity as
|
| 5165 | to whether or not the acknowledgement should be credited to the
|
| 5166 | address of the last chunk sent. However, this ambiguity does not
|
| 5167 | seem to bear any significant consequence to SCTP behavior. If this
|
| 5168 | ambiguity is undesirable, the transmitter may choose not to clear the
|
| 5169 | error counter if the last chunk sent was a retransmission.
|
| 5170 |
|
| 5171 | Note: When configuring the SCTP endpoint, the user should avoid
|
| 5172 | having the value of 'Association.Max.Retrans' larger than the
|
| 5173 | summation of the 'Path.Max.Retrans' of all the destination addresses
|
| 5174 | for the remote endpoint. Otherwise, all the destination addresses
|
| 5175 | may become inactive while the endpoint still considers the peer
|
| 5176 | endpoint reachable. When this condition occurs, how the SCTP chooses
|
| 5177 | to function is implementation specific.
|
| 5178 |
|
| 5179 | When the primary path is marked inactive (due to excessive
|
| 5180 | retransmissions, for instance), the sender MAY automatically transmit
|
| 5181 | new packets to an alternate destination address if one exists and is
|
| 5182 | active. If more than one alternate address is active when the
|
| 5183 | primary path is marked inactive only ONE transport address SHOULD be
|
| 5184 | chosen and used as the new destination transport address.
|
| 5185 |
|
| 5186 | 8.3 Path Heartbeat
|
| 5187 |
|
| 5188 | By default, an SCTP endpoint shall monitor the reachability of the
|
| 5189 | idle destination transport address(es) of its peer by sending a
|
| 5190 | HEARTBEAT chunk periodically to the destination transport
|
| 5191 | address(es).
|
| 5192 |
|
| 5193 | A destination transport address is considered "idle" if no new chunk
|
| 5194 | which can be used for updating path RTT (usually including first
|
| 5195 | transmission DATA, INIT, COOKIE ECHO, HEARTBEAT etc.) and no
|
| 5196 | HEARTBEAT has been sent to it within the current heartbeat period of
|
| 5197 | that address. This applies to both active and inactive destination
|
| 5198 | addresses.
|
| 5199 |
|
| 5200 | The upper layer can optionally initiate the following functions:
|
| 5201 |
|
| 5202 | A) Disable heartbeat on a specific destination transport address of a
|
| 5203 | given association,
|
| 5204 |
|
| 5205 | B) Change the HB.interval,
|
| 5206 |
|
| 5207 |
|
| 5208 |
|
| 5209 |
|
| 5210 | Stewart, et al. Standards Track [Page 93]
|
| 5211 |
|
| 5212 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5213 |
|
| 5214 |
|
| 5215 | C) Re-enable heartbeat on a specific destination transport address of
|
| 5216 | a given association, and,
|
| 5217 |
|
| 5218 | D) Request an on-demand HEARTBEAT on a specific destination transport
|
| 5219 | address of a given association.
|
| 5220 |
|
| 5221 | The endpoint should increment the respective error counter of the
|
| 5222 | destination transport address each time a HEARTBEAT is sent to that
|
| 5223 | address and not acknowledged within one RTO.
|
| 5224 |
|
| 5225 | When the value of this counter reaches the protocol parameter '
|
| 5226 | Path.Max.Retrans', the endpoint should mark the corresponding
|
| 5227 | destination address as inactive if it is not so marked, and may also
|
| 5228 | optionally report to the upper layer the change of reachability of
|
| 5229 | this destination address. After this, the endpoint should continue
|
| 5230 | HEARTBEAT on this destination address but should stop increasing the
|
| 5231 | counter.
|
| 5232 |
|
| 5233 | The sender of the HEARTBEAT chunk should include in the Heartbeat
|
| 5234 | Information field of the chunk the current time when the packet is
|
| 5235 | sent out and the destination address to which the packet is sent.
|
| 5236 |
|
| 5237 | IMPLEMENTATION NOTE: An alternative implementation of the heartbeat
|
| 5238 | mechanism that can be used is to increment the error counter variable
|
| 5239 | every time a HEARTBEAT is sent to a destination. Whenever a
|
| 5240 | HEARTBEAT ACK arrives, the sender SHOULD clear the error counter of
|
| 5241 | the destination that the HEARTBEAT was sent to. This in effect would
|
| 5242 | clear the previously stroked error (and any other error counts as
|
| 5243 | well).
|
| 5244 |
|
| 5245 | The receiver of the HEARTBEAT should immediately respond with a
|
| 5246 | HEARTBEAT ACK that contains the Heartbeat Information field copied
|
| 5247 | from the received HEARTBEAT chunk.
|
| 5248 |
|
| 5249 | Upon the receipt of the HEARTBEAT ACK, the sender of the HEARTBEAT
|
| 5250 | should clear the error counter of the destination transport address
|
| 5251 | to which the HEARTBEAT was sent, and mark the destination transport
|
| 5252 | address as active if it is not so marked. The endpoint may
|
| 5253 | optionally report to the upper layer when an inactive destination
|
| 5254 | address is marked as active due to the reception of the latest
|
| 5255 | HEARTBEAT ACK. The receiver of the HEARTBEAT ACK must also clear the
|
| 5256 | association overall error count as well (as defined in section 8.1).
|
| 5257 |
|
| 5258 | The receiver of the HEARTBEAT ACK should also perform an RTT
|
| 5259 | measurement for that destination transport address using the time
|
| 5260 | value carried in the HEARTBEAT ACK chunk.
|
| 5261 |
|
| 5262 |
|
| 5263 |
|
| 5264 |
|
| 5265 |
|
| 5266 | Stewart, et al. Standards Track [Page 94]
|
| 5267 |
|
| 5268 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5269 |
|
| 5270 |
|
| 5271 | On an idle destination address that is allowed to heartbeat, a
|
| 5272 | HEARTBEAT chunk is RECOMMENDED to be sent once per RTO of that
|
| 5273 | destination address plus the protocol parameter 'HB.interval' , with
|
| 5274 | jittering of +/- 50%, and exponential back-off of the RTO if the
|
| 5275 | previous HEARTBEAT is unanswered.
|
| 5276 |
|
| 5277 | A primitive is provided for the SCTP user to change the HB.interval
|
| 5278 | and turn on or off the heartbeat on a given destination address. The
|
| 5279 | heartbeat interval set by the SCTP user is added to the RTO of that
|
| 5280 | destination (including any exponential backoff). Only one heartbeat
|
| 5281 | should be sent each time the heartbeat timer expires (if multiple
|
| 5282 | destinations are idle). It is a implementation decision on how to
|
| 5283 | choose which of the candidate idle destinations to heartbeat to (if
|
| 5284 | more than one destination is idle).
|
| 5285 |
|
| 5286 | Note: When tuning the heartbeat interval, there is a side effect that
|
| 5287 | SHOULD be taken into account. When this value is increased, i.e.
|
| 5288 | the HEARTBEAT takes longer, the detection of lost ABORT messages
|
| 5289 | takes longer as well. If a peer endpoint ABORTs the association for
|
| 5290 | any reason and the ABORT chunk is lost, the local endpoint will only
|
| 5291 | discover the lost ABORT by sending a DATA chunk or HEARTBEAT chunk
|
| 5292 | (thus causing the peer to send another ABORT). This must be
|
| 5293 | considered when tuning the HEARTBEAT timer. If the HEARTBEAT is
|
| 5294 | disabled only sending DATA to the association will discover a lost
|
| 5295 | ABORT from the peer.
|
| 5296 |
|
| 5297 | 8.4 Handle "Out of the blue" Packets
|
| 5298 |
|
| 5299 | An SCTP packet is called an "out of the blue" (OOTB) packet if it is
|
| 5300 | correctly formed, i.e., passed the receiver's Adler-32 check (see
|
| 5301 | Section 6.8), but the receiver is not able to identify the
|
| 5302 | association to which this packet belongs.
|
| 5303 |
|
| 5304 | The receiver of an OOTB packet MUST do the following:
|
| 5305 |
|
| 5306 | 1) If the OOTB packet is to or from a non-unicast address, silently
|
| 5307 | discard the packet. Otherwise,
|
| 5308 |
|
| 5309 | 2) If the OOTB packet contains an ABORT chunk, the receiver MUST
|
| 5310 | silently discard the OOTB packet and take no further action.
|
| 5311 | Otherwise,
|
| 5312 |
|
| 5313 | 3) If the packet contains an INIT chunk with a Verification Tag set
|
| 5314 | to '0', process it as described in Section 5.1. Otherwise,
|
| 5315 |
|
| 5316 | 4) If the packet contains a COOKIE ECHO in the first chunk, process
|
| 5317 | it as described in Section 5.1. Otherwise,
|
| 5318 |
|
| 5319 |
|
| 5320 |
|
| 5321 |
|
| 5322 | Stewart, et al. Standards Track [Page 95]
|
| 5323 |
|
| 5324 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5325 |
|
| 5326 |
|
| 5327 | 5) If the packet contains a SHUTDOWN ACK chunk, the receiver should
|
| 5328 | respond to the sender of the OOTB packet with a SHUTDOWN COMPLETE.
|
| 5329 | When sending the SHUTDOWN COMPLETE, the receiver of the OOTB
|
| 5330 | packet must fill in the Verification Tag field of the outbound
|
| 5331 | packet with the Verification Tag received in the SHUTDOWN ACK and
|
| 5332 | set the T-bit in the Chunk Flags to indicate that no TCB was
|
| 5333 | found. Otherwise,
|
| 5334 |
|
| 5335 | 6) If the packet contains a SHUTDOWN COMPLETE chunk, the receiver
|
| 5336 | should silently discard the packet and take no further action.
|
| 5337 | Otherwise,
|
| 5338 |
|
| 5339 | 7) If the packet contains a "Stale cookie" ERROR or a COOKIE ACK the
|
| 5340 | SCTP Packet should be silently discarded. Otherwise,
|
| 5341 |
|
| 5342 | 8) The receiver should respond to the sender of the OOTB packet with
|
| 5343 | an ABORT. When sending the ABORT, the receiver of the OOTB packet
|
| 5344 | MUST fill in the Verification Tag field of the outbound packet
|
| 5345 | with the value found in the Verification Tag field of the OOTB
|
| 5346 | packet and set the T-bit in the Chunk Flags to indicate that no
|
| 5347 | TCB was found. After sending this ABORT, the receiver of the OOTB
|
| 5348 | packet shall discard the OOTB packet and take no further action.
|
| 5349 |
|
| 5350 | 8.5 Verification Tag
|
| 5351 |
|
| 5352 | The Verification Tag rules defined in this section apply when sending
|
| 5353 | or receiving SCTP packets which do not contain an INIT, SHUTDOWN
|
| 5354 | COMPLETE, COOKIE ECHO (see Section 5.1), ABORT or SHUTDOWN ACK chunk.
|
| 5355 | The rules for sending and receiving SCTP packets containing one of
|
| 5356 | these chunk types are discussed separately in Section 8.5.1.
|
| 5357 |
|
| 5358 | When sending an SCTP packet, the endpoint MUST fill in the
|
| 5359 | Verification Tag field of the outbound packet with the tag value in
|
| 5360 | the Initiate Tag parameter of the INIT or INIT ACK received from its
|
| 5361 | peer.
|
| 5362 |
|
| 5363 | When receiving an SCTP packet, the endpoint MUST ensure that the
|
| 5364 | value in the Verification Tag field of the received SCTP packet
|
| 5365 | matches its own Tag. If the received Verification Tag value does not
|
| 5366 | match the receiver's own tag value, the receiver shall silently
|
| 5367 | discard the packet and shall not process it any further except for
|
| 5368 | those cases listed in Section 8.5.1 below.
|
| 5369 |
|
| 5370 |
|
| 5371 |
|
| 5372 |
|
| 5373 |
|
| 5374 |
|
| 5375 |
|
| 5376 |
|
| 5377 |
|
| 5378 | Stewart, et al. Standards Track [Page 96]
|
| 5379 |
|
| 5380 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5381 |
|
| 5382 |
|
| 5383 | 8.5.1 Exceptions in Verification Tag Rules
|
| 5384 |
|
| 5385 | A) Rules for packet carrying INIT:
|
| 5386 |
|
| 5387 | - The sender MUST set the Verification Tag of the packet to 0.
|
| 5388 |
|
| 5389 | - When an endpoint receives an SCTP packet with the Verification
|
| 5390 | Tag set to 0, it should verify that the packet contains only an
|
| 5391 | INIT chunk. Otherwise, the receiver MUST silently discard the
|
| 5392 | packet.
|
| 5393 |
|
| 5394 | B) Rules for packet carrying ABORT:
|
| 5395 |
|
| 5396 | - The endpoint shall always fill in the Verification Tag field of
|
| 5397 | the outbound packet with the destination endpoint's tag value
|
| 5398 | if it is known.
|
| 5399 |
|
| 5400 | - If the ABORT is sent in response to an OOTB packet, the
|
| 5401 | endpoint MUST follow the procedure described in Section 8.4.
|
| 5402 |
|
| 5403 | - The receiver MUST accept the packet if the Verification Tag
|
| 5404 | matches either its own tag, OR the tag of its peer. Otherwise,
|
| 5405 | the receiver MUST silently discard the packet and take no
|
| 5406 | further action.
|
| 5407 |
|
| 5408 | C) Rules for packet carrying SHUTDOWN COMPLETE:
|
| 5409 |
|
| 5410 | - When sending a SHUTDOWN COMPLETE, if the receiver of the
|
| 5411 | SHUTDOWN ACK has a TCB then the destination endpoint's tag MUST
|
| 5412 | be used. Only where no TCB exists should the sender use the
|
| 5413 | Verification Tag from the SHUTDOWN ACK.
|
| 5414 |
|
| 5415 | - The receiver of a SHUTDOWN COMPLETE shall accept the packet if
|
| 5416 | the Verification Tag field of the packet matches its own tag OR
|
| 5417 | it is set to its peer's tag and the T bit is set in the Chunk
|
| 5418 | Flags. Otherwise, the receiver MUST silently discard the packet
|
| 5419 | and take no further action. An endpoint MUST ignore the
|
| 5420 | SHUTDOWN COMPLETE if it is not in the SHUTDOWN-ACK-SENT state.
|
| 5421 |
|
| 5422 | D) Rules for packet carrying a COOKIE ECHO
|
| 5423 |
|
| 5424 | - When sending a COOKIE ECHO, the endpoint MUST use the value of
|
| 5425 | the Initial Tag received in the INIT ACK.
|
| 5426 |
|
| 5427 | - The receiver of a COOKIE ECHO follows the procedures in Section
|
| 5428 | 5.
|
| 5429 |
|
| 5430 |
|
| 5431 |
|
| 5432 |
|
| 5433 |
|
| 5434 | Stewart, et al. Standards Track [Page 97]
|
| 5435 |
|
| 5436 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5437 |
|
| 5438 |
|
| 5439 | E) Rules for packet carrying a SHUTDOWN ACK
|
| 5440 |
|
| 5441 | - If the receiver is in COOKIE-ECHOED or COOKIE-WAIT state the
|
| 5442 | procedures in section 8.4 SHOULD be followed, in other words it
|
| 5443 | should be treated as an Out Of The Blue packet.
|
| 5444 |
|
| 5445 | 9. Termination of Association
|
| 5446 |
|
| 5447 | An endpoint should terminate its association when it exits from
|
| 5448 | service. An association can be terminated by either abort or
|
| 5449 | shutdown. An abort of an association is abortive by definition in
|
| 5450 | that any data pending on either end of the association is discarded
|
| 5451 | and not delivered to the peer. A shutdown of an association is
|
| 5452 | considered a graceful close where all data in queue by either
|
| 5453 | endpoint is delivered to the respective peers. However, in the case
|
| 5454 | of a shutdown, SCTP does not support a half-open state (like TCP)
|
| 5455 | wherein one side may continue sending data while the other end is
|
| 5456 | closed. When either endpoint performs a shutdown, the association on
|
| 5457 | each peer will stop accepting new data from its user and only deliver
|
| 5458 | data in queue at the time of sending or receiving the SHUTDOWN chunk.
|
| 5459 |
|
| 5460 | 9.1 Abort of an Association
|
| 5461 |
|
| 5462 | When an endpoint decides to abort an existing association, it shall
|
| 5463 | send an ABORT chunk to its peer endpoint. The sender MUST fill in
|
| 5464 | the peer's Verification Tag in the outbound packet and MUST NOT
|
| 5465 | bundle any DATA chunk with the ABORT.
|
| 5466 |
|
| 5467 | An endpoint MUST NOT respond to any received packet that contains an
|
| 5468 | ABORT chunk (also see Section 8.4).
|
| 5469 |
|
| 5470 | An endpoint receiving an ABORT shall apply the special Verification
|
| 5471 | Tag check rules described in Section 8.5.1.
|
| 5472 |
|
| 5473 | After checking the Verification Tag, the receiving endpoint shall
|
| 5474 | remove the association from its record, and shall report the
|
| 5475 | termination to its upper layer.
|
| 5476 |
|
| 5477 | 9.2 Shutdown of an Association
|
| 5478 |
|
| 5479 | Using the SHUTDOWN primitive (see Section 10.1), the upper layer of
|
| 5480 | an endpoint in an association can gracefully close the association.
|
| 5481 | This will allow all outstanding DATA chunks from the peer of the
|
| 5482 | shutdown initiator to be delivered before the association terminates.
|
| 5483 |
|
| 5484 | Upon receipt of the SHUTDOWN primitive from its upper layer, the
|
| 5485 | endpoint enters SHUTDOWN-PENDING state and remains there until all
|
| 5486 | outstanding data has been acknowledged by its peer. The endpoint
|
| 5487 |
|
| 5488 |
|
| 5489 |
|
| 5490 | Stewart, et al. Standards Track [Page 98]
|
| 5491 |
|
| 5492 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5493 |
|
| 5494 |
|
| 5495 | accepts no new data from its upper layer, but retransmits data to the
|
| 5496 | far end if necessary to fill gaps.
|
| 5497 |
|
| 5498 | Once all its outstanding data has been acknowledged, the endpoint
|
| 5499 | shall send a SHUTDOWN chunk to its peer including in the Cumulative
|
| 5500 | TSN Ack field the last sequential TSN it has received from the peer.
|
| 5501 | It shall then start the T2-shutdown timer and enter the SHUTDOWN-SENT
|
| 5502 | state. If the timer expires, the endpoint must re-send the SHUTDOWN
|
| 5503 | with the updated last sequential TSN received from its peer.
|
| 5504 |
|
| 5505 | The rules in Section 6.3 MUST be followed to determine the proper
|
| 5506 | timer value for T2-shutdown. To indicate any gaps in TSN, the
|
| 5507 | endpoint may also bundle a SACK with the SHUTDOWN chunk in the same
|
| 5508 | SCTP packet.
|
| 5509 |
|
| 5510 | An endpoint should limit the number of retransmissions of the
|
| 5511 | SHUTDOWN chunk to the protocol parameter 'Association.Max.Retrans'.
|
| 5512 | If this threshold is exceeded the endpoint should destroy the TCB and
|
| 5513 | MUST report the peer endpoint unreachable to the upper layer (and
|
| 5514 | thus the association enters the CLOSED state). The reception of any
|
| 5515 | packet from its peer (i.e. as the peer sends all of its queued DATA
|
| 5516 | chunks) should clear the endpoint's retransmission count and restart
|
| 5517 | the T2-Shutdown timer, giving its peer ample opportunity to transmit
|
| 5518 | all of its queued DATA chunks that have not yet been sent.
|
| 5519 |
|
| 5520 | Upon the reception of the SHUTDOWN, the peer endpoint shall
|
| 5521 |
|
| 5522 | - enter the SHUTDOWN-RECEIVED state,
|
| 5523 |
|
| 5524 | - stop accepting new data from its SCTP user
|
| 5525 |
|
| 5526 | - verify, by checking the Cumulative TSN Ack field of the chunk,
|
| 5527 | that all its outstanding DATA chunks have been received by the
|
| 5528 | SHUTDOWN sender.
|
| 5529 |
|
| 5530 | Once an endpoint as reached the SHUTDOWN-RECEIVED state it MUST NOT
|
| 5531 | send a SHUTDOWN in response to a ULP request, and should discard
|
| 5532 | subsequent SHUTDOWN chunks.
|
| 5533 |
|
| 5534 | If there are still outstanding DATA chunks left, the SHUTDOWN
|
| 5535 | receiver shall continue to follow normal data transmission procedures
|
| 5536 | defined in Section 6 until all outstanding DATA chunks are
|
| 5537 | acknowledged; however, the SHUTDOWN receiver MUST NOT accept new data
|
| 5538 | from its SCTP user.
|
| 5539 |
|
| 5540 | While in SHUTDOWN-SENT state, the SHUTDOWN sender MUST immediately
|
| 5541 | respond to each received packet containing one or more DATA chunk(s)
|
| 5542 | with a SACK, a SHUTDOWN chunk, and restart the T2-shutdown timer. If
|
| 5543 |
|
| 5544 |
|
| 5545 |
|
| 5546 | Stewart, et al. Standards Track [Page 99]
|
| 5547 |
|
| 5548 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5549 |
|
| 5550 |
|
| 5551 | it has no more outstanding DATA chunks, the SHUTDOWN receiver shall
|
| 5552 | send a SHUTDOWN ACK and start a T2-shutdown timer of its own,
|
| 5553 | entering the SHUTDOWN-ACK-SENT state. If the timer expires, the
|
| 5554 | endpoint must re-send the SHUTDOWN ACK.
|
| 5555 |
|
| 5556 | The sender of the SHUTDOWN ACK should limit the number of
|
| 5557 | retransmissions of the SHUTDOWN ACK chunk to the protocol parameter '
|
| 5558 | Association.Max.Retrans'. If this threshold is exceeded the endpoint
|
| 5559 | should destroy the TCB and may report the peer endpoint unreachable
|
| 5560 | to the upper layer (and thus the association enters the CLOSED
|
| 5561 | state).
|
| 5562 |
|
| 5563 | Upon the receipt of the SHUTDOWN ACK, the SHUTDOWN sender shall stop
|
| 5564 | the T2-shutdown timer, send a SHUTDOWN COMPLETE chunk to its peer,
|
| 5565 | and remove all record of the association.
|
| 5566 |
|
| 5567 | Upon reception of the SHUTDOWN COMPLETE chunk the endpoint will
|
| 5568 | verify that it is in SHUTDOWN-ACK-SENT state, if it is not the chunk
|
| 5569 | should be discarded. If the endpoint is in the SHUTDOWN-ACK-SENT
|
| 5570 | state the endpoint should stop the T2-shutdown timer and remove all
|
| 5571 | knowledge of the association (and thus the association enters the
|
| 5572 | CLOSED state).
|
| 5573 |
|
| 5574 | An endpoint SHOULD assure that all its outstanding DATA chunks have
|
| 5575 | been acknowledged before initiating the shutdown procedure.
|
| 5576 |
|
| 5577 | An endpoint should reject any new data request from its upper layer
|
| 5578 | if it is in SHUTDOWN-PENDING, SHUTDOWN-SENT, SHUTDOWN-RECEIVED, or
|
| 5579 | SHUTDOWN-ACK-SENT state.
|
| 5580 |
|
| 5581 | If an endpoint is in SHUTDOWN-ACK-SENT state and receives an INIT
|
| 5582 | chunk (e.g., if the SHUTDOWN COMPLETE was lost) with source and
|
| 5583 | destination transport addresses (either in the IP addresses or in the
|
| 5584 | INIT chunk) that belong to this association, it should discard the
|
| 5585 | INIT chunk and retransmit the SHUTDOWN ACK chunk.
|
| 5586 |
|
| 5587 | Note: Receipt of an INIT with the same source and destination IP
|
| 5588 | addresses as used in transport addresses assigned to an endpoint but
|
| 5589 | with a different port number indicates the initialization of a
|
| 5590 | separate association.
|
| 5591 |
|
| 5592 | The sender of the INIT or COOKIE ECHO should respond to the receipt
|
| 5593 | of a SHUTDOWN-ACK with a stand-alone SHUTDOWN COMPLETE in an SCTP
|
| 5594 | packet with the Verification Tag field of its common header set to
|
| 5595 | the same tag that was received in the SHUTDOWN ACK packet. This is
|
| 5596 | considered an Out of the Blue packet as defined in Section 8.4. The
|
| 5597 | sender of the INIT lets T1-init continue running and remains in the
|
| 5598 |
|
| 5599 |
|
| 5600 |
|
| 5601 |
|
| 5602 | Stewart, et al. Standards Track [Page 100]
|
| 5603 |
|
| 5604 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5605 |
|
| 5606 |
|
| 5607 | COOKIE-WAIT or COOKIE-ECHOED state. Normal T1-init timer expiration
|
| 5608 | will cause the INIT or COOKIE chunk to be retransmitted and thus
|
| 5609 | start a new association.
|
| 5610 |
|
| 5611 | If a SHUTDOWN is received in COOKIE WAIT or COOKIE ECHOED states the
|
| 5612 | SHUTDOWN chunk SHOULD be silently discarded.
|
| 5613 |
|
| 5614 | If an endpoint is in SHUTDOWN-SENT state and receives a SHUTDOWN
|
| 5615 | chunk from its peer, the endpoint shall respond immediately with a
|
| 5616 | SHUTDOWN ACK to its peer, and move into a SHUTDOWN-ACK-SENT state
|
| 5617 | restarting its T2-shutdown timer.
|
| 5618 |
|
| 5619 | If an endpoint is in the SHUTDOWN-ACK-SENT state and receives a
|
| 5620 | SHUTDOWN ACK, it shall stop the T2-shutdown timer, send a SHUTDOWN
|
| 5621 | COMPLETE chunk to its peer, and remove all record of the association.
|
| 5622 |
|
| 5623 | 10. Interface with Upper Layer
|
| 5624 |
|
| 5625 | The Upper Layer Protocols (ULP) shall request for services by passing
|
| 5626 | primitives to SCTP and shall receive notifications from SCTP for
|
| 5627 | various events.
|
| 5628 |
|
| 5629 | The primitives and notifications described in this section should be
|
| 5630 | used as a guideline for implementing SCTP. The following functional
|
| 5631 | description of ULP interface primitives is shown for illustrative
|
| 5632 | purposes. Different SCTP implementations may have different ULP
|
| 5633 | interfaces. However, all SCTPs must provide a certain minimum set of
|
| 5634 | services to guarantee that all SCTP implementations can support the
|
| 5635 | same protocol hierarchy.
|
| 5636 |
|
| 5637 | 10.1 ULP-to-SCTP
|
| 5638 |
|
| 5639 | The following sections functionally characterize a ULP/SCTP
|
| 5640 | interface. The notation used is similar to most procedure or
|
| 5641 | function calls in high level languages.
|
| 5642 |
|
| 5643 | The ULP primitives described below specify the basic functions the
|
| 5644 | SCTP must perform to support inter-process communication. Individual
|
| 5645 | implementations must define their own exact format, and may provide
|
| 5646 | combinations or subsets of the basic functions in single calls.
|
| 5647 |
|
| 5648 | A) Initialize
|
| 5649 |
|
| 5650 | Format: INITIALIZE ([local port], [local eligible address list]) ->
|
| 5651 | local SCTP instance name
|
| 5652 |
|
| 5653 |
|
| 5654 |
|
| 5655 |
|
| 5656 |
|
| 5657 |
|
| 5658 | Stewart, et al. Standards Track [Page 101]
|
| 5659 |
|
| 5660 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5661 |
|
| 5662 |
|
| 5663 | This primitive allows SCTP to initialize its internal data structures
|
| 5664 | and allocate necessary resources for setting up its operation
|
| 5665 | environment. Once SCTP is initialized, ULP can communicate directly
|
| 5666 | with other endpoints without re-invoking this primitive.
|
| 5667 |
|
| 5668 | SCTP will return a local SCTP instance name to the ULP.
|
| 5669 |
|
| 5670 | Mandatory attributes:
|
| 5671 |
|
| 5672 | None.
|
| 5673 |
|
| 5674 | Optional attributes:
|
| 5675 |
|
| 5676 | The following types of attributes may be passed along with the
|
| 5677 | primitive:
|
| 5678 |
|
| 5679 | o local port - SCTP port number, if ULP wants it to be specified;
|
| 5680 |
|
| 5681 | o local eligible address list - An address list that the local SCTP
|
| 5682 | endpoint should bind. By default, if an address list is not
|
| 5683 | included, all IP addresses assigned to the host should be used by
|
| 5684 | the local endpoint.
|
| 5685 |
|
| 5686 | IMPLEMENTATION NOTE: If this optional attribute is supported by an
|
| 5687 | implementation, it will be the responsibility of the implementation
|
| 5688 | to enforce that the IP source address field of any SCTP packets sent
|
| 5689 | out by this endpoint contains one of the IP addresses indicated in
|
| 5690 | the local eligible address list.
|
| 5691 |
|
| 5692 | B) Associate
|
| 5693 |
|
| 5694 | Format: ASSOCIATE(local SCTP instance name, destination transport addr,
|
| 5695 | outbound stream count)
|
| 5696 | -> association id [,destination transport addr list] [,outbound stream
|
| 5697 | count]
|
| 5698 |
|
| 5699 | This primitive allows the upper layer to initiate an association to a
|
| 5700 | specific peer endpoint.
|
| 5701 |
|
| 5702 | The peer endpoint shall be specified by one of the transport
|
| 5703 | addresses which defines the endpoint (see Section 1.4). If the local
|
| 5704 | SCTP instance has not been initialized, the ASSOCIATE is considered
|
| 5705 | an error.
|
| 5706 |
|
| 5707 | An association id, which is a local handle to the SCTP association,
|
| 5708 | will be returned on successful establishment of the association. If
|
| 5709 | SCTP is not able to open an SCTP association with the peer endpoint,
|
| 5710 | an error is returned.
|
| 5711 |
|
| 5712 |
|
| 5713 |
|
| 5714 | Stewart, et al. Standards Track [Page 102]
|
| 5715 |
|
| 5716 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5717 |
|
| 5718 |
|
| 5719 | Other association parameters may be returned, including the complete
|
| 5720 | destination transport addresses of the peer as well as the outbound
|
| 5721 | stream count of the local endpoint. One of the transport address
|
| 5722 | from the returned destination addresses will be selected by the local
|
| 5723 | endpoint as default primary path for sending SCTP packets to this
|
| 5724 | peer. The returned "destination transport addr list" can be used by
|
| 5725 | the ULP to change the default primary path or to force sending a
|
| 5726 | packet to a specific transport address.
|
| 5727 |
|
| 5728 | IMPLEMENTATION NOTE: If ASSOCIATE primitive is implemented as a
|
| 5729 | blocking function call, the ASSOCIATE primitive can return
|
| 5730 | association parameters in addition to the association id upon
|
| 5731 | successful establishment. If ASSOCIATE primitive is implemented as a
|
| 5732 | non-blocking call, only the association id shall be returned and
|
| 5733 | association parameters shall be passed using the COMMUNICATION UP
|
| 5734 | notification.
|
| 5735 |
|
| 5736 | Mandatory attributes:
|
| 5737 |
|
| 5738 | o local SCTP instance name - obtained from the INITIALIZE operation.
|
| 5739 |
|
| 5740 | o destination transport addr - specified as one of the transport
|
| 5741 | addresses of the peer endpoint with which the association is to be
|
| 5742 | established.
|
| 5743 |
|
| 5744 | o outbound stream count - the number of outbound streams the ULP
|
| 5745 | would like to open towards this peer endpoint.
|
| 5746 |
|
| 5747 | Optional attributes:
|
| 5748 |
|
| 5749 | None.
|
| 5750 |
|
| 5751 | C) Shutdown
|
| 5752 |
|
| 5753 | Format: SHUTDOWN(association id)
|
| 5754 | -> result
|
| 5755 |
|
| 5756 | Gracefully closes an association. Any locally queued user data will
|
| 5757 | be delivered to the peer. The association will be terminated only
|
| 5758 | after the peer acknowledges all the SCTP packets sent. A success
|
| 5759 | code will be returned on successful termination of the association.
|
| 5760 | If attempting to terminate the association results in a failure, an
|
| 5761 | error code shall be returned.
|
| 5762 |
|
| 5763 | Mandatory attributes:
|
| 5764 |
|
| 5765 | o association id - local handle to the SCTP association
|
| 5766 |
|
| 5767 |
|
| 5768 |
|
| 5769 |
|
| 5770 | Stewart, et al. Standards Track [Page 103]
|
| 5771 |
|
| 5772 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5773 |
|
| 5774 |
|
| 5775 | Optional attributes:
|
| 5776 |
|
| 5777 | None.
|
| 5778 |
|
| 5779 | D) Abort
|
| 5780 |
|
| 5781 | Format: ABORT(association id [, cause code])
|
| 5782 | -> result
|
| 5783 |
|
| 5784 | Ungracefully closes an association. Any locally queued user data
|
| 5785 | will be discarded and an ABORT chunk is sent to the peer. A success
|
| 5786 | code will be returned on successful abortion of the association. If
|
| 5787 | attempting to abort the association results in a failure, an error
|
| 5788 | code shall be returned.
|
| 5789 |
|
| 5790 | Mandatory attributes:
|
| 5791 |
|
| 5792 | o association id - local handle to the SCTP association
|
| 5793 |
|
| 5794 | Optional attributes:
|
| 5795 |
|
| 5796 | o cause code - reason of the abort to be passed to the peer.
|
| 5797 |
|
| 5798 | None.
|
| 5799 |
|
| 5800 | E) Send
|
| 5801 |
|
| 5802 | Format: SEND(association id, buffer address, byte count [,context]
|
| 5803 | [,stream id] [,life time] [,destination transport address]
|
| 5804 | [,unorder flag] [,no-bundle flag] [,payload protocol-id] )
|
| 5805 | -> result
|
| 5806 |
|
| 5807 | This is the main method to send user data via SCTP.
|
| 5808 |
|
| 5809 | Mandatory attributes:
|
| 5810 |
|
| 5811 | o association id - local handle to the SCTP association
|
| 5812 |
|
| 5813 | o buffer address - the location where the user message to be
|
| 5814 | transmitted is stored;
|
| 5815 |
|
| 5816 | o byte count - The size of the user data in number of bytes;
|
| 5817 |
|
| 5818 | Optional attributes:
|
| 5819 |
|
| 5820 | o context - an optional 32 bit integer that will be carried in the
|
| 5821 | sending failure notification to the ULP if the transportation of
|
| 5822 | this User Message fails.
|
| 5823 |
|
| 5824 |
|
| 5825 |
|
| 5826 | Stewart, et al. Standards Track [Page 104]
|
| 5827 |
|
| 5828 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5829 |
|
| 5830 |
|
| 5831 | o stream id - to indicate which stream to send the data on. If not
|
| 5832 | specified, stream 0 will be used.
|
| 5833 |
|
| 5834 | o life time - specifies the life time of the user data. The user
|
| 5835 | data will not be sent by SCTP after the life time expires. This
|
| 5836 | parameter can be used to avoid efforts to transmit stale user
|
| 5837 | messages. SCTP notifies the ULP if the data cannot be initiated
|
| 5838 | to transport (i.e. sent to the destination via SCTP's send
|
| 5839 | primitive) within the life time variable. However, the user data
|
| 5840 | will be transmitted if SCTP has attempted to transmit a chunk
|
| 5841 | before the life time expired.
|
| 5842 |
|
| 5843 | IMPLEMENTATION NOTE: In order to better support the data lifetime
|
| 5844 | option, the transmitter may hold back the assigning of the TSN number
|
| 5845 | to an outbound DATA chunk to the last moment. And, for
|
| 5846 | implementation simplicity, once a TSN number has been assigned the
|
| 5847 | sender should consider the send of this DATA chunk as committed,
|
| 5848 | overriding any lifetime option attached to the DATA chunk.
|
| 5849 |
|
| 5850 | o destination transport address - specified as one of the
|
| 5851 | destination transport addresses of the peer endpoint to which this
|
| 5852 | packet should be sent. Whenever possible, SCTP should use this
|
| 5853 | destination transport address for sending the packets, instead of
|
| 5854 | the current primary path.
|
| 5855 |
|
| 5856 | o unorder flag - this flag, if present, indicates that the user
|
| 5857 | would like the data delivered in an unordered fashion to the peer
|
| 5858 | (i.e., the U flag is set to 1 on all DATA chunks carrying this
|
| 5859 | message).
|
| 5860 |
|
| 5861 | o no-bundle flag - instructs SCTP not to bundle this user data with
|
| 5862 | other outbound DATA chunks. SCTP MAY still bundle even when this
|
| 5863 | flag is present, when faced with network congestion.
|
| 5864 |
|
| 5865 | o payload protocol-id - A 32 bit unsigned integer that is to be
|
| 5866 | passed to the peer indicating the type of payload protocol data
|
| 5867 | being transmitted. This value is passed as opaque data by SCTP.
|
| 5868 |
|
| 5869 | F) Set Primary
|
| 5870 |
|
| 5871 | Format: SETPRIMARY(association id, destination transport address,
|
| 5872 | [source transport address] )
|
| 5873 | -> result
|
| 5874 |
|
| 5875 | Instructs the local SCTP to use the specified destination transport
|
| 5876 | address as primary path for sending packets.
|
| 5877 |
|
| 5878 |
|
| 5879 |
|
| 5880 |
|
| 5881 |
|
| 5882 | Stewart, et al. Standards Track [Page 105]
|
| 5883 |
|
| 5884 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5885 |
|
| 5886 |
|
| 5887 | The result of attempting this operation shall be returned. If the
|
| 5888 | specified destination transport address is not present in the
|
| 5889 | "destination transport address list" returned earlier in an associate
|
| 5890 | command or communication up notification, an error shall be returned.
|
| 5891 |
|
| 5892 | Mandatory attributes:
|
| 5893 |
|
| 5894 | o association id - local handle to the SCTP association
|
| 5895 |
|
| 5896 | o destination transport address - specified as one of the transport
|
| 5897 | addresses of the peer endpoint, which should be used as primary
|
| 5898 | address for sending packets. This overrides the current primary
|
| 5899 | address information maintained by the local SCTP endpoint.
|
| 5900 |
|
| 5901 | Optional attributes:
|
| 5902 |
|
| 5903 | o source transport address - optionally, some implementations may
|
| 5904 | allow you to set the default source address placed in all outgoing
|
| 5905 | IP datagrams.
|
| 5906 |
|
| 5907 | G) Receive
|
| 5908 |
|
| 5909 | Format: RECEIVE(association id, buffer address, buffer size
|
| 5910 | [,stream id])
|
| 5911 | -> byte count [,transport address] [,stream id] [,stream sequence
|
| 5912 | number] [,partial flag] [,delivery number] [,payload protocol-id]
|
| 5913 |
|
| 5914 | This primitive shall read the first user message in the SCTP in-queue
|
| 5915 | into the buffer specified by ULP, if there is one available. The
|
| 5916 | size of the message read, in bytes, will be returned. It may,
|
| 5917 | depending on the specific implementation, also return other
|
| 5918 | information such as the sender's address, the stream id on which it
|
| 5919 | is received, whether there are more messages available for retrieval,
|
| 5920 | etc. For ordered messages, their stream sequence number may also be
|
| 5921 | returned.
|
| 5922 |
|
| 5923 | Depending upon the implementation, if this primitive is invoked when
|
| 5924 | no message is available the implementation should return an
|
| 5925 | indication of this condition or should block the invoking process
|
| 5926 | until data does become available.
|
| 5927 |
|
| 5928 | Mandatory attributes:
|
| 5929 |
|
| 5930 | o association id - local handle to the SCTP association
|
| 5931 |
|
| 5932 | o buffer address - the memory location indicated by the ULP to store
|
| 5933 | the received message.
|
| 5934 |
|
| 5935 |
|
| 5936 |
|
| 5937 |
|
| 5938 | Stewart, et al. Standards Track [Page 106]
|
| 5939 |
|
| 5940 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5941 |
|
| 5942 |
|
| 5943 | o buffer size - the maximum size of data to be received, in bytes.
|
| 5944 |
|
| 5945 | Optional attributes:
|
| 5946 |
|
| 5947 | o stream id - to indicate which stream to receive the data on.
|
| 5948 |
|
| 5949 | o stream sequence number - the stream sequence number assigned by
|
| 5950 | the sending SCTP peer.
|
| 5951 |
|
| 5952 | o partial flag - if this returned flag is set to 1, then this
|
| 5953 | Receive contains a partial delivery of the whole message. When
|
| 5954 | this flag is set, the stream id and stream sequence number MUST
|
| 5955 | accompany this receive. When this flag is set to 0, it indicates
|
| 5956 | that no more deliveries will be received for this stream sequence
|
| 5957 | number.
|
| 5958 |
|
| 5959 | o payload protocol-id - A 32 bit unsigned integer that is received
|
| 5960 | from the peer indicating the type of payload protocol of the
|
| 5961 | received data. This value is passed as opaque data by SCTP.
|
| 5962 |
|
| 5963 | H) Status
|
| 5964 |
|
| 5965 | Format: STATUS(association id)
|
| 5966 | -> status data
|
| 5967 |
|
| 5968 | This primitive should return a data block containing the following
|
| 5969 | information:
|
| 5970 | association connection state,
|
| 5971 | destination transport address list,
|
| 5972 | destination transport address reachability states,
|
| 5973 | current receiver window size,
|
| 5974 | current congestion window sizes,
|
| 5975 | number of unacknowledged DATA chunks,
|
| 5976 | number of DATA chunks pending receipt,
|
| 5977 | primary path,
|
| 5978 | most recent SRTT on primary path,
|
| 5979 | RTO on primary path,
|
| 5980 | SRTT and RTO on other destination addresses, etc.
|
| 5981 |
|
| 5982 | Mandatory attributes:
|
| 5983 |
|
| 5984 | o association id - local handle to the SCTP association
|
| 5985 |
|
| 5986 | Optional attributes:
|
| 5987 |
|
| 5988 | None.
|
| 5989 |
|
| 5990 |
|
| 5991 |
|
| 5992 |
|
| 5993 |
|
| 5994 | Stewart, et al. Standards Track [Page 107]
|
| 5995 |
|
| 5996 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 5997 |
|
| 5998 |
|
| 5999 | I) Change Heartbeat
|
| 6000 |
|
| 6001 | Format: CHANGEHEARTBEAT(association id, destination transport address,
|
| 6002 | new state [,interval])
|
| 6003 | -> result
|
| 6004 |
|
| 6005 | Instructs the local endpoint to enable or disable heartbeat on the
|
| 6006 | specified destination transport address.
|
| 6007 |
|
| 6008 | The result of attempting this operation shall be returned.
|
| 6009 |
|
| 6010 | Note: Even when enabled, heartbeat will not take place if the
|
| 6011 | destination transport address is not idle.
|
| 6012 |
|
| 6013 | Mandatory attributes:
|
| 6014 |
|
| 6015 | o association id - local handle to the SCTP association
|
| 6016 |
|
| 6017 | o destination transport address - specified as one of the transport
|
| 6018 | addresses of the peer endpoint.
|
| 6019 |
|
| 6020 | o new state - the new state of heartbeat for this destination
|
| 6021 | transport address (either enabled or disabled).
|
| 6022 |
|
| 6023 | Optional attributes:
|
| 6024 |
|
| 6025 | o interval - if present, indicates the frequency of the heartbeat if
|
| 6026 | this is to enable heartbeat on a destination transport address.
|
| 6027 | This value is added to the RTO of the destination transport
|
| 6028 | address. This value, if present, effects all destinations.
|
| 6029 |
|
| 6030 | J) Request HeartBeat
|
| 6031 |
|
| 6032 | Format: REQUESTHEARTBEAT(association id, destination transport
|
| 6033 | address)
|
| 6034 | -> result
|
| 6035 |
|
| 6036 | Instructs the local endpoint to perform a HeartBeat on the specified
|
| 6037 | destination transport address of the given association. The returned
|
| 6038 | result should indicate whether the transmission of the HEARTBEAT
|
| 6039 | chunk to the destination address is successful.
|
| 6040 |
|
| 6041 | Mandatory attributes:
|
| 6042 |
|
| 6043 | o association id - local handle to the SCTP association
|
| 6044 |
|
| 6045 | o destination transport address - the transport address of the
|
| 6046 | association on which a heartbeat should be issued.
|
| 6047 |
|
| 6048 |
|
| 6049 |
|
| 6050 | Stewart, et al. Standards Track [Page 108]
|
| 6051 |
|
| 6052 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6053 |
|
| 6054 |
|
| 6055 | K) Get SRTT Report
|
| 6056 |
|
| 6057 | Format: GETSRTTREPORT(association id, destination transport address)
|
| 6058 | -> srtt result
|
| 6059 |
|
| 6060 | Instructs the local SCTP to report the current SRTT measurement on
|
| 6061 | the specified destination transport address of the given association.
|
| 6062 | The returned result can be an integer containing the most recent SRTT
|
| 6063 | in milliseconds.
|
| 6064 |
|
| 6065 | Mandatory attributes:
|
| 6066 |
|
| 6067 | o association id - local handle to the SCTP association
|
| 6068 |
|
| 6069 | o destination transport address - the transport address of the
|
| 6070 | association on which the SRTT measurement is to be reported.
|
| 6071 |
|
| 6072 | L) Set Failure Threshold
|
| 6073 |
|
| 6074 | Format: SETFAILURETHRESHOLD(association id, destination transport
|
| 6075 | address, failure threshold)
|
| 6076 | -> result
|
| 6077 |
|
| 6078 | This primitive allows the local SCTP to customize the reachability
|
| 6079 | failure detection threshold 'Path.Max.Retrans' for the specified
|
| 6080 | destination address.
|
| 6081 |
|
| 6082 | Mandatory attributes:
|
| 6083 |
|
| 6084 | o association id - local handle to the SCTP association
|
| 6085 |
|
| 6086 | o destination transport address - the transport address of the
|
| 6087 | association on which the failure detection threshold is to be set.
|
| 6088 |
|
| 6089 | o failure threshold - the new value of 'Path.Max.Retrans' for the
|
| 6090 | destination address.
|
| 6091 |
|
| 6092 | M) Set Protocol Parameters
|
| 6093 |
|
| 6094 | Format: SETPROTOCOLPARAMETERS(association id, [,destination transport
|
| 6095 | address,] protocol parameter list)
|
| 6096 | -> result
|
| 6097 |
|
| 6098 | This primitive allows the local SCTP to customize the protocol
|
| 6099 | parameters.
|
| 6100 |
|
| 6101 |
|
| 6102 |
|
| 6103 |
|
| 6104 |
|
| 6105 |
|
| 6106 | Stewart, et al. Standards Track [Page 109]
|
| 6107 |
|
| 6108 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6109 |
|
| 6110 |
|
| 6111 | Mandatory attributes:
|
| 6112 |
|
| 6113 | o association id - local handle to the SCTP association
|
| 6114 |
|
| 6115 | o protocol parameter list - The specific names and values of the
|
| 6116 | protocol parameters (e.g., Association.Max.Retrans [see Section
|
| 6117 | 14]) that the SCTP user wishes to customize.
|
| 6118 |
|
| 6119 | Optional attributes:
|
| 6120 |
|
| 6121 | o destination transport address - some of the protocol parameters
|
| 6122 | may be set on a per destination transport address basis.
|
| 6123 |
|
| 6124 | N) Receive unsent message
|
| 6125 |
|
| 6126 | Format: RECEIVE_UNSENT(data retrieval id, buffer address, buffer size
|
| 6127 | [,stream id] [, stream sequence number] [,partial flag]
|
| 6128 | [,payload protocol-id])
|
| 6129 |
|
| 6130 | o data retrieval id - The identification passed to the ULP in the
|
| 6131 | failure notification.
|
| 6132 |
|
| 6133 | o buffer address - the memory location indicated by the ULP to store
|
| 6134 | the received message.
|
| 6135 |
|
| 6136 | o buffer size - the maximum size of data to be received, in bytes.
|
| 6137 |
|
| 6138 | Optional attributes:
|
| 6139 |
|
| 6140 | o stream id - this is a return value that is set to indicate
|
| 6141 | which stream the data was sent to.
|
| 6142 |
|
| 6143 | o stream sequence number - this value is returned indicating
|
| 6144 | the stream sequence number that was associated with the message.
|
| 6145 |
|
| 6146 | o partial flag - if this returned flag is set to 1, then this
|
| 6147 | message is a partial delivery of the whole message. When
|
| 6148 | this flag is set, the stream id and stream sequence number MUST
|
| 6149 | accompany this receive. When this flag is set to 0, it indicates
|
| 6150 | that no more deliveries will be received for this stream sequence
|
| 6151 | number.
|
| 6152 |
|
| 6153 | o payload protocol-id - The 32 bit unsigned integer that was sent to
|
| 6154 | be sent to the peer indicating the type of payload protocol of the
|
| 6155 | received data.
|
| 6156 |
|
| 6157 |
|
| 6158 |
|
| 6159 |
|
| 6160 |
|
| 6161 |
|
| 6162 | Stewart, et al. Standards Track [Page 110]
|
| 6163 |
|
| 6164 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6165 |
|
| 6166 |
|
| 6167 | O) Receive unacknowledged message
|
| 6168 |
|
| 6169 | Format: RECEIVE_UNACKED(data retrieval id, buffer address, buffer size,
|
| 6170 | [,stream id] [, stream sequence number] [,partial flag]
|
| 6171 | [,payload protocol-id])
|
| 6172 |
|
| 6173 | o data retrieval id - The identification passed to the ULP in the
|
| 6174 | failure notification.
|
| 6175 |
|
| 6176 | o buffer address - the memory location indicated by the ULP to store
|
| 6177 | the received message.
|
| 6178 |
|
| 6179 | o buffer size - the maximum size of data to be received, in bytes.
|
| 6180 |
|
| 6181 | Optional attributes:
|
| 6182 |
|
| 6183 | o stream id - this is a return value that is set to indicate which
|
| 6184 | stream the data was sent to.
|
| 6185 |
|
| 6186 | o stream sequence number - this value is returned indicating the
|
| 6187 | stream sequence number that was associated with the message.
|
| 6188 |
|
| 6189 | o partial flag - if this returned flag is set to 1, then this
|
| 6190 | message is a partial delivery of the whole message. When this
|
| 6191 | flag is set, the stream id and stream sequence number MUST
|
| 6192 | accompany this receive. When this flag is set to 0, it indicates
|
| 6193 | that no more deliveries will be received for this stream sequence
|
| 6194 | number.
|
| 6195 |
|
| 6196 | o payload protocol-id - The 32 bit unsigned integer that was sent to
|
| 6197 | be sent to the peer indicating the type of payload protocol of the
|
| 6198 | received data.
|
| 6199 |
|
| 6200 | P) Destroy SCTP instance
|
| 6201 |
|
| 6202 | Format: DESTROY(local SCTP instance name)
|
| 6203 |
|
| 6204 | o local SCTP instance name - this is the value that was passed to
|
| 6205 | the application in the initialize primitive and it indicates which
|
| 6206 | SCTP instance to be destroyed.
|
| 6207 |
|
| 6208 | 10.2 SCTP-to-ULP
|
| 6209 |
|
| 6210 | It is assumed that the operating system or application environment
|
| 6211 | provides a means for the SCTP to asynchronously signal the ULP
|
| 6212 | process. When SCTP does signal an ULP process, certain information
|
| 6213 | is passed to the ULP.
|
| 6214 |
|
| 6215 |
|
| 6216 |
|
| 6217 |
|
| 6218 | Stewart, et al. Standards Track [Page 111]
|
| 6219 |
|
| 6220 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6221 |
|
| 6222 |
|
| 6223 | IMPLEMENTATION NOTE: In some cases this may be done through a
|
| 6224 | separate socket or error channel.
|
| 6225 |
|
| 6226 | A) DATA ARRIVE notification
|
| 6227 |
|
| 6228 | SCTP shall invoke this notification on the ULP when a user message is
|
| 6229 | successfully received and ready for retrieval.
|
| 6230 |
|
| 6231 | The following may be optionally be passed with the notification:
|
| 6232 |
|
| 6233 | o association id - local handle to the SCTP association
|
| 6234 |
|
| 6235 | o stream id - to indicate which stream the data is received on.
|
| 6236 |
|
| 6237 | B) SEND FAILURE notification
|
| 6238 |
|
| 6239 | If a message can not be delivered SCTP shall invoke this notification
|
| 6240 | on the ULP.
|
| 6241 |
|
| 6242 | The following may be optionally be passed with the notification:
|
| 6243 |
|
| 6244 | o association id - local handle to the SCTP association
|
| 6245 |
|
| 6246 | o data retrieval id - an identification used to retrieve unsent and
|
| 6247 | unacknowledged data.
|
| 6248 |
|
| 6249 | o cause code - indicating the reason of the failure, e.g., size too
|
| 6250 | large, message life-time expiration, etc.
|
| 6251 |
|
| 6252 | o context - optional information associated with this message (see D
|
| 6253 | in Section 10.1).
|
| 6254 |
|
| 6255 | C) NETWORK STATUS CHANGE notification
|
| 6256 |
|
| 6257 | When a destination transport address is marked inactive (e.g., when
|
| 6258 | SCTP detects a failure), or marked active (e.g., when SCTP detects a
|
| 6259 | recovery), SCTP shall invoke this notification on the ULP.
|
| 6260 |
|
| 6261 | The following shall be passed with the notification:
|
| 6262 |
|
| 6263 | o association id - local handle to the SCTP association
|
| 6264 |
|
| 6265 | o destination transport address - This indicates the destination
|
| 6266 | transport address of the peer endpoint affected by the change;
|
| 6267 |
|
| 6268 | o new-status - This indicates the new status.
|
| 6269 |
|
| 6270 |
|
| 6271 |
|
| 6272 |
|
| 6273 |
|
| 6274 | Stewart, et al. Standards Track [Page 112]
|
| 6275 |
|
| 6276 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6277 |
|
| 6278 |
|
| 6279 | D) COMMUNICATION UP notification
|
| 6280 |
|
| 6281 | This notification is used when SCTP becomes ready to send or receive
|
| 6282 | user messages, or when a lost communication to an endpoint is
|
| 6283 | restored.
|
| 6284 |
|
| 6285 | IMPLEMENTATION NOTE: If ASSOCIATE primitive is implemented as a
|
| 6286 | blocking function call, the association parameters are returned as a
|
| 6287 | result of the ASSOCIATE primitive itself. In that case,
|
| 6288 | COMMUNICATION UP notification is optional at the association
|
| 6289 | initiator's side.
|
| 6290 |
|
| 6291 | The following shall be passed with the notification:
|
| 6292 |
|
| 6293 | o association id - local handle to the SCTP association
|
| 6294 |
|
| 6295 | o status - This indicates what type of event has occurred
|
| 6296 |
|
| 6297 | o destination transport address list - the complete set of transport
|
| 6298 | addresses of the peer
|
| 6299 |
|
| 6300 | o outbound stream count - the maximum number of streams allowed to
|
| 6301 | be used in this association by the ULP
|
| 6302 |
|
| 6303 | o inbound stream count - the number of streams the peer endpoint has
|
| 6304 | requested with this association (this may not be the same number
|
| 6305 | as 'outbound stream count').
|
| 6306 |
|
| 6307 | E) COMMUNICATION LOST notification
|
| 6308 |
|
| 6309 | When SCTP loses communication to an endpoint completely (e.g., via
|
| 6310 | Heartbeats) or detects that the endpoint has performed an abort
|
| 6311 | operation, it shall invoke this notification on the ULP.
|
| 6312 |
|
| 6313 | The following shall be passed with the notification:
|
| 6314 |
|
| 6315 | o association id - local handle to the SCTP association
|
| 6316 |
|
| 6317 | o status - This indicates what type of event has occurred; The status
|
| 6318 | may indicate a failure OR a normal termination event
|
| 6319 | occurred in response to a shutdown or abort request.
|
| 6320 |
|
| 6321 | The following may be passed with the notification:
|
| 6322 |
|
| 6323 | o data retrieval id - an identification used to retrieve unsent and
|
| 6324 | unacknowledged data.
|
| 6325 |
|
| 6326 | o last-acked - the TSN last acked by that peer endpoint;
|
| 6327 |
|
| 6328 |
|
| 6329 |
|
| 6330 | Stewart, et al. Standards Track [Page 113]
|
| 6331 |
|
| 6332 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6333 |
|
| 6334 |
|
| 6335 | o last-sent - the TSN last sent to that peer endpoint;
|
| 6336 |
|
| 6337 | F) COMMUNICATION ERROR notification
|
| 6338 |
|
| 6339 | When SCTP receives an ERROR chunk from its peer and decides to notify
|
| 6340 | its ULP, it can invoke this notification on the ULP.
|
| 6341 |
|
| 6342 | The following can be passed with the notification:
|
| 6343 |
|
| 6344 | o association id - local handle to the SCTP association
|
| 6345 |
|
| 6346 | o error info - this indicates the type of error and optionally some
|
| 6347 | additional information received through the ERROR chunk.
|
| 6348 |
|
| 6349 | G) RESTART notification
|
| 6350 |
|
| 6351 | When SCTP detects that the peer has restarted, it may send this
|
| 6352 | notification to its ULP.
|
| 6353 |
|
| 6354 | The following can be passed with the notification:
|
| 6355 |
|
| 6356 | o association id - local handle to the SCTP association
|
| 6357 |
|
| 6358 | H) SHUTDOWN COMPLETE notification
|
| 6359 |
|
| 6360 | When SCTP completes the shutdown procedures (section 9.2) this
|
| 6361 | notification is passed to the upper layer.
|
| 6362 |
|
| 6363 | The following can be passed with the notification:
|
| 6364 |
|
| 6365 | o association id - local handle to the SCTP association
|
| 6366 |
|
| 6367 | 11. Security Considerations
|
| 6368 |
|
| 6369 | 11.1 Security Objectives
|
| 6370 |
|
| 6371 | As a common transport protocol designed to reliably carry time-
|
| 6372 | sensitive user messages, such as billing or signaling messages for
|
| 6373 | telephony services, between two networked endpoints, SCTP has the
|
| 6374 | following security objectives.
|
| 6375 |
|
| 6376 | - availability of reliable and timely data transport services
|
| 6377 | - integrity of the user-to-user information carried by SCTP
|
| 6378 |
|
| 6379 |
|
| 6380 |
|
| 6381 |
|
| 6382 |
|
| 6383 |
|
| 6384 |
|
| 6385 |
|
| 6386 | Stewart, et al. Standards Track [Page 114]
|
| 6387 |
|
| 6388 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6389 |
|
| 6390 |
|
| 6391 | 11.2 SCTP Responses To Potential Threats
|
| 6392 |
|
| 6393 | SCTP may potentially be used in a wide variety of risk situations.
|
| 6394 | It is important for operator(s) of systems running SCTP to analyze
|
| 6395 | their particular situations and decide on the appropriate counter-
|
| 6396 | measures.
|
| 6397 |
|
| 6398 | Operators of systems running SCTP should consult [RFC2196] for
|
| 6399 | guidance in securing their site.
|
| 6400 |
|
| 6401 | 11.2.1 Countering Insider Attacks
|
| 6402 |
|
| 6403 | The principles of [RFC2196] should be applied to minimize the risk of
|
| 6404 | theft of information or sabotage by insiders. Such procedures
|
| 6405 | include publication of security policies, control of access at the
|
| 6406 | physical, software, and network levels, and separation of services.
|
| 6407 |
|
| 6408 | 11.2.2 Protecting against Data Corruption in the Network
|
| 6409 |
|
| 6410 | Where the risk of undetected errors in datagrams delivered by the
|
| 6411 | lower layer transport services is considered to be too great,
|
| 6412 | additional integrity protection is required. If this additional
|
| 6413 | protection were provided in the application-layer, the SCTP header
|
| 6414 | would remain vulnerable to deliberate integrity attacks. While the
|
| 6415 | existing SCTP mechanisms for detection of packet replays are
|
| 6416 | considered sufficient for normal operation, stronger protections are
|
| 6417 | needed to protect SCTP when the operating environment contains
|
| 6418 | significant risk of deliberate attacks from a sophisticated
|
| 6419 | adversary.
|
| 6420 |
|
| 6421 | In order to promote software code-reuse, to avoid re-inventing the
|
| 6422 | wheel, and to avoid gratuitous complexity to SCTP, the IP
|
| 6423 | Authentication Header [RFC2402] SHOULD be used when the threat
|
| 6424 | environment requires stronger integrity protections, but does not
|
| 6425 | require confidentiality.
|
| 6426 |
|
| 6427 | A widely implemented BSD Sockets API extension exists for
|
| 6428 | applications to request IP security services, such as AH or ESP from
|
| 6429 | an operating system kernel. Applications can use such an API to
|
| 6430 | request AH whenever AH use is appropriate.
|
| 6431 |
|
| 6432 | 11.2.3 Protecting Confidentiality
|
| 6433 |
|
| 6434 | In most cases, the risk of breach of confidentiality applies to the
|
| 6435 | signaling data payload, not to the SCTP or lower-layer protocol
|
| 6436 | overheads. If that is true, encryption of the SCTP user data only
|
| 6437 | might be considered. As with the supplementary checksum service,
|
| 6438 | user data encryption MAY be performed by the SCTP user application.
|
| 6439 |
|
| 6440 |
|
| 6441 |
|
| 6442 | Stewart, et al. Standards Track [Page 115]
|
| 6443 |
|
| 6444 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6445 |
|
| 6446 |
|
| 6447 | Alternately, the user application MAY use an implementation-specific
|
| 6448 | API to request that the IP Encapsulating Security Payload (ESP)
|
| 6449 | [RFC2406] be used to provide confidentiality and integrity.
|
| 6450 |
|
| 6451 | Particularly for mobile users, the requirement for confidentiality
|
| 6452 | might include the masking of IP addresses and ports. In this case
|
| 6453 | ESP SHOULD be used instead of application-level confidentiality. If
|
| 6454 | ESP is used to protect confidentiality of SCTP traffic, an ESP
|
| 6455 | cryptographic transform that includes cryptographic integrity
|
| 6456 | protection MUST be used, because if there is a confidentiality threat
|
| 6457 | there will also be a strong integrity threat.
|
| 6458 |
|
| 6459 | Whenever ESP is in use, application-level encryption is not generally
|
| 6460 | required.
|
| 6461 |
|
| 6462 | Regardless of where confidentiality is provided, the ISAKMP [RFC2408]
|
| 6463 | and the Internet Key Exchange (IKE) [RFC2409] SHOULD be used for key
|
| 6464 | management.
|
| 6465 |
|
| 6466 | Operators should consult [RFC2401] for more information on the
|
| 6467 | security services available at and immediately above the Internet
|
| 6468 | Protocol layer.
|
| 6469 |
|
| 6470 | 11.2.4 Protecting against Blind Denial of Service Attacks
|
| 6471 |
|
| 6472 | A blind attack is one where the attacker is unable to intercept or
|
| 6473 | otherwise see the content of data flows passing to and from the
|
| 6474 | target SCTP node. Blind denial of service attacks may take the form
|
| 6475 | of flooding, masquerade, or improper monopolization of services.
|
| 6476 |
|
| 6477 | 11.2.4.1 Flooding
|
| 6478 |
|
| 6479 | The objective of flooding is to cause loss of service and incorrect
|
| 6480 | behavior at target systems through resource exhaustion, interference
|
| 6481 | with legitimate transactions, and exploitation of buffer-related
|
| 6482 | software bugs. Flooding may be directed either at the SCTP node or
|
| 6483 | at resources in the intervening IP Access Links or the Internet.
|
| 6484 | Where the latter entities are the target, flooding will manifest
|
| 6485 | itself as loss of network services, including potentially the breach
|
| 6486 | of any firewalls in place.
|
| 6487 |
|
| 6488 | In general, protection against flooding begins at the equipment
|
| 6489 | design level, where it includes measures such as:
|
| 6490 |
|
| 6491 | - avoiding commitment of limited resources before determining that
|
| 6492 | the request for service is legitimate
|
| 6493 |
|
| 6494 |
|
| 6495 |
|
| 6496 |
|
| 6497 |
|
| 6498 | Stewart, et al. Standards Track [Page 116]
|
| 6499 |
|
| 6500 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6501 |
|
| 6502 |
|
| 6503 | - giving priority to completion of processing in progress over the
|
| 6504 | acceptance of new work
|
| 6505 |
|
| 6506 | - identification and removal of duplicate or stale queued requests
|
| 6507 | for service.
|
| 6508 |
|
| 6509 | - not responding to unexpected packets sent to non-unicast
|
| 6510 | addresses.
|
| 6511 |
|
| 6512 | Network equipment should be capable of generating an alarm and log if
|
| 6513 | a suspicious increase in traffic occurs. The log should provide
|
| 6514 | information such as the identity of the incoming link and source
|
| 6515 | address(es) used which will help the network or SCTP system operator
|
| 6516 | to take protective measures. Procedures should be in place for the
|
| 6517 | operator to act on such alarms if a clear pattern of abuse emerges.
|
| 6518 |
|
| 6519 | The design of SCTP is resistant to flooding attacks, particularly in
|
| 6520 | its use of a four-way start-up handshake, its use of a cookie to
|
| 6521 | defer commitment of resources at the responding SCTP node until the
|
| 6522 | handshake is completed, and its use of a Verification Tag to prevent
|
| 6523 | insertion of extraneous packets into the flow of an established
|
| 6524 | association.
|
| 6525 |
|
| 6526 | The IP Authentication Header and Encapsulating Security Payload might
|
| 6527 | be useful in reducing the risk of certain kinds of denial of service
|
| 6528 | attacks."
|
| 6529 |
|
| 6530 | The use of the Host Name feature in the INIT chunk could be used to
|
| 6531 | flood a target DNS server. A large backlog of DNS queries, resolving
|
| 6532 | the Host Name received in the INIT chunk to IP addresses, could be
|
| 6533 | accomplished by sending INIT's to multiple hosts in a given domain.
|
| 6534 | In addition, an attacker could use the Host Name feature in an
|
| 6535 | indirect attack on a third party by sending large numbers of INITs to
|
| 6536 | random hosts containing the host name of the target. In addition to
|
| 6537 | the strain on DNS resources, this could also result in large numbers
|
| 6538 | of INIT ACKs being sent to the target. One method to protect against
|
| 6539 | this type of attack is to verify that the IP addresses received from
|
| 6540 | DNS include the source IP address of the original INIT. If the list
|
| 6541 | of IP addresses received from DNS does not include the source IP
|
| 6542 | address of the INIT, the endpoint MAY silently discard the INIT.
|
| 6543 | This last option will not protect against the attack against the DNS.
|
| 6544 |
|
| 6545 |
|
| 6546 |
|
| 6547 |
|
| 6548 |
|
| 6549 |
|
| 6550 |
|
| 6551 |
|
| 6552 |
|
| 6553 |
|
| 6554 | Stewart, et al. Standards Track [Page 117]
|
| 6555 |
|
| 6556 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6557 |
|
| 6558 |
|
| 6559 | 11.2.4.2 Blind Masquerade
|
| 6560 |
|
| 6561 | Masquerade can be used to deny service in several ways:
|
| 6562 |
|
| 6563 | - by tying up resources at the target SCTP node to which the
|
| 6564 | impersonated node has limited access. For example, the target
|
| 6565 | node may by policy permit a maximum of one SCTP association with
|
| 6566 | the impersonated SCTP node. The masquerading attacker may attempt
|
| 6567 | to establish an association purporting to come from the
|
| 6568 | impersonated node so that the latter cannot do so when it requires
|
| 6569 | it.
|
| 6570 |
|
| 6571 | - by deliberately allowing the impersonation to be detected, thereby
|
| 6572 | provoking counter-measures which cause the impersonated node to be
|
| 6573 | locked out of the target SCTP node.
|
| 6574 |
|
| 6575 | - by interfering with an established association by inserting
|
| 6576 | extraneous content such as a SHUTDOWN request.
|
| 6577 |
|
| 6578 | SCTP reduces the risk of blind masquerade attacks through IP spoofing
|
| 6579 | by use of the four-way startup handshake. Man-in-the-middle
|
| 6580 | masquerade attacks are discussed in Section 11.3 below. Because the
|
| 6581 | initial exchange is memoryless, no lockout mechanism is triggered by
|
| 6582 | blind masquerade attacks. In addition, the INIT ACK containing the
|
| 6583 | State Cookie is transmitted back to the IP address from which it
|
| 6584 | received the INIT. Thus the attacker would not receive the INIT ACK
|
| 6585 | containing the State Cookie. SCTP protects against insertion of
|
| 6586 | extraneous packets into the flow of an established association by use
|
| 6587 | of the Verification Tag.
|
| 6588 |
|
| 6589 | Logging of received INIT requests and abnormalities such as
|
| 6590 | unexpected INIT ACKs might be considered as a way to detect patterns
|
| 6591 | of hostile activity. However, the potential usefulness of such
|
| 6592 | logging must be weighed against the increased SCTP startup processing
|
| 6593 | it implies, rendering the SCTP node more vulnerable to flooding
|
| 6594 | attacks. Logging is pointless without the establishment of operating
|
| 6595 | procedures to review and analyze the logs on a routine basis.
|
| 6596 |
|
| 6597 | 11.2.4.3 Improper Monopolization of Services
|
| 6598 |
|
| 6599 | Attacks under this heading are performed openly and legitimately by
|
| 6600 | the attacker. They are directed against fellow users of the target
|
| 6601 | SCTP node or of the shared resources between the attacker and the
|
| 6602 | target node. Possible attacks include the opening of a large number
|
| 6603 | of associations between the attacker's node and the target, or
|
| 6604 | transfer of large volumes of information within a legitimately-
|
| 6605 | established association.
|
| 6606 |
|
| 6607 |
|
| 6608 |
|
| 6609 |
|
| 6610 | Stewart, et al. Standards Track [Page 118]
|
| 6611 |
|
| 6612 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6613 |
|
| 6614 |
|
| 6615 | Policy limits should be placed on the number of associations per
|
| 6616 | adjoining SCTP node. SCTP user applications should be capable of
|
| 6617 | detecting large volumes of illegitimate or "no-op" messages within a
|
| 6618 | given association and either logging or terminating the association
|
| 6619 | as a result, based on local policy.
|
| 6620 |
|
| 6621 | 11.3 Protection against Fraud and Repudiation
|
| 6622 |
|
| 6623 | The objective of fraud is to obtain services without authorization
|
| 6624 | and specifically without paying for them. In order to achieve this
|
| 6625 | objective, the attacker must induce the SCTP user application at the
|
| 6626 | target SCTP node to provide the desired service while accepting
|
| 6627 | invalid billing data or failing to collect it. Repudiation is a
|
| 6628 | related problem, since it may occur as a deliberate act of fraud or
|
| 6629 | simply because the repudiating party kept inadequate records of
|
| 6630 | service received.
|
| 6631 |
|
| 6632 | Potential fraudulent attacks include interception and misuse of
|
| 6633 | authorizing information such as credit card numbers, blind masquerade
|
| 6634 | and replay, and man-in-the middle attacks which modify the packets
|
| 6635 | passing through a target SCTP association in real time.
|
| 6636 |
|
| 6637 | The interception attack is countered by the confidentiality measures
|
| 6638 | discussed in Section 11.2.3 above.
|
| 6639 |
|
| 6640 | Section 11.2.4.2 describes how SCTP is resistant to blind masquerade
|
| 6641 | attacks, as a result of the four-way startup handshake and the
|
| 6642 | Verification Tag. The Verification Tag and TSN together are
|
| 6643 | protections against blind replay attacks, where the replay is into an
|
| 6644 | existing association.
|
| 6645 |
|
| 6646 | However, SCTP does not protect against man-in-the-middle attacks
|
| 6647 | where the attacker is able to intercept and alter the packets sent
|
| 6648 | and received in an association. For example, the INIT ACK will have
|
| 6649 | sufficient information sent on the wire for an adversary in the
|
| 6650 | middle to hijack an existing SCTP association. Where a significant
|
| 6651 | possibility of such attacks is seen to exist, or where possible
|
| 6652 | repudiation is an issue, the use of the IPSEC AH service is
|
| 6653 | recommended to ensure both the integrity and the authenticity of the
|
| 6654 | SCTP packets passed.
|
| 6655 |
|
| 6656 | SCTP also provides no protection against attacks originating at or
|
| 6657 | beyond the SCTP node and taking place within the context of an
|
| 6658 | existing association. Prevention of such attacks should be covered
|
| 6659 | by appropriate security policies at the host site, as discussed in
|
| 6660 | Section 11.2.1.
|
| 6661 |
|
| 6662 |
|
| 6663 |
|
| 6664 |
|
| 6665 |
|
| 6666 | Stewart, et al. Standards Track [Page 119]
|
| 6667 |
|
| 6668 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6669 |
|
| 6670 |
|
| 6671 | 12. Recommended Transmission Control Block (TCB) Parameters
|
| 6672 |
|
| 6673 | This section details a recommended set of parameters that should be
|
| 6674 | contained within the TCB for an implementation. This section is for
|
| 6675 | illustrative purposes and should not be deemed as requirements on an
|
| 6676 | implementation or as an exhaustive list of all parameters inside an
|
| 6677 | SCTP TCB. Each implementation may need its own additional parameters
|
| 6678 | for optimization.
|
| 6679 |
|
| 6680 | 12.1 Parameters necessary for the SCTP instance
|
| 6681 |
|
| 6682 | Associations: A list of current associations and mappings to the data
|
| 6683 | consumers for each association. This may be in the
|
| 6684 | form of a hash table or other implementation dependent
|
| 6685 | structure. The data consumers may be process
|
| 6686 | identification information such as file descriptors,
|
| 6687 | named pipe pointer, or table pointers dependent on how
|
| 6688 | SCTP is implemented.
|
| 6689 |
|
| 6690 | Secret Key: A secret key used by this endpoint to compute the MAC.
|
| 6691 | This SHOULD be a cryptographic quality random number
|
| 6692 | with a sufficient length. Discussion in [RFC1750] can
|
| 6693 | be helpful in selection of the key.
|
| 6694 |
|
| 6695 | Address List: The list of IP addresses that this instance has bound.
|
| 6696 | This information is passed to one's peer(s) in INIT and
|
| 6697 | INIT ACK chunks.
|
| 6698 |
|
| 6699 | SCTP Port: The local SCTP port number the endpoint is bound to.
|
| 6700 |
|
| 6701 | 12.2 Parameters necessary per association (i.e. the TCB)
|
| 6702 |
|
| 6703 | Peer : Tag value to be sent in every packet and is received
|
| 6704 | Verification: in the INIT or INIT ACK chunk.
|
| 6705 | Tag :
|
| 6706 |
|
| 6707 | My : Tag expected in every inbound packet and sent in the
|
| 6708 | Verification: INIT or INIT ACK chunk.
|
| 6709 | Tag :
|
| 6710 |
|
| 6711 | State : A state variable indicating what state the association
|
| 6712 | : is in, i.e. COOKIE-WAIT, COOKIE-ECHOED, ESTABLISHED,
|
| 6713 | : SHUTDOWN-PENDING, SHUTDOWN-SENT, SHUTDOWN-RECEIVED,
|
| 6714 | : SHUTDOWN-ACK-SENT.
|
| 6715 |
|
| 6716 | Note: No "CLOSED" state is illustrated since if a
|
| 6717 | association is "CLOSED" its TCB SHOULD be removed.
|
| 6718 |
|
| 6719 |
|
| 6720 |
|
| 6721 |
|
| 6722 | Stewart, et al. Standards Track [Page 120]
|
| 6723 |
|
| 6724 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6725 |
|
| 6726 |
|
| 6727 | Peer : A list of SCTP transport addresses that the peer is
|
| 6728 | Transport : bound to. This information is derived from the INIT or
|
| 6729 | Address : INIT ACK and is used to associate an inbound packet
|
| 6730 | List : with a given association. Normally this information is
|
| 6731 | : hashed or keyed for quick lookup and access of the TCB.
|
| 6732 |
|
| 6733 | Primary : This is the current primary destination transport
|
| 6734 | Path : address of the peer endpoint. It may also specify a
|
| 6735 | : source transport address on this endpoint.
|
| 6736 |
|
| 6737 | Overall : The overall association error count.
|
| 6738 | Error Count :
|
| 6739 |
|
| 6740 | Overall : The threshold for this association that if the Overall
|
| 6741 | Error : Error Count reaches will cause this association to be
|
| 6742 | Threshold : torn down.
|
| 6743 |
|
| 6744 | Peer Rwnd : Current calculated value of the peer's rwnd.
|
| 6745 |
|
| 6746 | Next TSN : The next TSN number to be assigned to a new DATA chunk.
|
| 6747 | : This is sent in the INIT or INIT ACK chunk to the peer
|
| 6748 | : and incremented each time a DATA chunk is assigned a
|
| 6749 | : TSN (normally just prior to transmit or during
|
| 6750 | : fragmentation).
|
| 6751 |
|
| 6752 | Last Rcvd : This is the last TSN received in sequence. This value
|
| 6753 | TSN : is set initially by taking the peer's Initial TSN,
|
| 6754 | : received in the INIT or INIT ACK chunk, and
|
| 6755 | : subtracting one from it.
|
| 6756 |
|
| 6757 | Mapping : An array of bits or bytes indicating which out of
|
| 6758 | Array : order TSN's have been received (relative to the
|
| 6759 | : Last Rcvd TSN). If no gaps exist, i.e. no out of order
|
| 6760 | : packets have been received, this array will be set to
|
| 6761 | : all zero. This structure may be in the form of a
|
| 6762 | : circular buffer or bit array.
|
| 6763 |
|
| 6764 | Ack State : This flag indicates if the next received packet
|
| 6765 | : is to be responded to with a SACK. This is initialized
|
| 6766 | : to 0. When a packet is received it is incremented.
|
| 6767 | : If this value reaches 2 or more, a SACK is sent and the
|
| 6768 | : value is reset to 0. Note: This is used only when no
|
| 6769 | : DATA chunks are received out of order. When DATA chunks
|
| 6770 | : are out of order, SACK's are not delayed (see Section
|
| 6771 | : 6).
|
| 6772 |
|
| 6773 |
|
| 6774 |
|
| 6775 |
|
| 6776 |
|
| 6777 |
|
| 6778 | Stewart, et al. Standards Track [Page 121]
|
| 6779 |
|
| 6780 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6781 |
|
| 6782 |
|
| 6783 | Inbound : An array of structures to track the inbound streams.
|
| 6784 | Streams : Normally including the next sequence number expected
|
| 6785 | : and possibly the stream number.
|
| 6786 |
|
| 6787 | Outbound : An array of structures to track the outbound streams.
|
| 6788 | Streams : Normally including the next sequence number to
|
| 6789 | : be sent on the stream.
|
| 6790 |
|
| 6791 | Reasm Queue : A re-assembly queue.
|
| 6792 |
|
| 6793 | Local : The list of local IP addresses bound in to this
|
| 6794 | Transport : association.
|
| 6795 | Address :
|
| 6796 | List :
|
| 6797 |
|
| 6798 | Association : The smallest PMTU discovered for all of the
|
| 6799 | PMTU : peer's transport addresses.
|
| 6800 |
|
| 6801 | 12.3 Per Transport Address Data
|
| 6802 |
|
| 6803 | For each destination transport address in the peer's address list
|
| 6804 | derived from the INIT or INIT ACK chunk, a number of data elements
|
| 6805 | needs to be maintained including:
|
| 6806 |
|
| 6807 | Error count : The current error count for this destination.
|
| 6808 |
|
| 6809 | Error : Current error threshold for this destination i.e.
|
| 6810 | Threshold : what value marks the destination down if Error count
|
| 6811 | : reaches this value.
|
| 6812 |
|
| 6813 | cwnd : The current congestion window.
|
| 6814 |
|
| 6815 | ssthresh : The current ssthresh value.
|
| 6816 |
|
| 6817 | RTO : The current retransmission timeout value.
|
| 6818 |
|
| 6819 | SRTT : The current smoothed round trip time.
|
| 6820 |
|
| 6821 | RTTVAR : The current RTT variation.
|
| 6822 |
|
| 6823 | partial : The tracking method for increase of cwnd when in
|
| 6824 | bytes acked : congestion avoidance mode (see Section 6.2.2)
|
| 6825 |
|
| 6826 | state : The current state of this destination, i.e. DOWN, UP,
|
| 6827 | : ALLOW-HB, NO-HEARTBEAT, etc.
|
| 6828 |
|
| 6829 | PMTU : The current known path MTU.
|
| 6830 |
|
| 6831 |
|
| 6832 |
|
| 6833 |
|
| 6834 | Stewart, et al. Standards Track [Page 122]
|
| 6835 |
|
| 6836 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6837 |
|
| 6838 |
|
| 6839 | Per : A timer used by each destination.
|
| 6840 | Destination :
|
| 6841 | Timer :
|
| 6842 |
|
| 6843 | RTO-Pending : A flag used to track if one of the DATA chunks sent to
|
| 6844 | this address is currently being used to compute a
|
| 6845 | RTT. If this flag is 0, the next DATA chunk sent to this
|
| 6846 | destination should be used to compute a RTT and this
|
| 6847 | flag should be set. Every time the RTT calculation
|
| 6848 | completes (i.e. the DATA chunk is SACK'd) clear this
|
| 6849 | flag.
|
| 6850 |
|
| 6851 | last-time : The time this destination was last sent to. This can be
|
| 6852 | used : used to determine if a HEARTBEAT is needed.
|
| 6853 |
|
| 6854 | 12.4 General Parameters Needed
|
| 6855 |
|
| 6856 | Out Queue : A queue of outbound DATA chunks.
|
| 6857 |
|
| 6858 | In Queue : A queue of inbound DATA chunks.
|
| 6859 |
|
| 6860 | 13. IANA Considerations
|
| 6861 |
|
| 6862 | This protocol will require port reservation like TCP for the use of
|
| 6863 | "well known" servers within the Internet. All current TCP ports
|
| 6864 | shall be automatically reserved in the SCTP port address space. New
|
| 6865 | requests should follow IANA's current mechanisms for TCP.
|
| 6866 |
|
| 6867 | This protocol may also be extended through IANA in three ways:
|
| 6868 |
|
| 6869 | -- through definition of additional chunk types,
|
| 6870 | -- through definition of additional parameter types, or
|
| 6871 | -- through definition of additional cause codes within
|
| 6872 | ERROR chunks
|
| 6873 |
|
| 6874 | In the case where a particular ULP using SCTP desires to have its own
|
| 6875 | ports, the ULP should be responsible for registering with IANA for
|
| 6876 | getting its ports assigned.
|
| 6877 |
|
| 6878 | 13.1 IETF-defined Chunk Extension
|
| 6879 |
|
| 6880 | The definition and use of new chunk types is an integral part of
|
| 6881 | SCTP. Thus, new chunk types are assigned by IANA through an IETF
|
| 6882 | Consensus action as defined in [RFC2434].
|
| 6883 |
|
| 6884 | The documentation for a new chunk code type must include the
|
| 6885 | following information:
|
| 6886 |
|
| 6887 |
|
| 6888 |
|
| 6889 |
|
| 6890 | Stewart, et al. Standards Track [Page 123]
|
| 6891 |
|
| 6892 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6893 |
|
| 6894 |
|
| 6895 | a) A long and short name for the new chunk type;
|
| 6896 |
|
| 6897 | b) A detailed description of the structure of the chunk, which MUST
|
| 6898 | conform to the basic structure defined in Section 3.2;
|
| 6899 |
|
| 6900 | c) A detailed definition and description of intended use of each
|
| 6901 | field within the chunk, including the chunk flags if any;
|
| 6902 |
|
| 6903 | d) A detailed procedural description of the use of the new chunk type
|
| 6904 | within the operation of the protocol.
|
| 6905 |
|
| 6906 | The last chunk type (255) is reserved for future extension if
|
| 6907 | necessary.
|
| 6908 |
|
| 6909 | 13.2 IETF-defined Chunk Parameter Extension
|
| 6910 |
|
| 6911 | The assignment of new chunk parameter type codes is done through an
|
| 6912 | IETF Consensus action as defined in [RFC2434]. Documentation of the
|
| 6913 | chunk parameter MUST contain the following information:
|
| 6914 |
|
| 6915 | a) Name of the parameter type.
|
| 6916 |
|
| 6917 | b) Detailed description of the structure of the parameter field.
|
| 6918 | This structure MUST conform to the general type-length-value
|
| 6919 | format described in Section 3.2.1.
|
| 6920 |
|
| 6921 | c) Detailed definition of each component of the parameter value.
|
| 6922 |
|
| 6923 | d) Detailed description of the intended use of this parameter type,
|
| 6924 | and an indication of whether and under what circumstances multiple
|
| 6925 | instances of this parameter type may be found within the same
|
| 6926 | chunk.
|
| 6927 |
|
| 6928 | 13.3 IETF-defined Additional Error Causes
|
| 6929 |
|
| 6930 | Additional cause codes may be allocated in the range 11 to 65535
|
| 6931 | through a Specification Required action as defined in [RFC2434].
|
| 6932 | Provided documentation must include the following information:
|
| 6933 |
|
| 6934 | a) Name of the error condition.
|
| 6935 |
|
| 6936 | b) Detailed description of the conditions under which an SCTP
|
| 6937 | endpoint should issue an ERROR (or ABORT) with this cause code.
|
| 6938 |
|
| 6939 | c) Expected action by the SCTP endpoint which receives an ERROR (or
|
| 6940 | ABORT) chunk containing this cause code.
|
| 6941 |
|
| 6942 |
|
| 6943 |
|
| 6944 |
|
| 6945 |
|
| 6946 | Stewart, et al. Standards Track [Page 124]
|
| 6947 |
|
| 6948 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 6949 |
|
| 6950 |
|
| 6951 | d) Detailed description of the structure and content of data fields
|
| 6952 | which accompany this cause code.
|
| 6953 |
|
| 6954 | The initial word (32 bits) of a cause code parameter MUST conform to
|
| 6955 | the format shown in Section 3.3.10, i.e.:
|
| 6956 |
|
| 6957 | -- first two bytes contain the cause code value
|
| 6958 | -- last two bytes contain length of the Cause Parameter.
|
| 6959 |
|
| 6960 | 13.4 Payload Protocol Identifiers
|
| 6961 |
|
| 6962 | Except for value 0 which is reserved by SCTP to indicate an
|
| 6963 | unspecified payload protocol identifier in a DATA chunk, SCTP will
|
| 6964 | not be responsible for standardizing or verifying any payload
|
| 6965 | protocol identifiers; SCTP simply receives the identifier from the
|
| 6966 | upper layer and carries it with the corresponding payload data.
|
| 6967 |
|
| 6968 | The upper layer, i.e., the SCTP user, SHOULD standardize any specific
|
| 6969 | protocol identifier with IANA if it is so desired. The use of any
|
| 6970 | specific payload protocol identifier is out of the scope of SCTP.
|
| 6971 |
|
| 6972 | 14. Suggested SCTP Protocol Parameter Values
|
| 6973 |
|
| 6974 | The following protocol parameters are RECOMMENDED:
|
| 6975 |
|
| 6976 | RTO.Initial - 3 seconds
|
| 6977 | RTO.Min - 1 second
|
| 6978 | RTO.Max - 60 seconds
|
| 6979 | RTO.Alpha - 1/8
|
| 6980 | RTO.Beta - 1/4
|
| 6981 | Valid.Cookie.Life - 60 seconds
|
| 6982 | Association.Max.Retrans - 10 attempts
|
| 6983 | Path.Max.Retrans - 5 attempts (per destination address)
|
| 6984 | Max.Init.Retransmits - 8 attempts
|
| 6985 | HB.interval - 30 seconds
|
| 6986 |
|
| 6987 | IMPLEMENTATION NOTE: The SCTP implementation may allow ULP to
|
| 6988 | customize some of these protocol parameters (see Section 10).
|
| 6989 |
|
| 6990 | Note: RTO.Min SHOULD be set as recommended above.
|
| 6991 |
|
| 6992 |
|
| 6993 |
|
| 6994 |
|
| 6995 |
|
| 6996 |
|
| 6997 |
|
| 6998 |
|
| 6999 |
|
| 7000 |
|
| 7001 |
|
| 7002 | Stewart, et al. Standards Track [Page 125]
|
| 7003 |
|
| 7004 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 7005 |
|
| 7006 |
|
| 7007 | 15. Acknowledgements
|
| 7008 |
|
| 7009 | The authors wish to thank Mark Allman, R.J. Atkinson, Richard Band,
|
| 7010 | Scott Bradner, Steve Bellovin, Peter Butler, Ram Dantu, R.
|
| 7011 | Ezhirpavai, Mike Fisk, Sally Floyd, Atsushi Fukumoto, Matt Holdrege,
|
| 7012 | Henry Houh, Christian Huitema, Gary Lehecka, Jonathan Lee, David
|
| 7013 | Lehmann, John Loughney, Daniel Luan, Barry Nagelberg, Thomas Narten,
|
| 7014 | Erik Nordmark, Lyndon Ong, Shyamal Prasad, Kelvin Porter, Heinz
|
| 7015 | Prantner, Jarno Rajahalme, Raymond E. Reeves, Renee Revis, Ivan Arias
|
| 7016 | Rodriguez, A. Sankar, Greg Sidebottom, Brian Wyld, La Monte Yarroll,
|
| 7017 | and many others for their invaluable comments.
|
| 7018 |
|
| 7019 | 16. Authors' Addresses
|
| 7020 |
|
| 7021 | Randall R. Stewart
|
| 7022 | 24 Burning Bush Trail.
|
| 7023 | Crystal Lake, IL 60012
|
| 7024 | USA
|
| 7025 |
|
| 7026 | Phone: +1-815-477-2127
|
| 7027 | EMail: rrs@cisco.com
|
| 7028 |
|
| 7029 |
|
| 7030 | Qiaobing Xie
|
| 7031 | Motorola, Inc.
|
| 7032 | 1501 W. Shure Drive, #2309
|
| 7033 | Arlington Heights, IL 60004
|
| 7034 | USA
|
| 7035 |
|
| 7036 | Phone: +1-847-632-3028
|
| 7037 | EMail: qxie1@email.mot.com
|
| 7038 |
|
| 7039 |
|
| 7040 | Ken Morneault
|
| 7041 | Cisco Systems Inc.
|
| 7042 | 13615 Dulles Technology Drive
|
| 7043 | Herndon, VA. 20171
|
| 7044 | USA
|
| 7045 |
|
| 7046 | Phone: +1-703-484-3323
|
| 7047 | EMail: kmorneau@cisco.com
|
| 7048 |
|
| 7049 |
|
| 7050 |
|
| 7051 |
|
| 7052 |
|
| 7053 |
|
| 7054 |
|
| 7055 |
|
| 7056 |
|
| 7057 |
|
| 7058 | Stewart, et al. Standards Track [Page 126]
|
| 7059 |
|
| 7060 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 7061 |
|
| 7062 |
|
| 7063 | Chip Sharp
|
| 7064 | Cisco Systems Inc.
|
| 7065 | 7025 Kit Creek Road
|
| 7066 | Research Triangle Park, NC 27709
|
| 7067 | USA
|
| 7068 |
|
| 7069 | Phone: +1-919-392-3121
|
| 7070 | EMail: chsharp@cisco.com
|
| 7071 |
|
| 7072 |
|
| 7073 | Hanns Juergen Schwarzbauer
|
| 7074 | SIEMENS AG
|
| 7075 | Hofmannstr. 51
|
| 7076 | 81359 Munich
|
| 7077 | Germany
|
| 7078 |
|
| 7079 | Phone: +49-89-722-24236
|
| 7080 | EMail: HannsJuergen.Schwarzbauer@icn.siemens.de
|
| 7081 |
|
| 7082 |
|
| 7083 | Tom Taylor
|
| 7084 | Nortel Networks
|
| 7085 | 1852 Lorraine Ave.
|
| 7086 | Ottawa, Ontario
|
| 7087 | Canada K1H 6Z8
|
| 7088 |
|
| 7089 | Phone: +1-613-736-0961
|
| 7090 | EMail: taylor@nortelnetworks.com
|
| 7091 |
|
| 7092 |
|
| 7093 | Ian Rytina
|
| 7094 | Ericsson Australia
|
| 7095 | 37/360 Elizabeth Street
|
| 7096 | Melbourne, Victoria 3000
|
| 7097 | Australia
|
| 7098 |
|
| 7099 | Phone: +61-3-9301-6164
|
| 7100 | EMail: ian.rytina@ericsson.com
|
| 7101 |
|
| 7102 |
|
| 7103 |
|
| 7104 |
|
| 7105 |
|
| 7106 |
|
| 7107 |
|
| 7108 |
|
| 7109 |
|
| 7110 |
|
| 7111 |
|
| 7112 |
|
| 7113 |
|
| 7114 | Stewart, et al. Standards Track [Page 127]
|
| 7115 |
|
| 7116 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 7117 |
|
| 7118 |
|
| 7119 | Malleswar Kalla
|
| 7120 | Telcordia Technologies
|
| 7121 | 3 Corporate Place
|
| 7122 | PYA-2J-341
|
| 7123 | Piscataway, NJ 08854
|
| 7124 | USA
|
| 7125 |
|
| 7126 | Phone: +1-732-699-3728
|
| 7127 | EMail: mkalla@telcordia.com
|
| 7128 |
|
| 7129 | Lixia Zhang
|
| 7130 | UCLA Computer Science Department
|
| 7131 | 4531G Boelter Hall
|
| 7132 | Los Angeles, CA 90095-1596
|
| 7133 | USA
|
| 7134 |
|
| 7135 | Phone: +1-310-825-2695
|
| 7136 | EMail: lixia@cs.ucla.edu
|
| 7137 |
|
| 7138 | Vern Paxson
|
| 7139 | ACIRI
|
| 7140 | 1947 Center St., Suite 600,
|
| 7141 | Berkeley, CA 94704-1198
|
| 7142 | USA
|
| 7143 |
|
| 7144 | Phone: +1-510-666-2882
|
| 7145 | EMail: vern@aciri.org
|
| 7146 |
|
| 7147 | 17. References
|
| 7148 |
|
| 7149 | [RFC768] Postel, J. (ed.), "User Datagram Protocol", STD 6, RFC
|
| 7150 | 768, August 1980.
|
| 7151 |
|
| 7152 | [RFC793] Postel, J. (ed.), "Transmission Control Protocol", STD 7,
|
| 7153 | RFC 793, September 1981.
|
| 7154 |
|
| 7155 | [RFC1123] Braden, R., "Requirements for Internet hosts - application
|
| 7156 | and support", STD 3, RFC 1123, October 1989.
|
| 7157 |
|
| 7158 | [RFC1191] Mogul, J. and S. Deering, "Path MTU Discovery", RFC 1191,
|
| 7159 | November 1990.
|
| 7160 |
|
| 7161 | [RFC1700] Reynolds, J. and J. Postel, "Assigned Numbers", STD 2, RFC
|
| 7162 | 1700, October 1994.
|
| 7163 |
|
| 7164 | [RFC1981] McCann, J., Deering, S. and J. Mogul, "Path MTU Discovery
|
| 7165 | for IP version 6", RFC 1981, August 1996.
|
| 7166 |
|
| 7167 |
|
| 7168 |
|
| 7169 |
|
| 7170 | Stewart, et al. Standards Track [Page 128]
|
| 7171 |
|
| 7172 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 7173 |
|
| 7174 |
|
| 7175 | [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982,
|
| 7176 | August 1996.
|
| 7177 |
|
| 7178 | [RFC2026] Bradner, S., "The Internet Standards Process -- Revision
|
| 7179 | 3", BCP 9, RFC 2026, October 1996.
|
| 7180 |
|
| 7181 | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
|
| 7182 | Requirement Levels", BCP 14, RFC 2119, March 1997.
|
| 7183 |
|
| 7184 | [RFC2401] Kent, S. and R. Atkinson, "Security Architecture for the
|
| 7185 | Internet Protocol", RFC 2401, November 1998.
|
| 7186 |
|
| 7187 | [RFC2402] Kent, S. and R. Atkinson, "IP Authentication Header", RFC
|
| 7188 | 2402, November 1998.
|
| 7189 |
|
| 7190 | [RFC2406] Kent, S. and R. Atkinson, "IP Encapsulating Security
|
| 7191 | Payload (ESP)", RFC 2406, November 1998.
|
| 7192 |
|
| 7193 | [RFC2408] Maughan, D., Schertler, M., Schneider, M. and J. Turner,
|
| 7194 | "Internet Security Association and Key Management
|
| 7195 | Protocol", RFC 2408, November 1998.
|
| 7196 |
|
| 7197 | [RFC2409] Harkins, D. and D. Carrel, "The Internet Key Exchange
|
| 7198 | (IKE)", RFC 2409, November 1998.
|
| 7199 |
|
| 7200 | [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an
|
| 7201 | IANA Considerations Section in RFCs", BCP 26, RFC 2434,
|
| 7202 | October 1998.
|
| 7203 |
|
| 7204 | [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
|
| 7205 | (IPv6) Specification", RFC 2460, December 1998.
|
| 7206 |
|
| 7207 | [RFC2581] Allman, M., Paxson, V. and W. Stevens, "TCP Congestion
|
| 7208 | Control", RFC 2581, April 1999.
|
| 7209 |
|
| 7210 | 18. Bibliography
|
| 7211 |
|
| 7212 | [ALLMAN99] Allman, M. and Paxson, V., "On Estimating End-to-End
|
| 7213 | Network Path Properties", Proc. SIGCOMM'99, 1999.
|
| 7214 |
|
| 7215 | [FALL96] Fall, K. and Floyd, S., Simulation-based Comparisons of
|
| 7216 | Tahoe, Reno, and SACK TCP, Computer Communications Review,
|
| 7217 | V. 26 N. 3, July 1996, pp. 5-21.
|
| 7218 |
|
| 7219 | [RFC1750] Eastlake, D. (ed.), "Randomness Recommendations for
|
| 7220 | Security", RFC 1750, December 1994.
|
| 7221 |
|
| 7222 |
|
| 7223 |
|
| 7224 |
|
| 7225 |
|
| 7226 | Stewart, et al. Standards Track [Page 129]
|
| 7227 |
|
| 7228 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 7229 |
|
| 7230 |
|
| 7231 | [RFC1950] Deutsch P. and J. Gailly, "ZLIB Compressed Data Format
|
| 7232 | Specification version 3.3", RFC 1950, May 1996.
|
| 7233 |
|
| 7234 | [RFC2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC: Keyed-
|
| 7235 | Hashing for Message Authentication", RFC 2104, March 1997.
|
| 7236 |
|
| 7237 | [RFC2196] Fraser, B., "Site Security Handbook", FYI 8, RFC 2196,
|
| 7238 | September 1997.
|
| 7239 |
|
| 7240 | [RFC2522] Karn, P. and W. Simpson, "Photuris: Session-Key Management
|
| 7241 | Protocol", RFC 2522, March 1999.
|
| 7242 |
|
| 7243 | [SAVAGE99] Savage, S., Cardwell, N., Wetherall, D., and Anderson, T.,
|
| 7244 | "TCP Congestion Control with a Misbehaving Receiver", ACM
|
| 7245 | Computer Communication Review, 29(5), October 1999.
|
| 7246 |
|
| 7247 |
|
| 7248 |
|
| 7249 |
|
| 7250 |
|
| 7251 |
|
| 7252 |
|
| 7253 |
|
| 7254 |
|
| 7255 |
|
| 7256 |
|
| 7257 |
|
| 7258 |
|
| 7259 |
|
| 7260 |
|
| 7261 |
|
| 7262 |
|
| 7263 |
|
| 7264 |
|
| 7265 |
|
| 7266 |
|
| 7267 |
|
| 7268 |
|
| 7269 |
|
| 7270 |
|
| 7271 |
|
| 7272 |
|
| 7273 |
|
| 7274 |
|
| 7275 |
|
| 7276 |
|
| 7277 |
|
| 7278 |
|
| 7279 |
|
| 7280 |
|
| 7281 |
|
| 7282 | Stewart, et al. Standards Track [Page 130]
|
| 7283 |
|
| 7284 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 7285 |
|
| 7286 |
|
| 7287 | Appendix A: Explicit Congestion Notification
|
| 7288 |
|
| 7289 | ECN (Ramakrishnan, K., Floyd, S., "Explicit Congestion Notification",
|
| 7290 | RFC 2481, January 1999) describes a proposed extension to IP that
|
| 7291 | details a method to become aware of congestion outside of datagram
|
| 7292 | loss. This is an optional feature that an implementation MAY choose
|
| 7293 | to add to SCTP. This appendix details the minor differences
|
| 7294 | implementers will need to be aware of if they choose to implement
|
| 7295 | this feature. In general RFC 2481 should be followed with the
|
| 7296 | following exceptions.
|
| 7297 |
|
| 7298 | Negotiation:
|
| 7299 |
|
| 7300 | RFC2481 details negotiation of ECN during the SYN and SYN-ACK stages
|
| 7301 | of a TCP connection. The sender of the SYN sets two bits in the TCP
|
| 7302 | flags, and the sender of the SYN-ACK sets only 1 bit. The reasoning
|
| 7303 | behind this is to assure both sides are truly ECN capable. For SCTP
|
| 7304 | this is not necessary. To indicate that an endpoint is ECN capable
|
| 7305 | an endpoint SHOULD add to the INIT and or INIT ACK chunk the TLV
|
| 7306 | reserved for ECN. This TLV contains no parameters, and thus has the
|
| 7307 | following format:
|
| 7308 |
|
| 7309 | 0 1 2 3
|
| 7310 | 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
|
| 7311 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 7312 | | Parameter Type = 32768 | Parameter Length = 4 |
|
| 7313 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 7314 |
|
| 7315 | ECN-Echo:
|
| 7316 |
|
| 7317 | RFC 2481 details a specific bit for a receiver to send back in its
|
| 7318 | TCP acknowledgements to notify the sender of the Congestion
|
| 7319 | Experienced (CE) bit having arrived from the network. For SCTP this
|
| 7320 | same indication is made by including the ECNE chunk. This chunk
|
| 7321 | contains one data element, i.e. the lowest TSN associated with the IP
|
| 7322 | datagram marked with the CE bit, and looks as follows:
|
| 7323 |
|
| 7324 | 0 1 2 3
|
| 7325 | 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
|
| 7326 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 7327 | | Chunk Type=12 | Flags=00000000| Chunk Length = 8 |
|
| 7328 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 7329 | | Lowest TSN Number |
|
| 7330 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 7331 |
|
| 7332 | Note: The ECNE is considered a Control chunk.
|
| 7333 |
|
| 7334 |
|
| 7335 |
|
| 7336 |
|
| 7337 |
|
| 7338 | Stewart, et al. Standards Track [Page 131]
|
| 7339 |
|
| 7340 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 7341 |
|
| 7342 |
|
| 7343 | CWR:
|
| 7344 |
|
| 7345 | RFC 2481 details a specific bit for a sender to send in the header of
|
| 7346 | its next outbound TCP segment to indicate to its peer that it has
|
| 7347 | reduced its congestion window. This is termed the CWR bit. For
|
| 7348 | SCTP the same indication is made by including the CWR chunk.
|
| 7349 | This chunk contains one data element, i.e. the TSN number that
|
| 7350 | was sent in the ECNE chunk. This element represents the lowest
|
| 7351 | TSN number in the datagram that was originally marked with the
|
| 7352 | CE bit.
|
| 7353 |
|
| 7354 | 0 1 2 3
|
| 7355 | 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
|
| 7356 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 7357 | | Chunk Type=13 | Flags=00000000| Chunk Length = 8 |
|
| 7358 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 7359 | | Lowest TSN Number |
|
| 7360 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
| 7361 |
|
| 7362 | Note: The CWR is considered a Control chunk.
|
| 7363 |
|
| 7364 | Appendix B Alder 32 bit checksum calculation
|
| 7365 |
|
| 7366 | The Adler-32 checksum calculation given in this appendix is copied from
|
| 7367 | [RFC1950].
|
| 7368 |
|
| 7369 | Adler-32 is composed of two sums accumulated per byte: s1 is the sum
|
| 7370 | of all bytes, s2 is the sum of all s1 values. Both sums are done
|
| 7371 | modulo 65521. s1 is initialized to 1, s2 to zero. The Adler-32
|
| 7372 | checksum is stored as s2*65536 + s1 in network byte order.
|
| 7373 |
|
| 7374 | The following C code computes the Adler-32 checksum of a data buffer.
|
| 7375 | It is written for clarity, not for speed. The sample code is in the
|
| 7376 | ANSI C programming language. Non C users may find it easier to read
|
| 7377 | with these hints:
|
| 7378 |
|
| 7379 |
|
| 7380 |
|
| 7381 |
|
| 7382 |
|
| 7383 |
|
| 7384 |
|
| 7385 |
|
| 7386 |
|
| 7387 |
|
| 7388 |
|
| 7389 |
|
| 7390 |
|
| 7391 |
|
| 7392 |
|
| 7393 |
|
| 7394 | Stewart, et al. Standards Track [Page 132]
|
| 7395 |
|
| 7396 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 7397 |
|
| 7398 |
|
| 7399 | & Bitwise AND operator.
|
| 7400 | >> Bitwise right shift operator. When applied to an
|
| 7401 | unsigned quantity, as here, right shift inserts zero bit(s)
|
| 7402 | at the left.
|
| 7403 | << Bitwise left shift operator. Left shift inserts zero
|
| 7404 | bit(s) at the right.
|
| 7405 | ++ "n++" increments the variable n.
|
| 7406 | % modulo operator: a % b is the remainder of a divided by b.
|
| 7407 | #define BASE 65521 /* largest prime smaller than 65536 */
|
| 7408 | /*
|
| 7409 | Update a running Adler-32 checksum with the bytes buf[0..len-1]
|
| 7410 | and return the updated checksum. The Adler-32 checksum should be
|
| 7411 | initialized to 1.
|
| 7412 |
|
| 7413 | Usage example:
|
| 7414 |
|
| 7415 | unsigned long adler = 1L;
|
| 7416 |
|
| 7417 | while (read_buffer(buffer, length) != EOF) {
|
| 7418 | adler = update_adler32(adler, buffer, length);
|
| 7419 | }
|
| 7420 | if (adler != original_adler) error();
|
| 7421 | */
|
| 7422 | unsigned long update_adler32(unsigned long adler,
|
| 7423 | unsigned char *buf, int len)
|
| 7424 | {
|
| 7425 | unsigned long s1 = adler & 0xffff;
|
| 7426 | unsigned long s2 = (adler >> 16) & 0xffff;
|
| 7427 | int n;
|
| 7428 |
|
| 7429 | for (n = 0; n < len; n++) {
|
| 7430 | s1 = (s1 + buf[n]) % BASE;
|
| 7431 | s2 = (s2 + s1) % BASE;
|
| 7432 | }
|
| 7433 | return (s2 << 16) + s1;
|
| 7434 | }
|
| 7435 |
|
| 7436 | /* Return the adler32 of the bytes buf[0..len-1] */
|
| 7437 | unsigned long adler32(unsigned char *buf, int len)
|
| 7438 | {
|
| 7439 | return update_adler32(1L, buf, len);
|
| 7440 | }
|
| 7441 |
|
| 7442 |
|
| 7443 |
|
| 7444 |
|
| 7445 |
|
| 7446 |
|
| 7447 |
|
| 7448 |
|
| 7449 |
|
| 7450 | Stewart, et al. Standards Track [Page 133]
|
| 7451 |
|
| 7452 | RFC 2960 Stream Control Transmission Protocol October 2000
|
| 7453 |
|
| 7454 |
|
| 7455 | Full Copyright Statement
|
| 7456 |
|
| 7457 | Copyright (C) The Internet Society (2000). All Rights Reserved.
|
| 7458 |
|
| 7459 | This document and translations of it may be copied and furnished to
|
| 7460 | others, and derivative works that comment on or otherwise explain it
|
| 7461 | or assist in its implementation may be prepared, copied, published
|
| 7462 | and distributed, in whole or in part, without restriction of any
|
| 7463 | kind, provided that the above copyright notice and this paragraph are
|
| 7464 | included on all such copies and derivative works. However, this
|
| 7465 | document itself may not be modified in any way, such as by removing
|
| 7466 | the copyright notice or references to the Internet Society or other
|
| 7467 | Internet organizations, except as needed for the purpose of
|
| 7468 | developing Internet standards in which case the procedures for
|
| 7469 | copyrights defined in the Internet Standards process must be
|
| 7470 | followed, or as required to translate it into languages other than
|
| 7471 | English.
|
| 7472 |
|
| 7473 | The limited permissions granted above are perpetual and will not be
|
| 7474 | revoked by the Internet Society or its successors or assigns.
|
| 7475 |
|
| 7476 | This document and the information contained herein is provided on an
|
| 7477 | "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
|
| 7478 | TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
| 7479 | BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
| 7480 | HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
| 7481 | MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
| 7482 |
|
| 7483 | Acknowledgement
|
| 7484 |
|
| 7485 | Funding for the RFC Editor function is currently provided by the
|
| 7486 | Internet Society.
|
| 7487 |
|
| 7488 |
|
| 7489 |
|
| 7490 |
|
| 7491 |
|
| 7492 |
|
| 7493 |
|
| 7494 |
|
| 7495 |
|
| 7496 |
|
| 7497 |
|
| 7498 |
|
| 7499 |
|
| 7500 |
|
| 7501 |
|
| 7502 |
|
| 7503 |
|
| 7504 |
|
| 7505 |
|
| 7506 | Stewart, et al. Standards Track [Page 134]
|
| 7507 |
|