--- 1/draft-ietf-dmm-ondemand-mobility-09.txt 2017-01-29 05:13:13.912531214 -0800 +++ 2/draft-ietf-dmm-ondemand-mobility-10.txt 2017-01-29 05:13:13.944531961 -0800 @@ -1,25 +1,25 @@ DMM Working Group A. Yegin Internet-Draft Actility Intended status: Informational D. Moses -Expires: June 15, 2017 Intel +Expires: August 2, 2017 Intel K. Kweon J. Lee J. Park Samsung S. Jeon Sungkyunkwan University - December 12, 2016 + January 29, 2017 On Demand Mobility Management - draft-ietf-dmm-ondemand-mobility-09 + draft-ietf-dmm-ondemand-mobility-10 Abstract Applications differ with respect to whether they need IP session continuity and/or IP address reachability. The network providing the same type of service to any mobile host and any application running on the host yields inefficiencies. This document describes a solution for taking the application needs into account in selectively providing IP session continuity and IP address reachability on a per- socket basis. @@ -32,25 +32,25 @@ 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 June 15, 2017. + This Internet-Draft will expire on August 2, 2017. Copyright Notice - Copyright (c) 2016 IETF Trust and the persons identified as the + Copyright (c) 2017 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 @@ -58,33 +58,34 @@ Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Notational Conventions . . . . . . . . . . . . . . . . . . . 4 3. Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Types of IP Addresses . . . . . . . . . . . . . . . . . . 4 3.2. Granularity of Selection . . . . . . . . . . . . . . . . 5 3.3. On Demand Nature . . . . . . . . . . . . . . . . . . . . 5 3.4. Conveying the Selection . . . . . . . . . . . . . . . . . 6 - 4. Backwards Compatibility Considerations . . . . . . . . . . . 9 - 4.1. Applications . . . . . . . . . . . . . . . . . . . . . . 9 - 4.2. IP Stack in the Mobile Host . . . . . . . . . . . . . . . 9 - 4.3. Network Infrastructure . . . . . . . . . . . . . . . . . 10 - 5. Summary of New Definitions . . . . . . . . . . . . . . . . . 10 - 6. Security Considerations . . . . . . . . . . . . . . . . . . . 10 - 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 - 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 11 - 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 - 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 - 10.1. Normative References . . . . . . . . . . . . . . . . . . 11 - 10.2. Informative References . . . . . . . . . . . . . . . . . 11 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 + 4. Usage example . . . . . . . . . . . . . . . . . . . . . . . . 9 + 5. Backwards Compatibility Considerations . . . . . . . . . . . 10 + 5.1. Applications . . . . . . . . . . . . . . . . . . . . . . 11 + 5.2. IP Stack in the Mobile Host . . . . . . . . . . . . . . . 11 + 5.3. Network Infrastructure . . . . . . . . . . . . . . . . . 11 + 6. Summary of New Definitions . . . . . . . . . . . . . . . . . 11 + 7. Security Considerations . . . . . . . . . . . . . . . . . . . 12 + 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 + 9. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 12 + 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 13 + 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 + 11.1. Normative References . . . . . . . . . . . . . . . . . . 13 + 11.2. Informative References . . . . . . . . . . . . . . . . . 13 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 1. Introduction In the context of Mobile IP [RFC5563][RFC6275][RFC5213][RFC5944], following two attributes are defined for the IP service provided to the mobile hosts: IP session continuity: The ability to maintain an ongoing IP session by keeping the same local end-point IP address throughout the session despite the mobile host changing its point of attachment within the @@ -231,28 +232,29 @@ addresses configured. Zero or more Non-persistent, zero or more Session-lasting, and zero or more Fixed IP addresses may be configured on the IP stack of the host. The combination may be as a result of the host policy, application demand, or a mix of the two. When an application requires a specific type of IP address and such address is not already configured on the host, the IP stack shall attempt to configure one. For example, a host may not always have a Session-lasting IP address available. When an application requests one, the IP stack shall make an attempt to configure one by issuing a - request to the network. If the operation fails, the IP stack shall - fail the associated socket request. If successful, a Session-lasting - IP Address gets configured on the mobile host. If another socket - requests a Session-lasting IP address at a later time, the same IP - address may be served to that socket as well. When the last socket - using the same configured IP address is closed, the IP address may be - released or kept for future applications that may be launched and - require a Session-lasting IP address. + request to the network (see section Section 3.4 for more details). + If the operation fails, the IP stack shall fail the associated socket + request. If successful, a Session-lasting IP Address gets configured + on the mobile host. If another socket requests a Session-lasting IP + address at a later time, the same IP address may be served to that + socket as well. When the last socket using the same configured IP + address is closed, the IP address may be released or kept for future + applications that may be launched and require a Session-lasting IP + address. In some cases it might be preferable for the mobile host to request a new Session-lasting IP address for a new opening of an IP session (even though one was already assigned to the mobile host by the network and might be in use in a different, already active IP session). It is outside the scope of this specification to define criteria for selecting to use available addresses or choose to request new ones. It supports both alternatives (and any combination). @@ -272,21 +274,21 @@ - Permission to grant various types of IP addresses to a requesting application. - Determination of a default address type when an application does not make any explicit indication, whether it already supports the required API or it is just a legacy application. 3.4. Conveying the Selection The selection of the address type is conveyed from the applications - to the IP stack in oredr to influence the source address selection + to the IP stack in order to influence the source address selection algorithm [RFC6724]. The current source address selection algorithm operates on the available set of IP addresses, when selecting an address. According to the proposed solution, if the requested IP address type is not available at the time of the request, the IP stack shall make an attempt to configure one such IP address. The selected IP address shall be compliant with the requested IP address type, whether it is selected among available addresses or dynamically configured. In the absence of a matching type (because it is not available and not @@ -321,21 +323,21 @@ Section 2.1. The following new flags are defined in this document and they shall be used with Socket API in compliance with [RFC5014]: IPV6_REQUIRE_FIXED_IP /* Require a Fixed IP address as source */ IPV6_REQUIRE_SESSION_LASTING_IP /* Require a Session-lasting IP address as source */ - IPV6_REQUIRE_NON-PERSISTENT_IP /* Require a Non-persistent IP address + IPV6_REQUIRE_NON_PERSISTENT_IP /* Require a Non-persistent IP address as source */ Only one of these flags may be set on the same socket. If an application attempts to set more than one flag, the most recent setting will be the one in effect. When any of these new flags is used, the IPV6_PREFER_SRC_HOME and IPV6_PREFER_SRC_COA flags, if used, shall be ignored. These new flags are used with setsockopt()/getsockopt(), getaddrinfo(), and inet6_is_srcaddr() functions [RFC5014]. Similar @@ -385,143 +387,210 @@ The following new error codes are also defined in the document and will be used in the Socket API in compliance with [RFC5014]. EAI_REQUIREDIPNOTSUPPORTED /* The network does not support the ability to request that specific IP address type */ EAI_REQUIREDIPFAILED /* The network could not assign that specific IP address type */ -4. Backwards Compatibility Considerations +4. Usage example + + The following example shows the code for creating a Stream socket + (TCP) with a Session-Lasting source IP address: + +#include +#include + +int s ; // Socket id +sockaddr_in6 serverAddress ; // server info for connect() +uint32_t flags = IPV6_REQUIRE_SESSION_LASTING_IP ; + // For requesting a Session-Lasting + // source IP address + + // Create an IPv6 TCP socket +s = socket(AF_INET6, SOCK_STREAM, 0) ; +if (s!=0) { + // Handle socket creation error + // ... +} // if socket creation failed +else { + + // Socket creation is successful + // The application cannot connect yet, since it wants to use a + // Session-Lasting source IP address It needs to request the + // Session-Lasting source IP before connecting + if (setsockopt(s, + IPPROTO_IPV6, + IPV6_ADDR_PREFERENCE, + (void *) flags, + sizeof(flags)) == 0){ + + // setting session continuity to Session Lasting is successful + // The application can connect to the server + + // Set the desired server's port# and IP address + serverAddress.sin6_port = serverPort ; + serverAddress.sin6_addr = serverIpAddress ; + + // Connect to the server + if (connect(s, &serverAddress, sizeof(serverAddress))==0) { + // connect successful (3-way handshake has been completed + // with Session-Lasting source address. + // Continue application functionality + // ... + } // if connect() is successful + else { + // connect failed + // ... + // Application code that handles connect failure and closes + // the socket + // ... + } // if connect() failed + + } // if the request of a Session-Lasting source address was successful + else { + // application code that does not use Session-lasting IP address + // The application may either connect without the desired + // Session-lasting service, or close the socket + //... + } // if the socket was successfully created but a Session-Lasting source + // address was not provided +} // if socket was created successfully + + // The rest of the application's code + // .. + +5. Backwards Compatibility Considerations Backwards compatibility support is required by the following 3 types of entities: - The Applications on the mobile host - The IP stack in the mobile host - The network infrastructure -4.1. Applications +5.1. Applications Legacy applications that do not support the new flags will use the legacy API to the IP stack and will not enjoy On-Demand Mobility feature. Applications using the new flags must be aware that they may be executed in environments that do not support the On-Demand Mobility feature. Such environments may include legacy IP stack in the mobile host, legacy network infrastructure, or both. In either case, the API will return an error code and the invoking applications must respond with using legacy calls without the On-Demand Mobility feature. -4.2. IP Stack in the Mobile Host +5.2. IP Stack in the Mobile Host New IP stacks must continue to support all legacy operations. If an application does not use On-Demand Mobility feature, the IP stack must respond in a legacy manner. If the network infrastructure supports On-Demand Mobility feature, the IP stack should follow the application request: If the application requests a specific address type, the stack should forward this request to the network. If the application does not request an address type, the IP stack must not request an address type and leave it to the network's default behavior to choose the type of the allocated IP prefix. If an IP prefix was already allocated to the host, the IP stack uses it and may not request a new one from the network. -4.3. Network Infrastructure +5.3. Network Infrastructure The network infrastructure may or may not support the On-Demand Mobility feature. How the IP stack on the host and the network infrastructure behave in case of a compatibility issue is outside the scope of this API specification. -5. Summary of New Definitions +6. Summary of New Definitions The following list summarizes the new constants definitions discussed in this memo: IPV6_REQUIRE_FIXED_IP IPV6_REQUIRE_SESSION_LASTING_IP IPV6_REQUIRE_NON_PERSISTENT_IP IPV6_REQUIRE_SRC_ON_NET EAI_REQUIREDIPNOTSUPPORTED EAI_REQUIREDIPFAILED IPV6_REQUIRE_FIXED_IP IPV6_REQUIRE_SESSION_LASTING_IP IPV6_REQUIRE_NON_PERSISTENT_IP IPV6_REQUIRE_SRC_ON_NET EAI_REQUIREDIPNOTSUPPORTED EAI_REQUIREDIPFAILED -6. Security Considerations +7. Security Considerations The setting of certain IP address type on a given socket may be restricted to privileged applications. For example, a Fixed IP Address may be provided as a premium service and only certain applications may be allowed to use them. Setting and enforcement of such privileges are outside the scope of this document. -7. IANA Considerations +8. IANA Considerations This document has no IANA considerations. -8. Contributors +9. Contributors This document was merged with [I-D.sijeon-dmm-use-cases-api-source]. We would like to acknowledge the contribution of the following people to that document as well: Sergio Figueiredo Altran Research, France Email: sergio.figueiredo@altran.com Younghan Kim Soongsil University, Korea Email: younghak@ssu.ac.kr John Kaippallimalil Huawei, USA Email: john.kaippallimalil@huawei.com -9. Acknowledgements +10. Acknowledgements We would like to thank Alexandru Petrescu, Jouni Korhonen, Sri - Gundavelli, and Lorenzo Colitti for their valuable comments and - suggestions on this work. + Gundavelli, Dave Dolson and Lorenzo Colitti for their valuable + comments and suggestions on this work. -10. References +11. References -10.1. Normative References +11.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC5014] Nordmark, E., Chakrabarti, S., and J. Laganier, "IPv6 Socket API for Source Address Selection", RFC 5014, DOI 10.17487/RFC5014, September 2007, . [RFC6724] Thaler, D., Ed., Draves, R., Matsumoto, A., and T. Chown, "Default Address Selection for Internet Protocol Version 6 (IPv6)", RFC 6724, DOI 10.17487/RFC6724, September 2012, . -10.2. Informative References +11.2. Informative References [I-D.sijeon-dmm-use-cases-api-source] Jeon, S., Figueiredo, S., Kim, Y., and J. Kaippallimalil, "Use Cases and API Extension for Source IP Address Selection", draft-sijeon-dmm-use-cases-api-source-05 (work in progress), October 2016. [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261,