-
Notifications
You must be signed in to change notification settings - Fork 1
/
draft-tuexen-tsvwg-rfc6951-bis.xml
660 lines (622 loc) · 29.6 KB
/
draft-tuexen-tsvwg-rfc6951-bis.xml
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
<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
xml:lang="en"
ipr="trust200902"
submissionType="IETF"
consensus="true"
category="std"
docName="draft-tuexen-tsvwg-rfc6951-bis-07-to-be"
obsoletes="6951"
version="3"
tocDepth="4">
<front>
<title abbrev='UDP Encapsulation of SCTP Packets'>
UDP Encapsulation of Stream Control Transmission Protocol (SCTP) Packets
for End-Host to End-Host Communication
</title>
<seriesInfo name="Internet-Draft" value="draft-tuexen-tsvwg-rfc6951-bis-07-to-be"/>
<!-- ************** MICHAEL TUEXEN *************** -->
<author initials='M.' surname='Tüxen' fullname='Michael Tüxen'>
<organization abbrev='Münster Univ. of Appl. Sciences'>
Münster University of Applied Sciences</organization>
<address>
<postal>
<street>Stegerwaldstrasse 39</street>
<city>48565 Steinfurt</city>
<country>Germany</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<!-- ************** RANDALL STEWART ***************-->
<author initials="R." surname="Stewart" fullname="Randall R. Stewart">
<organization></organization>
<address>
<postal>
<street>15214 Pendio Drive</street>
<city>Bella Collina</city>
<region>FL</region>
<code>34756</code>
<country>United States of America</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<date />
<abstract>
<t>This document describes a simple method of encapsulating Stream Control
Transmission Protocol (SCTP) packets into UDP packets and its limitations.
This allows the usage of SCTP in networks with legacy NATs that do not support
SCTP.
It can also be used to implement SCTP on hosts without directly accessing
the IP layer, for example, implementing it as part of the application without
requiring special privileges.</t>
<t>Please note that this document only describes the functionality
needed within an SCTP stack to add on UDP encapsulation, providing
only those mechanisms for two end-hosts to communicate with each
other over UDP ports.
In particular, it does not provide mechanisms to determine whether
UDP encapsulation is being used by the peer, nor the mechanisms for
determining which remote UDP port number can be used.
These functions are out of scope for this document.</t>
<t>This document covers only end-hosts and not tunneling (egress or ingress)
endpoints.
It obsoletes RFC 6951.</t>
</abstract>
</front>
<middle>
<section anchor='intro'>
<name>Introduction</name>
<t>This document describes a simple method of encapsulating SCTP packets into
UDP packets.
SCTP, as defined in <xref target='RFC9260'/>, runs directly over IPv4 or IPv6.
There are two main reasons for encapsulating SCTP packets:</t>
<ul>
<li><t>To allow SCTP traffic to pass through NATs, which do not provide
native SCTP support.</t></li>
<li><t>To allow SCTP to be implemented on hosts that do not provide direct
access to the IP layer.
In particular, applications can use their own SCTP implementation if the
operating system does not provide one.</t></li>
</ul>
<t>SCTP provides the necessary congestion control and reliability service
that UDP does not perform.</t>
</section>
<section>
<name>Conventions</name>
<t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
"<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>",
"<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
"<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to
be interpreted as described in
BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when,
they appear in all capitals, as shown here.</t>
</section>
<section anchor='use_cases'>
<name>Use Cases</name>
<t>This section discusses two important use cases for encapsulating
SCTP into UDP.</t>
<section>
<name>Portable SCTP Implementations</name>
<t>Some operating systems support SCTP natively.
For other operating systems, implementations are available but require
special privileges to install and/or use them.
In some cases, a kernel implementation might not be available at all.
When providing an SCTP implementation as part of a user process, most operating
systems require special privileges to access the IP layer directly.</t>
<t>Using UDP encapsulation makes it possible to provide an
SCTP implementation as part of a user process that does not
require any special privileges.</t>
<t>A crucial point for implementing SCTP in user space is that the
source address of outgoing packets needs to be controlled.
This is not an issue if the SCTP stack can use all addresses configured
at the IP layer as source addresses.
However, it is an issue when also using the address management needed for
NAT traversal, described in <xref target='emb_addrs'/>.</t>
</section>
<section>
<name>Legacy NAT Traversal</name>
<t>Using UDP encapsulation allows SCTP communication when traversing NATs not
supporting SCTP.
For single-homed associations, IP addresses <bcp14>MUST NOT</bcp14> be listed in
the INIT and INIT-ACK chunks.
To use multiple addresses, the dynamic address reconfiguration extension
described in <xref target='RFC5061'/> <bcp14>MUST</bcp14> be used only with
wildcard addresses in the ASCONF chunks (Address Configuration Change Chunks)
in combination with <xref target='RFC4895'/>.</t>
<t>For multihomed SCTP associations, the address management
as described in <xref target='emb_addrs'/> <bcp14>MUST</bcp14> be performed.</t>
<t>SCTP sends periodic HEARTBEAT chunks on all idle paths.
These can keep the NAT state alive.</t>
<t>If multiple SCTP endpoints are operating be a NAT, the local SCTP port
numbers used by the SCTP endpoints <bcp14>MUST</bcp14> all be different.</t>
</section>
</section>
<section>
<name>Unilateral Self-Address Fixing (UNSAF) Considerations</name>
<t>As <xref target='RFC3424'/> requires a limited scope,
this document only covers SCTP endpoints dealing with legacy constraints
as described in <xref target='use_cases'/>.
It doesn't cover generic tunneling endpoints.</t>
<t>Obviously, the exit strategy is to use hosts supporting SCTP natively and
middleboxes supporting SCTP.</t>
</section>
<section>
<name>SCTP over UDP</name>
<section anchor='arch'>
<name>Architectural Considerations</name>
<t>UDP-encapsulated SCTP is normally communicated between SCTP stacks
using the IANA-assigned UDP port number 9899 (sctp-tunneling) on both
ends.
There are circumstances where other ports <bcp14>MAY</bcp14> be used on either
end: As stated earlier, implementations in the application space
might be need to use ports other than the registered port.
Since NAT boxes might change UDP port numbers, the receiver might observe other
UDP port numbers than were used by the sender.
Discovery of alternate ports is outside of the scope of this document,
but this section describes considerations for SCTP stack design in light
of their potential use.</t>
<t>Each SCTP stack uses a single local UDP encapsulation port number as
the destination port for all its incoming SCTP packets.
While the uniqueness of the local UDP encapsulation port number is not
necessarily needed for the protocol, this greatly simplifies implementation
design, since different ports for each address would require a sender
implementation to choose the appropriate port while doing source address
selection.
Using a single local UDP encapsulation port number per host is not possible
if the SCTP stack is implemented as part of each application, there are multiple
applications, and some of the applications want to use the same IP address.</t>
<t>An SCTP implementation supporting UDP encapsulation <bcp14>MUST</bcp14>
maintain a remote UDP encapsulation port number per destination address for each
SCTP association.
Again, because the remote stack <bcp14>MAY</bcp14> be using ports other
than the well-known port, each port <bcp14>MAY</bcp14> be different from each
stack.
However, because of remapping of ports by NATs, the remote ports associated
with different remote IP addresses <bcp14>MAY</bcp14> not be identical,
even if they are associated with the same stack.</t>
<t>Implementation note: Because the well-known port might not be used,
implementations need to allow other port numbers to be specified as a
local or remote UDP encapsulation port number through APIs.</t>
</section>
<section>
<name>Packet Format</name>
<section>
<name>SCTP/UDP/IPv4 Packet Format</name>
<t>To encapsulate an SCTP packet, a UDP header
as defined in <xref target='RFC0768'/> is inserted between
the IP header as defined in <xref target='RFC0791'/>
and the SCTP common header as defined in <xref target='RFC9260'/>.</t>
<t><xref target='sctp_udp_ipv4'/> shows the packet
format of an encapsulated SCTP packet when IPv4 is
used.</t>
<figure anchor='sctp_udp_ipv4'
align='center'>
<name>An SCTP/UDP/IPv4 Packet</name>
<artwork>
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IPv4 Header |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| UDP Header |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SCTP Common Header |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SCTP Chunk #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SCTP Chunk #n |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
</figure>
</section>
<section>
<name>SCTP/UDP/IPv6 Packet Format</name>
<t>The packet format for an encapsulated SCTP packet when using
IPv6 as defined in <xref target='RFC8200'/> is shown in
<xref target='sctp_upd_ipv6'/>.
Please note that the number m of IPv6 extension headers can be 0.</t>
<figure anchor='sctp_upd_ipv6'
align='center'>
<name>An SCTP/UDP/IPv6 Packet</name>
<artwork>
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IPv6 Base Header |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IPv6 Extension Header #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IPv6 Extension Header #m |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| UDP Header |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SCTP Common Header |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SCTP Chunk #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SCTP Chunk #n |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
</figure>
</section>
<section anchor='error_cause'>
<name>A New Error Cause</name>
<t>The error cause indicating an
"Restart of an Association with New Encapsulation Port" is defined by the
following figure.</t>
<figure>
<name>Restart of an Association with New Encapsulation Port Error Cause</name>
<artwork align="left">
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cause Code = 14 (suggested) | Cause Length = 8 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Current Encapsulation Port | New Encapsulation Port |
+-------------------------------+-------------------------------+
</artwork>
</figure>
<dl newline="true">
<dt>Cause Code: 2 bytes (unsigned integer)</dt>
<dd>
<t>This field holds the IANA defined cause code for the
"Restart of an Association with New Encapsulation Port" error cause.
IANA is requested to assign the value 14 (suggested) for this cause code.</t>
</dd>
<dt>Cause Length: 2 bytes (unsigned integer)</dt>
<dd>
<t>This field holds the length in bytes of the error cause;
the value <bcp14>MUST</bcp14> be 8.</t>
</dd>
<dt>Current Encapsulation Port: 2 bytes (unsigned integer)</dt>
<dd>
<t>This field holds the remote encapsulation port currently being used
for the destination address the received packet containing the INIT chunk was
sent from.
If the UDP encapsulation for destination address is currently disabled,
0 is used.</t>
</dd>
<dt>New Encapsulation Port: 2 bytes (unsigned integer)</dt>
<dd>
<t>If the received SCTP packet containing the INIT chunk is encapsulated in UDP,
this field holds the UDP source port number of the UDP packet.
If the received SCTP packet is not encapsulated in UDP,
this field is 0.</t>
</dd>
</dl>
<t>All transported integer numbers are in "network byte order" a.k.a., Big Endian.</t>
</section>
</section>
<section>
<name>Sending Packets</name>
<t>Within the UDP header, the source port <bcp14>MUST</bcp14> be the local UDP
encapsulation port number of the SCTP stack, and the destination port
<bcp14>MUST</bcp14> be the remote UDP encapsulation port number maintained for
the association and the destination address to which the packet is sent
(see <xref target='arch'/>).</t>
<t>Because the SCTP packet is the UDP payload, the length of the
UDP packet <bcp14>MUST</bcp14> be the length of the SCTP packet plus the size of
the UDP header.</t>
<t>The SCTP checksum <bcp14>MUST</bcp14> be computed for IPv4 and IPv6, and the
UDP checksum <bcp14>SHOULD</bcp14> be computed for IPv4 and IPv6.
(See <xref target='RFC0768'/> regarding IPv4;
see <xref target='RFC8200'/> and <xref target='RFC6936'/> regarding IPv6.)
Although UDP with a zero checksum over IPv6 is allowed under certain
constraints <xref target='RFC6936'/>, this document does not specify mechanisms
for this mode.
Deployed support might be limited; also, at the time of writing, the use of a
zero UDP checksum would be counter to the goal of legacy NAT traversal.</t>
</section>
<section anchor='decaps'>
<name>Receiving Packets</name>
<t>When an encapsulated packet is received, the UDP header
is removed.
Then, the generic lookup is performed, as done by an SCTP stack whenever a
packet is received, to find the association for the received SCTP packet.
After finding the SCTP association (which includes checking the verification
tag), the UDP source port <bcp14>MUST</bcp14> be stored as the encapsulation
port for the destination address the SCTP packet is received from
(see <xref target='arch'/>).</t>
<t>When a non-encapsulated SCTP packet is received by the SCTP stack,
the encapsulation of outgoing packets belonging to the same association and
the corresponding destination address <bcp14>MUST</bcp14> be disabled.</t>
<t>If the verification tag can't be checked, the procedures described in one
of the following sections <bcp14>MUST</bcp14> be followed.</t>
</section>
<section>
<name>Handling of SCTP Packets Containing an INIT Chunk Matching an Existing Association</name>
<t>SCTP packets containing an INIT chunk have the verification tag 0 in
the common header.
Therefore the verification tag can't be checked.</t>
<t>The following rules apply when processing the received packet:</t>
<ol>
<li><t>The remote UDP encapsulation port for the source address of the received
SCTP packet <bcp14>MUST NOT</bcp14> be updated if the encapsulation of outgoing
packets is enabled and the received SCTP packet is encapsulated.</t></li>
<li><t>The UDP encapsulation for outgoing packets towards the source address
of the received SCTP packet <bcp14>MUST NOT</bcp14> be enabled, if it is
disabled and the received SCTP packet is encapsulated.</t></li>
<li><t>The UDP encapsulation for outgoing packets towards the source address
of the received SCTP packet <bcp14>MUST NOT</bcp14> be disabled, if it is
enabled and the received SCTP packet is not encapsulated.</t></li>
<li><t>If the UDP encapsulation for outgoing packets towards the source address
of the received SCTP packet is disabled and the received SCTP packet is
encapsulated, an SCTP packet containing an ABORT chunk <bcp14>MUST</bcp14> be
sent.
The ABORT chunk <bcp14>MAY</bcp14> include the error cause defined below
indicating an "Restart of an Association with New Encapsulation Port".
This packet containing the ABORT chunk <bcp14>MUST</bcp14> be encapsulated in
UDP.
The UDP source port and UDP destination port used for sending the
packet containing the ABORT chunk are the UDP destination port and
UDP source port of the received packet containing the INIT chunk.</t></li>
<li><t>If the UDP encapsulation for outgoing packets towards the source address
of the received SCTP packet is disabled and the received SCTP packet is
not encapsulated, the processing defined in <xref target="RFC9260"/>
<bcp14>MUST</bcp14> be performed.
If a packet is sent in response, it <bcp14>MUST NOT</bcp14> be
encapsulated.</t></li>
<li><t>If the UDP encapsulation for outgoing packets towards the source address
of the received SCTP packet is enabled and the received SCTP packet is not
encapsulated, an SCTP packet containing an ABORT chunk <bcp14>MUST</bcp14> be
sent.
The ABORT chunk <bcp14>MAY</bcp14> include the error cause defined in
<xref target="error_cause"/> indicating an "Restart of an Association with New
Encapsulation Port".
This packet containing the ABORT chunk <bcp14>MUST NOT</bcp14> be encapsulated
in UDP.</t></li>
<li><t>If the UDP encapsulation for outgoing packets towards the source address
of the received SCTP packet is enabled and the received SCTP packet is
encapsulated, but the UDP source port of the received SCTP packet is not
equal to the remote UDP encapsulation port for the source address of the
received SCTP packet, an SCTP packet containing an ABORT chunk
<bcp14>MUST</bcp14> be sent.
The ABORT chunk <bcp14>MAY</bcp14> include the error cause defined in
<xref target="error_cause"/> indicating an "Restart of an Association with
New Encapsulation Port".
This packet containing the ABORT chunk <bcp14>MUST</bcp14> be encapsulated in
UDP.
The UDP source port and UDP destination port used for sending the
packet containing the ABORT chunk are the UDP destination port and
UDP source port of the received packet containing the INIT chunk.</t></li>
<li><t>If the UDP encapsulation for outgoing packets towards the source address
of the received SCTP packet is enabled and the received SCTP packet is
encapsulated and the UDP source port of the received SCTP packet is
equal to the remote UDP encapsulation port for the source address of the
received SCTP packet, the processing defined in <xref target="RFC9260"/>
<bcp14>MUST</bcp14> be performed.
If a packet is sent in response, it <bcp14>MUST</bcp14> be encapsulated.
The UDP source port and UDP destination port used for sending the
packet containing the ABORT chunk are the UDP destination port and
UDP source port of the received packet containing the INIT chunk.</t></li>
</ol>
</section>
<section>
<name>Handling of Out of the Blue Packets</name>
<t>If the processing of an out of the blue packet requires the sending
of a packet in response according to the rules specified in Section 8.4 of
<xref target="RFC9260"/>, the following rules apply:</t>
<ol>
<li>
<t>If the received packet was encapsulated in UDP, the response packets
<bcp14>MUST</bcp14> also be encapsulated in UDP.
The UDP source port and UDP destination port used for sending the response
packet are the UDP destination port and UDP source port of the received
packet.</t>
</li>
<li>
<t>If the received packet was not encapsulated in UDP, the response packet
<bcp14>MUST NOT</bcp14> be encapsulated in UDP.</t>
</li>
</ol>
<t>Please note that in these cases a check of the verification tag is not
possible.</t>
</section>
<section anchor='icmp_cons'>
<name>ICMP Considerations</name>
<t>When receiving ICMP or ICMPv6 response packets, there might not
be enough bytes in the payload to identify the SCTP association
that the SCTP packet triggering the ICMP or ICMPv6 packet belongs to.
If a received ICMP or ICMPv6 packet cannot be related to a specific
SCTP association or the verification tag cannot be verified,
it <bcp14>MUST</bcp14> be discarded silently.
In particular, this means that the SCTP stack <bcp14>MUST NOT</bcp14> rely on
receiving ICMP or ICMPv6 messages.
Implementation constraints could prevent processing received
ICMP or ICMPv6 messages.</t>
<t>If received ICMP or ICMPv6 messages are processed, the following mapping
<bcp14>SHOULD</bcp14> apply:</t>
<ol>
<li><t>ICMP messages with type 'Destination Unreachable' and code
'Port Unreachable' <bcp14>SHOULD</bcp14> be treated as ICMP messages
with type 'Destination Unreachable' and code 'Protocol Unreachable'.
See <xref target='RFC0792'/> for more details.</t></li>
<li><t>ICMPv6 messages with type 'Destination Unreachable' and code
'Port Unreachable' <bcp14>SHOULD</bcp14> be treated as ICMPv6 messages with type
'Parameter Problem' and code 'unrecognized Next Header type encountered'.
See <xref target='RFC4443'/> for more details.</t></li>
</ol>
</section>
<section>
<name>Path MTU Considerations</name>
<t>If an SCTP endpoint starts to encapsulate the packets of a path, it
<bcp14>MUST</bcp14> decrease the Path MTU of that path by the size of the
UDP header.
If it stops encapsulating them, the Path MTU <bcp14>SHOULD</bcp14> be increased
by the size of the UDP header.</t>
<t>Since one cannot rely on the feedback provided by ICMP or ICMPv6 due to the
limitation laid out in <xref target='icmp_cons'/>, <xref target='RFC8899'/>
<bcp14>MUST</bcp14> be followed, when performing Path MTU discovery.</t>
<t>If the implementation does not allow control of the Don't Fragment (DF) bit
contained in the IPv4 header, then Path MTU discovery can't be used.
In this case, an implementation-specific value <bcp14>SHOULD</bcp14> be used
instead.</t>
</section>
<section anchor='emb_addrs'>
<name>Handling of Embedded IP Addresses</name>
<t>When using UDP encapsulation for legacy NAT traversal, IP addresses that
might require translation <bcp14>MUST NOT</bcp14> be put into any SCTP packet.</t>
<t>This means that a multihomed SCTP association is set up initially as a
single-homed one, and the protocol extension <xref target='RFC5061'/>
in combination with <xref target='RFC4895'/> is used to add the other
addresses.
Only wildcard addresses are put into the SCTP packet.</t>
<t>When addresses are changed during the lifetime of an association,
the protocol extension <xref target='RFC5061'/> <bcp14>MUST</bcp14> be used
with wildcard addresses only.
If an SCTP endpoint receives an ABORT with the T-bit set, it <bcp14>MAY</bcp14>
use this as an indication that the addresses seen by the peer might
have changed.</t>
</section>
<section>
<name>Explicit Congestion Notification (ECN) Considerations</name>
<t>If the implementation supports the sending and receiving of the
ECN bits for the IP protocols being used by an SCTP association, the ECN bits
<bcp14>MUST NOT</bcp14> be changed during sending and receiving.</t>
</section>
</section>
<section>
<name>Socket API Considerations</name>
<t>This section describes how the socket API defined in
<xref target='RFC6458'/> needs to be extended to provide a way for the
application to control the UDP encapsulation.</t>
<t>Please note that this section is informational only.</t>
<t>A socket API implementation based on <xref target='RFC6458'/> is extended by
supporting one new read/write socket option.</t>
<section>
<name>Get or Set the Remote UDP Encapsulation Port Number
(SCTP_REMOTE_UDP_ENCAPS_PORT)</name>
<t>This socket option can be used to set and retrieve the UDP encapsulation
port number.
This allows an endpoint to encapsulate initial packets.</t>
<artwork>
struct sctp_udpencaps {
sctp_assoc_t sue_assoc_id;
struct sockaddr_storage sue_address;
uint16_t sue_port;
};
</artwork>
<dl newline="true">
<dt>sue_assoc_id:</dt>
<dd><t>This parameter is ignored for one-to-one style sockets.
For one-to-many style sockets, the application might fill in an association
identifier or SCTP_FUTURE_ASSOC for this query.
It is an error to use SCTP_{CURRENT|ALL}_ASSOC in sue_assoc_id.</t></dd>
<dt>sue_address:</dt>
<dd><t>This specifies which address is of interest.
If a wildcard address is provided, it applies only to future paths.</t></dd>
<dt>sue_port:</dt>
<dd><t>The UDP port number in network byte order; used as the destination port
number for UDP encapsulation.
Providing a value of 0 disables UDP encapsulation.</t></dd>
</dl>
</section>
</section>
<section>
<name>Middlebox Considerations</name>
<t>Middleboxes often use different timeouts for UDP based flows than
for other flows.
Therefore the HEARTBEAT.Interval parameter <bcp14>SHOULD</bcp14> be lowered to
15 seconds when UDP encapsulation is used.</t>
</section>
<section>
<name>IANA Considerations</name>
<t>[NOTE to RFC-Editor: "RFCXXXX" is to be replaced by the RFC number you
assign this document.]</t>
<t>[NOTE to RFC-Editor: The requested values for the cause code are tentative
and to be confirmed by IANA.]</t>
<t>A new error cause code has to be assigned by IANA.
This requires an additional line in the "Error Cause Codes" registry for
SCTP:</t>
<table>
<name>New Entry in Error Cause Codes Registry</name>
<thead>
<tr><th>Value</th> <th>Cause Code </th> <th>Reference</th></tr>
</thead>
<tbody>
<tr><td>14 (suggested) </td> <td>Restart of an Association with New Encapsulation Port</td> <td>[RFCXXXX]</td></tr>
</tbody>
</table>
<t>This document refers to the already assigned UDP port 9899 (sctp-tunneling).
IANA is requested to update this assignment to refer to [RFCXXXX].
As per <xref target='RFC6335'/>, the Assignee is [IESG] and the Contact is
[IETF_Chair].</t>
</section>
<section>
<name>Security Considerations</name>
<t>Encapsulating SCTP into UDP does not add any additional
security considerations to the ones given in
<xref target='RFC9260'/> and
<xref target='RFC5061'/>.</t>
<t>Firewalls inspecting SCTP packets need also to be aware of the encapsulation
and apply corresponding rules to the encapsulated packets.</t>
<t>An attacker might send a malicious UDP packet towards an SCTP endpoint
to change the encapsulation port for a single remote address of
a particular SCTP association.
However, as specified in <xref target='decaps'/>, this requires the usage
of one of the two negotiated verification tags.
This protects against blind attackers the same way as described
in <xref target='RFC9260'/> for SCTP over IPv4 or IPv6.
Non-blind attackers can affect SCTP association using the UDP encapsulation
described in this document in the same way as SCTP associations not
using the UDP encapsulation of SCTP described here.</t>
</section>
</middle>
<back>
<references>
<name>References</name>
<references>
<name>Normative References</name>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.0768.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.0791.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.0792.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4443.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4895.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5061.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8200.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8899.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9260.xml"/>
</references>
<references>
<name>Informative References</name>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3424.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6335.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6458.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6936.xml"/>
<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6951.xml"/>
</references>
</references>
<section numbered='false'>
<name>Acknowledgments</name>
<t>The authors wish to thank
<contact fullname="Stewart Bryant"/>,
<contact fullname="Dave Crocker"/>,
<contact fullname="Gorry Fairhurst"/>,
<contact fullname="Tero Kivinen"/>,
<contact fullname="Barry Leiba"/>,
<contact fullname="Pete Resnick"/>,
<contact fullname="Martin Stiemerling"/>,
<contact fullname="Irene Rüngeler"/>,
and
<contact fullname="Dan Wing"/>
for their invaluable comments on <xref target='RFC6951'/>.</t>
<t>The authors wish to thank <contact fullname="Georgios Papastergiou"/> for
the initial problem report resulting in the work on this document and
<contact fullname="Irene Rüngeler"/> and
<contact fullname="Felix Weinrank"/>
for their invaluable comments on this document.</t>
<t>Part of this work has received funding from the European Union's Horizon 2020
research and innovation programme under grant agreement No. 644334 (NEAT).
The views expressed are solely those of the author(s).</t>
</section>
</back>
</rfc>