Network Working Group R. Stewart Internet-Draft Huawei Intended status: Standards Track M. Tuexen Expires: June 24, 2010 I. Ruengeler Muenster Univ. of Applied Sciences December 21, 2009 Stream Control Transmission Protocol (SCTP) Network Address Translation Support draft-stewart-natsupp-tsvwg-00.txt Abstract Stream Control Transmission Protocol [RFC4960] provides a reliable communications channel between two end-hosts in many ways similar to TCP [RFC0793]. With the widespread deployment of Network Address Translators (NAT), specialized code has been added to NAT for TCP that allows multiple hosts to reside behind a NAT and yet use only a single globally unique IPv4 address, even when two hosts (behind a NAT) choose the same port numbers for their connection. This additional code is sometimes classified as Network Address and Port Translation or NAPT. To date, specialized code for SCTP has NOT yet been added to most NATs so that only pure NAT is available. The end result of this is that only one SCTP capable host can be behind a NAT. This document describes an SCTP specific chunks and procedures to help NAT's provide similar features of NAPT in the single point and multi-point traversal scenario. Status of this Memo This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. Stewart, et al. Expires June 24, 2010 [Page 1] Internet-Draft SCTP Network Address Translation December 2009 The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on June 24, 2010. Copyright Notice Copyright (c) 2009 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the BSD License. Stewart, et al. Expires June 24, 2010 [Page 2] Internet-Draft SCTP Network Address Translation December 2009 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4. Problem space overview . . . . . . . . . . . . . . . . . . . . 4 5. Handling of internal port number and verification tag collisions . . . . . . . . . . . . . . . . . . . . . . . . . . 5 6. Handling of internal port number collisions . . . . . . . . . . 6 7. Handling of missing state . . . . . . . . . . . . . . . . . . . 7 8. Multi Point Traversal considerations . . . . . . . . . . . . . 8 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 9 10. Security considerations . . . . . . . . . . . . . . . . . . . . 9 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 9 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9 12.1. Normative References . . . . . . . . . . . . . . . . . . . 9 12.2. Informative References . . . . . . . . . . . . . . . . . . 9 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 9 Stewart, et al. Expires June 24, 2010 [Page 3] Internet-Draft SCTP Network Address Translation December 2009 1. Introduction Stream Control Transmission Protocol [RFC4960] provides a reliable communications channel between two end-hosts in many ways similar to TCP [RFC0793]. With the widespread deployment of Network Address Translators (NAT), specialized code has been added to NAT for TCP that allows multiple hosts to reside behind a NAT and yet use only a single globally unique IPv4 address, even when two hosts (behind a NAT) choose the same port numbers for their connection. This additional code is sometimes classified as Network Address and Port Translation or NAPT. To date, specialized code for SCTP has NOT yet been added to most NATs so that only true NAT is available. The end result of this is that only one SCTP capable host can be behind a NAT. This document describes an SCTP specific chunks and procedures to help NAT's provide similar features of NAPT in the single point and multi-point traversal scenario. An SCTP implementation supporting this extension will follow these procedures to assure that in both single homed and multi-homed cases a NAT will maintian the proper state without needing to change port numbers. A NAT will need to follow these proceedures for generating appropriate SCTP packet formats. NAT's should refer to xxxxbehavedraftxxx for the BCP in using these formats. 2. Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. 3. Terminology For this discussion we will use several terms, which we will define and point out in a figure. o Private-Address (Priv-Addr) - The private address that is known to the internal host. o Internal-Port (Int-Port) - The port number that is in use by the host holding the Private-Address. o Internal-VTag (Int-VTag) - The Verification Tag that the internal host has chosen for its communication. The VTag is a unique 32 bit tag that must accompany any incoming SCTP packet for this Stewart, et al. Expires June 24, 2010 [Page 4] Internet-Draft SCTP Network Address Translation December 2009 association to the Private-Address. o External-Address (Ext-Addr) - The address that an internal host is attempting to contact. o External-Port (Ext-Port) - The port number of the peer process at the External-Address. o External-VTag (Ext-VTag) - The Verification Tag that the host holding the External-Address has chosen for its communication. The VTag is a unique 32 bit tag that must accompany any incoming SCTP packet for this association to the External-Address. o Public-Address (Pub-Addr) - The public address assigned to the NAT box which it uses as a source address when sending packets towards the External-Address. Internal Network | External Network | Private | Public External +---------+ Address | Address /--\/--\ Address +---------+ | SCTP | +-----+ / \ | SCTP | |end point|==========| NAT |======= | Internet | ========== |end point| | A | +-----+ \ / | B | +---------+ Internal | \--/\--/ External +---------+ Internal Port | Port External VTag | VTag 4. Problem space overview When an SCTP endpoint is behind a NAT which supports xxxnatdraftxxx a number of problems may arise as it trys to communicate with its peer. o More than one server behind a NAT may pick the same V-Tag and source port when talking to the same peer server. This creates a situation where the NAT will not be able to tell the two associations apart. This situation is discussed in Section 5 o When an SCTP endpoint is a server and talking with multiple peers and the peers are behind the same NAT, to the server the two endpoints cannot be distinguished. This case is discussed in Section 6. o A NAT could at one point during a conversation restart causing all of its state to be lost. This problem and its solution is Stewart, et al. Expires June 24, 2010 [Page 5] Internet-Draft SCTP Network Address Translation December 2009 discussed in Section 7. o An SCTP endpoint may be behind two NAT's giving it redundancy. The method to set up this scenario is discussed in Section 8. Each of these solutions requires additional chunks and parameters, defined in this document, and possibly modified handling procedures from those specified in [RFC4960]. 5. Handling of internal port number and verification tag collisions Consider the case where two hosts in the Private-Address space want to set up an SCTP association with the same server running on the same host in the Internet. This means that the External-Port and the External-Address are the same. If they both choose the same Internal-Port and Internal-VTag, the NAT box cannot distinguish incoming packets anymore. But this is very unlikely. The Internal- VTags are chosen at random and if the Internal-Ports are also chosen from the ephemeral port range at random this gives a 46 bit random number which has to match. In the TCP like NAPT case the NAT box can control the 16 bit Natted Port. However, in this unlikely event the NAT box MUST respond to the INIT chunk by sending an ABORT chunk with the M-bit set. The M-bit is a new bit defined by this document to express to SCTP that the source of this packet is a "middle" box, not the peer SCTP endpoint. The source address of the packet containing the ABORT chunk MUST be the destination address of the SCTP packet containing the INIT chunk. The sender of the packet containing the INIT chunk, upon reception of an ABORT with M-bit set SHOULD reinitiate the association setup procedure after choosing a new initiate tag. These proceedures SHOULD be followed only if the appropriate error cause code for colliding NAT table state is included AND the association is in the COOKIE-WAIT state (i.e. it is awaiting a INIT-ACK). If the endpoint is in any other state an SCTP endpoint SHOULD NOT respond. The ABORT chunk defined in [RFC4960] is therefore extended by using the following format: Stewart, et al. Expires June 24, 2010 [Page 6] Internet-Draft SCTP Network Address Translation December 2009 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type = 6 | Reserved |M|T| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \ \ / zero or more Error Causes / \ \ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The following error cause with cause code 0x00B0 (Colliding NAT table entry) MUST be included in the ABORT chunk: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Cause Code=0x00B0 | Cause Length=Variable | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \ INIT chunk / / \ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6. Handling of internal port number collisions When two SCTP hosts are behind a NAT and using the recommendations in xxxxbehavexxx it is possible that two SCTP hosts in the Private- Address space will want to set up an SCTP association with the same server running on the same host in the Internet. For the NAT appropriate tracking may be performed by assuring that the vtags are unique between the two hosts as defined in xxxxbehavexxx. But for the external SCTP server on the internet this means that the External-Port and the External-Address are the same. If they both have chosen the same Internal-Port the server cannot distinguish both associations based on the address and port numbers. For the server it looks like the association is being restarted. To overcome this limitation the client sends a DISABLE_RESTART parameter in the INIT- chunk which is defined as follows: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type = 0xC007 | Length=4 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ When the server receives this parameter it MUST do the following: Stewart, et al. Expires June 24, 2010 [Page 7] Internet-Draft SCTP Network Address Translation December 2009 o Include in the INIT-ACK a DISABLE_RESTART parameter to inform the client that it will support the feature. o Disable the restart procdures defined in [RFC4960] for this association. Servers that support this feature will need to be capable of maintaining multiple connections to what appears to be the same peer (behind the NAT) differentiated only by the vtags. 7. Handling of missing state If the NAT box receives a packet for which the lookup procedure does not find an entry in the NAT table, a packet containing an ERROR packet is sent back with the M-bit set. The source address of the packet containing the ERROR chunk MUST be the destination address of the incoming SCTP packet. The verification tag is reflected. The ERROR chunk defined in [RFC4960] is therefore extended by using the following format: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type = 9 | Reserved |M|T| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \ \ / zero or more Error Causes / \ \ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The following error cause with cause code 0x00B1 (Missing NAT table entry) SHOULD be included in the ERROR chunk: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Cause Code=0x00B1 | Cause Length=Variable | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \ Incoming Packet / / \ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Upon reception by an SCTP end-point with this ERROR chunk the receiver SHOULD take the following actions: Stewart, et al. Expires June 24, 2010 [Page 8] Internet-Draft SCTP Network Address Translation December 2009 o Validate the verifcation tag is reflected by looking at the V-tag that would have been included in the outgoing packet. o Validate that the peer of the SCTP assocation supports the dynamic address extension, if it does not discard the incoming ERROR chunk. o Generate a new ASCONF chunk as defined below including both sets of V-tags so that the NAT may recover the appropriate state. The procedures for generating an ASCONF can be found in [RFC5061] 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Parameter Type = 0xC008 | Parameter Length = 16 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ASCONF-Request Correlation ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Internal Verification Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | External Verification Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ If the NAT box receives a packet for which it has no NAT table entry and the packet contains an ASCONF chunk with a vtag parameter, the NAT box MUST update its NAT table according to the verification tags in the vtag parameter. The peer SCTP endpoint receiving such an ASCONF chunk SHOULD either add the address and respond with an acknowledgment, if the address is new to the assocation (following all procedures defined in [RFC5061]). Or, if the address is already part of the association, the SCTP endpoint MUST NOT respond with an error, but instead should respond with an ASCONF-ACK acknowledging the address but take no action (since the address is already in the association). 8. Multi Point Traversal considerations If a multi-homed SCTP end-point behind a NAT connects to a peer, it SHOULD first set up the association single-homed with only one address causing the first NAT to populate its state. Then it SHOULD adds each IP address using ASCONF chunks sent via their respective NATs. The address to add is the wildcard address and the lookup address SHOULD also contain the vtag parameter pair illustrated above. Stewart, et al. Expires June 24, 2010 [Page 9] Internet-Draft SCTP Network Address Translation December 2009 9. IANA Considerations TBD 10. Security considerations TBD 11. Acknowledgments The authors wish to thank Qiaobing Xie, Henning Peters, Bryan Ford, David Hayes, Alfred Hines, Dan Wing, and Jason But for their invaluable comments. 12. References 12.1. Normative References [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC4960] Stewart, R., "Stream Control Transmission Protocol", RFC 4960, September 2007. [RFC5061] Stewart, R., Xie, Q., Tuexen, M., Maruyama, S., and M. Kozuka, "Stream Control Transmission Protocol (SCTP) Dynamic Address Reconfiguration", RFC 5061, September 2007. 12.2. Informative References [RFC1918] Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and E. Lear, "Address Allocation for Private Internets", BCP 5, RFC 1918, February 1996. Stewart, et al. Expires June 24, 2010 [Page 10] Internet-Draft SCTP Network Address Translation December 2009 Authors' Addresses Randall R. Stewart Huawei Chapin, SC 29036 USA Phone: Email: rstewart@huawei.com Michael Tuexen Muenster Univ. of Applied Sciences Stegerwaldstr. 39 48565 Steinfurt Germany Email: tuexen@fh-muenster.de Irene Ruengeler Muenster Univ. of Applied Sciences Stegerwaldstr. 39 48565 Steinfurt Germany Email: i.ruengeler@fh-muenster.de Stewart, et al. Expires June 24, 2010 [Page 11]