P2PSIPInternet Engineering Task Force (IETF) N.Zong, Ed. Internet-DraftZong Request for Comments: 7264 X. JiangIntended status:Category: Standards Track R. EvenExpires: April 24, 2014ISSN: 2070-1721 Huawei Technologies Y. Zhang CoolPadOctober 21, 2013/ China Mobile June 2014 An Extension to the REsource LOcation And Discovery (RELOAD) Protocol to Support Relay Peer Routingdraft-ietf-p2psip-rpr-11Abstract This documentproposesdefines an optional extension to the REsource LOcation And Discovery (RELOAD) protocol to support the relay peer routing mode. RELOAD recommends symmetric recursive routing for routing messages. The new optional extension provides a shorter route forresponsesresponses, thereby reducingtheoverhead on intermediatepeers andpeers. This document also describesthepotentialusecases where this extension can be used. Status of This Memo ThisInternet-Draftissubmitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documentsan Internet Standards Track document. This document is a product of the Internet Engineering Task Force (IETF).Note that other groups may also distribute working documents as Internet-Drafts. The listIt represents the consensus ofcurrent Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents validthe IETF community. It has received public review and has been approved fora maximumpublication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741. Information about the current status ofsix monthsthis document, any errata, and how to provide feedback on it may beupdated, replaced, or obsoleted by other documentsobtained atany 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 April 24, 2014.http://www.rfc-editor.org/info/rfc7264. Copyright Notice Copyright (c)20132014 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . 3....................................................3 2. Terminology. . . . . . . . . . . . . . . . . . . . . . . . . 3.....................................................4 3. Overview. . . . . . . . . . . . . . . . . . . . . . . . . . 4........................................................5 3.1. RPR. . . . . . . . . . . . . . . . . . . . . . . . . . . 4........................................................5 3.2. ScenarioswhereWhere RPRcan be used . . . . . . . . . . . . . 5Can Be Used ............................6 3.2.1. Managed orclosedClosed P2Psystems . . . . . . . . . . . . 5Systems .......................6 3.2.2. Usingbootstrap nodesBootstrap Nodes asrelay peers . . . . . . . . 5Relay Peers ................7 3.2.3. Wirelessscenarios . . . . . . . . . . . . . . . . . 6Scenarios ..................................7 4. Relationship between SRR and RPR. . . . . . . . . . . . . . 6................................7 4.1. How RPRworks . . . . . . . . . . . . . . . . . . . . . . 6Works ..............................................7 4.2. How SRR and RPRwork together . . . . . . . . . . . . . . 6Work Together ..............................7 5.Comparison on cost of SRR and RPR . . . . . . . . . . . . . . 7 5.1. Closed or managed networks . . . . . . . . . . . . . . . 7 5.2. Open networks . . . . . . . . . . . . . . . . . . . . . . 7 6.RPRextensionsExtensions to RELOAD. . . . . . . . . . . . . . . . . . 8 6.1.........................................8 5.1. Basicrequirements . . . . . . . . . . . . . . . . . . . 8 6.2.Requirements .........................................8 5.2. Modification to RELOADmessage structure . . . . . . . . 8 6.2.1. State-keeping flag . . . . . . . . . . . . . . . . . 8 6.2.2.Message Structure ...................8 5.2.1. Extensiverouting mode . . . . . . . . . . . . . . . 9 6.3.Routing Mode ..............................8 5.3. Creating arequest . . . . . . . . . . . . . . . . . . . 9 6.3.1.Request .........................................9 5.3.1. Creating arequestRequest for RPR. . . . . . . . . . . . . 9 6.4...........................9 5.4. Request andresponse processing . . . . . . . . . . . . . 10 6.4.1.Response Processing ............................9 5.4.1. Destinationpeer: receivingPeer: Receiving arequestRequest andsendingSending aresponse . . . . . . . . . . . . . . . . . . . . . . 10 6.4.2.Response ..................................9 5.4.2. Sendingpeer: receivingPeer: Receiving aresponse . . . . . . . . . 11 6.4.3.Response .................10 5.4.3. Relaypeer processing . . . . . . . . . . . . . . . . 11 7.Peer Processing ..............................10 6. Overlayconfiguration extension . . . . . . . . . . . . . . . 11 8.Configuration Extension ................................10 7. Discovery ofrelay peers . . . . . . . . . . . . . . . . . . 11 9.Relay Peers .......................................11 8. Security Considerations. . . . . . . . . . . . . . . . . . . 11 10.........................................11 9. IANA Considerations. . . . . . . . . . . . . . . . . . . . . 12 10.1.............................................11 9.1. AnewNew RELOAD Forwarding Option. . . . . . . . . . . . . 12 11.............................11 10. Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . 12 12................................................11 11. References. . . . . . . . . . . . . . . . . . . . . . . . . 12 12.1.....................................................12 11.1. Normative References. . . . . . . . . . . . . . . . . . 12 12.2......................................12 11.2. Informative References. . . . . . . . . . . . . . . . . 12 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 13...................................12 Appendix A. OptionalmethodsMethods toinvestigate peer connectivity . 13 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14Investigate Peer Connectivity .....13 Appendix B. Comparison of Cost of SRR and RPR .....................14 B.1. Closed or Managed Networks .................................14 B.2. Open Networks ..............................................15 1. Introduction The REsource LOcation And Discovery (RELOAD) protocol[I-D.ietf-p2psip- base][RFC6940] recommends symmetric recursive routing (SRR) for routing messages and describes the extensions that would be required to support additional routing algorithms.Other thanIn addition to SRR, two other routingoptions:options -- direct response routing (DRR) and relay peer routing (RPR) -- are also discussed in Appendix A of[I-D.ietf-p2psip-base].[RFC6940]. As we show insectionSection 3, RPR is advantageous over SRR in some scenariosreducingin that RPR can reduce load (CPU and link bandwidth) on intermediate peers. 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, using a combination of RPR and SRR together is more likely tobringprovide benefits than if SRR is used alone. Note that in thisdocument,document we focus on the RPRroutingmode and its extensions to RELOAD to produce a standalone solution. Please refer toDRR document [I-D.ietf-p2psip-drr][RFC7263] for details on the DRRroutingmode. We first discuss the problem statement in Section3, then how3. How to combine RPR and SRR is presented in Section 4.In Section 5, we give comparison on the cost of SRR and RPR in both managed and open networks.An extension to RELOAD to support RPR isproposeddefined in Section6.5. Discovery of relay peers is introduced in Section 7. Some optional methods to check peer connectivity are introduced in Appendix A. In Appendix B, we give a comparison of the cost of SRR and RPR in both managed and open networks. 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 usetheterminology and definitions from theRELOADbasedraft [I-D.ietf-p2psip-base]RELOAD specification [RFC6940] extensively in this document. We also use terms defined in the NAT behavior discovery document [RFC5780]. Other terms used in this document are defined inline when used and are also defined below for reference. Publicly Reachable: A peer is publicly reachable if it can receive unsolicited messages from any other peer in the same overlay. Note:"publicly""Publicly" does not mean that the peers must be on the public Internet, because the RELOAD protocol may be used in a closed network. Relay Peer: A relay peer is a type of publicly reachable peer that can receive unsolicited messages from all other peers in the overlay and forward the responses from destination peers towards the sender of the request. Relay Peer Routing (RPR): "RPR" refers to a routing mode in which responses toP2PSIPPeer-to-Peer SIP (P2PSIP) requests are sent by the destination peer to a relay peer transport addresswhothat will forward the responses towards the sending peer. For simplicity, the abbreviationRPR"RPR" is usedinsteadin the rest ofthethis document. Symmetric Recursive Routing (SRR): "SRR" refers to a routing mode in which responses follow the reverse path of the request to get to the sending peer. For simplicity, the abbreviationSRR"SRR" is usedinsteadin the rest of this document. Direct Response Routing (DRR): "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 in the rest of this document. 3. Overview 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 aSkype- likeSkype-like system intended to provide public service, while others run in small-scale closednetworks of small scale.networks. SRR works in any situation, but RPR may work better in some specific scenarios. 3.1. RPR RELOAD is a simple request-response protocol. After sending a request, a peer waits for a response from a destination peer. There are several ways for the destination peer to send a response back to the source peer. In this section, we will provide detailed information on RPR. Note that the same types of illustrative settings can be found inDRR document [I-D.ietf-p2psip-drr].Appendix B.1 of [RFC7263]. If peer A knows it is behind a NAT orNATs,NATs and knows one or more relay peers with whom they haveahad prior connections, peer A can try RPR. Assume that peer A is associated with relay peer R. When sending the request, peer A includes information describing peerRR's transport address in the request. When peer X receives the request, peer X sends the response to peer R, which forwards it directly toPeerpeer A on the existing connection. Figure 1 illustrates RPR. Note that RPR also allows a shorter route for responses compared toSRR, whichSRR; this means less overhead on intermediate peers. Establishing a connection to the relay withTLSTransport Layer Security (TLS) requires multiple round trips. Please refer toSection 5Appendix B for a cost comparison between SRR and RPR. A B C D X R | Request | | | | | |----------->| | | | | | | Request | | | | | |----------->| | | | | | | Request | | | | | |----------->| | | | | | | Request | | | | | |----------->| | | | | | | Response | | | | | |---------->| | | | | Response | | |<-----------+------------+------------+------------+-----------| | | | | | | Figure1.1: RPRrouting modeMode This technique relies on the relative population of peers such as peer A that require relay peers, and peers such as peer R that are capable of serving asarelay peers. It also requires a mechanism to enable peers to know which peers can be used as their relays. This mechanism may be based onconfiguration,configuration -- forexampleexample, as part of the overlayconfigurationconfiguration, an initial list of relay peers can be supplied. Another option isina responsemessage,message in which the responding peer can announce that it can serve as a relay peer. 3.2. ScenarioswhereWhere RPRcan be usedCan Be Used In this section, we will list several scenarios where using RPR wouldprovide an improvedimprove performance. 3.2.1. Managed orclosedClosed P2PsystemsSystems As described in Section 3.2.1 ofDRR draft [I-D.ietf-p2psip-drr],[RFC7263], 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 peerswhichthat 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 withthehelp from these relay peers. Peers MUST also support SRR in case RPR fails. Another usage is to install relay peers on the managed networkboundaryboundary, allowing external peers to send responses to peers inside the managed network. 3.2.2. Usingbootstrap nodesBootstrap Nodes asrelay peersRelay Peers Bootstrap nodes are typically publicly reachable in a RELOAD architecture. As a result, one possiblearchitecturescenario would be to use the bootstrap nodes as relay peers for use with RPR. A relay peer SHOULD be publicly accessible and maintain a direct connection with its client. As such, bootstrap nodes are well suited to play the role of relay peers. 3.2.3. WirelessscenariosScenarios In some mobile deployments, using RPR may helpreducingreduce radio battery usage and bandwidth by the intermediate peers. The service provider may recommend using RPR based onhis/herhis knowledge of the topology. 4. Relationship between SRR and RPR 4.1. How RPRworksWorks 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 peersbyusing the Attachmethod.method [RFC6940]. A requirement for RPR isforthat the source peertoconveytheirits relaypeerpeer's (orpeers)peers') transportaddressaddress(es) in therequest,request so the destination peer knows where the relaypeerpeers are and will send the response to a relay peer first. The requestSHOULD includeMUST also include the requestingpeer information enablingpeer's Node-ID or IP address, which enables the relay peer to route the response back to the right peer. Note that being a relay peer does not require that the relay peerhashave more functionality than an ordinary peer.As discussed later, relayRelay 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.2. How SRR and RPRwork togetherWork Together RPR is not intended to replace SRR. It is better to use these two modes together to adapt to each peer's specific situation. Note that the informative suggestionsonfor how to transition between SRR and RPR are the samewith that ofas those for DRR. Please refer toDRR document [I-D .ietf-p2psip-drr]Section 4.2 of [RFC7263] for more details. If a relay peer is provided by the service provider, peersMAYSHOULD prefer RPR over SRR.Otherwise, usingHowever, RPR SHOULD NOT bediscouragedused in the open Internet or if the administrator does not feel hehavehas enough information about theoverlay.overlay network topology. A new overlay configuration element specifying the usage ofDRRRPR is defined in Section7.6. 5.Comparison on cost of SRR andRPRThe major advantage of the use ofExtensions to RELOAD Adding support for RPRis that it reducesrequires extensions to thenumber of intermediate peers traversed by the response. By doing that, it reducescurrent RELOAD protocol. In this section, we define theload on those peers' resources like processingrequired extensions, including extensions to message structure andcommunication bandwidth.message processing. 5.1.Closed or managed networks As described in Section 3, many P2P systems run in a closed or managed environment (e.g., carrier networks) so that network administrators would know that they could safely use RPR. The number of hopsBasic Requirements All peers MUST be able to process requests fora responserouting in SRR and MAY support RPRare listedrouting requests. 5.2. Modification to RELOAD Message Structure RELOAD provides an extensible framework to accommodate future extensions. In this section, we define an RPR routing option for the extensive routing mode specified in [RFC7263]. The state-keeping flag [RFC7263] is needed to support thefollowing table.RPR mode. 5.2.1. Extensive Routing Mode The new RouteMode value for RPR is defined below for the ExtensiveRoutingModeOption structure: enum {(0),DRR(1),RPR(2),(255)} RouteMode; struct { RouteMode routemode; OverlayLinkType transport; IpAddressPort ipaddressport; Destination destinations<1..2^8-1>; } ExtensiveRoutingModeOption; Note that thesame illustrative settings can be found inDRRdocument [I-D.ietf-p2psip-drr]. Mode | Success | No. of Hops | No. of Msgs ---------------------------------------------------- SRR | Yes | log(N) | log(N) RPR | Yes | 2 | 2 RPR(DTLS) | Yes | 2 | 7+2 Table 1. Comparison of SRR and RPRvalue inclosed networks From the above comparison, itRouteMode isclear that: 1) In most cases when N > 4 (2^2), RPR uses fewer hops than SRR. Using a shorter route means less overhead and resource usage on intermediate peers,defined in [RFC7263]. RouteMode: refers to which type of routing mode isan important consideration for adopting RPR in the cases whereindicated to theresources such as CPU and bandwidth are limited, e.g.,destination peer. OverlayLinkType: refers to thecase of mobile, wireless networks. 2) Intransport type that is used to deliver responses from thecases when N > 512 (2^9), RPR also uses fewer messages than SRR. 3) Indestination peer to thecases when N < 512, RPR uses more messages than SRR (but still uses fewer hops than SRR). Sorelay peer. IpAddressPort: refers to theconsideration on whether using RPR or SRR depends on other factors like using less resources (bandwidth and processing) fromtransport address that theintermediate peers. Section 4 providesdestination peer should usecases where RPR has better chancefor sending responses. This will be a relay peer address for RPR. Destination: refers towork or wheretheintermediary resources considerations are important. 5.2. Open networks In open networks (e.g., Internet) where RPRrelay peer itself. If the routing mode isnot guaranteed to work, RPR can fall back to SRR if it fails after trial, as described in Section 4. Based onRPR, then thesame settings of Section 5.1,destination contains two items: thenumber of hops, number of messagesrelay peer's Node-ID and the sending peer's Node-ID. 5.3. Creating a Request 5.3.1. Creating a Request for RPR When using RPR for aresponsetransaction, the sending peer MUST set the IGNORE-STATE-KEEPING flag inSRRthe ForwardingHeader. Additionally, the peer MUST construct andRPR are listedinclude a ForwardingOption structure in thefollowing table. Mode | Success | No. of Hops | No. of Msgs ----------------------------------------------------------- SRR | Yes | log(N) | log(N) RPR | Yes | 2 | 2 | Fail&Fall back to SRR | 2+log(N)| 2+log(N) RPR(DTLS) | Yes | 2 | 7+2 | Fail&Fall back to SRR | 2+log(N)| 9+log(N) Table 2. Comparison of SRR and RPR in open networks FromForwardingHeader. When constructing theabove comparison, it canForwardingOption structure, the fields MUST beobserved that trying to first use RPR could still provide an overall number of hops lower than directly using SRR. The detailed analysis is sameset asDRR case and canfollows: 1) The type MUST befound in DRR document [I-D.ietf-p2psip-drr]. 6. RPR extensionsset toRELOAD Adding supportextensive_routing_mode. 2) The ExtensiveRoutingModeOption structure MUST be used forRPR requires extensions to the current RELOAD protocol. In this section, we definetheextensions required tooption field within theprotocol, including extensions to message structure and to message processing. 6.1. Basic requirements All peersForwardingOption structure. The fields MUST beabledefined as follows: 2.1) routemode set toprocess requests0x02 (RPR). 2.2) transport set as appropriate forrouting in SRR, and MAY support RPR routing requests. 6.2. Modification to RELOAD message structure RELOAD provides an extensible framework to accommodate future extensions. In this section, we define a ForwardingOption structure and present a state-keeping flagthe relay peer. 2.3) ipaddressport set tosupport RPR mode. 6.2.1. State-keeping flag flag : 0x08 IGNORE-STATE-KEEPING If IGNORE-STATE-KEEPING is set, anythe transport address of the relay peerreceiving this message andthrough whichis notthedestination ofsender wishes the messageSHOULD forwardrelayed. 2.4) The destination structure MUST contain two values. The first MUST be defined as type "node" and set with themessagevalues for the relay peer. The second MUST be defined as type "node" and set with thefull via_listsending peer's own values. 5.4. Request andSHOULD NOT maintain any internal state. 6.2.2. Extensive routing mode We first define a new type to define the new option, extensive_routing_mode: The option value is illustrated as below, defining the ExtensiveRoutingModeOption structure: enum {(0),DRR(1),RPR(2),(255)} RouteMode; struct { RouteMode routemode; OverlayLinkType transport; IpAddressPort ipaddressport; Destination destinations<1..2^8-1>; } ExtensiveRoutingModeOption; Note that DRR value in RouteMode is defined in DRR document [I-D .ietf-p2psip-drr]. RouteMode: refers to which type of routing modeResponse Processing This section gives normative text for message processing after RPR isindicated to the destination peer. OverlayLinkType: refers tointroduced. Here, we only describe thetransport type which is usedadditional procedures for supporting RPR. Please refer todeliver responses from[RFC6940] for RELOAD base procedures. 5.4.1. Destination Peer: Receiving a Request and Sending a Response When the destination peertoreceives a request, it will check therelay peer. IpAddressPort: refers tooptions in thetransport address thatforwarding header. If the destination peershouldcannot understand the extensive_routing_mode option in the request, it MUST attempt to use SRR tosend thereturn an "Error_Unknown_Extension" responseto. This will be a relay peer address for RPR. Destination: refers(defined in Sections 6.3.3.1 and 14.9 of [RFC6940]) to therelay peer itself.sending peer. If the routing mode is RPR,thenthe destinationcontains two destinations, which are the relay peer's Node-ID and the sending peer's Node-ID. 6.3. Creating a request 6.3.1. Creatingpeer MUST construct arequest for RPR When using RPRdestination_list fora transaction,thesending peerresponse with two entries as defined in [RFC6940]. The first entry MUST be set to theIGNORE-STATE-KEEPING flagrelay peer's Node-ID from the option in theForwardingHeader. Additionally,request, and thepeersecond entry MUSTconstruct and include a ForwardingOptions structurebe the sending peer's Node-ID from the option in theForwardingHeader. When constructingrequest. In theForwardingOption structure,event that thefields MUST be set as follows: 1) The type MUST be set to extensive_routing_mode. 2) The ExtensiveRoutingModeOption structure MUST be used for the option field within the ForwardingOptions structure. The fields MUST be defined as follows: 2.1) routemode set to 0x02 (RPR). 2.2) transport set as appropriate for the relay peer. 2.3) ipaddressport set to the transport address of the relay peer that the sender wishes the message to be relayed through. 2.4) destination structure MUST contain two values. The first MUST be defined as type node and set with the values for the relay peer. The second MUST be defined as type node and set with the sending peer's own values. 6.4. Request and response processing This section gives normative text for message processing after RPR is introduced. Here, we only describe the additional procedures for supporting RPR. Please refer to [I-D.ietf-p2psip-base] for RELOAD base procedures. 6.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 using SRR to return an "Error_Unknown_Extension" response (defined in Section 6.3.3.1 and Section 14.9 of [I-D.ietf-p2psip- base]) to the sending peer. 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 peer Node-ID from the option of the request. In the event that the routing mode isrouting mode is set to RPR and there are not exactly two destinations, the destination peer MUST try to send an "Error_Unknown_Extension" response (defined inSectionSections 6.3.3.1 andSection14.9 of[I-D.ietf-p2psip-base])[RFC6940]) to the sending peer using SRR. After the peer constructs the destination_list for the response, it sends the response to the transportaddressaddress, which is indicated in the ipaddressport field in the option using the specific transport mode in theForwardingoption.ForwardingOption. If the destination peer receives a retransmit with SRR preference on the message it is trying toresponserespond to now, the responding peer SHOULD abort the RPR response and use SRR.6.4.2.5.4.2. Sendingpeer: receivingPeer: Receiving aresponseResponse Upon receiving a response, the peer follows the rules in[I-D.ietf- p2psip-base].[RFC6940]. If the sender used RPR anddoesdid not get a response until the timeout, it MAYeitherresend the message using either RPRbut(but with a different relaypeer (if available),peer, if available) orresend the message usingSRR.6.4.3.5.4.3. Relaypeer processingPeer Processing Relay peers are designed to forward responses to peers who are not publicly reachable. For the routing of the response, this document 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].[RFC6940]. It receives the response, validates the message,re-adjustreadjusts thedestination_listdestination_list, andforwardforwards the response to the next hop in the destination_list based on the connection table. There is no added requirement for the relay peer.7.6. Overlayconfiguration extensionConfiguration Extension This document uses the new RELOAD overlay configuration element, "route-mode", inside each "configuration" element, as defined in Section76 ofthe DRR document [I-D.ietf-p2psip-drr]. 8.[RFC7263]. The route mode MUST be "RPR". 7. Discovery ofrelay peersRelay Peers There are several ways to distributetheinformation 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 the relay peer as aservice and thenservice; some service advertisement and discovery mechanism can then also be used for discovering relaypeers,peers -- for example, using the same mechanism as that used inTURNTraversal Using Relays around NAT (TURN) server discovery as discussed inbase RELOAD [I-D.ietf-p2psip-base].[RFC6940]. Another option is to let a peer advertise its capability to be a relay in the response toATTACHan Attach orJOIN. 9.Join [RFC6940]. 8. Security Considerations The normative security recommendations of Section 13 ofbase draft [I-D.ietf-p2psip-base][RFC6940] are applicable to this document. As a routing alternative, the security part of RPR conforms to Section 13.6 ofthe base draft[RFC6940], which describes routing security. RPR behaves like a DRR requesting node towards the destination node. The RPR relaynodepeer is not necessarily an arbitrary nodebut SHOULD be-- for example, atrusted one (managedmanaged network, a bootstrapnodesnode, or a configuredrelay) which will makerelay peer; it should be a trusted node, because a trusted node will be less of ariskrisk, as outlined insection13Section 13 of [RFC6940]. In order to address possible DoS attacks, thebased draft. 10.relay peer SHOULD also limit the number of maximum connections; this is required in order to also reduce load on the relay peer, as explained in Section 4.1. 9. IANA Considerations10.1.9.1. AnewNew RELOAD Forwarding Option A new RELOAD Forwarding Option typeishas been added to the "RELOAD Forwarding OptionRegistryRegistry" defined in[I-D.ietf-p2psip-base]. Type: 0x02 -[RFC6940]. Code: 2 Forwarding Option: extensive_routing_mode11.10. Acknowledgments David Bryanhashelped extensively with thisdocument,document and helped provide some of the text, analysis, and ideas contained here. The authors would like to thank Ted Hardie, Narayanan Vidya, Dondeti Lakshminath, Bruce Lowekamp, Stephane Bryant, MarcPetit-HugueninPetit-Huguenin, and Carlos Jesus Bernardos Cano for their constructive comments.12.11. References12.1.11.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14,RFC2119,RFC 2119, March 1997.[I-D.ietf-p2psip-base][RFC6940] Jennings, C., Lowekamp, B., Rescorla, E., Baset, S., and H. Schulzrinne, "REsource LOcation And Discovery (RELOAD) Base Protocol",draft-ietf-p2psip-base-26 (work in progress), February 2013. [I-D.ietf-p2psip-drr]RFC 6940, January 2014. [RFC7263] Zong, N., Jiang, X., Even,R.R., and Y. Zhang,Y.,"AnextensionExtension toRELOADthe REsource LOcation And Discovery (RELOAD) Protocol tosupportSupport Direct Response Routing",draft- ietf-p2psip-drr-11 (work in progress), October 2013. 12.2.RFC 7263, June 2014. 11.2. Informative References[RFC5780] MacDonald, D. and B. Lowekamp, "NAT Behavior Discovery Using STUN", RFC5780, May 2010.[RFC3424] Daigle,L.,L. and IAB, "IAB Considerations for UNilateral Self-Address Fixing (UNSAF) Across Network Address Translation",RFC3424,RFC 3424, November 2002.13. References[RFC5780] MacDonald, D. and B. Lowekamp, "NAT Behavior Discovery Using Session Traversal Utilities for NAT (STUN)", RFC 5780, May 2010. Appendix A. OptionalmethodsMethods toinvestigate peer connectivityInvestigate Peer Connectivity This section is for informational purposes onlyfor providingand provides some mechanisms that can be used when theconfiguration information does not specify if RPR can be used. It summarizes some methods whichconfiguration information does not specify if RPR can be used. It summarizes some methods that can be used by a peer to determine its own network location compared with NAT. These methods may help a peer to decide which routing mode it may wish to try. Note that there is no foolproof way to determine whether a peer is publicly reachable, other than via out-of-band mechanisms. This document addresses UNilateral Self-Address Fixing (UNSAF) [RFC3424] considerations by specifying a fallback plan to SRR [RFC6940]. SRR is not an UNSAF mechanism. This document does not define any new UNSAF mechanisms. For RPR to function correctly, a peer may attempt to determine whether it is publicly reachable. If it is not, RPR may be chosen to route the response with help from relay peers, or the peers should fall back to SRR. NATs and firewalls are two major contributors to preventing RPR from functioning properly. There are a number of techniques by which a peer 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 peer to which the address belongs can be a candidate to serve as a relay peer. Peers that are not publicly reachable may still use RPR to shorten the response path, with help from relay peers. Some conditions that are unique in P2PSIP architecture could be leveraged to facilitate the tests. In a P2P overlay network, each peer has only a partial view of the whole network and knows of a few peers in the overlay. P2P routing algorithms canbe used foreasily deliver a request from a sending peer todetermine its own network location compareda peer withNAT. These methods may helpwhom the sending peer has no direct connection. This makes it easy for a peer todecide which routing mode it may wishask other peers totry. Note that there is no foolproof waysend unsolicited messages back todetermine ifthe requester. The approaches for a peeris publically reachable, other than via out-of-band mechanisms. This documentto get the addresses needed for further tests, as well as theUNSAF [RFC3424] concerns by specifyingtest for learning whether afallback planpeer may be publicly reachable, are the same as those for DRR. Please refer to Appendix A of [RFC7263] for more details. Appendix B. Comparison of Cost of SRR[p2psip-base-draft]. SRR is not an UNSAF mechanism.and RPR Thedocument does not define any new UNSAF mechanisms. Formajor advantage of using RPRto function correctly, a peer may attempt to determine whether itispublicly reachable. Ifthat itis not, RPR may be chosen to routereduces theresponse withnumber of intermediate peers traversed by thehelp from relay peers, orresponse. This reduces thepeers should fall back to SRR. NATsload, such as processing andfirewalls are two major contributors preventing RPR from functioning properly. There arecommunication bandwidth, on those peers' resources. B.1. Closed or Managed Networks As described in Section 3, many P2P systems run in a closed or managed environment (e.g., carrier networks), so network administrators would know that they could safely use RPR. The number oftechniques by whichhops for apeer can get its reflexive address on the public side ofresponse in SRR and in RPR are listed in theNAT. After obtainingfollowing table. Note that thereflexive address, a peersame types of illustrative settings canperform further tests to learn whetherbe found in Appendix B.1 of [RFC7263]. Mode | Success | No. of Hops | No. of Msgs ------------------------------------------------ SRR | Yes | log(N) | log(N) RPR | Yes | 2 | 2 RPR (DTLS) | Yes | 2 | 7+2 Table 1: Comparison of SRR and RPR in Closed Networks From thereflexive addressabove comparison, it ispublicly reachable. If the address appears to be publicly reachable,clear that: 1) In most cases when the number of peersto(N) > 4 (2^2), RPR uses fewer hops than SRR. Using a shorter route means less overhead and resource usage on intermediate peers, which is an important consideration for adopting RPR in theaddress belongs can be a candidate to servecases where such resources asa relay peer. Peers whichCPU and bandwidth arenot publicly reachable may still uselimited, e.g., the case of mobile, wireless networks. 2) In the cases when N > 512 (2^9), RPRto shortenalso uses fewer messages than SRR. 3) In theresponse path withcases when N < 512, RPR uses more messages than SRR (but still uses fewer hops than SRR), so thehelp from relay peers. Some conditions are unique in P2PSIP architecture which could be leveragedconsideration of whether tofacilitateuse RPR or SRR depends on other factors such as using less resources (bandwidth and processing) from thetests. In P2P overlay network, each peer onlyintermediate peers. Section 4 provides use cases where RPR haspartialaviewbetter chance of working or where thewhole network, and knowsconsiderations ofa few peers in the overlay. P2P routing algorithms can easily deliver a request from a sending peer to a peer with whomintermediary resources are important. B.2. Open Networks In open networks (e.g., thesending peer has no direct connection. This makes it easy for a peer to ask other peersInternet) where RPR is not guaranteed tosend unsolicited messageswork, RPR can fall back to SRR if it fails after trial, as described in Section 4.2. Based on therequester. The approaches for a peer to get the addresses needed forsame settings as those listed in Appendix B.1, thefurther tests,number of hops, as well as thetestnumber of messages forlearning whetherapeer mayresponse in SRR and RPR, are listed in the following table: Mode | Success | No. of Hops | No. of Msgs ---------------------------------------------------------------- SRR | Yes | log(N) | log(N) RPR | Yes | 2 | 2 | Fail & fall back to SRR | 2+log(N) | 2+log(N) RPR (DTLS) | Yes | 2 | 7+2 | Fail & fall back to SRR | 2+log(N) | 9+log(N) Table 2: Comparison of SRR and RPR in Open Networks From the above comparison, it can bepublicly reachableobserved that trying to first use RPR could still provide an overall number of hops lower than directly using SRR. The detailed analysis is the same asthe DRR case. Please refer to DRR document [I-D.ietf-p2psip-drr]that formore details.DRR and can be found in [RFC7263]. Authors' Addresses Ning Zong(editor)Huawei TechnologiesEmail:EMail: zongning@huawei.com Xingfeng Jiang Huawei TechnologiesEmail:EMail: jiang.x.f@huawei.com Roni Even Huawei TechnologiesEmail:EMail: roni.even@mail01.huawei.com Yunfei Zhang CoolPadEmail:/ China Mobile EMail: hishigh@gmail.com