draft-ietf-shim6-multihome-shim-api-01.txt   draft-ietf-shim6-multihome-shim-api-02.txt 
SHIM6 Working Group M. Komu SHIM6 Working Group M. Komu
Internet-Draft HIIT Internet-Draft HIIT
Expires: August 5, 2006 M. Bagnulo Intended status: Informational M. Bagnulo
UC3M Expires: September 6, 2007 UC3M
K. Slavov K. Slavov
S. Sugimoto, Ed. S. Sugimoto, Ed.
Ericsson Ericsson
February 2006 March 5, 2007
Socket Application Program Interface (API) for Multihoming Shim Socket Application Program Interface (API) for Multihoming Shim
draft-ietf-shim6-multihome-shim-api-01 draft-ietf-shim6-multihome-shim-api-02
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79. aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
skipping to change at page 1, line 38 skipping to change at page 1, line 38
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on August 5, 2006. This Internet-Draft will expire on September 6, 2007.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2006). Copyright (C) The IETF Trust (2007).
Abstract Abstract
This document specifies a socket API for the multihoming shim layer. This document specifies a socket API for the multihoming shim layer.
The API aims to enable interactions between the applications and the The API aims to enable interactions between the applications and the
multihoming shim layer for advanced locator management and access to multihoming shim layer for advanced locator management and access to
information about failure detection and path exploration. information about failure detection and path exploration.
This document is based on an assumption that a multhomed host is This document is based on an assumption that a multhomed host is
equipped with a conceptual sublayer (here after "shim") inside the IP equipped with a conceptual sublayer (here after "shim") inside the IP
skipping to change at page 3, line 29 skipping to change at page 2, line 34
5.8. SHIM_LOC_PEER_RECV . . . . . . . . . . . . . . . . . . . . 18 5.8. SHIM_LOC_PEER_RECV . . . . . . . . . . . . . . . . . . . . 18
5.9. SHIM_LOCLIST_LOCAL . . . . . . . . . . . . . . . . . . . . 18 5.9. SHIM_LOCLIST_LOCAL . . . . . . . . . . . . . . . . . . . . 18
5.10. SHIM_LOCLIST_PEER . . . . . . . . . . . . . . . . . . . . 19 5.10. SHIM_LOCLIST_PEER . . . . . . . . . . . . . . . . . . . . 19
5.11. SHIM_APP_TIMEOUT . . . . . . . . . . . . . . . . . . . . . 19 5.11. SHIM_APP_TIMEOUT . . . . . . . . . . . . . . . . . . . . . 19
5.12. SHIM_DEFERRED_CONTEXT_SETUP . . . . . . . . . . . . . . . 20 5.12. SHIM_DEFERRED_CONTEXT_SETUP . . . . . . . . . . . . . . . 20
5.13. Error Handling . . . . . . . . . . . . . . . . . . . . . . 21 5.13. Error Handling . . . . . . . . . . . . . . . . . . . . . . 21
6. Ancillary Data for Multihoming Shim . . . . . . . . . . . . . 21 6. Ancillary Data for Multihoming Shim . . . . . . . . . . . . . 21
6.1. Get Locator Information from Incoming Packet . . . . . . . 23 6.1. Get Locator Information from Incoming Packet . . . . . . . 23
6.2. Specify Locator Information for Outgoing Packet . . . . . 23 6.2. Specify Locator Information for Outgoing Packet . . . . . 23
6.3. Notification from Application to Multihoming Shim . . . . 23 6.3. Notification from Application to Multihoming Shim . . . . 23
6.3.1. SHIM_FEEDBACK_POSITIVE . . . . . . . . . . . . . . . . 24 6.3.1. SHIM_FEEDBACK_POSITIVE . . . . . . . . . . . . . . . . 23
6.3.2. SHIM_FEEDBACK_NEGATIVE . . . . . . . . . . . . . . . . 24 6.3.2. SHIM_FEEDBACK_NEGATIVE . . . . . . . . . . . . . . . . 24
7. Data Structures . . . . . . . . . . . . . . . . . . . . . . . 24 7. Data Structures . . . . . . . . . . . . . . . . . . . . . . . 24
7.1. Placeholder for Locator Information . . . . . . . . . . . 24 7.1. Placeholder for Locator Information . . . . . . . . . . . 24
7.2. Path Exploration Parameter . . . . . . . . . . . . . . . . 25 7.2. Path Exploration Parameter . . . . . . . . . . . . . . . . 25
8. Implications for Existing Socket API Extensions . . . . . . . 26 8. Implications for Existing Socket API Extensions . . . . . . . 26
9. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 27 9. Resolving Conflicts with Preference Values . . . . . . . . . . 26
9.1. Issues with a Context Shared by Applications . . . . . . . 27 9.1. Implicit Forking . . . . . . . . . . . . . . . . . . . . . 27
9.2. Issues with Shim Unaware Application . . . . . . . . . . . 27 10. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 27
9.2.1. Initial Contact with Multiple Locator Pairs . . . . . 27 10.1. Naming at Socket Layer . . . . . . . . . . . . . . . . . . 27
9.2.2. Naming at Socket Layer . . . . . . . . . . . . . . . . 29 10.2. Additional Requirements from Application . . . . . . . . . 28
9.3. Additional Requirements from Application . . . . . . . . . 29 10.3. Issues of Header Conversion among Different Address
9.4. Issues of Header Conversion among Different Address Family . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Family . . . . . . . . . . . . . . . . . . . . . . . . . . 29 10.4. Handling of Unknown Locator Provided by Application . . . 28
9.5. Handling of Unknown Locator Provided by Application . . . 30 11. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 11.1. Changes from version 00 to version 01 . . . . . . . . . . 29
11. Security Considerations . . . . . . . . . . . . . . . . . . . 30 11.2. Changes from version 01 to version 02 . . . . . . . . . . 29
12. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . 30 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29
13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 31 13. Security Considerations . . . . . . . . . . . . . . . . . . . 29
14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 31 14. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . 29
14.1. Normative References . . . . . . . . . . . . . . . . . . . 31 15. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 30
14.2. Informative References . . . . . . . . . . . . . . . . . . 32 16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 33 16.1. Normative References . . . . . . . . . . . . . . . . . . . 30
Intellectual Property and Copyright Statements . . . . . . . . . . 34 16.2. Informative References . . . . . . . . . . . . . . . . . . 31
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 31
Intellectual Property and Copyright Statements . . . . . . . . . . 33
1. Introduction 1. Introduction
HIP and SHIM6 have a commonality in their protocol design; separation HIP and SHIM6 have a commonality in their protocol design separation
of identifier and locator (hereafter identifier/locator separation). of identifier and locator (hereafter identifier/locator separation).
Both protocols aim to solve problems that are specific to multihoming Both protocols aim to solve problems that are specific to multihoming
environment in a host centric approach. In these protocols, a sub- environment in a host centric approach. In these protocols, a sub-
layer within the IP layer maintains mappings of identifiers and layer within the IP layer maintains mappings of identifiers and
locators. locators.
The shim layer is useful in a sense that the IP layer can maintain The shim layer is useful in a sense that the IP layer can maintain
the mapping of an identifier to corresponding locators. Under a the mapping of an identifier to corresponding locators. Under a
multihomed environment, typically, a host has more than one IP multihomed environment, typically, a host has more than one IP
address at a time. During a given transaction, a host may be address at a time. During a given transaction, a host may be
skipping to change at page 5, line 12 skipping to change at page 5, line 12
interest for the developers of a given shim protocol, as the shim interest for the developers of a given shim protocol, as the shim
layer should provide the interface to the application. layer should provide the interface to the application.
2. Terminology 2. Terminology
This section provides terminology used in this document. Basically This section provides terminology used in this document. Basically
most of the terms used in this document are taken from the following most of the terms used in this document are taken from the following
documents: documents:
o SHIM6 Protocol Specification[I-D.ietf-shim6-proto] o SHIM6 Protocol Specification[I-D.ietf-shim6-proto]
o HIP Architecture[I-D.ietf-hip-arch] o HIP Architecture[RFC4423]
o Reachability Protocol (REAP)[I-D.ietf-shim6-failure-detection] o Reachability Protocol (REAP)[I-D.ietf-shim6-failure-detection]
In this document, the term "IP" refers to both IPv4 and IPv6, unless In this document, the term "IP" refers to both IPv4 and IPv6, unless
the protocol version is specifically mentioned. The followings are the protocol version is specifically mentioned. The followings are
definitions of the terms that are frequently used in this document: definitions of the terms that are frequently used in this document:
o Endpoint Identifier (EID) - An identifier used by the application o Endpoint Identifier (EID) - An identifier used by the application
to specify the endpoint of a given communication. Applications to specify the endpoint of a given communication. Applications
may handle EID in various ways such as long-lived connections, may handle EID in various ways such as long-lived connections,
callbacks, and referrals[I-D.ietf-shim6-app-refer]. callbacks, and referrals[I-D.ietf-shim6-app-refer].
skipping to change at page 9, line 14 skipping to change at page 9, line 14
o The application should be able to know if the communication is now o The application should be able to know if the communication is now
served by the shim layer or not. served by the shim layer or not.
o The application should be able to access locator information o The application should be able to access locator information
regardless of its address family. In other words, no matter regardless of its address family. In other words, no matter
whether the target locator is IPv4 or IPv6, the application should whether the target locator is IPv4 or IPv6, the application should
be able to use common interface to access the locator information. be able to use common interface to access the locator information.
5. Socket Options for Multihoming Shim Layer 5. Socket Options for Multihoming Shim Layer
In this section, the socket options for the interface between the In this section, socket options that are specifc to multihome shim
application and the multihomed shim layer are defined. These options are defined.
can be used either by getsockopt() or setsockopt() system call for an
open socket. Table 1 provides a list of the socket options. Note
that all socket options are defined at level SOL_SHIM.
The first column of the table gives the name of the option. The Table 1 provides a list of the socket options that are specific to
second and third columns indicate whether the option is for multihoming shim layer. These socket options can be used by either
getsockopt() or setsockopt() system call for a given socket. All of
these socket options are defined at level SOL_SHIM.
The first column of Table 1 gives the name of the option. The second
and third columns indicate whether the option can be handled by
getsockopt() and/or setsockopt(), respectively. The fourth column getsockopt() and/or setsockopt(), respectively. The fourth column
provides a brief description of the socket option. The fifth column provides a brief description of the socket option. The fifth column
shows the type of data structure specified with the socket option, shows the type of data structure specified along with the socket
which can store an argument for setsockopt() and result for option. By default, the data structure type is an integer.
getsockopt(). By default, the data structure type is an integer.
+-----------------------------+-----+-----+-----------------+-------+ +-----------------------------+-----+-----+-----------------+-------+
| optname | get | set | description | dtype | | optname | get | set | description | dtype |
+-----------------------------+-----+-----+-----------------+-------+ +-----------------------------+-----+-----+-----------------+-------+
| SHIM_ASSOCIATED | o | | Check if the | int | | SHIM_ASSOCIATED | o | | Check if the | int |
| | | | socket is | | | | | | socket is | |
| | | | associated with | | | | | | associated with | |
| | | | any shim | | | | | | any shim | |
| | | | context or not. | | | | | | context or not. | |
| SHIM_DONTSHIM | o | o | Request the | int | | SHIM_DONTSHIM | o | o | Request the | int |
skipping to change at page 11, line 10 skipping to change at page 11, line 10
| | | | path | | | | | | path | |
| | | | exploration and | | | | | | exploration and | |
| | | | failure | | | | | | failure | |
| | | | detection. | | | | | | detection. | |
| SHIM_CONTEXT_DEFERRED_SETUP | o | o | Specify if the | int | | SHIM_CONTEXT_DEFERRED_SETUP | o | o | Specify if the | int |
| | | | context setup | | | | | | context setup | |
| | | | can be deferred | | | | | | can be deferred | |
| | | | or not. | | | | | | or not. | |
+-----------------------------+-----+-----+-----------------+-------+ +-----------------------------+-----+-----+-----------------+-------+
Table 1: Shim specific socket options for getsockopt() and Table 1: Socket options for multihoming shim
setsockopt()
*1: Pointer to a shim_locator which is defined in Section 7. *1: Pointer to a shim_locator which is defined in Section 7.
*2: Pointer to an array of shim_locator. *2: Pointer to an array of shim_locator.
*3: Pointer to a shim_pathexplore which is defined in Section 7. *3: Pointer to a shim_pathexplore which is defined in Section 7.
Figure 2 illustrates how the shim specific socket options fit into Figure 2 illustrates how the shim specific socket options fit into
the system model of socket API. In the figure, it can be seen that the system model of socket API. In the figure, it can be seen that
the shim layer and the additional protocol components (IPv4 and IPv6) the shim layer and the additional protocol components (IPv4 and IPv6)
skipping to change at page 17, line 35 skipping to change at page 17, line 35
the socket. the socket.
Data type of the option value is integer. The option value should be Data type of the option value is integer. The option value should be
binary (0 or 1). By default, the option value is set to 0, meaning binary (0 or 1). By default, the option value is set to 0, meaning
that the option is disabled. that the option is disabled.
The option value can be set by setsockopt(). The option value can be set by setsockopt().
The option value can be read by getsockopt(). The option value can be read by getsockopt().
See section Section 6 for the procedure to access locator information See Section 6 for the procedure to access locator information stored
stored in the ancillary data objects. in the ancillary data objects.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
For example, the option can be activated by the application as For example, the option can be activated by the application as
follows: follows:
int optval; int optval;
optval = 1; optval = 1;
skipping to change at page 18, line 28 skipping to change at page 18, line 28
socket. socket.
Data type of the option value is integer. The option value should be Data type of the option value is integer. The option value should be
binary (0 or 1). By default, the option value is set to 0, meaning binary (0 or 1). By default, the option value is set to 0, meaning
that the option is disabled. that the option is disabled.
The option value can be set by setsockopt(). The option value can be set by setsockopt().
The option value can be read by getsockopt(). The option value can be read by getsockopt().
See section Section 6 for the procedure to access locator information See Section 6 for the procedure to access locator information stored
stored in the ancillary data objects. in the ancillary data objects.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
with the socket. with the socket.
The usage of the option is same as that of SHIM_LOC_LOCAL_RECV The usage of the option is same as that of SHIM_LOC_LOCAL_RECV
option. option.
5.9. SHIM_LOCLIST_LOCAL 5.9. SHIM_LOCLIST_LOCAL
The SHIM_LOCLIST_LOCAL option can be used to read or set the locator The SHIM_LOCLIST_LOCAL option can be used to read or set the locator
list associated with the local EID of the shim context associated list associated with the local EID of the shim context associated
with the socket. Hence this option is effective only when there is a with the socket. Hence this option is effective only when there is a
shim context associated with the socket. shim context associated with the socket.
Data type of option value is pointer to the buffer where a locator Data type of option value is pointer to the buffer where a locator
list is stored. See section Section 7 for the data structure for list is stored. See Section 7 for the data structure for storing the
storing the locator information. By default, the option value is set locator information. By default, the option value is set as NULL,
as NULL, meaning that the option is disabled. meaning that the option is disabled.
The locator list can be read by getsockopt(). Note that the size of The locator list can be read by getsockopt(). Note that the size of
the buffer pointed by optval argument should be large enough to store the buffer pointed by optval argument should be large enough to store
an array of locator information. The number of the locator an array of locator information. The number of the locator
information is not known beforehand. information is not known beforehand.
The locator list can be set by setsockopt(). The buffer pointed by The locator list can be set by setsockopt(). The buffer pointed by
optval argument should contain an array of locator list. optval argument should contain an array of locator list.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
skipping to change at page 19, line 24 skipping to change at page 19, line 24
Example is TBD. Example is TBD.
5.10. SHIM_LOCLIST_PEER 5.10. SHIM_LOCLIST_PEER
The SHIM_LOCLIST_LOCAL option can be used to read or set the locator The SHIM_LOCLIST_LOCAL option can be used to read or set the locator
list associated with the peer EID of the shim context associated with list associated with the peer EID of the shim context associated with
the socket. Hence this option is effective only when there is a shim the socket. Hence this option is effective only when there is a shim
context associated with the socket. context associated with the socket.
Data type of option value is pointer to the buffer where a locator Data type of option value is pointer to the buffer where a locator
list is stored. See section Section 7 for the data structure for list is stored. See Section 7 for the data structure for storing the
storing the locator information. By default, the option value is set locator information. By default, the option value is set as NULL,
as NULL, meaning that the option is disabled. meaning that the option is disabled.
The locator list can be read by getsockopt(). Note that the size of The locator list can be read by getsockopt(). Note that the size of
the buffer pointed by optval argument should be large enough to store the buffer pointed by optval argument should be large enough to store
an array of locator information. The number of the locator an array of locator information. The number of the locator
information is not known beforehand. information is not known beforehand.
The locator list can be set by setsockopt(). The buffer pointed by The locator list can be set by setsockopt(). The buffer pointed by
optval argument should contain an array of locator list. optval argument should contain an array of locator list.
An error ENOENT will be returned when there is no context associated An error ENOENT will be returned when there is no context associated
skipping to change at page 23, line 7 skipping to change at page 23, line 7
| SHIM_FEEDBACK_POSITIVE | o | | TBD | | SHIM_FEEDBACK_POSITIVE | o | | TBD |
| SHIM_FEEDBACK_NEGATICE | o | | TBD | | SHIM_FEEDBACK_NEGATICE | o | | TBD |
+------------------------+-----------+-----------+-------------+ +------------------------+-----------+-----------+-------------+
Table 2: Shim specific ancillary data Table 2: Shim specific ancillary data
*1: cmsg_data[] should include padding (if necessary) and a single *1: cmsg_data[] should include padding (if necessary) and a single
sockaddr_in{}/sockaddr_in6{}. sockaddr_in{}/sockaddr_in6{}.
It should be noted that the above ancillary data can only be handled It should be noted that the above ancillary data can only be handled
in UDP and raw sockets, not in TCP sockets. As explained in in UDP and raw sockets, not in TCP sockets because there is no one-
[RFC3542], there is no one-to-one mapping of send/receive operations to-one mapping of send/receive operations and the TCP segments being
and the TCP segments being transmitted/received. In case of TCP, transmitted/received.
application may use setsockopt() or getsockopt() to access or specify
some of locator information provided by the shim layer.
6.1. Get Locator Information from Incoming Packet 6.1. Get Locator Information from Incoming Packet
Application can get locator information from the received IP packet Application can get locator information from the received IP packet
by specifying the shim specific socket options for the socket. When by specifying the shim specific socket options for the socket. When
SHIM_LOC_LOCAL_RECV and/or SHIM_LOC_PEER_RECV socket options are set, SHIM_LOC_LOCAL_RECV and/or SHIM_LOC_PEER_RECV socket options are set,
the application can retrieve local and/or remote locator from the the application can retrieve local and/or remote locator from the
ancillary data. ancillary data.
6.2. Specify Locator Information for Outgoing Packet 6.2. Specify Locator Information for Outgoing Packet
skipping to change at page 27, line 4 skipping to change at page 26, line 45
In IPv6, [RFC3542] defines that IPV6_PKTINFO can be used to specify In IPv6, [RFC3542] defines that IPV6_PKTINFO can be used to specify
source IPv6 address and the outgoing interface for outgoing packets, source IPv6 address and the outgoing interface for outgoing packets,
and retrieve destination IPv6 address and receiving interface for and retrieve destination IPv6 address and receiving interface for
incoming packets. This information is stored in ancillary data being incoming packets. This information is stored in ancillary data being
IPV6_PKTINFO specified as cmsg_type. Existing socket API should IPV6_PKTINFO specified as cmsg_type. Existing socket API should
continue to work above the shim layer, that is, the IP addresses continue to work above the shim layer, that is, the IP addresses
handled in IPV6_PKTINFO should be EIDs, not the locators. handled in IPV6_PKTINFO should be EIDs, not the locators.
Baseline is that the above existing socket API (IP_RECVDSTADDR and Baseline is that the above existing socket API (IP_RECVDSTADDR and
IPV6_PKTINFO) is assumed to work above the multihoming shim layer. IPV6_PKTINFO) is assumed to work above the multihoming shim layer.
In other words, the IP addresses those socket options deal with are In other words, the IP addresses those socket options deal with are
EIDs rather than locators. EIDs rather than locators.
9. Discussion 9. Resolving Conflicts with Preference Values
In this section, open discussion issues are noted.
9.1. Issues with a Context Shared by Applications
A context is by definition, system-wide. This means that a context
could be shared by applications whose communications are using the
same EID pair.
When a context is shared by applications, there may be some problems
when the shim layer needs to handle feedbacks from the multiple
applications. As mentioned in Section Section 6, an application may
provide the shim layer feedback about timeout values from its own
settings. This implies that there is potentially a race condition at
the shim layer.
First of all, the socket options must be used with a proper
privilege. Feedback from the application which is run under a root
privilege must always override the feedback provided by application
which is run under normal user privilege.
For other cases, one could rely on a kind of heuristics of the
configuration. For instance, prioritizing feedback with higher
demand (e.g. timeout value 300 seconds are more demanding then
timeout value 600 seconds) may make sense in some cases. However, it
is still an open issue what kind of timer value could be handled in
this way.
Further discussions are needed how the shim layer can accommodate
feedbacks from multiple applications within a same context.
9.2. Issues with Shim Unaware Application
In multihomed environment where either of the peers or both of the
peers have multiple locators, there are some issues with shim unaware
application which uses legacy socket API.
9.2.1. Initial Contact with Multiple Locator Pairs
In a connection oriented communication, the connect() system call is
used to make the initial contact to the peer, which typically
requires IP address and port number to specify the endpoint. Hence,
name-to-address resolution should be performed prior to connect().
The application needs to resolve the FQDN of the peer to an IP Since the multihoming shim API allows application to specify
address by any available name-to-address conversion method. preference value for the context which is associated with the socket
instance, there may be a conflict with preference values specified by
different applications. For instance, application A and B may
establish communication over the same EID pair while each application
have different preference in their choice of local locator.
In typical case, the application receives information from the SHIM6 supports a notion of forking context in which a context is
resolver. If the application ends up with receiving multiple IP split when there is a conflict with preference values specified by
addresses to reach the peer, it should iterate through each multiple applications. Thus, context forking can simply resolve the
destination address one-by-one. It should be noted that the host may conflicting situation which may be caused by the use of socket
also have multiple source addresses. options for multihoming shim layer.
The different resulting address pairs may have different reachability 9.1. Implicit Forking
status so, in order to find a working address pair, it may be
required to explore all the available address pairs (as opposed to
explore all available destination addresses).
In normal case, the application issues a connect() by specifying the Socket options defined in Section 5 may cause conflicting situation
resolved IP address of the peer. If the connect() fails, it iterates when the target context is shared by multiple applications. In such
through the available IP addresses one by one sequentially until case, socket handler and the multihoming shim layer should react as
working pair is found. Another approach is to initiate concurrent follows; socket handler should inform the shim layer that context
connect() with every locator of the peer. connect() can also be forking is required. In SHIM6, when a context is forked, an unique
called in a sequence which would probably require more time to find identifier called Forked Instance Identifier (FII) is assigned to the
the working pair. newly forked context. The forked context is then exclusively
associated with the socket through which non-default preference value
was specified. The forked context is maintained by the multihoming
shim layer during the lifetime of associated socket instance. When
the socket is closed, the multihoming shim layer SHOULD delete
associated context. In this way, garbage collection can be carried
out to cleanup unused forked contexts. Upon garbage collection,
every forked context SHOULD be checked if there is no socket
(process) associated with the context. If there is none, the forked
context should be deleted. When a forked context is torn down, SHIM6
should notify the peer about the deletion of forked context.
There is a case where involvement of the shim layer is expected for As opposed to socket options, context forking MUST NOT be triggered
handling initial contact. In such case, behavior of the shim layer by any use of ancillary data that are specific to multihoming shim
will depend on presence of the required context. This case occurs defined in Section 6.
when there exists a context for the EID specified in connect(), the
initial contact can be made in accordance with the context
information. Otherwise, the shim layer should invoke context
establishment with the peer EID specified in the argument for
connect().
Additional efforts would be required in a case where the peer cannot 10. Discussion
be reachable through the EID (for example, EID is non-routable or
non-IP reachable) but it can be reached through alternative locator.
In particular, the shim layer should somehow discover the alternate
locator for the EID to establish context. [I-D.nordmark-shim6-esd]
addresses the possible approach to perform reverse DNS lookup from
EID to FQDN, then perform forward lookup again to find the full-set
of locators and EID.
In HIP, resolving HITs to IP addresses using DNS is not feasible In this section, open issues are introduced.
because HITs do not contain any hierarchical information. To
mitigate this problem, there are a few alternatives. Firstly,
resolver library on end-host can be modified to provide HIT-to-IP
mappings for HIP software module. Secondly, a distributed hash table
(DHT) service can be used for storing and looking up the mappings
because it supports non-hierarchical identifiers, such as HITs
[I-D.ietf-hip-arch]. Thirdly, it is possible to use IP addresses in
legacy applications as described in [I-D.henderson-hip-applications].
9.2.2. Naming at Socket Layer 10.1. Naming at Socket Layer
getsockname() and getpeername() system calls are used to obtain the getsockname() and getpeername() system calls are used to obtain the
'name' of endpoint which is actually a pair of IP address and port 'name' of endpoint which is actually a pair of IP address and port
number assigned to a given socket. getsockname() is used when an number assigned to a given socket. getsockname() is used when an
application wants to obtain the local IP address and port number application wants to obtain the local IP address and port number
assigned for a given socket instance. getpeername() is used when an assigned for a given socket instance. getpeername() is used when an
application wants to obtain the remote IP address and port number. application wants to obtain the remote IP address and port number.
The above is based on a traditional system model of the socket API The above is based on a traditional system model of the socket API
where an IP address is expected to play both the role of identifier where an IP address is expected to play both the role of identifier
and the role of locator. and the role of locator.
In a system model where a shim layer exists inside the IP layer, both In a system model where a shim layer exists inside the IP layer, both
getsockname() and getpeername() deal with identifiers, namely EIDs. getsockname() and getpeername() deal with identifiers, namely EIDs.
In this sense, the shim layer serves to (1) hide locators and (2) In this sense, the shim layer serves to (1) hide locators and (2)
provide access to the identifier for the application over the legacy provide access to the identifier for the application over the legacy
socket APIs. socket APIs.
9.3. Additional Requirements from Application 10.2. Additional Requirements from Application
At the moment, it is not certain if following requirements are common At the moment, it is not certain if following requirements are common
in all the multihomed environments (SHIM6 and HIP). These are mainly in all the multihomed environments (SHIM6 and HIP). These are mainly
identified during discussions made on SHIM6 WG mailing list. identified during discussions made on SHIM6 WG mailing list.
o The application should be able to set preferences for the o The application should be able to set preferences for the
locators, local and remote one and also to the preferences of the locators, local and remote one and also to the preferences of the
local locators that will be passed to the peer. local locators that will be passed to the peer.
9.4. Issues of Header Conversion among Different Address Family 10.3. Issues of Header Conversion among Different Address Family
The shim layer performs identifier/locator adaptation. Therefore, in The shim layer performs identifier/locator adaptation. Therefore, in
some case, the whole IP header can be replaced with new IP header of some case, the whole IP header can be replaced with new IP header of
a different address family (e.g. conversion from IPv4 to IPv6 or vice a different address family (e.g. conversion from IPv4 to IPv6 or vice
versa). Hence, there is an issue how to make the conversion with versa). Hence, there is an issue how to make the conversion with
minimum impact. Note that this issue is common in other protocol minimum impact. Note that this issue is common in other protocol
conversion such as SIIT[RFC2765]. conversion such as SIIT[RFC2765].
As addressed in SIIT specification, some of the features (IPv6 As addressed in SIIT specification, some of the features (IPv6
routing headers, hop-by-hop extension headers, or destination routing headers, hop-by-hop extension headers, or destination
headers) from IPv6 are not convertible to IPv4. In addition, notion headers) from IPv6 are not convertible to IPv4. In addition, notion
of source routing is not exactly the same in IPv4 and IPv6. Hence, of source routing is not exactly the same in IPv4 and IPv6. Hence,
there is certain limitation in protocol conversion between IPv4 and there is certain limitation in protocol conversion between IPv4 and
IPv6. IPv6.
The question is how should the shim layer behave when it is face with The question is how should the shim layer behave when it is face with
limitation problem of protocol conversion. Should we introduce new limitation problem of protocol conversion. Should we introduce new
error something like ENOSUITABLELOCATOR ? error something like ENOSUITABLELOCATOR ?
9.5. Handling of Unknown Locator Provided by Application 10.4. Handling of Unknown Locator Provided by Application
There might be a case where application provides the shim layer new There might be a case where application provides the shim layer new
locator with the SHIM_LOC_*_PREF socket options or SHIM_LOC_*_SEND locator with the SHIM_LOC_*_PREF socket options or SHIM_LOC_*_SEND
ancillary data. Then there is a question how should the shim layer ancillary data. Then there is a question how should the shim layer
treat the new locator informed by the application. treat the new locator informed by the application.
In principle, locator information are exchanged by the shim protocol. In principle, locator information are exchanged by the shim protocol.
However, there might be a case where application acquires information However, there might be a case where application acquires information
about the locator and prefers to use it for its communication. about the locator and prefers to use it for its communication.
10. IANA Considerations 11. Changes
11.1. Changes from version 00 to version 01
The followings are changes from version 00 to version 01:
o Define shim_locator{} data type which is a placeholder for
locator.
o Define shim_pathexplore{} data type in which a set of REAP
parameters are stored.
o Remove descriptions about "stickiness" of socket options.
o Deprecate SHIM_IF_RECV and SHIM_IF_SEND socket options.
o Give default value and how to disable given socket option.
11.2. Changes from version 01 to version 02
The followings are changes from version 01 to version 02:
o Add section describing context forking.
o Rephrase conclusion section.
o Separate normative references from informative references.
o Remove texts from discussion section that are not relevant to the
contents of the document.
o Add section describing change history (this section).
12. IANA Considerations
This document contains no IANA consideration. This document contains no IANA consideration.
11. Security Considerations 13. Security Considerations
This document does not specify any security mechanism for the shim This document does not specify any security mechanism for the shim
layer. Fundamentally, the shim layer has a potential to impose layer. Fundamentally, the shim layer has a potential to impose
security threats, as it changes the source and/or destination IP security threats, as it changes the source and/or destination IP
addresses of the IP packet being sent or received. Therefore, the addresses of the IP packet being sent or received. Therefore, the
basic assumption is that the security mechanism defined in each basic assumption is that the security mechanism defined in each
protocol of the shim layer is strictly applied. protocol of the shim layer is strictly applied.
12. Conclusion 14. Conclusion
In this document, the Application Program Interface (API) for In this document, the Application Program Interface (API) for
multihomed shim layer is specified. The socket API allows multihoming shim layer is specified. The socket API allows
applications to have additional control on the locator management and applications to have additional control of the locator management and
interface to the REAP mechanism inside the shim layer. The socket interface to the REAP mechanism inside the multihoming shim layer.
API is expected to be useful for applications that may greatly
benefit from multihomed environment. From the architectural
perspective, the socket API enhances software development environment
in a sense that it allows separate treatment of identifier and
locator at the IP layer. The API is designed with a care not to
break the semantics of existing socket API and minimize the impact to
the legacy applications.
Multihoming shim socket options defined in this document can be used Socket options for multihoming shim layer can be used by getsockopt()
by getsockopt() and/or setcokopt() system calls, which allow and/or setcokopt() system calls. Besides, applications can use some
applications to have control of locator management. Additionally, ancillary data that are specific to multihoming shim layer to get
applications can specify locator information for outgoing packet and locator from received packet or to set locator for outgoing packet.
get locator information from incoming packet by using ancillary data
objects that are specific to the multihoming shim layer.
13. Acknowledgments From an architectural point of view, the socket API provides extends
the existing socket API framework in the face of ID/Locator
separation. With regard to API that relate to IP address management,
it is assured that existing socket API continue to work above the
shim layer dealing with identifiers, while multihoming shim API deals
with locators.
15. Acknowledgments
Authors would like to thank Jari Arkko who participated in the Authors would like to thank Jari Arkko who participated in the
discussion that lead to the first version of this document, and discussion that lead to the first version of this document, and
Tatuya Jinmei who thoroughly reviewed the early version of this draft Tatuya Jinmei who thoroughly reviewed the early version of this draft
and provided detailed comments on socket API related issues. and provided detailed comments on socket API related issues.
14. References 16. References
14.1. Normative References
[I-D.henderson-hip-applications]
Henderson, T. and P. Nikander, "Using HIP with Legacy
Applications", draft-henderson-hip-applications-03 (work
in progress), May 2006.
[I-D.ietf-hip-arch] 16.1. Normative References
Moskowitz, R. and P. Nikander, "Host Identity Protocol
Architecture", draft-ietf-hip-arch-03 (work in progress),
August 2005.
[I-D.ietf-shim6-failure-detection] [I-D.ietf-shim6-failure-detection]
Arkko, J. and I. Beijnum, "Failure Detection and Locator Arkko, J. and I. Beijnum, "Failure Detection and Locator
Pair Exploration Protocol for IPv6 Multihoming", Pair Exploration Protocol for IPv6 Multihoming",
draft-ietf-shim6-failure-detection-06 (work in progress), draft-ietf-shim6-failure-detection-07 (work in progress),
September 2006. December 2006.
[I-D.ietf-shim6-proto] [I-D.ietf-shim6-proto]
Bagnulo, M. and E. Nordmark, "Level 3 multihoming shim Bagnulo, M. and E. Nordmark, "Level 3 multihoming shim
protocol", draft-ietf-shim6-proto-05 (work in progress), protocol", draft-ietf-shim6-proto-07 (work in progress),
May 2006. December 2006.
[POSIX] "IEEE Std. 1003.1-2001 Standard for Information Technology [POSIX] "IEEE Std. 1003.1-2001 Standard for Information Technology
-- Portable Operating System Interface (POSIX). Open group -- Portable Operating System Interface (POSIX). Open group
Technical Standard: Base Specifications, Issue 6, Technical Standard: Base Specifications, Issue 6,
http://www.opengroup.org/austin", December 2001. http://www.opengroup.org/austin", December 2001.
[RFC3542] Stevens, W., Thomas, M., Nordmark, E., and T. Jinmei, [RFC3542] Stevens, W., Thomas, M., Nordmark, E., and T. Jinmei,
"Advanced Sockets Application Program Interface (API) for "Advanced Sockets Application Program Interface (API) for
IPv6", RFC 3542, May 2003. IPv6", RFC 3542, May 2003.
14.2. Informative References [RFC4423] Moskowitz, R. and P. Nikander, "Host Identity Protocol
(HIP) Architecture", RFC 4423, May 2006.
16.2. Informative References
[I-D.ietf-shim6-app-refer] [I-D.ietf-shim6-app-refer]
Nordmark, E., "Shim6 Application Referral Issues", Nordmark, E., "Shim6 Application Referral Issues",
draft-ietf-shim6-app-refer-00 (work in progress), draft-ietf-shim6-app-refer-00 (work in progress),
July 2005. July 2005.
[I-D.ietf-shim6-hba] [I-D.ietf-shim6-hba]
Bagnulo, M., "Hash Based Addresses (HBA)", Bagnulo, M., "Hash Based Addresses (HBA)",
draft-ietf-shim6-hba-02 (work in progress), October 2006. draft-ietf-shim6-hba-02 (work in progress), October 2006.
[I-D.nordmark-shim6-esd]
Nordmark, E., "Extended Shim6 Design for ID/loc split and
Traffic Engineering", draft-nordmark-shim6-esd-00 (work in
progress), February 2006.
[RFC2765] Nordmark, E., "Stateless IP/ICMP Translation Algorithm [RFC2765] Nordmark, E., "Stateless IP/ICMP Translation Algorithm
(SIIT)", RFC 2765, February 2000. (SIIT)", RFC 2765, February 2000.
[RFC3972] Aura, T., "Cryptographically Generated Addresses (CGA)", [RFC3972] Aura, T., "Cryptographically Generated Addresses (CGA)",
RFC 3972, March 2005. RFC 3972, March 2005.
Authors' Addresses Authors' Addresses
Miika Komu Miika Komu
Helsinki Institue for Information Technology Helsinki Institue for Information Technology
skipping to change at page 34, line 5 skipping to change at page 33, line 5
Shinta Sugimoto (editor) Shinta Sugimoto (editor)
Nippon Ericsson K.K. Nippon Ericsson K.K.
Koraku Mori Building Koraku Mori Building
1-4-14, Koraku, Bunkyo-ku 1-4-14, Koraku, Bunkyo-ku
Tokyo 112-0004 Tokyo 112-0004
Japan Japan
Phone: +81 3 3830 2241 Phone: +81 3 3830 2241
Email: shinta.sugimoto@ericsson.com Email: shinta.sugimoto@ericsson.com
Intellectual Property Statement Full Copyright Statement
Copyright (C) The IETF Trust (2007).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79. found in BCP 78 and BCP 79.
skipping to change at page 34, line 29 skipping to change at page 33, line 45
such proprietary rights by implementers or users of this such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr. http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at this standard. Please address the information to the IETF at
ietf-ipr@ietf.org. ietf-ipr@ietf.org.
Disclaimer of Validity
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Copyright Statement
Copyright (C) The Internet Society (2006). This document is subject
to the rights, licenses and restrictions contained in BCP 78, and
except as set forth therein, the authors retain all their rights.
Acknowledgment Acknowledgment
Funding for the RFC Editor function is currently provided by the Funding for the RFC Editor function is provided by the IETF
Internet Society. Administrative Support Activity (IASA).
 End of changes. 46 change blocks. 
205 lines changed or deleted 161 lines changed or added

This html diff was produced by rfcdiff 1.33. The latest version is available from http://tools.ietf.org/tools/rfcdiff/