K. Naito Internet-Draft A. Matsumoto Intended status: Informational NTT Expires: September 4, 2012 March 2012 NAT resource optimizing extension draft-naito-nat-resource-optimizing-extension-00 Abstract When NAT is used in address resource restricted environment, or when a lot of users are located under a NAT device, IP address and port resources may be eaten up, and it brings severe bad effects on user experiences. This situation can be greatly mitigated by tweaking mapping behavior and session timer handling at NAT function. This document proposes to NAT IP address and port resource optimizing extension for address resource restricted environment. One extension is to enable simultaneous use of a port for different transport sessions, and the other is to make use of TCP timestamp for TIME_WAIT Assassination. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. 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." This Internet-Draft will expire on August 4, 2012. Copyright Notice Copyright (c) 2012 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 Naito & Matsumoto Expires September 4, 2012 [Page 1] Internet-Draft NAT resource optimizing extension March 2012 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 Simplified BSD License. This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English. 1. Introduction The internet has run out of IPv4 addresses, and after that IPv4 addresses that can be allocated to a user will be much more restricted. NAT is a tool that is widely used for this problem of IPv4 address shortage. However, there will be more and more demands for resources to provide the Internet access to the users and devices. IPv6 is a fundamental solution for this problem, but the deployment of IPv6 takes time. In some cases, e.g. browsing a dynamic web page for a map service, a lot of sessions are used by the browser, and a number of ports are eaten up in short time. What is worse is that when a NAT is in between, the NAT keeps track of each session for long time, typically for four minutes, even if the session is terminated by both ends within a few seconds. This problem is caused or worsened by the following behaviors of NAT. 1. In a lot of NAT implementation, a port that is available at NAT is allocated or a transport session. i.e. a NAT does not use a port for multiple sessions simultaneously. 2.TCP TIME_WAIT state requires 2*MSL wait before a session is closed, So at a NAT device many session states are kept, even if both ends of a session have closed and deleted the state for the session. We propose two mechanisms to change the above behaviors of NAT that enables to save addresses and ports resources. Naito & Matsumoto Expires September 4, 2012 [Page 2] Internet-Draft NAT resource optimizing extension March 2012 1.1. TCP TIME_WAIT TCP TIME_WAIT mechanism is written in RFC793. TCP TIME_WAIT status requires 2*MSL to wait before connection to be CLOSED, in case: 1.Packet in previous session be transfered later 2.Retransmission of ACK packet(which is respond to FIN) is needed. In case 1, the old packet should be discarded, not to harm new session. In case 2, retransmission should be done to close destination port. If TIME_WAIT mechanism do not work, TCP transmission problem may happen. 1.2. TIME_WAIT Assassination The server may accept the TCP SYN from the client change the state of the port from TCP TIME-WAIT to TCP Established. This is known as TIME-WAIT assassination. 1.3. PAWS(Protect Against Wrapped Sequence numbers) PAWS(Protect Against Wrapped Sequence numbers) is written in RFC1323. PAWS is used to prevent packet in previous session be transfered to the new session. 2. Proposal 2.1. Adopt Intended Port over-use mechanism To use single port for several connections, over-use port. For example, if destination address differ in two connections, use single port for NAT port assignment. In such case, this mechanism SHOULD meet the requirement written in RFC5382. i.e. REQ-1:A NAT MUST have an "Endpoint-Independent Mapping" behavior for TCP. (There may be some other violations to adopt this, which I'll consider and write by IETF83 Paris) 2.2. Adopt RFC6191 to NAT To make connection re-usable for TCP transmission(e.g. http transmission) in address resource restricted network, force port state to be CLOSED, as soon as a session have finished(i.e. port is in TCP TIME_WAIT state), if there are any SYN-WAIT state for new session, waiting for port to be released. This mechanism is written in RFC6191. To make this mechanism work in network that several PCs connected to the NAT equipment, value of timestamp SHOULD be successive. (timestamps MAY be overwritten in NAT equipment, so that timestamp in each packet that go through NAT equipment be successive.) Naito & Matsumoto Expires September 4, 2012 [Page 3] Internet-Draft NAT resource optimizing extension March 2012 Also, consideration of some transmission pattern and effect is needed. (I'll consider patterns, and write by IETF83 Paris) 3. Security Considerations (I'll write some by IETF83, Paris.) 4. Normative References [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981. [RFC1323] Jacobson, V., Braden, B., and D. Borman, "TCP Extensions for High Performance", RFC 1323, May 1992. [RFC5382] Guha, S., Biswas, K., Ford, B., Sivakumar, S., and P. Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, RFC 5382, October 2008. [RFC6191] Gont, F., "Reducing the TIME-WAIT State Using TCP Timestamps", BCP 159, RFC 6191, April 2011. Authors' Addresses Kengo Naito NTT SI Lab 3-9-11 Midori-Cho Musashino-shi, Tokyo 180-8585 Japan Phone: +81 422 59 4949 Email: naito.kengo@lab.ntt.co.jp Arifumi Matsumoto NTT SI Lab 3-9-11 Midori-Cho Musashino-shi, Tokyo 180-8585 Japan Phone: +81 422 59 3334 Email: arifumi@nttv6.net Naito & Matsumoto Expires September 4, 2012 [Page 4]