idnits 2.17.1 draft-ietf-tsvwg-natsupp-05.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 (February 25, 2013) is 4077 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 768, 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) -- Obsolete informational reference (is this intentional?): RFC 5735 (Obsoleted by RFC 6890) == Outdated reference: A later version (-09) exists of draft-ietf-behave-sctpnat-07 Summary: 4 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). 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: August 29, 2013 I. Ruengeler 6 Muenster Univ. of Appl. Sciences 7 February 25, 2013 9 Stream Control Transmission Protocol (SCTP) Network Address Translation 10 Support 11 draft-ietf-tsvwg-natsupp-05.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 August 29, 2013. 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 . . . . . . . . . . . . . . . . . . . . . . . . . 4 67 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 5 68 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 69 4. Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . 6 70 4.1. Modified Chunks . . . . . . . . . . . . . . . . . . . . . 6 71 4.1.1. Extended ABORT Chunk . . . . . . . . . . . . . . . . . 6 72 4.1.2. Extended ERROR Chunk . . . . . . . . . . . . . . . . . 7 73 4.2. New Error Causes . . . . . . . . . . . . . . . . . . . . . 7 74 4.2.1. VTag and Port Number Collision Error Cause . . . . . . 7 75 4.2.2. Missing State Error Cause . . . . . . . . . . . . . . 8 76 4.2.3. Port Number Collision Error Cause . . . . . . . . . . 8 77 4.3. New Parameters . . . . . . . . . . . . . . . . . . . . . . 9 78 4.3.1. Disable Restart Parameter . . . . . . . . . . . . . . 9 79 4.3.2. VTags Parameter . . . . . . . . . . . . . . . . . . . 9 80 5. Problem Space and Procedures . . . . . . . . . . . . . . . . . 10 81 5.1. Problem Space Overview . . . . . . . . . . . . . . . . . . 11 82 5.2. Association Setup Considerations . . . . . . . . . . . . . 11 83 5.3. Handling of Internal Port Number and Verification Tag 84 Collisions . . . . . . . . . . . . . . . . . . . . . . . . 11 85 5.4. Handling of Internal Port Number Collisions . . . . . . . 12 86 5.5. Handling of Missing State . . . . . . . . . . . . . . . . 13 87 5.6. Multi-Point Traversal Considerations . . . . . . . . . . . 15 88 6. Socket API Considerations . . . . . . . . . . . . . . . . . . 15 89 6.1. Get or Set the NAT Friendliness (SCTP_NAT_FRIENDLY) . . . 16 90 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 91 7.1. New Chunk Flags for Two Existing Chunk Types . . . . . . . 16 92 7.2. Three New Error Causes . . . . . . . . . . . . . . . . . . 17 93 7.3. Two New Chunk Parameter Types . . . . . . . . . . . . . . 18 94 8. Security Considerations . . . . . . . . . . . . . . . . . . . 18 95 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 18 96 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19 97 10.1. Normative References . . . . . . . . . . . . . . . . . . . 19 98 10.2. Informative References . . . . . . . . . . . . . . . . . . 19 99 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 19 101 1. Introduction 103 Stream Control Transmission Protocol [RFC4960] provides a reliable 104 communications channel between two end-hosts in many ways similar to 105 TCP [RFC0793]. With the widespread deployment of Network Address 106 Translators (NAT), specialized code has been added to NAT for TCP 107 that allows multiple hosts to reside behind a NAT using private 108 addresses (see [RFC5735]) and yet use only a single globally unique 109 IPv4 address, even when two hosts (behind a NAT) choose the same port 110 numbers for their connection. This additional code is sometimes 111 classified as Network Address and Port Translation (NAPT). To date, 112 specialized code for SCTP has not yet been added to most NATs so that 113 only true NAT is available. The end result of this is that only one 114 SCTP capable host can be behind a NAT. 116 This document describes SCTP specific packets and procedures to help 117 NATs provide similar features of NAPT in the single-point and multi- 118 point traversal scenario. An SCTP implementation supporting this 119 extension will follow these procedures to assure that in both single- 120 homed and multi-homed cases a NAT will maintain the proper state 121 without needing to change port numbers. 123 A NAT will need to follow these procedures for generating appropriate 124 SCTP packet formats. NATs should refer to [I-D.ietf-behave-sctpnat] 125 for the BCP in using these formats. 127 When considering this feature it is possible to have multiple levels 128 of support. At each level, the Internal Host, External Host and NAT 129 may or may not support the features described in this document. The 130 following table illustrates the results of the various combinations 131 of support and if communications can occur between two endpoints. 133 +---------------+------------+---------------+---------------+ 134 | Internal Host | NAT | External Host | Communication | 135 +---------------+------------+---------------+---------------+ 136 | Support | Support | Support | Yes | 137 | Support | Support | No Support | Limited | 138 | Support | No Support | Support | None | 139 | Support | No Support | No Support | None | 140 | No Support | Support | Support | Limited | 141 | No Support | Support | No Support | Limited | 142 | No Support | No Support | Support | None | 143 | No Support | No Support | No Support | None | 144 +---------------+------------+---------------+---------------+ 146 Table 1: Communication possibilities 148 From the table we can see that when a NAT does not support the 149 extension no communication can occur. This is because for the most 150 part of the current situation i. e. SCTP packets sent externally 151 from behind a NAT are discarded by the NAT. In some cases, where the 152 NAT supports the feature but one of the two external hosts does not 153 support the feature, communication may occur but in a limited way. 154 For example only one host may be able to have a connection when a 155 collision case occurs. 157 2. Conventions 159 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 160 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 161 document are to be interpreted as described in [RFC2119]. 163 3. Terminology 165 This document uses the following terms, which are depicted in 166 Figure 1. 168 Private-Address (Priv-Addr): The private address that is known to 169 the internal host. 171 Internal-Port (Int-Port): The port number that is in use by the host 172 holding the Private-Address. 174 Internal-VTag (Int-VTag): The Verification Tag that the internal 175 host has chosen for its communication. The VTag is a unique 32- 176 bit tag that must accompany any incoming SCTP packet for this 177 association to the Private-Address. 179 External-Address (Ext-Addr): The address that an internal host is 180 attempting to contact. 182 External-Port (Ext-Port): The port number of the peer process at the 183 External-Address. 185 External-VTag (Ext-VTag): The Verification Tag that the host holding 186 the External-Address has chosen for its communication. The VTag 187 is a unique 32-bit tag that must accompany any incoming SCTP 188 packet for this association to the External-Address. 190 Public-Address (Pub-Addr): The public address assigned to the NAT 191 box which it uses as a source address when sending packets towards 192 the External-Address. 194 Internal Network | External Network 195 | 196 Private | Public External 197 +---------+ Address | Address /--\/--\ Address +---------+ 198 | SCTP | +-----+ / \ | SCTP | 199 |end point|=========| NAT |=======| Internet |==========|end point| 200 | A | +-----+ \ / | B | 201 +---------+ Internal | \--/\--/ External+---------+ 202 Internal Port | Port External 203 VTag | VTag 205 Figure 1: Basic network setup 207 4. Data Formats 209 4.1. Modified Chunks 211 This section presents existing chunks defined in [RFC4960] that are 212 modified by this document. 214 4.1.1. Extended ABORT Chunk 216 0 1 2 3 217 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 218 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 219 | Type = 6 | Reserved |M|T| Length | 220 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 221 \ \ 222 / zero or more Error Causes / 223 \ \ 224 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 226 The ABORT chunk is extended to add the new 'M-bit'. The M-bit 227 indicates to the receiver of the ABORT chunk that the chunk was not 228 generated by the peer SCTP endpoint, but instead by a middle box. 230 4.1.2. Extended ERROR Chunk 232 0 1 2 3 233 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 234 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 235 | Type = 9 | Reserved |M|T| Length | 236 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 237 \ \ 238 / zero or more Error Causes / 239 \ \ 240 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 242 The ERROR chunk defined in [RFC4960] is extended to add the new 243 'M-bit'. The M-bit indicates to the receiver of the ERROR chunk that 244 the chunk was not generated by the peer SCTP endpoint, but instead by 245 a middle box. 247 4.2. New Error Causes 249 This section defines the new error causes added by this document. 251 4.2.1. VTag and Port Number Collision Error Cause 253 0 1 2 3 254 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 255 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 256 | Cause Code = 0x00B0 | Cause Length = Variable | 257 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 258 \ Chunk / 259 / \ 260 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 262 Cause Code: 2 bytes (unsigned integer) 263 This field holds the IANA defined cause code for the VTag and Port 264 Number Collision Error Cause. The suggested value of this field 265 for IANA is 0x00B0. 267 Cause Length: 2 bytes (unsigned integer) 268 This field holds the length in bytes of the error cause. The 269 value MUST be the length of the Cause-Specific Information plus 4. 271 Chunk: variable length 272 The Cause-Specific Information is filled with the chunk that 273 caused this error. This can be an INIT, INIT-ACK, or ASCONF 274 chunk. Note that if the entire chunk will not fit in the ERROR 275 chunk or ABORT chunk being sent then the bytes that do not fit are 276 truncated. 278 4.2.2. Missing State Error Cause 280 0 1 2 3 281 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 282 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 283 | Cause Code = 0x00B1 | Cause Length = Variable | 284 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 285 \ Incoming Packet / 286 / \ 287 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 289 Cause Code: 2 bytes (unsigned integer) 290 This field holds the IANA defined cause code for the Missing State 291 Error Cause. The suggested value of this field for IANA is 292 0x00B1. 294 Cause Length: 2 bytes (unsigned integer) 295 This field holds the length in bytes of the error cause. The 296 value MUST be the length of the Cause-Specific Information plus 4. 298 Incoming Packet: variable length 299 The Cause-Specific Information is filled with the IPv4 or IPv6 300 packet that caused this error. The IPv4 or IPv6 header MUST be 301 included. Note that if the packet will not fit in the ERROR chunk 302 or ABORT chunk being sent then the bytes that do not fit are 303 truncated. 305 4.2.3. Port Number Collision Error Cause 307 0 1 2 3 308 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 309 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 310 | Cause Code = 0x00B2 | Cause Length = Variable | 311 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 312 \ chunk / 313 / \ 314 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 316 Cause Code: 2 bytes (unsigned integer) 317 This field holds the IANA defined cause code for the Port Number 318 Collision Error Cause. The suggested value of this field for IANA 319 is 0x00B2. 321 Cause Length: 2 bytes (unsigned integer) 322 This field holds the length in bytes of the error cause. The 323 value MUST be the length of the Cause-Specific Information plus 4. 325 Chunk: variable length 326 The Cause-Specific Information is filled with the chunk that 327 caused this error. This can be an INIT, INIT-ACK, or ASCONF 328 chunk. Note that if the entire chunk will not fit in the ERROR 329 chunk or ABORT chunk being sent then the bytes that do not fit are 330 truncated. 332 4.3. New Parameters 334 This section defines new parameters and their valid appearance 335 defined by this document. 337 4.3.1. Disable Restart Parameter 339 This parameter is used to indicate that the RESTART procedure is 340 requested to be disabled. Both endpoints of an association MUST 341 include this parameter in the INIT chunk and INIT-ACK chunk when 342 establishing an association and MUST include it in the ASCONF chunk 343 when adding an address to successfully disable the restart procedure. 345 0 1 2 3 346 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 347 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 348 | Type = 0xC007 | Length = 4 | 349 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 351 Parameter Type: 2 bytes (unsigned integer) 352 This field holds the IANA defined parameter type for the Disable 353 Restart Parameter. The suggested value of this field for IANA is 354 0xC007. 356 Parameter Length: 2 bytes (unsigned integer) 357 This field holds the length in bytes of the parameter. The value 358 MUST be 4. 360 This parameter MAY appear in INIT, INIT-ACK and ASCONF chunks and 361 MUST NOT appear in any other chunk. 363 4.3.2. VTags Parameter 365 This parameter is used to help a NAT recover from state loss. 367 0 1 2 3 368 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 369 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 370 | Parameter Type = 0xC008 | Parameter Length = 16 | 371 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 372 | ASCONF-Request Correlation ID | 373 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 374 | Internal Verification Tag | 375 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 376 | External Verification Tag | 377 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 379 Parameter Type: 2 bytes (unsigned integer) 380 This field holds the IANA defined parameter type for the VTags 381 Parameter. The suggested value of this field for IANA is 0xC008. 383 Parameter Length: 2 bytes (unsigned integer) 384 This field holds the length in bytes of the parameter. The value 385 MUST be 16. 387 ASCONF-Request Correlation ID: 4 bytes (unsigned integer) 388 This is an opaque integer assigned by the sender to identify each 389 request parameter. The receiver of the ASCONF Chunk will copy 390 this 32-bit value into the ASCONF Response Correlation ID field of 391 the ASCONF-ACK response parameter. The sender of the ASCONF can 392 use this same value in the ASCONF-ACK to find which request the 393 response is for. Note that the receiver MUST NOT change this 32- 394 bit value. 396 Internal Verification Tag: 4 bytes (unsigned integer) 397 The Verification Tag that the internal host has chosen for its 398 communication. The Verification Tag is a unique 32-bit tag that 399 must accompany any incoming SCTP packet for this association to 400 the Private-Address. 402 External Verification Tag: 4 bytes (unsigned integer) The 403 Verification Tag that the host holding the External-Address has 404 chosen for its communication. The VTag is a unique 32-bit tag 405 that must accompany any incoming SCTP packet for this association 406 to the External-Address. 408 This parameter MAY appear in ASCONF chunks and MUST NOT appear in any 409 other chunk. 411 5. Problem Space and Procedures 412 5.1. Problem Space Overview 414 When an SCTP endpoint is behind a NAT which supports 415 [I-D.ietf-behave-sctpnat] a number of problems may arise as it tries 416 to communicate with its peer: 418 o More than one server behind a NAT may pick the same VTag and 419 source port when talking to the same peer server. This creates a 420 situation where the NAT will not be able to tell the two 421 associations apart. This situation is discussed in Section 5.3. 423 o When an SCTP endpoint is a server communicating with multiple 424 peers and the peers are behind the same NAT, then the two 425 endpoints cannot be distinguished by the server. This case is 426 discussed in Section 5.4. 428 o A restart of a NAT during a conversation could cause a loss of its 429 state. This problem and its solution is discussed in Section 5.5. 431 o An SCTP endpoint may be behind two NATs providing redundancy. The 432 method to set up this scenario is discussed in Section 5.6. 434 Each of these solutions requires additional chunks and parameters, 435 defined in this document, and possibly modified handling procedures 436 from those specified in [RFC4960]. 438 5.2. Association Setup Considerations 440 Every association MUST initially be set up single-homed. There MUST 441 NOT be any IPv4 Address parameter, IPv6 Address parameter, or 442 Supported Address Types parameter in the INIT-chunk. The INIT-ACK 443 chunk MUST NOT contain any IPv4 Address parameter or IPv6 Address 444 parameter. 446 If the association should finally be multi-homed, the procedure in 447 Section 5.6 MUST be used. 449 The INIT and INIT-ACK chunk SHOULD contain the Disable Restart 450 parameter defined in Section 4.3.1. 452 5.3. Handling of Internal Port Number and Verification Tag Collisions 454 Consider the case where two hosts in the Private-Address space want 455 to set up an SCTP association with the same server running on the 456 same host in the Internet. This means that the External-Port and the 457 External-Address are the same. If they both choose the same 458 Internal-Port and Internal-VTag, the NAT box cannot distinguish 459 between incoming packets anymore. But this is very unlikely. The 460 Internal-VTags are chosen at random and if the Internal-Ports are 461 also chosen from the ephemeral port range at random this gives a 46- 462 bit random number which has to match. In the TCP like NAPT case the 463 NAT box can control the 16-bit Natted Port and therefor avoid 464 collisions deterministically. 466 The same can happen when an INIT-ACK chunk or an ASCONF chunk is 467 processed by the NAT. 469 However, in this unlikely event the NAT box MUST send an ABORT chunk 470 with the M-bit set if the collision is triggered by an INIT or INIT- 471 ACK chunk or send an ERROR chunk with the M-bit set if the collision 472 is triggered by an ASCONF chunk. The M-bit is a new bit defined by 473 this document to express to SCTP that the source of this packet is a 474 "middle" box, not the peer SCTP endpoint (see Section 4.1.1). In a 475 packet containing an INIT-ACK chunk triggers the collision, the 476 corresponding packet containing the ABORT chunk MUST contain the same 477 source and destination address and port numbers as the packet 478 containing the INIT-ACK chunk. In the other two cases, the source 479 and destination address and port numbers MUST be swapped. 481 The sender of the packet containing the INIT chunk or the receiver of 482 the INIT-ACK chunk, upon reception of an ABORT chunk with M-bit set, 483 SHOULD reinitiate the association setup procedure after choosing a 484 new initiate tag. These procedures SHOULD be followed only if the 485 appropriate error cause code for colliding NAT table state is 486 included AND the association is in the COOKIE-WAIT state (i. e. it is 487 awaiting an INIT-ACK). If the endpoint is in any other state an SCTP 488 endpoint SHOULD NOT respond. 490 The sender of the ASCONF chunk, upon reception of an ERROR chunk with 491 M-bit set, MUST stop adding the path to the association. 493 The sender of the ERROR or ABORT chunk MUST include the error cause 494 with cause code 'VTag and Port Number Collision' (see Section 4.2.1). 496 5.4. Handling of Internal Port Number Collisions 498 When two SCTP hosts are behind a NAT and using the recommendations in 499 [I-D.ietf-behave-sctpnat] it is possible that two SCTP hosts in the 500 Private-Address space will want to set up an SCTP association with 501 the same server running on the same host in the Internet. For the 502 NAT appropriate tracking may be performed by assuring that the VTags 503 are unique between the two hosts as defined in 504 [I-D.ietf-behave-sctpnat]. But for the external SCTP server on the 505 internet this means that the External-Port and the External-Address 506 are the same. If they both have chosen the same Internal-Port the 507 server cannot distinguish between both associations based on the 508 address and port numbers. For the server it looks like the 509 association is being restarted. To overcome this limitation the 510 client sends a Disable Restart parameter in the INIT-chunk. 512 When the server receives this parameter it MUST do the following: 514 o Include a Disable Restart parameter in the INIT-ACK to inform the 515 client that it will support the feature. 517 o Disable the restart procedures defined in [RFC4960] for this 518 association. 520 Servers that support this feature will need to be capable of 521 maintaining multiple connections to what appears to be the same peer 522 (behind the NAT) differentiated only by the VTags. 524 The NAT, when processing the INIT-ACK, should note in its internal 525 table that the association supports the Disable Restart extension. 526 This note is used when establishing future associations (i. e. when 527 processing an INIT from an internal host) to decide if the connection 528 should be allowed. The NAT MUST do the following when processing an 529 INIT: 531 o If the INIT is destined to an external address and port for which 532 the NAT has no outbound connection, allow the INIT creating an 533 internal mapping table. 535 o If the INIT matches the external address and port of an already 536 existing connection, validate that the external server supports 537 the Disable Restart feature, if it does allow the INIT to be 538 forwarded. 540 o If the external server does not support the Disable Restart 541 extension the NAT MUST send an ABORT with the M-bit set. 543 The 'Port Number Collision' error cause (see Section 4.2.3) MUST be 544 included in the ABORT chunk. 546 If the collision is triggered by an ASCONF chunk, a packet containing 547 an ERROR chunk with the 'Port Number Collision' error cause MUST be 548 sent back. 550 5.5. Handling of Missing State 552 If the NAT box receives a packet from the internal network for which 553 the lookup procedure does not find an entry in the NAT table, a 554 packet containing an ERROR chunk is sent back with the M-bit set. 555 The source address of the packet containing the ERROR chunk MUST be 556 the destination address of the incoming SCTP packet. The 557 verification tag is reflected and the T-bit is set. Please note that 558 such a packet containing an ERROR chunk SHOULD NOT be sent if the 559 received packet contains an ABORT, SHUTDOWN-COMPLETE or INIT-ACK 560 chunk. An ERROR chunk MUST NOT be sent if the received packet 561 contains an ERROR chunk with the M-bit set. 563 When sending the ERROR chunk, the new error cause Missing state (see 564 Section 4.2.2) MUST be included and the new M-bit of the ERROR chunk 565 MUST be set (see Section 4.1.2). 567 Upon reception of this ERROR chunk by an SCTP endpoint the receiver 568 SHOULD take the following actions: 570 o Validate that the verification tag is reflected by looking at the 571 VTag that would have been included in the outgoing packet. 573 o Validate that the peer of the SCTP association supports the 574 dynamic address extension, if it does not discard the incoming 575 ERROR chunk. 577 o Generate a new ASCONF chunk containing the VTags parameter (see 578 Section 4.3.2) and the Disable Restart parameter if the 579 association is using the disabled restart feature. By processing 580 this packet the NAT can recover the appropriate state. The 581 procedures for generating an ASCONF chunk can be found in 582 [RFC5061]. 584 If the NAT box receives a packet for which it has no NAT table entry 585 and the packet contains an ASCONF chunk with the VTags parameter, the 586 NAT box MUST update its NAT table according to the verification tags 587 in the VTags parameter and the optional Disable Restart parameter. 589 The peer SCTP endpoint receiving such an ASCONF chunk SHOULD either 590 add the address and respond with an acknowledgment, if the address is 591 new to the association (following all procedures defined in 592 [RFC5061]). Or, if the address is already part of the association, 593 the SCTP endpoint MUST NOT respond with an error, but instead should 594 respond with an ASCONF-ACK chunk acknowledging the address but take 595 no action (since the address is already in the association). 597 Note that it is possible that upon receiving an ASCONF chunk 598 containing the VTags parameter the NAT will realize that it has an 599 'Internal Port Number and Verification Tag collision'. In such a 600 case the NAT MUST send an ERROR chunk with the error cause code set 601 to 'VTag and Port Number Collision' (see Section 4.2.1). 603 If an SCTP endpoint receives an ERROR with 'Internal Port Number and 604 Verification Tag collision' as the error cause and the packet in the 605 Error Chunk contains an ASCONF with the VTags parameter, careful 606 examination of the association is required. The endpoint MUST do the 607 following: 609 o Validate that the verification tag is reflected by looking at the 610 VTag that would have been included in the outgoing packet. 612 o Validate that the peer of the SCTP association supports the 613 dynamic address extension, if it does not discard the incoming 614 ERROR chunk. 616 o If the association is attempting to add an address (i. e. 617 following the procedures in Section 5.6) then the endpoint MUST- 618 NOT consider the address part of the association and SHOULD make 619 no further attempt to add the address (i. e. cancel any ASCONF 620 timers and remove any record of the path), since the NAT has a 621 VTag collision and the association cannot easily create a new VTag 622 (as it would if the error occurred when sending an INIT). 624 o If the endpoint has no other path, i. e. the procedure was 625 executed due to missing a state in the NAT, then the endpoint MUST 626 abort the association. This would occur only if the local NAT 627 restarted and accepted a new association before attempting to 628 repair the missing state (Note that this is no different than what 629 happens to all TCP connections when a NAT looses its state). 631 5.6. Multi-Point Traversal Considerations 633 If a multi-homed SCTP endpoint behind a NAT connects to a peer, it 634 SHOULD first set up the association single-homed with only one 635 address causing the first NAT to populate its state. Then it SHOULD 636 add each IP address using ASCONF chunks sent via their respective 637 NATs. The address to add is the wildcard address and the lookup 638 address SHOULD also contain the VTags parameter and optionally the 639 Disable Restart parameter as illustrated above. 641 6. Socket API Considerations 643 This section describes how the socket API defined in [RFC6458] is 644 extended to provide a way for the application to control NAT 645 friendliness. 647 Please note that this section is informational only. 649 A socket API implementation based on [RFC6458] is extended by 650 supporting one new read/write socket option. 652 6.1. Get or Set the NAT Friendliness (SCTP_NAT_FRIENDLY) 654 This socket option uses the option_level IPPROTO_SCTP and the 655 option_name SCTP_NAT_FRIENDLY. It can be used to enable/disable the 656 NAT friendliness for future associations and retrieve the value for 657 future and specific ones. 659 struct sctp_assoc_value { 660 sctp_assoc_t assoc_id; 661 uint32_t assoc_value; 662 }; 664 assoc_id: This parameter is ignored for one-to-one style sockets. 665 For one-to-many style sockets the application may fill in an 666 association identifier or SCTP_FUTURE_ASSOC for this query. It is 667 an error to use SCTP_{CURRENT|ALL}_ASSOC in assoc_id. 669 assoc_value: A non-zero value indicates a NAT-friendly mode. 671 7. IANA Considerations 673 [NOTE to RFC-Editor: 675 "RFCXXXX" is to be replaced by the RFC number you assign this 676 document. 678 ] 680 [NOTE to RFC-Editor: 682 The suggested values for the chunk type and the chunk parameter 683 types are tentative and to be confirmed by IANA. 685 ] 687 This document (RFCXXXX) is the reference for all registrations 688 described in this section. The suggested changes are described 689 below. 691 7.1. New Chunk Flags for Two Existing Chunk Types 693 As defined in [RFC6096] two chunk flags have to be assigned by IANA 694 for the ERROR chunk. The suggested value for the T bit is 0x01 and 695 for the M bit is 0x02. 697 This requires an update of the "ERROR Chunk Flags" registry for SCTP: 699 ERROR Chunk Flags 701 +------------------+-----------------+-----------+ 702 | Chunk Flag Value | Chunk Flag Name | Reference | 703 +------------------+-----------------+-----------+ 704 | 0x01 | T bit | [RFCXXXX] | 705 | 0x02 | M bit | [RFCXXXX] | 706 | 0x04 | Unassigned | | 707 | 0x08 | Unassigned | | 708 | 0x10 | Unassigned | | 709 | 0x20 | Unassigned | | 710 | 0x40 | Unassigned | | 711 | 0x80 | Unassigned | | 712 +------------------+-----------------+-----------+ 714 As defined in [RFC6096] one chunk flag has to be assigned by IANA for 715 the ABORT chunk. The suggested value of the M bit is 0x02. 717 This requires an update of the "ABORT Chunk Flags" registry for SCTP: 719 ABORT Chunk Flags 721 +------------------+-----------------+-----------+ 722 | Chunk Flag Value | Chunk Flag Name | Reference | 723 +------------------+-----------------+-----------+ 724 | 0x01 | T bit | [RFC4960] | 725 | 0x02 | M bit | [RFCXXXX] | 726 | 0x04 | Unassigned | | 727 | 0x08 | Unassigned | | 728 | 0x10 | Unassigned | | 729 | 0x20 | Unassigned | | 730 | 0x40 | Unassigned | | 731 | 0x80 | Unassigned | | 732 +------------------+-----------------+-----------+ 734 7.2. Three New Error Causes 736 Three error causes have to be assigned by IANA. It is suggested to 737 use the values given below. 739 This requires three additional lines in the "Error Cause Codes" 740 registry for SCTP: 742 Error Cause Codes 744 +-------+--------------------------------+-----------+ 745 | Value | Cause Code | Reference | 746 +-------+--------------------------------+-----------+ 747 | 176 | VTag and Port Number Collision | [RFCXXXX] | 748 | 177 | Missing State | [RFCXXXX] | 749 | 178 | Port Number Collision | [RFCXXXX] | 750 +-------+--------------------------------+-----------+ 752 7.3. Two New Chunk Parameter Types 754 Two chunk parameter types have to be assigned by IANA. It is 755 suggested to use the values given below. IANA should assign these 756 values from the pool of parameters with the upper two bits set to 757 '11'. 759 This requires two additional lines in the "Chunk Parameter Types" 760 registry for SCTP: 762 Chunk Parameter Types 764 +----------+--------------------------+-----------+ 765 | ID Value | Chunk Parameter Type | Reference | 766 +----------+--------------------------+-----------+ 767 | 49159 | Disable Restart (0xC007) | [RFCXXXX] | 768 | 49160 | VTags (0xC008) | [RFCXXXX] | 769 +----------+--------------------------+-----------+ 771 8. Security Considerations 773 The document does not add any additional security considerations to 774 the ones given in [RFC4960], [RFC4895], and [RFC5061]. 776 9. Acknowledgments 778 The authors wish to thank Jason But, Bryan Ford, David Hayes, Alfred 779 Hines, Henning Peters, Timo Voelker, Dan Wing, and Qiaobing Xie for 780 their invaluable comments. 782 10. References 783 10.1. Normative References 785 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 786 RFC 793, September 1981. 788 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 789 Requirement Levels", BCP 14, RFC 2119, March 1997. 791 [RFC4895] Tuexen, M., Stewart, R., Lei, P., and E. Rescorla, 792 "Authenticated Chunks for the Stream Control Transmission 793 Protocol (SCTP)", RFC 4895, August 2007. 795 [RFC4960] Stewart, R., "Stream Control Transmission Protocol", 796 RFC 4960, September 2007. 798 [RFC5061] Stewart, R., Xie, Q., Tuexen, M., Maruyama, S., and M. 799 Kozuka, "Stream Control Transmission Protocol (SCTP) 800 Dynamic Address Reconfiguration", RFC 5061, 801 September 2007. 803 [RFC6096] Tuexen, M. and R. Stewart, "Stream Control Transmission 804 Protocol (SCTP) Chunk Flags Registration", RFC 6096, 805 January 2011. 807 10.2. Informative References 809 [RFC5735] Cotton, M. and L. Vegoda, "Special Use IPv4 Addresses", 810 BCP 153, RFC 5735, January 2010. 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 [I-D.ietf-behave-sctpnat] 817 Stewart, R., Tuexen, M., and I. Ruengeler, "Stream Control 818 Transmission Protocol (SCTP) Network Address Translation", 819 draft-ietf-behave-sctpnat-07 (work in progress), 820 October 2012. 822 Authors' Addresses 824 Randall R. Stewart 825 Adara Networks 826 Chapin, SC 29036 827 US 829 Email: randall@lakerest.net 831 Michael Tuexen 832 Muenster University of Applied Sciences 833 Stegerwaldstrasse 39 834 48565 Steinfurt 835 DE 837 Email: tuexen@fh-muenster.de 839 Irene Ruengeler 840 Muenster University of Applied Sciences 841 Stegerwaldstrasse 39 842 48565 Steinfurt 843 DE 845 Email: i.ruengeler@fh-muenster.de