idnits 2.17.1 draft-ietf-tsvwg-natsupp-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC0793], [RFC4960]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 09, 2013) is 3880 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'RFCXXXX' is mentioned on line 770, but not defined ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 4960 (Obsoleted by RFC 9260) ** Obsolete normative reference: RFC 6096 (Obsoleted by RFC 9260) == Outdated reference: A later version (-09) exists of draft-ietf-behave-sctpnat-08 Summary: 4 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group R. Stewart 3 Internet-Draft Adara Networks 4 Intended status: Standards Track M. Tuexen 5 Expires: March 13, 2014 I. Ruengeler 6 Muenster Univ. of Appl. Sciences 7 September 09, 2013 9 Stream Control Transmission Protocol (SCTP) Network Address Translation 10 Support 11 draft-ietf-tsvwg-natsupp-06.txt 13 Abstract 15 Stream Control Transmission Protocol [RFC4960] provides a reliable 16 communications channel between two end-hosts in many ways similar to 17 TCP [RFC0793]. With the widespread deployment of Network Address 18 Translators (NAT), specialized code has been added to NAT for TCP 19 that allows multiple hosts to reside behind a NAT and yet use only a 20 single globally unique IPv4 address, even when two hosts (behind a 21 NAT) choose the same port numbers for their connection. This 22 additional code is sometimes classified as Network Address and Port 23 Translation (NAPT). To date, specialized code for SCTP has not yet 24 been added to most NATs so that only pure NAT is available. The end 25 result of this is that only one SCTP capable host can be behind a 26 NAT. 28 This document describes the protocol extensions required for the SCTP 29 endpoints to help NATs provide similar features of NAPT in the 30 single-point and multi-point traversal scenario. 32 Status of This Memo 34 This Internet-Draft is submitted in full conformance with the 35 provisions of BCP 78 and BCP 79. 37 Internet-Drafts are working documents of the Internet Engineering 38 Task Force (IETF). Note that other groups may also distribute 39 working documents as Internet-Drafts. The list of current Internet- 40 Drafts is at http://datatracker.ietf.org/drafts/current/. 42 Internet-Drafts are draft documents valid for a maximum of six months 43 and may be updated, replaced, or obsoleted by other documents at any 44 time. It is inappropriate to use Internet-Drafts as reference 45 material or to cite them other than as "work in progress." 47 This Internet-Draft will expire on March 13, 2014. 49 Copyright Notice 51 Copyright (c) 2013 IETF Trust and the persons identified as the 52 document authors. All rights reserved. 54 This document is subject to BCP 78 and the IETF Trust's Legal 55 Provisions Relating to IETF Documents 56 (http://trustee.ietf.org/license-info) in effect on the date of 57 publication of this document. Please review these documents 58 carefully, as they describe your rights and restrictions with respect 59 to this document. Code Components extracted from this document must 60 include Simplified BSD License text as described in Section 4.e of 61 the Trust Legal Provisions and are provided without warranty as 62 described in the Simplified BSD License. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 67 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 4 68 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 69 4. Data Formats . . . . . . . . . . . . . . . . . . . . . . . . 5 70 4.1. Modified Chunks . . . . . . . . . . . . . . . . . . . . . 5 71 4.1.1. Extended ABORT Chunk . . . . . . . . . . . . . . . . 5 72 4.1.2. Extended ERROR Chunk . . . . . . . . . . . . . . . . 5 73 4.2. New Error Causes . . . . . . . . . . . . . . . . . . . . 6 74 4.2.1. VTag and Port Number Collision Error Cause . . . . . 6 75 4.2.2. Missing State Error Cause . . . . . . . . . . . . . . 7 76 4.2.3. Port Number Collision Error Cause . . . . . . . . . . 7 77 4.3. New Parameters . . . . . . . . . . . . . . . . . . . . . 8 78 4.3.1. Disable Restart Parameter . . . . . . . . . . . . . . 8 79 4.3.2. VTags Parameter . . . . . . . . . . . . . . . . . . . 8 80 5. Problem Space and Procedures . . . . . . . . . . . . . . . . 9 81 5.1. Problem Space Overview . . . . . . . . . . . . . . . . . 9 82 5.2. Association Setup Considerations . . . . . . . . . . . . 10 83 5.3. Handling of Internal Port Number and Verification Tag 84 Collisions . . . . . . . . . . . . . . . . . . . . . . . 10 85 5.4. Handling of Internal Port Number Collisions . . . . . . . 11 86 5.5. Handling of Missing State . . . . . . . . . . . . . . . . 12 87 5.6. Multi-Point Traversal Considerations . . . . . . . . . . 14 88 6. Socket API Considerations . . . . . . . . . . . . . . . . . . 14 89 6.1. Get or Set the NAT Friendliness 90 (SCTP_NAT_FRIENDLY) . . . . . . . . . . . . . . . . . . . 14 91 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 92 7.1. New Chunk Flags for Two Existing Chunk Types . . . . . . 15 93 7.2. Three New Error Causes . . . . . . . . . . . . . . . . . 16 94 7.3. Two New Chunk Parameter Types . . . . . . . . . . . . . . 17 95 8. Security Considerations . . . . . . . . . . . . . . . . . . . 17 96 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 17 97 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 98 10.1. Normative References . . . . . . . . . . . . . . . . . . 17 99 10.2. Informative References . . . . . . . . . . . . . . . . . 18 100 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 102 1. Introduction 104 Stream Control Transmission Protocol [RFC4960] provides a reliable 105 communications channel between two end-hosts in many ways similar to 106 TCP [RFC0793]. With the widespread deployment of Network Address 107 Translators (NAT), specialized code has been added to NAT for TCP 108 that allows multiple hosts to reside behind a NAT using private 109 addresses (see [RFC6890]) and yet use only a single globally unique 110 IPv4 address, even when two hosts (behind a NAT) choose the same port 111 numbers for their connection. This additional code is sometimes 112 classified as Network Address and Port Translation (NAPT). To date, 113 specialized code for SCTP has not yet been added to most NATs so that 114 only true NAT is available. The end result of this is that only one 115 SCTP capable host can be behind a NAT. 117 This document describes SCTP specific packets and procedures to help 118 NATs provide similar features of NAPT in the single-point and multi- 119 point traversal scenario. An SCTP implementation supporting this 120 extension will follow these procedures to assure that in both single- 121 homed and multi-homed cases a NAT will maintain the proper state 122 without needing to change port numbers. 124 A NAT will need to follow these procedures for generating appropriate 125 SCTP packet formats. NATs should refer to [I-D.ietf-behave-sctpnat] 126 for the BCP in using these formats. 128 When considering this feature it is possible to have multiple levels 129 of support. At each level, the Internal Host, External Host and NAT 130 may or may not support the features described in this document. The 131 following table illustrates the results of the various combinations 132 of support and if communications can occur between two endpoints. 134 +---------------+------------+---------------+---------------+ 135 | Internal Host | NAT | External Host | Communication | 136 +---------------+------------+---------------+---------------+ 137 | Support | Support | Support | Yes | 138 | Support | Support | No Support | Limited | 139 | Support | No Support | Support | None | 140 | Support | No Support | No Support | None | 141 | No Support | Support | Support | Limited | 142 | No Support | Support | No Support | Limited | 143 | No Support | No Support | Support | None | 144 | No Support | No Support | No Support | None | 145 +---------------+------------+---------------+---------------+ 147 Table 1: Communication possibilities 149 From the table we can see that when a NAT does not support the 150 extension no communication can occur. This is because for the most 151 part of the current situation i. e. SCTP packets sent externally from 152 behind a NAT are discarded by the NAT. In some cases, where the NAT 153 supports the feature but one of the two external hosts does not 154 support the feature, communication may occur but in a limited way. 155 For example only one host may be able to have a connection when a 156 collision case occurs. 158 2. Conventions 160 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 161 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 162 document are to be interpreted as described in [RFC2119]. 164 3. Terminology 166 This document uses the following terms, which are depicted in Figure 167 1. 169 Private-Address (Priv-Addr): The private address that is known to 170 the internal host. 172 Internal-Port (Int-Port): The port number that is in use by the host 173 holding the Private-Address. 175 Internal-VTag (Int-VTag): The Verification Tag that the internal 176 host has chosen for its communication. The VTag is a unique 177 32-bit tag that must accompany any incoming SCTP packet for this 178 association to the Private-Address. 180 External-Address (Ext-Addr): The address that an internal host is 181 attempting to contact. 183 External-Port (Ext-Port): The port number of the peer process at the 184 External-Address. 186 External-VTag (Ext-VTag): The Verification Tag that the host holding 187 the External-Address has chosen for its communication. The VTag 188 is a unique 32-bit tag that must accompany any incoming SCTP 189 packet for this association to the External-Address. 191 Public-Address (Pub-Addr): The public address assigned to the NAT 192 box which it uses as a source address when sending packets towards 193 the External-Address. 195 Internal Network | External Network 196 | 197 Private | Public External 198 +---------+ Address | Address /--\/--\ Address +---------+ 199 | SCTP | +-----+ / \ | SCTP | 200 |end point|=========| NAT |=======| Internet |==========|end point| 201 | A | +-----+ \ / | B | 202 +---------+ Internal | \--/\--/ External+---------+ 203 Internal Port | Port External 204 VTag | VTag 206 Figure 1: Basic network setup 208 4. Data Formats 210 4.1. Modified Chunks 212 This section presents existing chunks defined in [RFC4960] that are 213 modified by this document. 215 4.1.1. Extended ABORT Chunk 217 0 1 2 3 218 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 219 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 220 | Type = 6 | Reserved |M|T| Length | 221 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 222 \ \ 223 / zero or more Error Causes / 224 \ \ 225 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 227 The ABORT chunk is extended to add the new 'M-bit'. The M-bit 228 indicates to the receiver of the ABORT chunk that the chunk was not 229 generated by the peer SCTP endpoint, but instead by a middle box. 231 4.1.2. Extended ERROR Chunk 233 0 1 2 3 234 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 235 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 236 | Type = 9 | Reserved |M|T| Length | 237 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 238 \ \ 239 / zero or more Error Causes / 240 \ \ 241 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 243 The ERROR chunk defined in [RFC4960] is extended to add the new 244 'M-bit'. The M-bit indicates to the receiver of the ERROR chunk that 245 the chunk was not generated by the peer SCTP endpoint, but instead by 246 a middle box. 248 4.2. New Error Causes 250 This section defines the new error causes added by this document. 252 4.2.1. VTag and Port Number Collision Error Cause 254 0 1 2 3 255 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 256 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 257 | Cause Code = 0x00B0 | Cause Length = Variable | 258 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 259 \ Chunk / 260 / \ 261 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 263 Cause Code: 2 bytes (unsigned integer) 264 This field holds the IANA defined cause code for the VTag and Port 265 Number Collision Error Cause. The suggested value of this field 266 for IANA is 0x00B0. 268 Cause Length: 2 bytes (unsigned integer) 269 This field holds the length in bytes of the error cause. The 270 value MUST be the length of the Cause-Specific Information plus 4. 272 Chunk: variable length 273 The Cause-Specific Information is filled with the chunk that 274 caused this error. This can be an INIT, INIT-ACK, or ASCONF 275 chunk. Note that if the entire chunk will not fit in the ERROR 276 chunk or ABORT chunk being sent then the bytes that do not fit are 277 truncated. 279 4.2.2. Missing State Error Cause 281 0 1 2 3 282 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 283 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 284 | Cause Code = 0x00B1 | Cause Length = Variable | 285 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 286 \ Incoming Packet / 287 / \ 288 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 290 Cause Code: 2 bytes (unsigned integer) 291 This field holds the IANA defined cause code for the Missing State 292 Error Cause. The suggested value of this field for IANA is 293 0x00B1. 295 Cause Length: 2 bytes (unsigned integer) 296 This field holds the length in bytes of the error cause. The 297 value MUST be the length of the Cause-Specific Information plus 4. 299 Incoming Packet: variable length 300 The Cause-Specific Information is filled with the IPv4 or IPv6 301 packet that caused this error. The IPv4 or IPv6 header MUST be 302 included. Note that if the packet will not fit in the ERROR chunk 303 or ABORT chunk being sent then the bytes that do not fit are 304 truncated. 306 4.2.3. Port Number Collision Error Cause 308 0 1 2 3 309 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 310 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 311 | Cause Code = 0x00B2 | Cause Length = Variable | 312 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 313 \ chunk / 314 / \ 315 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 317 Cause Code: 2 bytes (unsigned integer) 318 This field holds the IANA defined cause code for the Port Number 319 Collision Error Cause. The suggested value of this field for IANA 320 is 0x00B2. 322 Cause Length: 2 bytes (unsigned integer) 323 This field holds the length in bytes of the error cause. The 324 value MUST be the length of the Cause-Specific Information plus 4. 326 Chunk: variable length 327 The Cause-Specific Information is filled with the chunk that 328 caused this error. This can be an INIT, INIT-ACK, or ASCONF 329 chunk. Note that if the entire chunk will not fit in the ERROR 330 chunk or ABORT chunk being sent then the bytes that do not fit are 331 truncated. 333 4.3. New Parameters 335 This section defines new parameters and their valid appearance 336 defined by this document. 338 4.3.1. Disable Restart Parameter 340 This parameter is used to indicate that the RESTART procedure is 341 requested to be disabled. Both endpoints of an association MUST 342 include this parameter in the INIT chunk and INIT-ACK chunk when 343 establishing an association and MUST include it in the ASCONF chunk 344 when adding an address to successfully disable the restart procedure. 346 0 1 2 3 347 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 348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 349 | Type = 0xC007 | Length = 4 | 350 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 352 Parameter Type: 2 bytes (unsigned integer) 353 This field holds the IANA defined parameter type for the Disable 354 Restart Parameter. The suggested value of this field for IANA is 355 0xC007. 357 Parameter Length: 2 bytes (unsigned integer) 358 This field holds the length in bytes of the parameter. The value 359 MUST be 4. 361 This parameter MAY appear in INIT, INIT-ACK and ASCONF chunks and 362 MUST NOT appear in any other chunk. 364 4.3.2. VTags Parameter 366 This parameter is used to help a NAT recover from state loss. 368 0 1 2 3 369 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 370 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 371 | Parameter Type = 0xC008 | Parameter Length = 16 | 372 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 373 | ASCONF-Request Correlation ID | 374 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 375 | Internal Verification Tag | 376 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 377 | External Verification Tag | 378 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 380 Parameter Type: 2 bytes (unsigned integer) 381 This field holds the IANA defined parameter type for the VTags 382 Parameter. The suggested value of this field for IANA is 0xC008. 384 Parameter Length: 2 bytes (unsigned integer) 385 This field holds the length in bytes of the parameter. The value 386 MUST be 16. 388 ASCONF-Request Correlation ID: 4 bytes (unsigned integer) 389 This is an opaque integer assigned by the sender to identify each 390 request parameter. The receiver of the ASCONF Chunk will copy 391 this 32-bit value into the ASCONF Response Correlation ID field of 392 the ASCONF-ACK response parameter. The sender of the ASCONF can 393 use this same value in the ASCONF-ACK to find which request the 394 response is for. Note that the receiver MUST NOT change this 395 32-bit value. 397 Internal Verification Tag: 4 bytes (unsigned integer) 398 The Verification Tag that the internal host has chosen for its 399 communication. The Verification Tag is a unique 32-bit tag that 400 must accompany any incoming SCTP packet for this association to 401 the Private-Address. 403 External Verification Tag: 4 bytes (unsigned integer) The 404 Verification Tag that the host holding the External-Address has 405 chosen for its communication. The VTag is a unique 32-bit tag 406 that must accompany any incoming SCTP packet for this association 407 to the External-Address. 409 This parameter MAY appear in ASCONF chunks and MUST NOT appear in any 410 other chunk. 412 5. Problem Space and Procedures 414 5.1. Problem Space Overview 416 When an SCTP endpoint is behind a NAT which supports 417 [I-D.ietf-behave-sctpnat] a number of problems may arise as it tries 418 to communicate with its peer: 420 o More than one server behind a NAT may pick the same VTag and 421 source port when talking to the same peer server. This creates a 422 situation where the NAT will not be able to tell the two 423 associations apart. This situation is discussed in Section 5.3. 425 o When an SCTP endpoint is a server communicating with multiple 426 peers and the peers are behind the same NAT, then the two 427 endpoints cannot be distinguished by the server. This case is 428 discussed in Section 5.4. 430 o A restart of a NAT during a conversation could cause a loss of its 431 state. This problem and its solution is discussed in Section 5.5. 433 o An SCTP endpoint may be behind two NATs providing redundancy. The 434 method to set up this scenario is discussed in Section 5.6. 436 Each of these solutions requires additional chunks and parameters, 437 defined in this document, and possibly modified handling procedures 438 from those specified in [RFC4960]. 440 5.2. Association Setup Considerations 442 Every association MUST initially be set up single-homed. There MUST 443 NOT be any IPv4 Address parameter, IPv6 Address parameter, or 444 Supported Address Types parameter in the INIT-chunk. The INIT-ACK 445 chunk MUST NOT contain any IPv4 Address parameter or IPv6 Address 446 parameter. 448 If the association should finally be multi-homed, the procedure in 449 Section 5.6 MUST be used. 451 The INIT and INIT-ACK chunk SHOULD contain the Disable Restart 452 parameter defined in Section 4.3.1. 454 5.3. Handling of Internal Port Number and Verification Tag Collisions 456 Consider the case where two hosts in the Private-Address space want 457 to set up an SCTP association with the same server running on the 458 same host in the Internet. This means that the External-Port and the 459 External-Address are the same. If they both choose the same 460 Internal-Port and Internal-VTag, the NAT box cannot distinguish 461 between incoming packets anymore. But this is very unlikely. The 462 Internal-VTags are chosen at random and if the Internal-Ports are 463 also chosen from the ephemeral port range at random this gives a 464 46-bit random number which has to match. In the TCP like NAPT case 465 the NAT box can control the 16-bit Natted Port and therefor avoid 466 collisions deterministically. 468 The same can happen when an INIT-ACK chunk or an ASCONF chunk is 469 processed by the NAT. 471 However, in this unlikely event the NAT box MUST send an ABORT chunk 472 with the M-bit set if the collision is triggered by an INIT or INIT- 473 ACK chunk or send an ERROR chunk with the M-bit set if the collision 474 is triggered by an ASCONF chunk. The M-bit is a new bit defined by 475 this document to express to SCTP that the source of this packet is a 476 "middle" box, not the peer SCTP endpoint (see Section 4.1.1). In a 477 packet containing an INIT-ACK chunk triggers the collision, the 478 corresponding packet containing the ABORT chunk MUST contain the same 479 source and destination address and port numbers as the packet 480 containing the INIT-ACK chunk. In the other two cases, the source 481 and destination address and port numbers MUST be swapped. 483 The sender of the packet containing the INIT chunk or the receiver of 484 the INIT-ACK chunk, upon reception of an ABORT chunk with M-bit set, 485 SHOULD reinitiate the association setup procedure after choosing a 486 new initiate tag. These procedures SHOULD be followed only if the 487 appropriate error cause code for colliding NAT table state is 488 included AND the association is in the COOKIE-WAIT state (i. e. it is 489 awaiting an INIT-ACK). If the endpoint is in any other state an SCTP 490 endpoint SHOULD NOT respond. 492 The sender of the ASCONF chunk, upon reception of an ERROR chunk with 493 M-bit set, MUST stop adding the path to the association. 495 The sender of the ERROR or ABORT chunk MUST include the error cause 496 with cause code 'VTag and Port Number Collision' (see Section 4.2.1). 498 5.4. Handling of Internal Port Number Collisions 500 When two SCTP hosts are behind a NAT and using the recommendations in 501 [I-D.ietf-behave-sctpnat] it is possible that two SCTP hosts in the 502 Private-Address space will want to set up an SCTP association with 503 the same server running on the same host in the Internet. For the 504 NAT appropriate tracking may be performed by assuring that the VTags 505 are unique between the two hosts as defined in 506 [I-D.ietf-behave-sctpnat]. But for the external SCTP server on the 507 internet this means that the External-Port and the External-Address 508 are the same. If they both have chosen the same Internal-Port the 509 server cannot distinguish between both associations based on the 510 address and port numbers. For the server it looks like the 511 association is being restarted. To overcome this limitation the 512 client sends a Disable Restart parameter in the INIT-chunk. 514 When the server receives this parameter it MUST do the following: 516 o Include a Disable Restart parameter in the INIT-ACK to inform the 517 client that it will support the feature. 519 o Disable the restart procedures defined in [RFC4960] for this 520 association. 522 Servers that support this feature will need to be capable of 523 maintaining multiple connections to what appears to be the same peer 524 (behind the NAT) differentiated only by the VTags. 526 The NAT, when processing the INIT-ACK, should note in its internal 527 table that the association supports the Disable Restart extension. 528 This note is used when establishing future associations (i. e. when 529 processing an INIT from an internal host) to decide if the connection 530 should be allowed. The NAT MUST do the following when processing an 531 INIT: 533 o If the INIT is destined to an external address and port for which 534 the NAT has no outbound connection, allow the INIT creating an 535 internal mapping table. 537 o If the INIT matches the external address and port of an already 538 existing connection, validate that the external server supports 539 the Disable Restart feature, if it does allow the INIT to be 540 forwarded. 542 o If the external server does not support the Disable Restart 543 extension the NAT MUST send an ABORT with the M-bit set. 545 The 'Port Number Collision' error cause (see Section 4.2.3) MUST be 546 included in the ABORT chunk. 548 If the collision is triggered by an ASCONF chunk, a packet containing 549 an ERROR chunk with the 'Port Number Collision' error cause MUST be 550 sent back. 552 5.5. Handling of Missing State 554 If the NAT box receives a packet from the internal network for which 555 the lookup procedure does not find an entry in the NAT table, a 556 packet containing an ERROR chunk is sent back with the M-bit set. 557 The source address of the packet containing the ERROR chunk MUST be 558 the destination address of the incoming SCTP packet. The 559 verification tag is reflected and the T-bit is set. Please note that 560 such a packet containing an ERROR chunk SHOULD NOT be sent if the 561 received packet contains an ABORT, SHUTDOWN-COMPLETE or INIT-ACK 562 chunk. An ERROR chunk MUST NOT be sent if the received packet 563 contains an ERROR chunk with the M-bit set. 565 When sending the ERROR chunk, the new error cause Missing state (see 566 Section 4.2.2) MUST be included and the new M-bit of the ERROR chunk 567 MUST be set (see Section 4.1.2). 569 Upon reception of this ERROR chunk by an SCTP endpoint the receiver 570 SHOULD take the following actions: 572 o Validate that the verification tag is reflected by looking at the 573 VTag that would have been included in the outgoing packet. 575 o Validate that the peer of the SCTP association supports the 576 dynamic address extension, if it does not discard the incoming 577 ERROR chunk. 579 o Generate a new ASCONF chunk containing the VTags parameter (see 580 Section 4.3.2) and the Disable Restart parameter if the 581 association is using the disabled restart feature. By processing 582 this packet the NAT can recover the appropriate state. The 583 procedures for generating an ASCONF chunk can be found in 584 [RFC5061]. 586 If the NAT box receives a packet for which it has no NAT table entry 587 and the packet contains an ASCONF chunk with the VTags parameter, the 588 NAT box MUST update its NAT table according to the verification tags 589 in the VTags parameter and the optional Disable Restart parameter. 591 The peer SCTP endpoint receiving such an ASCONF chunk SHOULD either 592 add the address and respond with an acknowledgment, if the address is 593 new to the association (following all procedures defined in 594 [RFC5061]). Or, if the address is already part of the association, 595 the SCTP endpoint MUST NOT respond with an error, but instead should 596 respond with an ASCONF-ACK chunk acknowledging the address but take 597 no action (since the address is already in the association). 599 Note that it is possible that upon receiving an ASCONF chunk 600 containing the VTags parameter the NAT will realize that it has an 601 'Internal Port Number and Verification Tag collision'. In such a 602 case the NAT MUST send an ERROR chunk with the error cause code set 603 to 'VTag and Port Number Collision' (see Section 4.2.1). 605 If an SCTP endpoint receives an ERROR with 'Internal Port Number and 606 Verification Tag collision' as the error cause and the packet in the 607 Error Chunk contains an ASCONF with the VTags parameter, careful 608 examination of the association is required. The endpoint MUST do the 609 following: 611 o Validate that the verification tag is reflected by looking at the 612 VTag that would have been included in the outgoing packet. 614 o Validate that the peer of the SCTP association supports the 615 dynamic address extension, if it does not discard the incoming 616 ERROR chunk. 618 o If the association is attempting to add an address (i. e. 619 following the procedures in Section 5.6) then the endpoint MUST- 620 NOT consider the address part of the association and SHOULD make 621 no further attempt to add the address (i. e. cancel any ASCONF 622 timers and remove any record of the path), since the NAT has a 623 VTag collision and the association cannot easily create a new VTag 624 (as it would if the error occurred when sending an INIT). 626 o If the endpoint has no other path, i. e. the procedure was 627 executed due to missing a state in the NAT, then the endpoint MUST 628 abort the association. This would occur only if the local NAT 629 restarted and accepted a new association before attempting to 630 repair the missing state (Note that this is no different than what 631 happens to all TCP connections when a NAT looses its state). 633 5.6. Multi-Point Traversal Considerations 635 If a multi-homed SCTP endpoint behind a NAT connects to a peer, it 636 SHOULD first set up the association single-homed with only one 637 address causing the first NAT to populate its state. Then it SHOULD 638 add each IP address using ASCONF chunks sent via their respective 639 NATs. The address to add is the wildcard address and the lookup 640 address SHOULD also contain the VTags parameter and optionally the 641 Disable Restart parameter as illustrated above. 643 6. Socket API Considerations 645 This section describes how the socket API defined in [RFC6458] is 646 extended to provide a way for the application to control NAT 647 friendliness. 649 Please note that this section is informational only. 651 A socket API implementation based on [RFC6458] is extended by 652 supporting one new read/write socket option. 654 6.1. Get or Set the NAT Friendliness (SCTP_NAT_FRIENDLY) 656 This socket option uses the option_level IPPROTO_SCTP and the 657 option_name SCTP_NAT_FRIENDLY. It can be used to enable/disable the 658 NAT friendliness for future associations and retrieve the value for 659 future and specific ones. 661 struct sctp_assoc_value { 662 sctp_assoc_t assoc_id; 663 uint32_t assoc_value; 664 }; 666 assoc_id: This parameter is ignored for one-to-one style sockets. 667 For one-to-many style sockets the application may fill in an 668 association identifier or SCTP_FUTURE_ASSOC for this query. It is 669 an error to use SCTP_{CURRENT|ALL}_ASSOC in assoc_id. 671 assoc_value: A non-zero value indicates a NAT-friendly mode. 673 7. IANA Considerations 675 [NOTE to RFC-Editor: 677 "RFCXXXX" is to be replaced by the RFC number you assign this 678 document. 680 ] 682 [NOTE to RFC-Editor: 684 The suggested values for the chunk type and the chunk parameter 685 types are tentative and to be confirmed by IANA. 687 ] 689 This document (RFCXXXX) is the reference for all registrations 690 described in this section. The suggested changes are described 691 below. 693 7.1. New Chunk Flags for Two Existing Chunk Types 695 As defined in [RFC6096] two chunk flags have to be assigned by IANA 696 for the ERROR chunk. The suggested value for the T bit is 0x01 and 697 for the M bit is 0x02. 699 This requires an update of the "ERROR Chunk Flags" registry for SCTP: 701 ERROR Chunk Flags 703 +------------------+-----------------+-----------+ 704 | Chunk Flag Value | Chunk Flag Name | Reference | 705 +------------------+-----------------+-----------+ 706 | 0x01 | T bit | [RFCXXXX] | 707 | 0x02 | M bit | [RFCXXXX] | 708 | 0x04 | Unassigned | | 709 | 0x08 | Unassigned | | 710 | 0x10 | Unassigned | | 711 | 0x20 | Unassigned | | 712 | 0x40 | Unassigned | | 713 | 0x80 | Unassigned | | 714 +------------------+-----------------+-----------+ 716 As defined in [RFC6096] one chunk flag has to be assigned by IANA for 717 the ABORT chunk. The suggested value of the M bit is 0x02. 719 This requires an update of the "ABORT Chunk Flags" registry for SCTP: 721 ABORT Chunk Flags 723 +------------------+-----------------+-----------+ 724 | Chunk Flag Value | Chunk Flag Name | Reference | 725 +------------------+-----------------+-----------+ 726 | 0x01 | T bit | [RFC4960] | 727 | 0x02 | M bit | [RFCXXXX] | 728 | 0x04 | Unassigned | | 729 | 0x08 | Unassigned | | 730 | 0x10 | Unassigned | | 731 | 0x20 | Unassigned | | 732 | 0x40 | Unassigned | | 733 | 0x80 | Unassigned | | 734 +------------------+-----------------+-----------+ 736 7.2. Three New Error Causes 738 Three error causes have to be assigned by IANA. It is suggested to 739 use the values given below. 741 This requires three additional lines in the "Error Cause Codes" 742 registry for SCTP: 744 Error Cause Codes 746 +-------+--------------------------------+-----------+ 747 | Value | Cause Code | Reference | 748 +-------+--------------------------------+-----------+ 749 | 176 | VTag and Port Number Collision | [RFCXXXX] | 750 | 177 | Missing State | [RFCXXXX] | 751 | 178 | Port Number Collision | [RFCXXXX] | 752 +-------+--------------------------------+-----------+ 754 7.3. Two New Chunk Parameter Types 756 Two chunk parameter types have to be assigned by IANA. It is 757 suggested to use the values given below. IANA should assign these 758 values from the pool of parameters with the upper two bits set to 759 '11'. 761 This requires two additional lines in the "Chunk Parameter Types" 762 registry for SCTP: 764 Chunk Parameter Types 766 +----------+--------------------------+-----------+ 767 | ID Value | Chunk Parameter Type | Reference | 768 +----------+--------------------------+-----------+ 769 | 49159 | Disable Restart (0xC007) | [RFCXXXX] | 770 | 49160 | VTags (0xC008) | [RFCXXXX] | 771 +----------+--------------------------+-----------+ 773 8. Security Considerations 775 The document does not add any additional security considerations to 776 the ones given in [RFC4960], [RFC4895], and [RFC5061]. 778 9. Acknowledgments 780 The authors wish to thank Jason But, Bryan Ford, David Hayes, Alfred 781 Hines, Henning Peters, Timo Voelker, Dan Wing, and Qiaobing Xie for 782 their invaluable comments. 784 10. References 786 10.1. Normative References 788 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 789 793, September 1981. 791 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 792 Requirement Levels", BCP 14, RFC 2119, March 1997. 794 [RFC4895] Tuexen, M., Stewart, R., Lei, P., and E. Rescorla, 795 "Authenticated Chunks for the Stream Control Transmission 796 Protocol (SCTP)", RFC 4895, August 2007. 798 [RFC4960] Stewart, R., "Stream Control Transmission Protocol", RFC 799 4960, September 2007. 801 [RFC5061] Stewart, R., Xie, Q., Tuexen, M., Maruyama, S., and M. 802 Kozuka, "Stream Control Transmission Protocol (SCTP) 803 Dynamic Address Reconfiguration", RFC 5061, September 804 2007. 806 [RFC6096] Tuexen, M. and R. Stewart, "Stream Control Transmission 807 Protocol (SCTP) Chunk Flags Registration", RFC 6096, 808 January 2011. 810 10.2. Informative References 812 [RFC6458] Stewart, R., Tuexen, M., Poon, K., Lei, P., and V. 813 Yasevich, "Sockets API Extensions for the Stream Control 814 Transmission Protocol (SCTP)", RFC 6458, December 2011. 816 [RFC6890] Cotton, M., Vegoda, L., Bonica, R., and B. Haberman, 817 "Special-Purpose IP Address Registries", BCP 153, RFC 818 6890, April 2013. 820 [I-D.ietf-behave-sctpnat] 821 Stewart, R., Tuexen, M., and I. Ruengeler, "Stream Control 822 Transmission Protocol (SCTP) Network Address Translation", 823 draft-ietf-behave-sctpnat-08 (work in progress), February 824 2013. 826 Authors' Addresses 828 Randall R. Stewart 829 Adara Networks 830 Chapin, SC 29036 831 US 833 Email: randall@lakerest.net 834 Michael Tuexen 835 Muenster University of Applied Sciences 836 Stegerwaldstrasse 39 837 48565 Steinfurt 838 DE 840 Email: tuexen@fh-muenster.de 842 Irene Ruengeler 843 Muenster University of Applied Sciences 844 Stegerwaldstrasse 39 845 48565 Steinfurt 846 DE 848 Email: i.ruengeler@fh-muenster.de