This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdraft-ietf-tsvwg-2960bis-05.txt
8401 lines (5647 loc) · 333 KB
/
draft-ietf-tsvwg-2960bis-05.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Network Working Group R. Stewart
Internet-Draft Editor
Obsoletes: 2960,3309 June 12, 2007
(if approved)
Intended status: Standards Track
Expires: December 14, 2007
Stream Control Transmission Protocol
draft-ietf-tsvwg-2960bis-05.txt
Status of this Memo
By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
This Internet-Draft will expire on December 14, 2007.
Copyright Notice
Copyright (C) The IETF Trust (2007).
Abstract
This document obsoletes RFC2960 [RFC2960] and RFC3309 [RFC3309] it
describes the Stream Control Transmission Protocol (SCTP). SCTP is
designed to transport PSTN signaling messages over IP networks, but
is capable of broader applications.
SCTP is a reliable transport protocol operating on top of a
Stewart Expires December 14, 2007 [Page 1]
Internet-Draft Stream Control Transmission Protocol June 2007
connectionless packet network such as IP. It offers the following
services to its users:
-- acknowledged error-free non-duplicated transfer of user data,
-- data fragmentation to conform to discovered path MTU size,
-- sequenced delivery of user messages within multiple streams, with
an option for order-of-arrival delivery of individual user
messages,
-- optional bundling of multiple user messages into a single SCTP
packet, and
-- network-level fault tolerance through supporting of multi- homing
at either or both ends of an association.
The design of SCTP includes appropriate congestion avoidance behavior
and resistance to flooding and masquerade attacks.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . 6
1.2. Architectural View of SCTP . . . . . . . . . . . . . . . 6
1.3. Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4. Abbreviations . . . . . . . . . . . . . . . . . . . . . . 11
1.5. Functional View of SCTP . . . . . . . . . . . . . . . . . 11
1.5.1. Association Startup and Takedown . . . . . . . . . . 12
1.5.2. Sequenced Delivery within Streams . . . . . . . . . . 13
1.5.3. User Data Fragmentation . . . . . . . . . . . . . . . 13
1.5.4. Acknowledgement and Congestion Avoidance . . . . . . 13
1.5.5. Chunk Bundling . . . . . . . . . . . . . . . . . . . 14
1.5.6. Packet Validation . . . . . . . . . . . . . . . . . . 14
1.5.7. Path Management . . . . . . . . . . . . . . . . . . . 14
1.6. Serial Number Arithmetic . . . . . . . . . . . . . . . . 15
1.7. Changes from RFC2960 . . . . . . . . . . . . . . . . . . 16
2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 16
3. SCTP packet Format . . . . . . . . . . . . . . . . . . . . . 16
3.1. SCTP Common Header Field Descriptions . . . . . . . . . . 17
3.2. Chunk Field Descriptions . . . . . . . . . . . . . . . . 18
3.2.1. Optional/Variable-length Parameter Format . . . . . . 20
3.2.2. Reporting of Unrecognized Parameters . . . . . . . . 22
3.3. SCTP Chunk Definitions . . . . . . . . . . . . . . . . . 23
3.3.1. Payload Data (DATA) (0) . . . . . . . . . . . . . . . 23
3.3.2. Initiation (INIT) (1) . . . . . . . . . . . . . . . . 25
3.3.3. Initiation Acknowledgement (INIT ACK) (2): . . . . . 31
3.3.4. Selective Acknowledgement (SACK) (3): . . . . . . . . 35
3.3.5. Heartbeat Request (HEARTBEAT) (4): . . . . . . . . . 39
3.3.6. Heartbeat Acknowledgement (HEARTBEAT ACK) (5): . . . 40
3.3.7. Abort Association (ABORT) (6): . . . . . . . . . . . 41
Stewart Expires December 14, 2007 [Page 2]
Internet-Draft Stream Control Transmission Protocol June 2007
3.3.8. Shutdown Association (SHUTDOWN) (7): . . . . . . . . 42
3.3.9. Shutdown Acknowledgement (SHUTDOWN ACK) (8): . . . . 42
3.3.10. Operation Error (ERROR) (9): . . . . . . . . . . . . 43
3.3.10.1. Invalid Stream Identifier (1) . . . . . . . . . 45
3.3.10.2. Missing Mandatory Parameter (2) . . . . . . . . 45
3.3.10.3. Stale Cookie Error (3) . . . . . . . . . . . . . 46
3.3.10.4. Out of Resource (4) . . . . . . . . . . . . . . 46
3.3.10.5. Unresolvable Address (5) . . . . . . . . . . . . 47
3.3.10.6. Unrecognized Chunk Type (6) . . . . . . . . . . 47
3.3.10.7. Invalid Mandatory Parameter (7) . . . . . . . . 48
3.3.10.8. Unrecognized Parameters (8) . . . . . . . . . . 48
3.3.10.9. No User Data (9) . . . . . . . . . . . . . . . . 48
3.3.10.10. Cookie Received While Shutting Down (10) . . . . 49
3.3.10.11. Restart of an Association with New Addresses
(11) . . . . . . . . . . . . . . . . . . . . . . 49
3.3.10.12. User-Initiated Abort (12) . . . . . . . . . . . 50
3.3.10.13. Protocol Violation (13) . . . . . . . . . . . . 50
3.3.11. Cookie Echo (COOKIE ECHO) (10): . . . . . . . . . . . 51
3.3.12. Cookie Acknowledgement (COOKIE ACK) (11): . . . . . . 52
3.3.13. Shutdown Complete (SHUTDOWN COMPLETE) (14): . . . . . 52
4. SCTP Association State Diagram . . . . . . . . . . . . . . . 53
5. Association Initialization . . . . . . . . . . . . . . . . . 56
5.1. Normal Establishment of an Association . . . . . . . . . 57
5.1.1. Handle Stream Parameters . . . . . . . . . . . . . . 58
5.1.2. Handle Address Parameters . . . . . . . . . . . . . . 59
5.1.3. Generating State Cookie . . . . . . . . . . . . . . . 61
5.1.4. State Cookie Processing . . . . . . . . . . . . . . . 62
5.1.5. State Cookie Authentication . . . . . . . . . . . . . 62
5.1.6. An Example of Normal Association Establishment . . . 63
5.2. Handle Duplicate or Unexpected INIT, INIT ACK, COOKIE
ECHO, and COOKIE ACK . . . . . . . . . . . . . . . . . . 65
5.2.1. INIT received in COOKIE-WAIT or COOKIE-ECHOED
State (Item B) . . . . . . . . . . . . . . . . . . . 65
5.2.2. Unexpected INIT in States Other than CLOSED,
COOKIE-ECHOED,COOKIE-WAIT and SHUTDOWN-ACK-SENT . . . 66
5.2.3. Unexpected INIT ACK . . . . . . . . . . . . . . . . . 67
5.2.4. Handle a COOKIE ECHO when a TCB exists . . . . . . . 67
5.2.5. Handle Duplicate COOKIE-ACK. . . . . . . . . . . . . 71
5.2.6. Handle Stale COOKIE Error . . . . . . . . . . . . . . 71
5.3. Other Initialization Issues . . . . . . . . . . . . . . . 71
5.3.1. Selection of Tag Value . . . . . . . . . . . . . . . 71
5.4. Path Verification . . . . . . . . . . . . . . . . . . . . 72
6. User Data Transfer . . . . . . . . . . . . . . . . . . . . . 73
6.1. Transmission of DATA Chunks . . . . . . . . . . . . . . . 75
6.2. Acknowledgement on Reception of DATA Chunks . . . . . . . 77
6.2.1. Processing a Received SACK . . . . . . . . . . . . . 80
6.3. Management of Retransmission Timer . . . . . . . . . . . 82
6.3.1. RTO Calculation . . . . . . . . . . . . . . . . . . . 82
Stewart Expires December 14, 2007 [Page 3]
Internet-Draft Stream Control Transmission Protocol June 2007
6.3.2. Retransmission Timer Rules . . . . . . . . . . . . . 83
6.3.3. Handle T3-rtx Expiration . . . . . . . . . . . . . . 85
6.4. Multi-homed SCTP Endpoints . . . . . . . . . . . . . . . 86
6.4.1. Failover from Inactive Destination Address . . . . . 87
6.5. Stream Identifier and Stream Sequence Number . . . . . . 87
6.6. Ordered and Unordered Delivery . . . . . . . . . . . . . 87
6.7. Report Gaps in Received DATA TSNs . . . . . . . . . . . . 88
6.8. CRC32c Checksum Calculation . . . . . . . . . . . . . . . 89
6.9. Fragmentation and Reassembly . . . . . . . . . . . . . . 90
6.10. Bundling . . . . . . . . . . . . . . . . . . . . . . . . 91
7. Congestion control . . . . . . . . . . . . . . . . . . . . . 92
7.1. SCTP Differences from TCP Congestion control . . . . . . 93
7.2. SCTP Slow-Start and Congestion Avoidance . . . . . . . . 94
7.2.1. Slow-Start . . . . . . . . . . . . . . . . . . . . . 95
7.2.2. Congestion Avoidance . . . . . . . . . . . . . . . . 96
7.2.3. Congestion Control . . . . . . . . . . . . . . . . . 97
7.2.4. Fast Retransmit on Gap Reports . . . . . . . . . . . 97
7.3. Path MTU Discovery . . . . . . . . . . . . . . . . . . . 99
8. Fault Management . . . . . . . . . . . . . . . . . . . . . . 99
8.1. Endpoint Failure Detection . . . . . . . . . . . . . . . 99
8.2. Path Failure Detection . . . . . . . . . . . . . . . . . 100
8.3. Path Heartbeat . . . . . . . . . . . . . . . . . . . . . 101
8.4. Handle "Out of the blue" Packets . . . . . . . . . . . . 103
8.5. Verification Tag . . . . . . . . . . . . . . . . . . . . 104
8.5.1. Exceptions in Verification Tag Rules . . . . . . . . 104
9. Termination of Association . . . . . . . . . . . . . . . . . 105
9.1. Abort of an Association . . . . . . . . . . . . . . . . . 106
9.2. Shutdown of an Association . . . . . . . . . . . . . . . 106
10. Interface with Upper Layer . . . . . . . . . . . . . . . . . 109
10.1. ULP-to-SCTP . . . . . . . . . . . . . . . . . . . . . . . 109
10.2. SCTP-to-ULP . . . . . . . . . . . . . . . . . . . . . . . 120
11. Security Considerations . . . . . . . . . . . . . . . . . . . 123
11.1. Security Objectives . . . . . . . . . . . . . . . . . . . 123
11.2. SCTP Responses To Potential Threats . . . . . . . . . . . 123
11.2.1. Countering Insider Attacks . . . . . . . . . . . . . 124
11.2.2. Protecting against Data Corruption in the Network . . 124
11.2.3. Protecting Confidentiality . . . . . . . . . . . . . 124
11.2.4. Protecting against Blind Denial of Service Attacks . 125
11.2.4.1. Flooding . . . . . . . . . . . . . . . . . . . . 125
11.2.4.2. Blind Masquerade . . . . . . . . . . . . . . . . 126
11.2.4.3. Improper Monopolization of Services . . . . . . 127
11.3. SCTP Interactions with Firewalls . . . . . . . . . . . . 127
11.4. Protection of Non-SCTP Capable Hosts. . . . . . . . . . . 127
12. Network Management Considerations . . . . . . . . . . . . . . 128
13. Recommended Transmission Control Block (TCB) Parameters . . . 128
13.1. Parameters necessary for the SCTP instance . . . . . . . 129
13.2. Parameters necessary per association (i.e. the TCB) . . . 129
13.3. Per Transport Address Data . . . . . . . . . . . . . . . 131
Stewart Expires December 14, 2007 [Page 4]
Internet-Draft Stream Control Transmission Protocol June 2007
13.4. General Parameters Needed . . . . . . . . . . . . . . . . 132
14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 133
14.1. IETF-defined Chunk Extension . . . . . . . . . . . . . . 133
14.2. IETF-defined Chunk Parameter Extension . . . . . . . . . 133
14.3. IETF-defined Additional Error Causes . . . . . . . . . . 134
14.4. Payload Protocol Identifiers . . . . . . . . . . . . . . 134
15. Suggested SCTP Protocol Parameter Values . . . . . . . . . . 135
16. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 135
Appendix A. Explicit Congestion Notification . . . . . . . . . . 136
Appendix B. CRC32c Checksum Calculation . . . . . . . . . . . . 138
Appendix C. ICMP Handling . . . . . . . . . . . . . . . . . . . 140
17. References . . . . . . . . . . . . . . . . . . . . . . . . . 146
17.1. Normative references . . . . . . . . . . . . . . . . . . 146
17.2. Informative References . . . . . . . . . . . . . . . . . 147
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 148
Intellectual Property and Copyright Statements . . . . . . . . . 150
Stewart Expires December 14, 2007 [Page 5]
Internet-Draft Stream Control Transmission Protocol June 2007
1. Introduction
This section explains the reasoning behind the development of the
Stream Control Transmission Protocol (SCTP), the services it offers,
and the basic concepts needed to understand the detailed description
of the protocol.
1.1. Motivation
TCP [RFC0793] has performed immense service as the primary means of
reliable data transfer in IP networks. However, an increasing number
of recent applications have found TCP too limiting, and have
incorporated their own reliable data transfer protocol on top of UDP
[RFC0768]. The limitations which users have wished to bypass include
the following:
-- TCP provides both reliable data transfer and strict order-of-
transmission delivery of data. Some applications need reliable
transfer without sequence maintenance, while others would be
satisfied with partial ordering of the data. In both of these
cases the head-of-line blocking offered by TCP causes unnecessary
delay.
-- The stream-oriented nature of TCP is often an inconvenience.
Applications must add their own record marking to delineate their
messages, and must make explicit use of the push facility to
ensure that a complete message is transferred in a reasonable
time.
-- The limited scope of TCP sockets complicates the task of
providing highly-available data transfer capability using multi-
homed hosts.
-- TCP is relatively vulnerable to denial of service attacks, such
as SYN attacks.
Transport of PSTN signaling across the IP network is an application
for which all of these limitations of TCP are relevant. While this
application directly motivated the development of SCTP, other
applications may find SCTP a good match to their requirements.
1.2. Architectural View of SCTP
SCTP is viewed as a layer between the SCTP user application ("SCTP
user" for short) and a connectionless packet network service such as
IP. The remainder of this document assumes SCTP runs on top of IP.
The basic service offered by SCTP is the reliable transfer of user
Stewart Expires December 14, 2007 [Page 6]
Internet-Draft Stream Control Transmission Protocol June 2007
messages between peer SCTP users. It performs this service within
the context of an association between two SCTP endpoints. Section 10
of this document sketches the API which should exist at the boundary
between the SCTP and the SCTP user layers.
SCTP is connection-oriented in nature, but the SCTP association is a
broader concept than the TCP connection. SCTP provides the means for
each SCTP endpoint (Section 1.3) to provide the other endpoint
(during association startup) with a list of transport addresses
(i.e., multiple IP addresses in combination with an SCTP port)
through which that endpoint can be reached and from which it will
originate SCTP packets. The association spans transfers over all of
the possible source/destination combinations which may be generated
from each endpoint's lists.
_____________ _____________
| SCTP User | | SCTP User |
| Application | | Application |
|-------------| |-------------|
| SCTP | | SCTP |
| Transport | | Transport |
| Service | | Service |
|-------------| |-------------|
| |One or more ---- One or more| |
| IP Network |IP address \/ IP address| IP Network |
| Service |appearances /\ appearances| Service |
|_____________| ---- |_____________|
SCTP Node A |<-------- Network transport ------->| SCTP Node B
Figure 1: An SCTP Association
1.3. Key Terms
Some of the language used to describe SCTP has been introduced in the
previous sections. This section provides a consolidated list of the
key terms and their definitions.
o Active destination transport address: A transport address on a
peer endpoint which a transmitting endpoint considers available
for receiving user messages.
o Bundling: An optional multiplexing operation, whereby more than
one user message may be carried in the same SCTP packet. Each
user message occupies its own DATA chunk.
Stewart Expires December 14, 2007 [Page 7]
Internet-Draft Stream Control Transmission Protocol June 2007
o Chunk: A unit of information within an SCTP packet, consisting of
a chunk header and chunk-specific content.
o Congestion Window (cwnd): An SCTP variable that limits the data,
in number of bytes, a sender can send to a particular destination
transport address before receiving an acknowledgement.
o Cumulative TSN Ack Point: The TSN of the last DATA chunk
acknowledged via the Cumulative TSN Ack field of a SACK.
o Idle destination address: An address that has not had user
messages sent to it within some length of time, normally the
HEARTBEAT interval or greater.
o Inactive destination transport address: An address which is
considered inactive due to errors and unavailable to transport
user messages.
o Message = user message: Data submitted to SCTP by the Upper Layer
Protocol (ULP).
o Message Authentication Code (MAC): An integrity check mechanism
based on cryptographic hash functions using a secret key.
Typically, message authentication codes are used between two
parties that share a secret key in order to validate information
transmitted between these parties. In SCTP it is used by an
endpoint to validate the State Cookie information that is returned
from the peer in the COOKIE ECHO chunk. The term "MAC" has
different meanings in different contexts. SCTP uses this term
with the same meaning as in [RFC2104].
o Network Byte Order: Most significant byte first, a.k.a., Big
Endian.
o Ordered Message: A user message that is delivered in order with
respect to all previous user messages sent within the stream the
message was sent on.
o Outstanding TSN (at an SCTP endpoint): A TSN (and the associated
DATA chunk) that has been sent by the endpoint but for which it
has not yet received an acknowledgement.
o Path: The route taken by the SCTP packets sent by one SCTP
endpoint to a specific destination transport address of its peer
SCTP endpoint. Sending to different destination transport
addresses does not necessarily guarantee getting separate paths.
Stewart Expires December 14, 2007 [Page 8]
Internet-Draft Stream Control Transmission Protocol June 2007
o Primary Path: The primary path is the destination and source
address that will be put into a packet outbound to the peer
endpoint by default. The definition includes the source address
since an implementation MAY wish to specify both destination and
source address to better control the return path taken by reply
chunks and on which interface the packet is transmitted when the
data sender is multi-homed.
o Receiver Window (rwnd): An SCTP variable a data sender uses to
store the most recently calculated receiver window of its peer, in
number of bytes. This gives the sender an indication of the space
available in the receiver's inbound buffer.
o SCTP association: A protocol relationship between SCTP endpoints,
composed of the two SCTP endpoints and protocol state information
including Verification Tags and the currently active set of
Transmission Sequence Numbers (TSNs), etc. An association can be
uniquely identified by the transport addresses used by the
endpoints in the association. Two SCTP endpoints MUST NOT have
more than one SCTP association between them at any given time.
o SCTP endpoint: The logical sender/receiver of SCTP packets. On a
multi-homed host, an SCTP endpoint is represented to its peers as
a combination of a set of eligible destination transport addresses
to which SCTP packets can be sent and a set of eligible source
transport addresses from which SCTP packets can be received. All
transport addresses used by an SCTP endpoint must use the same
port number, but can use multiple IP addresses. A transport
address used by an SCTP endpoint must not be used by another SCTP
endpoint. In other words, a transport address is unique to an
SCTP endpoint.
o SCTP packet (or packet): The unit of data delivery across the
interface between SCTP and the connectionless packet network
(e.g., IP). An SCTP packet includes the common SCTP header,
possible SCTP control chunks, and user data encapsulated within
SCTP DATA chunks.
o SCTP user application (SCTP user): The logical higher-layer
application entity which uses the services of SCTP, also called
the Upper-layer Protocol (ULP).
o Slow Start Threshold (ssthresh): An SCTP variable. This is the
threshold which the endpoint will use to determine whether to
perform slow start or congestion avoidance on a particular
destination transport address. Ssthresh is in number of bytes.
Stewart Expires December 14, 2007 [Page 9]
Internet-Draft Stream Control Transmission Protocol June 2007
o Stream: A uni-directional logical channel established from one to
another associated SCTP endpoint, within which all user messages
are delivered in sequence except for those submitted to the
unordered delivery service.
Note: The relationship between stream numbers in opposite directions
is strictly a matter of how the applications use them. It is the
responsibility of the SCTP user to create and manage these
correlations if they are so desired.
o Stream Sequence Number: A 16-bit sequence number used internally
by SCTP to assure sequenced delivery of the user messages within a
given stream. One stream sequence number is attached to each user
message.
o Tie-Tags: Two 32-bit random numbers that together make a 64- bit
nonce. These Tags are used within a State Cookie and TCB so that
a newly restarting association can be linked to the original
association within the endpoint that did not restart and yet not
reveal the true Verification Tags of an existing association.
o Transmission Control Block (TCB): An internal data structure
created by an SCTP endpoint for each of its existing SCTP
associations to other SCTP endpoints. TCB contains all the status
and operational information for the endpoint to maintain and
manage the corresponding association.
o Transmission Sequence Number (TSN): A 32-bit sequence number used
internally by SCTP. One TSN is attached to each chunk containing
user data to permit the receiving SCTP endpoint to acknowledge its
receipt and detect duplicate deliveries.
o Transport address: A Transport Address is traditionally defined by
Network Layer address, Transport Layer protocol and Transport
Layer port number. In the case of SCTP running over IP, a
transport address is defined by the combination of an IP address
and an SCTP port number (where SCTP is the Transport protocol).
o Unacknowledged TSN (at an SCTP endpoint): A TSN (and the
associated DATA chunk) which has been received by the endpoint but
for which an acknowledgement has not yet been sent. Or in the
opposite case, for a packet that has been sent but no
acknowledgement has been received.
Stewart Expires December 14, 2007 [Page 10]
Internet-Draft Stream Control Transmission Protocol June 2007
o Unordered Message: Unordered messages are "unordered" with respect
to any other message, this includes both other unordered messages
as well as other ordered messages. An unordered message might be
delivered prior to or later than ordered messages sent on the same
stream.
o User message: The unit of data delivery across the interface
between SCTP and its user.
o Verification Tag: A 32 bit unsigned integer that is randomly
generated. The Verification Tag provides a key that allows a
receiver to verify that the SCTP packet belongs to the current
association and is not an old or stale packet from a previous
association.
1.4. Abbreviations
MAC - Message Authentication Code [RFC2104]
RTO - Retransmission Time-out
RTT - Round-trip Time
RTTVAR - Round-trip Time Variation
SCTP - Stream Control Transmission Protocol
SRTT - Smoothed RTT
TCB - Transmission Control Block
TLV - Type-Length-Value Coding Format
TSN - Transmission Sequence Number
ULP - Upper-layer Protocol
1.5. Functional View of SCTP
The SCTP transport service can be decomposed into a number of
functions. These are depicted in Figure 2 and explained in the
remainder of this section.
Stewart Expires December 14, 2007 [Page 11]
Internet-Draft Stream Control Transmission Protocol June 2007
SCTP User Application
-----------------------------------------------------
_____________ ____________________
| | | Sequenced delivery |
| Association | | within streams |
| | |____________________|
| startup |
| | ____________________________
| and | | User Data Fragmentation |
| | |____________________________|
| takedown |
| | ____________________________
| | | Acknowledgement |
| | | and |
| | | Congestion Avoidance |
| | |____________________________|
| |
| | ____________________________
| | | Chunk Bundling |
| | |____________________________|
| |
| | ________________________________
| | | Packet Validation |
| | |________________________________|
| |
| | ________________________________
| | | Path Management |
|_____________| |________________________________|
Figure 2: Functional View of the SCTP Transport Service
1.5.1. Association Startup and Takedown
An association is initiated by a request from the SCTP user (see the
description of the ASSOCIATE (or SEND) primitive in Section 10).
A cookie mechanism, similar to one described by Karn and Simpson in
[RFC2522] , is employed during the initialization to provide
protection against synchronization attacks. The cookie mechanism
uses a four-way handshake, the last two legs of which are allowed to
carry user data for fast setup. The startup sequence is described in
Section 5 of this document.
SCTP provides for graceful close (i.e., shutdown) of an active
association on request from the SCTP user. See the description of
the SHUTDOWN primitive in Section 10. SCTP also allows ungraceful
close (i.e., abort), either on request from the user (ABORT
Stewart Expires December 14, 2007 [Page 12]
Internet-Draft Stream Control Transmission Protocol June 2007
primitive) or as a result of an error condition detected within the
SCTP layer. Section 9 describes both the graceful and the ungraceful
close procedures.
SCTP does not support a half-open state (like TCP) wherein one side
may continue sending data while the other end is closed. When either
endpoint performs a shutdown, the association on each peer will stop
accepting new data from its user and only deliver data in queue at
the time of the graceful close (see Section 9 ).
1.5.2. Sequenced Delivery within Streams
The term "stream" is used in SCTP to refer to a sequence of user
messages that are to be delivered to the upper-layer protocol in
order with respect to other messages within the same stream. This is
in contrast to its usage in TCP, where it refers to a sequence of
bytes (in this document a byte is assumed to be eight bits).
The SCTP user can specify at association startup time the number of
streams to be supported by the association. This number is
negotiated with the remote end (see Section 5.1.1). User messages
are associated with stream numbers (SEND, RECEIVE primitives,
Section 10). Internally, SCTP assigns a stream sequence number to
each message passed to it by the SCTP user. On the receiving side,
SCTP ensures that messages are delivered to the SCTP user in sequence
within a given stream. However, while one stream may be blocked
waiting for the next in-sequence user message, delivery from other
streams may proceed.
SCTP provides a mechanism for bypassing the sequenced delivery
service. User messages sent using this mechanism are delivered to
the SCTP user as soon as they are received.
1.5.3. User Data Fragmentation
When needed, SCTP fragments user messages to ensure that the SCTP
packet passed to the lower layer conforms to the path MTU. On
receipt, fragments are reassembled into complete messages before
being passed to the SCTP user.
1.5.4. Acknowledgement and Congestion Avoidance
SCTP assigns a Transmission Sequence Number (TSN) to each user data
fragment or unfragmented message. The TSN is independent of any
stream sequence number assigned at the stream level. The receiving
end acknowledges all TSNs received, even if there are gaps in the
sequence. In this way, reliable delivery is kept functionally
separate from sequenced stream delivery.
Stewart Expires December 14, 2007 [Page 13]
Internet-Draft Stream Control Transmission Protocol June 2007
The acknowledgement and congestion avoidance function is responsible
for packet retransmission when timely acknowledgement has not been
received. Packet retransmission is conditioned by congestion
avoidance procedures similar to those used for TCP. See Section 6
and Section 7 for a detailed description of the protocol procedures
associated with this function.
1.5.5. Chunk Bundling
As described in Section 3, the SCTP packet as delivered to the lower
layer consists of a common header followed by one or more chunks.
Each chunk may contain either user data or SCTP control information.
The SCTP user has the option to request bundling of more than one
user messages into a single SCTP packet. The chunk bundling function
of SCTP is responsible for assembly of the complete SCTP packet and
its disassembly at the receiving end.
During times of congestion an SCTP implementation MAY still perform
bundling even if the user has requested that SCTP not bundle. The
user's disabling of bundling only affects SCTP implementations that
may delay a small period of time before transmission (to attempt to
encourage bundling). When the user layer disables bundling, this
small delay is prohibited but not bundling that is performed during
congestion or retransmission.
1.5.6. Packet Validation
A mandatory Verification Tag field and a 32 bit checksum field (see
Appendix B for a description of the CRC32c checksum) are included in
the SCTP common header. The Verification Tag value is chosen by each
end of the association during association startup. Packets received
without the expected Verification Tag value are discarded, as a
protection against blind masquerade attacks and against stale SCTP
packets from a previous association. The CRC32c checksum should be
set by the sender of each SCTP packet to provide additional
protection against data corruption in the network. The receiver of
an SCTP packet with an invalid CRC32c checksum silently discards the
packet.
1.5.7. Path Management
The sending SCTP user is able to manipulate the set of transport
addresses used as destinations for SCTP packets through the
primitives described in Section 10. The SCTP path management
function chooses the destination transport address for each outgoing
SCTP packet based on the SCTP user's instructions and the currently
perceived reachability status of the eligible destination set. The
path management function monitors reachability through heartbeats
Stewart Expires December 14, 2007 [Page 14]
Internet-Draft Stream Control Transmission Protocol June 2007
when other packet traffic is inadequate to provide this information
and advises the SCTP user when reachability of any far-end transport
address changes. The path management function is also responsible
for reporting the eligible set of local transport addresses to the
far end during association startup, and for reporting the transport
addresses returned from the far end to the SCTP user.
At association start-up, a primary path is defined for each SCTP
endpoint, and is used for normal sending of SCTP packets.
On the receiving end, the path management is responsible for
verifying the existence of a valid SCTP association to which the
inbound SCTP packet belongs before passing it for further processing.
Note: Path Management and Packet Validation are done at the same
time, so although described separately above, in reality they cannot
be performed as separate items.
1.6. Serial Number Arithmetic
It is essential to remember that the actual Transmission Sequence
Number space is finite, though very large. This space ranges from 0
to 2**32 - 1. Since the space is finite, all arithmetic dealing with
Transmission Sequence Numbers must be performed modulo 2**32. This
unsigned arithmetic preserves the relationship of sequence numbers as
they cycle from 2**32 - 1 to 0 again. There are some subtleties to
computer modulo arithmetic, so great care should be taken in
programming the comparison of such values. When referring to TSNs,
the symbol "=<" means "less than or equal"(modulo 2**32).
Comparisons and arithmetic on TSNs in this document SHOULD use Serial
Number Arithmetic as defined in [RFC1982] where SERIAL_BITS = 32.
An endpoint SHOULD NOT transmit a DATA chunk with a TSN that is more
than 2**31 - 1 above the beginning TSN of its current send window.
Doing so will cause problems in comparing TSNs.
Transmission Sequence Numbers wrap around when they reach 2**32 - 1.
That is, the next TSN a DATA chunk MUST use after transmitting TSN =
2*32 - 1 is TSN = 0.
Any arithmetic done on Stream Sequence Numbers SHOULD use Serial
Number Arithmetic as defined in [RFC1982] where SERIAL_BITS = 16.
All other arithmetic and comparisons in this document uses normal
arithmetic.
Stewart Expires December 14, 2007 [Page 15]
Internet-Draft Stream Control Transmission Protocol June 2007
1.7. Changes from RFC2960
SCTP was originally defined in [RFC2960] which this document
obsoletes. Readers interested in the details of the various changes
that this document incorporates are asked to consult [RFC4460].
2. Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC2119 [RFC2119].
3. SCTP packet Format
An SCTP packet is composed of a common header and chunks. A chunk
contains either control information or user data.
The SCTP packet format is shown below:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Common Header |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Chunk #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Chunk #n |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Multiple chunks can be bundled into one SCTP packet up to the MTU
size, except for the INIT, INIT ACK, and SHUTDOWN COMPLETE chunks.
These chunks MUST NOT be bundled with any other chunk in a packet.
See Section 6.10 for more details on chunk bundling.
If a user data message doesn't fit into one SCTP packet it can be
fragmented into multiple chunks using the procedure defined in
Section 6.9.
All integer fields in an SCTP packet MUST be transmitted in network
byte order, unless otherwise stated.
Stewart Expires December 14, 2007 [Page 16]
Internet-Draft Stream Control Transmission Protocol June 2007
3.1. SCTP Common Header Field Descriptions
SCTP Common Header Format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port Number | Destination Port Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Verification Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Source Port Number: 16 bits (unsigned integer)
This is the SCTP sender's port number. It can be used by the
receiver in combination with the source IP address, the SCTP
destination port and possibly the destination IP address to
identify the association to which this packet belongs. The port
number 0 MUST NOT be used.
Destination Port Number: 16 bits (unsigned integer)
This is the SCTP port number to which this packet is destined.
The receiving host will use this port number to de-multiplex the
SCTP packet to the correct receiving endpoint/application. The
port number 0 MUST NOT be used.
Verification Tag: 32 bits (unsigned integer)
The receiver of this packet uses the Verification Tag to validate
the sender of this SCTP packet. On transmit, the value of this
Verification Tag MUST be set to the value of the Initiate Tag
received from the peer endpoint during the association
initialization, with the following exceptions:
- A packet containing an INIT chunk MUST have a zero Verification
Tag.
- A packet containing a SHUTDOWN-COMPLETE chunk with the T-bit
set MUST have the Verification Tag copied from the packet with
the SHUTDOWN-ACK chunk.
Stewart Expires December 14, 2007 [Page 17]
Internet-Draft Stream Control Transmission Protocol June 2007
- A packet containing an ABORT chunk may have the verification
tag copied from the packet which caused the ABORT to be sent.
For details see Section 8.4 and Section 8.5.
An INIT chunk MUST be the only chunk in the SCTP packet carrying
it.
Checksum: 32 bits (unsigned integer)
This field contains the checksum of this SCTP packet. Its
calculation is discussed in Section 6.8. SCTP uses the CRC32c
algorithm as described in Appendix B for calculating the checksum
3.2. Chunk Field Descriptions
The figure below illustrates the field format for the chunks to be
transmitted in the SCTP packet. Each chunk is formatted with a Chunk
Type field, a chunk-specific Flag field, a Chunk Length field, and a
Value field.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Chunk Type | Chunk Flags | Chunk Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\ \
/ Chunk Value /
\ \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Chunk Type: 8 bits (unsigned integer)
This field identifies the type of information contained in the
Chunk Value field. It takes a value from 0 to 254. The value of
255 is reserved for future use as an extension field.
The values of Chunk Types are defined as follows: