P2PSIP X. Jiang Internet-Draft Huawei Tech. Intended status: Standards Track R. Even Expires: November 30, 2009 Gesher Erove D. Bryan Cogent Force, LLC May 29, 2009 An extension to RELOAD to support Direct Response and Relay Peer routing draft-jiang-p2psip-relay-02.txt 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. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on November 30, 2009. 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 in effect on the date of publication of this document (http://trustee.ietf.org/license-info). Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Jiang, et al. Expires November 30, 2009 [Page 1] Internet-Draft P2PSIP RELAY May 2009 Abstract This document proposes an extension to RELOAD to support direct response and relay peer routing modes. RELOAD recommends symmetric recursive routing for routing messages. The new extensions provide a shorter route for responses and describes the potential cases where these extensions can be used. Jiang, et al. Expires November 30, 2009 [Page 2] Internet-Draft P2PSIP RELAY May 2009 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 5 3.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.1.1. Symmetric Recursive Routing (SRR) . . . . . . . . . . 5 3.1.2. Direct Response Routing (DRR) . . . . . . . . . . . . 6 3.1.3. Relay Peer Routing (RPR) . . . . . . . . . . . . . . . 7 3.2. Scenarios Where DRR can be Used . . . . . . . . . . . . . 8 3.2.1. Managed or Closed P2P System . . . . . . . . . . . . . 8 3.2.2. Wireless Scenarios . . . . . . . . . . . . . . . . . . 8 3.3. Scenarios Where RPR Benefits . . . . . . . . . . . . . . . 9 3.3.1. Managed or Closed P2P System . . . . . . . . . . . . . 9 3.3.2. Using Bootstrap Peers as Relay pPeers . . . . . . . . 9 3.3.3. Wireless Scenarios . . . . . . . . . . . . . . . . . . 9 4. Relationship Between SRR and DRR/RPR . . . . . . . . . . . . . 9 4.1. How DRR Works . . . . . . . . . . . . . . . . . . . . . . 9 4.2. How RPR Works . . . . . . . . . . . . . . . . . . . . . . 9 4.3. How These Three Routing Modes Work Together . . . . . . . 10 5. Extensions to RELOAD . . . . . . . . . . . . . . . . . . . . . 11 5.1. Basic Requirements . . . . . . . . . . . . . . . . . . . . 11 5.2. Modification To RELOAD Message Structure . . . . . . . . . 11 5.2.1. State-keeping Flag . . . . . . . . . . . . . . . . . . 11 5.2.2. Extensive Routing Mode . . . . . . . . . . . . . . . . 12 5.3. Creating a Request . . . . . . . . . . . . . . . . . . . . 13 5.3.1. Creating a Request in DRR . . . . . . . . . . . . . . 13 5.3.2. Procedure For Running RPR . . . . . . . . . . . . . . 13 5.4. Request And Response Processing . . . . . . . . . . . . . 14 5.4.1. Destination Peer: Receiving a Request And Sending a Response . . . . . . . . . . . . . . . . . . . . . . 14 5.4.2. Sending Peer: Receiving a Response . . . . . . . . . . 14 5.4.3. Relay Peer Processing . . . . . . . . . . . . . . . . 15 6. Discovery Of Relay Peer . . . . . . . . . . . . . . . . . . . 15 7. Optional Methods to Investigate Node Connectivity . . . . . . 15 7.1. Getting Addresses To Be Used As Candidates for DRR . . . . 16 7.2. Public Reachability Test . . . . . . . . . . . . . . . . . 17 8. Security Considerations . . . . . . . . . . . . . . . . . . . 18 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 9.1. A new RELOAD Forwarding Option . . . . . . . . . . . . . . 18 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 18 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19 11.1. Normative References . . . . . . . . . . . . . . . . . . . 19 11.2. Informative References . . . . . . . . . . . . . . . . . . 19 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 20 Jiang, et al. Expires November 30, 2009 [Page 3] Internet-Draft P2PSIP RELAY May 2009 1. Introduction RELOAD [I-D.ietf-p2psip-base]recommends symmetric recursive routing (SRR) for routing messages and describes the extensions that would be required to support additional routing algorithms. Other than SRR, two other routing options: direct response routing (DRR) and relay peer routing (RPR) are also discussed in Appendix B in [I-D.ietf-p2psip-base]. As we show in section 3, DRR and RPR are advantageous over RPR in some scenarios. For example, in a closed network where every node is in the same address realm, DRR performs better than SRR. On the other hand, RPR works better in a network where relay peers are provisioned in advance so that relay peers are publicly reachable in the P2P system. In other scenarios, uisng these three routing modes together is more likely to bring benefits than if SRR is used alone. In this draft, we first discuss the problem statement, then the relationship between the three routing modes is presented. An extension to RELOAD to support DRR and RPR is proposed in Section 5. Section 7 gives some information on how peers can adaptively choose the best routing mode among SRR, DRR and RPR based on existing mechanisms. 2. Terminology 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 RFC 2119 [RFC2119]. We use the terminology and definitions from the Concepts and Terminology for Peer to Peer SIP [I-D.ietf-p2psip-concepts] draft extensively in this document. We also use terms defined in NAT behavior discovery [I-D.ietf-behave-nat-behavior-discovery]. Other terms used in this document are defined inline when used and are also defined below for reference. There are two types of roles in the RELOAD architecture: peer and client. Node is used when describing both peer and client. In discussions specific to behavior of a peer or client, the term peer or client is used instead. o Publicly Reachable: A node is publicly reachable if it can receive unsolicited messages from any other node in the same overlay. Note: "publicly" does not mean that the nodes must be on the public Internet, because the RELOAD protocol may be used in a closed system. Jiang, et al. Expires November 30, 2009 [Page 4] Internet-Draft P2PSIP RELAY May 2009 o Relay Peer: A type of publicly reachable peer that can receive unsolicited messages from all other nodes in the overlay and forward the responses from destination peers towards the request sender. o Direct Response Routing (DRR): refers to a routing mode in which responses to P2PSIP requests are returned to the sending peer directly from the destination peer based on the sending peer's own local transport address(es). For simplicity, the abbreviation DRR is used instead in the following text. o Relay Peer Routing (RPR): refers to a routing mode in which responses to P2PSIP requests are sent by the destination peer to a relay peer who will forward the responses towards the sending peer. For simplicity, the abbreviation RPR is used instead in the following text. o Symmetric Recursive Routing(SRR): refers to a routing mode in which responses follow the same request path in the reverse order to get back to the sending peer. For simplicity, the abreviation SRR is used instead in the following text. 3. Problem Statement RELOAD is expected to work under a great number of application scenarios. The situations where RELOAD is to be deployed differ greatly. For instance, some deployments are global, such as a Skype- like system intendeded to provide public service. Some run in closed networks of small scale. SRR works in any situation, but DRR and RPR may work better in some specific scenarios. 3.1. Overview RELOAD is a simple request-response protocol. After sending a request, a node waits for a response from a destination node. There are several ways for the destination node to send a response back to the source node. In this section, we will provide detailed information on three routing modes: SRR, DRR and RPR. Some assumptions are made in the following illustrations. o Peer A sends a request destined to a peer who is the reponsible peer for Resource-ID k; o Peer X is the root peer being responsible for resource k; o The intermediate peers for the path from A to X are peer B, C, D. 3.1.1. Symmetric Recursive Routing (SRR) For SRR, when the request sent by peer A is received by an intermediate peer B, C or D, each intermediate peer will insert information for the peer from whom they got the request in the via- Jiang, et al. Expires November 30, 2009 [Page 5] Internet-Draft P2PSIP RELAY May 2009 list as described in RELOAD. As a result, the destination peer X will know the exact path which the request has traversed. Peer X will then send back the response in the reverse path by constructing a destination list based on the via-list in the request. A B C D X | Request | | | | |----------->| | | | | | Request | | | | |----------->| | | | | | Request | | | | |----------->| | | | | | Request | | | | |----------->| | | | | | | | | | Response | | | | |<-----------| | | | Response | | | | |<-----------| | | | Response | | | | |<-----------| | | | Response | | | | |<-----------| | | | | | | | | | | | | | SRR works in any situation, especially when there are NATs or firewalls. 3.1.2. Direct Response Routing (DRR) In DRR, peer X receives the request sent by peer A through intermediate peer B, C and D, as in SRR. However, peer X sends the response back directly to peer A based on peer A's local transport address. In this case, the response won't be routed through intermediate peers, therefore transaction efficiency will be better than in SRR. Note, however, DRR may not always work in the presence of NATs or other situations where network connectivity is asymmetric. Jiang, et al. Expires November 30, 2009 [Page 6] Internet-Draft P2PSIP RELAY May 2009 A B C D X | Request | | | | |----------->| | | | | | Request | | | | |----------->| | | | | | Request | | | | |----------->| | | | | | Request | | | | |----------->| | | | | | | | | | | | | | | | | | | | | | | Response| | | |<-----------+------------+------------+------------| | | | | | 3.1.3. Relay Peer Routing (RPR) If peer A knows it is behind a NAT or NATs, and knows one or more relay peers with whom they have a prior connections, peer A can try RPR. Assume A is associated with relay peer R. When sending the request, peer A includes information describing peer R in the request. When peer X receives the request, peer X sends the response to peer R, which forwards it directly to Peer A on the existing connection. Jiang, et al. Expires November 30, 2009 [Page 7] Internet-Draft P2PSIP RELAY May 2009 A B C D X R | Request | | | | | |----------->| | | | | | | Request | | | | | |----------->| | | | | | | Request | | | | | |----------->| | | | | | | Request | | | | | |----------->| | | | | | | Response | | | | | |---------->| | | | | | | | | | | | | | | | Response | | | |<-----------+------------+------------+------------+-----------| | | | | | | 3.2. Scenarios Where DRR can be Used This section lists several scenarios where using DRR would work, and where the increased efficiency would be advantageous. 3.2.1. Managed or Closed P2P System The properties that make P2P technology attractive, such as the lack of need for centralized severs, self-organization, etc. are attractive for managed systems as well as unmanaged systems. Many of these systems are deployed on private network where nodes are in the same address realm and/or can directly route to each other. In such a scenario, the network administrator can indicate preference for DRR in the peer's configuration file. Peers in such a system would always try DRR first, but peers must also support SRR in case DRR fails. 3.2.2. Wireless Scenarios While some mobile deployments may use clients, in mobile networks with full peers, there is an advantage to using DRR to reduce radio battery usage by the intermediary peers. The service provider may recommend in the configuration using DRR based on his knowledge of the topology. Jiang, et al. Expires November 30, 2009 [Page 8] Internet-Draft P2PSIP RELAY May 2009 3.3. Scenarios Where RPR Benefits In this section, we will list several scenarios where using RPR would provide improved performance. Note that RPR allows a shorter response path compared to SRR. 3.3.1. Managed or Closed P2P System As described in Section 3.2.1, many P2P systems run in a closed or managed environment so that network administrators can better manage their system. For example, the network administrator can deploy several relay peers which are publicly reachable in the system and indicate their presence in the configuration file. After learning where these relay peers are, peers behind NATs can use RPR with the help from these relay peers. As with DRR, peers must also support SRR in case RPR fails. 3.3.2. Using Bootstrap Peers as Relay pPeers Bootstrap peers must be publicly reachable in a RELOAD architecture. As a result, one possible architecture would be to use the bootstrap peers as relay peers for use with RPR. The requirements for being a relay peer are publicly reachability and maintaining a direct connection with its client. As such, bootstrap peers are well suited to play the role of relay peers. 3.3.3. Wireless Scenarios While some mobile deployments may use clients, in mobile networks using peers, RPR, like DRR, may reduce radio battery usage by the intermediary peers. The service provider may recommend in the configuration using RPR based on his knowledge of the topology. 4. Relationship Between SRR and DRR/RPR 4.1. How DRR Works DRR is very simple. The only requirement is for the source peers to provide their (publically reachable) transport address to the destination peers, so that the destination peer knows where to send the response. Responses are sent directly to the requesting peer. 4.2. How RPR Works RPR is a bit more complicated than DRR. Peers using RPR must maintain a connection with their relay peer(s). This can be done in the same way as establishing a neighbor connection between peers by Jiang, et al. Expires November 30, 2009 [Page 9] Internet-Draft P2PSIP RELAY May 2009 using the Attach method. A requirement for RPR is for the source peer to convey their relay peer (or peers) information in the request, so the destination peer knows where the relay peer are and send the response to a relay peer first. (Editor's Note: Being a relay peer does not require that the relay peer have more functionality than an ordinary peer. As discussed later, relay peers comply with the same procedure as an ordinary peer to forward messages. The only difference is that there may be a larger traffic burden on relay peers. Relay peers can decide whether to accept a new connection based on their current burden.) 4.3. How These Three Routing Modes Work Together DRR and RPR are not intended to replace SRR. As seen from Section 3, DRR or RPR have better performance in some scenarios, but have limitations as well. As a result, it is better to use these three modes together to adapt to each peer's specific situation. In this section, we give some suggestions on how to transition between the routing modes in RELOAD. Editor's Note: What this draft proposes are extensions to support DRR/RPR. It is not required that the implementation should use the strategy described to choose the appropriate mode. A peer can collect statistical data on the success of the different routing modes based on previous transactions. Based on the data, the peer will have a clearer view about the success rate of different routing modes. Other than the success rate, the peer can also get data of fine granularity, for example, the number of retransmission the peer needs to achieve a desirable success rate. A typical strategy for the node is as follows. A node chooses to start with DRR or RPR. Based on the success rate as seen from the lost message statistics, the node can either continue to offer DRR/ RPR first or switch to SRR. The node can decide whether to try DRR or RPR based on other information such as configuration file information. If an overlay runs within a private network and all nodes in the system can reach each other directly, nodes may send most of the transactions with DRR. if a relay peer is provided by the service provider, nodes may prefer RPR over SRR. Jiang, et al. Expires November 30, 2009 [Page 10] Internet-Draft P2PSIP RELAY May 2009 5. Extensions to RELOAD Adding support for DRR and RPR requires extensions to the current RELOAD protocol. In this section, we detail the changes required to the protocol, including changes to message structure and to message processing. 5.1. Basic Requirements All peers implementing DRR or RPR MUST support SRR. All peers MUST be able to process requests for routing in SRR, and MAY support DRR or RPR routing requests. Peers that do not support or do not wish to provide DRR or RPR MAY reject these messages. 5.2. Modification To RELOAD Message Structure RELOAD provides an extensible framework to accommodate future extensions. In this section, we define a ForwardingHeader structure to support DRR and RPR modes. Additionally we present a state- keeping flag to inform intermediate peers if they are allowed to not maintain state for a transaction. 5.2.1. State-keeping Flag RELOAD allows intermediate peers to maintain state in order to implement SRR, for example for implementing hop-by-hop retransmission. If DRR or RPR is used, the response will not follow the reverse path, and the state in the intermediate peers won't be cleared until such state expires. In order to address this issue, we propose a new flag, state-keeping flag, in the message header to indicate whether the state should be maintained in the intermediate peers. [Editor's note: this flag will be useful for other cases so the authors suggest adding it in the base draft directly as a flag in the Forwarding Header (section 5.3.2 of that draft)] flag : 0x3 IGNORE-STATE-KEEPING If IGNORE-STATE-KEEPING is set, any peer receiving this message and which is not the destination of the message MUST forward the message as usual, but MUST not maintain any internal state. [Editors Note: This language needs work, but we are leaving it informal here, expecting it to be included in the base draft. Need to specify how Jiang, et al. Expires November 30, 2009 [Page 11] Internet-Draft P2PSIP RELAY May 2009 this interacts with hop-by-hop reliability, and if not included in the base, behavior if unsupported] 5.2.2. Extensive Routing Mode This draft introduces a new forwarding option for an extensive routing mode. This option conforms to the description in section 5.3.2.4 in [I-D.ietf-p2psip-base]. We first define a new type to define the new option, EXTENSIVE_ROUTING_MODE_TYPE: The new routing mode specifies that the message SHOULD be rejected in the case it is not understood by intermediate peers, and so the DESTINATION_CRITICAL flag is used. [Editors Note: Is this the right behavior here?] flag : 0x02 DESTINATION_CRITICAL The option value will be illustrated in the following figure, defining the ExtensiveRoutingModeOption structure: enum { 0x0, 0x01 (DRR), 0x02(RPR), 255} RouteMode; struct { RouteMode routemode; OverlayLink transport; IpAddressPort ipaddressport; Destination destination<1..2>; } ExtensiveRoutingModeOption; The above structure reuses: Transport, Destination and IpAddressPort structure defined in section 5.3.1.1 and 5.3.2.2 in [I-D.ietf-p2psip-base]. Route mode: refers to which type of routing mode is indicated to the destination peer. Currently, only DRR and RPR are defined. Transport: refers to the transport type which is used to deliver responses from the destination peer to the sending peer or the relay peer; Jiang, et al. Expires November 30, 2009 [Page 12] Internet-Draft P2PSIP RELAY May 2009 IpAddressPort: refers to the transport address the destination peer is using to send the response to. Destination: refers to the relay peer or the sending node itself. if the routing mode is DRR, then the destination only contains the sending node's node-id; If the routing mode is RPR, then the destination contains two destinations, which are the relay peer's node-id and the sending node's node-id; 5.3. Creating a Request 5.3.1. Creating a Request in DRR When using DRR for a transaction, the sending peer MUST set the IGNORE-STATE-KEEPING flag in the ForwardingHeader. Additionally, the peer MUST construct and include a ForwardingOptions structure in the ForwardingHeader. When constructing the ForwardingOption structure, the fields MUST be set as follows: o The type MUST be set to EXTENSIVE_ROUTING_MODE_TYPE o The ExtensiveRoutingModeOption structure MUST be used for the option field within the ForwardingOptions structure. The fields MUST be defined as follows: * RouteMode set to 0x01 (DRR) * Transport set as appropriate for the sender * IPAddressPort set to the peer's associated transport address * The destination structure MUST contain one vaule, defined as type peer and set with the sending peer's own values 5.3.2. Procedure For Running RPR When using RPR for a transaction, the sending peer MUST set the IGNORE- STATE-KEEPING flag in the ForwardingHeader. Additionally, the peer MUST construct and include a ForwardingOptions structure in the ForwardingHeader. When constructing the ForwardingOption structure, the fields MUST be set as follows: o The type MUST be set to EXTENSIVE_ROUTING_MODE_TYPE o The ExtensiveRoutingModeOption structure MUST be used for the option field within the ForwardingOptions structure. The fields MUST be defined as follows: * RouteMode set to 0x02 (RPR) * Transport set as appropriate for the relay peer * IPAddressPort set to the transport address of the relay peer that the sender wishes the message to be relayed through * Destination structure MUST contain two values. The first MUST be defined as type peer and set with the values for the relay peer. The second MUST be defined as type peer and set with the Jiang, et al. Expires November 30, 2009 [Page 13] Internet-Draft P2PSIP RELAY May 2009 sending peer's own values 5.4. Request And Response Processing This section gives normative text for message processing after DRR and RPR are introduced. Here, we only describe the additional procedures for supporting DRR and RPR. Please refer to [I-D.ietf-p2psip-base] for RELOAD base procedures. 5.4.1. Destination Peer: Receiving a Request And Sending a Response When the destination peer receives a request, it will check the options in the forwarding header. If the destination peer can not understand extensive_routing_mode option in the request, it MUST attempt to use SRR to return a error response to the sending peer. If the routing mode is DRR, the peer MUST construct the Destination list for the response with only one entry, using the sending peer's node-id from the option in the request as the value. If the routing mode is RPR, the destination peer MUST construct a Destination list for the response with two entries. The first MUST be set to the relay peer node-id from the option in the request and the second MUST be the sending node node-id from the option of the request. In the event that the routing mode is set to DRR and there is not exactly one destination, or the routing mode is set to RPR and there are not exactly two destinations the destination peer MUST try to send a error response to the sending peer using SRR. After the peer constructs the destination list for the response, it sends the response to the transport address which is indicated in the IpAddressPort field in the option using the specific transport mode in the option. 5.4.2. Sending Peer: Receiving a Response Upon receiving a response, the peer follows the rules in [I-D.ietf-p2psip-base]. The peer should note if DRR worked in order to decide if to offer DRR again. If the peer does not receive a response until the timeout it SHOULD resend the request using SRR. If the sender used RPR and does not get a response until the timeout, it MAY either resend the message using RPR but with a different relay peer (if available), or resend the message using SRR. Jiang, et al. Expires November 30, 2009 [Page 14] Internet-Draft P2PSIP RELAY May 2009 5.4.3. Relay Peer Processing Relay peers are designed to forward responses to nodes who are not publicly reachable. For the routing of the response, this draft still uses the destination list. The only difference from SRR is that the destination list is not the reverse of the via-list, instead it is constructed from the forwarding option as described below. When a relay peer receives a response, it MUST follow the rules in [I-D.ietf-p2psip-base]. It receives the response, validates the message, re-adjust the destination-list and forward the response to the next hop in the destination list based on the connection table. There is no added requirement for relay peer. However, it MUST use the second field in the destination of the ExtensiveRoutingModeOption to determine the destination. 6. Discovery Of Relay Peer There are several ways to distribute the information about relay peers throughout the overlay. P2P network providers can deploy some relay peers and advertise them in the configuration file. With the configuration file at hand, peers can get relay peers to try RPR. Another way is to consider relay peer as a service and then some service advertisement and discovery mechanism can also be used for discovering relay peers, for example, using the same mechanism as used in TURN server discovery in base RELOAD [I-D.ietf-p2psip-base]. Editor note: This section will be extended if we adopt RPR, but like other configuration information, there may be many ways to obtain this. 7. Optional Methods to Investigate Node Connectivity This section is for informational purposes only for the cases when the configuration information does not specify if DRR or RPR can be used. It summarizes some methods which can be used for a node to determine its own network location compared with NAT. These methods help a node decide which routing mode it may wish to try. Note that there is no foolproof way to determine if a node is publically reachable, other than via out-of-band mechanisms. As such, peers using these mechanisms may be able to optimize traffic, but must be able to resort to SRR routing in the event other routing mechanisms fail or testing falsely indicates a node is public. For DRR and RPR to function correctly, a node may attempt to determine whether it is publicly reachable. If it is not, RPR should Jiang, et al. Expires November 30, 2009 [Page 15] Internet-Draft P2PSIP RELAY May 2009 be chosen to route the response with the help from relay peers, or the peers should fall back to SRR. If the peer believes it is publically reachable, DRR may be attempted. NATs and firewalls are two major contributors preventing DRR and RPR from functioning properly. There are a number of techniques by which a node can get its reflexive address on the public side of the NAT. After obtaining the reflexive address, a peer can perform further tests to learn whether the reflexive address is publicly reachable. If the address appears to be publicly reachable, the nodes to which the address belongs can use DRR for responses and also can be a candidate to serve as a relay peer. Nodes which are not publicly reachable may still use RPR to shorten the response path with the help from relay peers. There are a number of techniques with a node can ues to obtain its reflexive address which is on the public side of the NAT. After obtaining the reflexive address, a peer can perform further tests to learn whether the reflexive address is publicly reachable. If the address proves publicly reachable, the nodes to which the address belongs can use DRR for responses and also can be a candidate for relay peer. Nodes that are not publicly reachable may still use RPR to shorten response path with the help of relay peers. Some conditions are unique in P2PSIP architecture which could be leveraged to facilitate the tests. In P2P overlay network, each node only has partial a view of the whole network, and knows of a few nodes in the overlay. P2P routing algorithms can easily deliver a request from a sending node to a peer with whom the sending node has no direct connection. This makes it easy for a node to ask get other nodes to send unsolicited messages back to the requester. In the following sections, we first introduce several ways for a node to get the addresses needed for the further tests. Then a test for learning whether a peer may be publicly reachable is proposed. 7.1. Getting Addresses To Be Used As Candidates for DRR In order to test whether a peer may be publicly reachable, the node should first get one or more addresses which will be used by other nodes to send him messages directly. This address is either a local address of a node or a translated address which is assigned by a NAT to the node. STUN is used to get a reflexive address on the public side of a NAT with the help of STUN servers. There is also a STUN usage [I-D.ietf-behave-nat-behavior-discovery] to discover NAT behavior. Under RELOAD architecture, a few infrastructure servers can be leveraged for this usage, such as enrollment servers, diagnostic Jiang, et al. Expires November 30, 2009 [Page 16] Internet-Draft P2PSIP RELAY May 2009 servers, bootstrap servers, etc. The node can use a STUN Binding request to one of STUN servers to trigger a STUN Binding response which returns the reflexive address from the server's perspective. If the reflexive transport address is the same as the source address of the Binding request, the node can determine that there likely is no NAT between him and the chosen infrastructure server. (Certainly, in some rare cases, the allocated address happens to be the same as the source address. Further tests will detect this case and rule it out in the end.). Usually, these infrastructure severs are publicly reachable in the overlay, so the node can be considered publicly reachable. On the other hand, with the techniques in [I-D.ietf-behave-nat-behavior-discovery], a node can also decide whether it is behind NAT with endpoint-independent mapping behavior. If the node is behind a NAT with endpoint- independent mapping behavior, the reflexive address should also be a candidate for further tests. UPnP-IGD is a mechanism that a node can use to get the assigned address from its residential gateway and after obtaining this address to communicate it with other nodes, the node can receive unsolicited messages from outside, even though it is behind a NAT. So the address obtained through the UPnP mechanism should also be used for further tests. Another way that a node behind NAT can use to learn its assigned address by NAT is NAT-PMP. Like in UPnP-IGD, the address obtained using this mechanism should also be tested further. The above techniques are not exhaustive. These techniques can be used to get candidate transport addresses for further tests. 7.2. Public Reachability Test Using the transport addresses obtained by means of the above techniques, a node can start a test to learn whether the candidate transport address is publicly reachable. The basic idea for the test is for a node to send a request and expect another node in the overlay to send back a response. If the response is received by the sending node successfully and also the node giving the response has no direct connection with the sending node, the sending node can determine that the address is probably publicly reachable and hence the node may be publicly reachable at the tested transport address. In P2P overlay, a request is routed through the overlay and finally a destination peer will terminate the request and give the response. In a large system, there is a high probability that the destination peer has no direct connection with the sending node. Especially in Jiang, et al. Expires November 30, 2009 [Page 17] Internet-Draft P2PSIP RELAY May 2009 RELOAD architecture, every node maintains a connection table. So it is easier for a node to check whether it has direct connection with another node. Note: Currently, no existing message in base RELOAD can achieve the test. In our opinion, this kind of test is within diagnostic scope, so authors hope WG can define a new diagnostic message to do that. We don't plan to define the message in this document, for the objective of this draft is to propose an extension to support DRR and RPR. The following text is informative. If a node wants to test whether its transport address is publicly reachable, it can send a request to the overlay. The routing for the test message would be different from other kinds of requests because it is not for storing/fetching something to/from the overlay or locating a specific node, instead it is to get a peer who can deliver the sending node an unsolicited response and which has no direct connection with him. Each intermediate peer receiving the request first checks whether it has a direct connections with the sending peer. If there is a direct connection, the request is routed to the next peer. If there is no direct connection, the intermediate peer terminates the request and sends the response back directly to the sending node with the transport address under test. After performing the test, if the peer determines that it may be publicly reachable, it can try DRR in subsequent transaction, and may advertise that it is a candidate to serve as a relay peer. 8. Security Considerations TBD 9. IANA Considerations 9.1. A new RELOAD Forwarding Option A new RELOAD Forwarding Option type is add to the Registry. Type: 0x1 - extensive_routing_mode 10. Acknowledgements Authors would like to thank Ted Hardie, Narayanan Vidya and Dondeti Lakshminath for their comments. Special thanks go to Bruce Lowekamp for his constructive comments. Jiang, et al. Expires November 30, 2009 [Page 18] Internet-Draft P2PSIP RELAY May 2009 11. References 11.1. Normative References [I-D.ietf-p2psip-base] Jennings, C., Lowekamp, B., Rescorla, E., Baset, S., and H. Schulzrinne, "REsource LOcation And Discovery (RELOAD) Base Protocol", draft-ietf-p2psip-base-02 (work in progress), March 2009. [I-D.ietf-p2psip-concepts] Bryan, D., Matthews, P., Shim, E., Willis, D., and S. Dawkins, "Concepts and Terminology for Peer to Peer SIP", draft-ietf-p2psip-concepts-02 (work in progress), July 2008. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. 11.2. Informative References [ChurnDHT] Rhea, S., "Handling Churn in a DHT", Proceedings of the USENIX Annual Technical Conference. Handling Churn in a DHT, June 2004. [I-D.ietf-behave-nat-behavior-discovery] MacDonald, D. and B. Lowekamp, "NAT Behavior Discovery Using STUN", draft-ietf-behave-nat-behavior-discovery-04 (work in progress), July 2008. [I-D.ietf-behave-tcp] Guha, S., Biswas, K., Ford, B., Sivakumar, S., and P. Srisuresh, "NAT Behavioral Requirements for TCP", draft-ietf-behave-tcp-08 (work in progress), September 2008. [I-D.lowekamp-mmusic-ice-tcp-framework] Lowekamp, B. and A. Roach, "A Proposal to Define Interactive Connectivity Establishment for the Transport Control Protocol (ICE-TCP) as an Extensible Framework", draft-lowekamp-mmusic-ice-tcp-framework-00 (work in progress), October 2008. [RFC4787] Audet, F. and C. Jennings, "Network Address Translation (NAT) Behavioral Requirements for Unicast UDP", BCP 127, RFC 4787, January 2007. Jiang, et al. Expires November 30, 2009 [Page 19] Internet-Draft P2PSIP RELAY May 2009 Authors' Addresses XingFeng Jiang Huawei Tech. Huihong Mansion,No.91 Baixia Rd. Nanjing, Jiangsu 210001 P.R.China Phone: +86(25)84565867 Email: jiang.x.f@huawei.com Roni Even Gesher Erove 14 David Hamelech Tel Aviv 64953 Israel Email: ron.even.tlv@gmail.com David A. Bryan Cogent Force, LLC Williamsburg, Virginia United States of America Email: dbryan@ethernot.org Jiang, et al. Expires November 30, 2009 [Page 20]