1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837
|
<pre>Internet Engineering Task Force (IETF) N. Zong
Request for Comments: 7264 X. Jiang
Category: Standards Track R. Even
ISSN: 2070-1721 Huawei Technologies
Y. Zhang
CoolPad / China Mobile
June 2014
<span class="h1">An Extension to the REsource LOcation And Discovery (RELOAD) Protocol</span>
<span class="h1">to Support Relay Peer Routing</span>
Abstract
This document defines 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 for
responses, thereby reducing overhead on intermediate peers. This
document also describes potential cases where this extension can be
used.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc7264">http://www.rfc-editor.org/info/rfc7264</a>.
<span class="grey">Zong, et al. Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) 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.
<span class="grey">Zong, et al. Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
Table of Contents
<a href="#section-1">1</a>. Introduction ....................................................<a href="#page-3">3</a>
<a href="#section-2">2</a>. Terminology .....................................................<a href="#page-4">4</a>
<a href="#section-3">3</a>. Overview ........................................................<a href="#page-5">5</a>
<a href="#section-3.1">3.1</a>. RPR ........................................................<a href="#page-5">5</a>
<a href="#section-3.2">3.2</a>. Scenarios Where RPR Can Be Used ............................<a href="#page-6">6</a>
<a href="#section-3.2.1">3.2.1</a>. Managed or Closed P2P Systems .......................<a href="#page-6">6</a>
<a href="#section-3.2.2">3.2.2</a>. Using Bootstrap Nodes as Relay Peers ................<a href="#page-7">7</a>
<a href="#section-3.2.3">3.2.3</a>. Wireless Scenarios ..................................<a href="#page-7">7</a>
<a href="#section-4">4</a>. Relationship between SRR and RPR ................................<a href="#page-7">7</a>
<a href="#section-4.1">4.1</a>. How RPR Works ..............................................<a href="#page-7">7</a>
<a href="#section-4.2">4.2</a>. How SRR and RPR Work Together ..............................<a href="#page-7">7</a>
<a href="#section-5">5</a>. RPR Extensions to RELOAD ........................................<a href="#page-8">8</a>
<a href="#section-5.1">5.1</a>. Basic Requirements .........................................<a href="#page-8">8</a>
<a href="#section-5.2">5.2</a>. Modification to RELOAD Message Structure ...................<a href="#page-8">8</a>
<a href="#section-5.2.1">5.2.1</a>. Extensive Routing Mode ..............................<a href="#page-8">8</a>
<a href="#section-5.3">5.3</a>. Creating a Request .........................................<a href="#page-9">9</a>
<a href="#section-5.3.1">5.3.1</a>. Creating a Request for RPR ..........................<a href="#page-9">9</a>
<a href="#section-5.4">5.4</a>. Request and Response Processing ............................<a href="#page-9">9</a>
5.4.1. Destination Peer: Receiving a Request and
Sending a Response ..................................<a href="#page-9">9</a>
<a href="#section-5.4.2">5.4.2</a>. Sending Peer: Receiving a Response .................<a href="#page-10">10</a>
<a href="#section-5.4.3">5.4.3</a>. Relay Peer Processing ..............................<a href="#page-10">10</a>
<a href="#section-6">6</a>. Overlay Configuration Extension ................................<a href="#page-10">10</a>
<a href="#section-7">7</a>. Discovery of Relay Peers .......................................<a href="#page-11">11</a>
<a href="#section-8">8</a>. Security Considerations ........................................<a href="#page-11">11</a>
<a href="#section-9">9</a>. IANA Considerations ............................................<a href="#page-11">11</a>
<a href="#section-9.1">9.1</a>. A New RELOAD Forwarding Option ............................<a href="#page-11">11</a>
<a href="#section-10">10</a>. Acknowledgments ...............................................<a href="#page-11">11</a>
<a href="#section-11">11</a>. References ....................................................<a href="#page-12">12</a>
<a href="#section-11.1">11.1</a>. Normative References .....................................<a href="#page-12">12</a>
<a href="#section-11.2">11.2</a>. Informative References ...................................<a href="#page-12">12</a>
<a href="#appendix-A">Appendix A</a>. Optional Methods to Investigate Peer Connectivity .....<a href="#page-13">13</a>
<a href="#appendix-B">Appendix B</a>. Comparison of Cost of SRR and RPR .....................<a href="#page-14">14</a>
<a href="#appendix-B.1">B.1</a>. Closed or Managed Networks .................................<a href="#page-14">14</a>
<a href="#appendix-B.2">B.2</a>. Open Networks ..............................................<a href="#page-15">15</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
The REsource LOcation And Discovery (RELOAD) protocol [<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>]
recommends symmetric recursive routing (SRR) for routing messages and
describes the extensions that would be required to support additional
routing algorithms. In addition to SRR, two other routing options --
direct response routing (DRR) and relay peer routing (RPR) -- are
also discussed in <a href="./rfc6940#appendix-A">Appendix A of [RFC6940]</a>. As we show in <a href="#section-3">Section 3</a>,
RPR is advantageous over SRR in some scenarios in 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
<span class="grey">Zong, et al. Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
that relay peers are publicly reachable in the P2P system. In other
scenarios, using a combination of RPR and SRR together is more likely
to provide benefits than if SRR is used alone.
Note that in this document we focus on the RPR mode and its
extensions to RELOAD to produce a standalone solution. Please refer
to [<a href="./rfc7263" title=""An Extension to the REsource LOcation And Discovery (RELOAD) Protocol to Support Direct Response Routing"">RFC7263</a>] for details on the DRR mode.
We first discuss the problem statement in <a href="#section-3">Section 3</a>. How to combine
RPR and SRR is presented in <a href="#section-4">Section 4</a>. An extension to RELOAD to
support RPR is defined in <a href="#section-5">Section 5</a>. Discovery of relay peers is
introduced in <a href="#section-7">Section 7</a>. Some optional methods to check peer
connectivity are introduced in <a href="#appendix-A">Appendix A</a>. In <a href="#appendix-B">Appendix B</a>, we give a
comparison of the cost of SRR and RPR in both managed and open
networks.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Terminology</span>
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 <a href="./rfc2119">RFC 2119</a> [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
We use terminology and definitions from the base RELOAD specification
[<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>] extensively in this document. We also use terms defined in
the NAT behavior discovery document [<a href="./rfc5780" title=""NAT Behavior Discovery Using Session Traversal Utilities for NAT (STUN)"">RFC5780</a>]. 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" 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 to Peer-to-Peer SIP (P2PSIP) requests are sent by the
destination peer to a relay peer transport address that will
forward the responses towards the sending peer. For simplicity,
the abbreviation "RPR" is used in the rest of this document.
<span class="grey">Zong, et al. Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
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 abbreviation "SRR" is
used in 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.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Overview</span>
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 intended to provide public service, while others
run in small-scale closed networks. SRR works in any situation, but
RPR may work better in some specific scenarios.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. RPR</span>
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 in <a href="./rfc7263#appendix-B.1">Appendix B.1 of [RFC7263]</a>.
If peer A knows it is behind a NAT or NATs and knows one or more
relay peers with whom they have had 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 peer R's
transport address 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. Figure 1 illustrates RPR. Note
that RPR also allows a shorter route for responses compared to SRR;
this means less overhead on intermediate peers. Establishing a
connection to the relay with Transport Layer Security (TLS) requires
multiple round trips. Please refer to <a href="#appendix-B">Appendix B</a> for a cost
comparison between SRR and RPR.
<span class="grey">Zong, et al. Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
A B C D X R
| Request | | | | |
|----------->| | | | |
| | Request | | | |
| |----------->| | | |
| | | Request | | |
| | |----------->| | |
| | | | Request | |
| | | |----------->| |
| | | | | Response |
| | | | |---------->|
| | | | Response | |
|<-----------+------------+------------+------------+-----------|
| | | | | |
Figure 1: RPR Mode
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 as relay peers. It also requires a mechanism to
enable peers to know which peers can be used as their relays. This
mechanism may be based on configuration -- for example, as part of
the overlay configuration, an initial list of relay peers can be
supplied. Another option is a response message in which the
responding peer can announce that it can serve as a relay peer.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Scenarios Where RPR Can Be Used</span>
In this section, we will list several scenarios where using RPR would
improve performance.
<span class="h4"><a class="selflink" id="section-3.2.1" href="#section-3.2.1">3.2.1</a>. Managed or Closed P2P Systems</span>
As described in <a href="./rfc7263#section-3.2.1">Section 3.2.1 of [RFC7263]</a>, 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 that 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 help from these relay peers. Peers MUST also support SRR in
case RPR fails.
Another usage is to install relay peers on the managed network
boundary, allowing external peers to send responses to peers inside
the managed network.
<span class="grey">Zong, et al. Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
<span class="h4"><a class="selflink" id="section-3.2.2" href="#section-3.2.2">3.2.2</a>. Using Bootstrap Nodes as Relay Peers</span>
Bootstrap nodes are typically publicly reachable in a RELOAD
architecture. As a result, one possible scenario 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.
<span class="h4"><a class="selflink" id="section-3.2.3" href="#section-3.2.3">3.2.3</a>. Wireless Scenarios</span>
In some mobile deployments, using RPR may help reduce radio battery
usage and bandwidth by the intermediate peers. The service provider
may recommend using RPR based on his knowledge of the topology.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Relationship between SRR and RPR</span>
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. How RPR Works</span>
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 using the Attach method [<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>].
A requirement for RPR is that the source peer convey its relay peer's
(or peers') transport address(es) in the request so the destination
peer knows where the relay peers are and will send the response to a
relay peer first. The request MUST also include the requesting
peer'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 peer
have more functionality than an ordinary peer. 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.
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. How SRR and RPR Work Together</span>
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 suggestions for how to transition between SRR and RPR
are the same as those for DRR. Please refer to <a href="./rfc7263#section-4.2">Section 4.2 of
[RFC7263]</a> for more details. If a relay peer is provided by the
service provider, peers SHOULD prefer RPR over SRR. However, RPR
SHOULD NOT be used in the open Internet or if the administrator does
<span class="grey">Zong, et al. Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
not feel he has enough information about the overlay network
topology. A new overlay configuration element specifying the usage
of RPR is defined in <a href="#section-6">Section 6</a>.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. RPR Extensions to RELOAD</span>
Adding support for RPR requires extensions to the current RELOAD
protocol. In this section, we define the required extensions,
including extensions to message structure and message processing.
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Basic Requirements</span>
All peers MUST be able to process requests for routing in SRR and MAY
support RPR routing requests.
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Modification to RELOAD Message Structure</span>
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 [<a href="./rfc7263" title=""An Extension to the REsource LOcation And Discovery (RELOAD) Protocol to Support Direct Response Routing"">RFC7263</a>]. The state-keeping
flag [<a href="./rfc7263" title=""An Extension to the REsource LOcation And Discovery (RELOAD) Protocol to Support Direct Response Routing"">RFC7263</a>] is needed to support the RPR mode.
<span class="h4"><a class="selflink" id="section-5.2.1" href="#section-5.2.1">5.2.1</a>. Extensive Routing Mode</span>
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 the DRR value in RouteMode is defined in [<a href="./rfc7263" title=""An Extension to the REsource LOcation And Discovery (RELOAD) Protocol to Support Direct Response Routing"">RFC7263</a>].
RouteMode: refers to which type of routing mode is indicated to the
destination peer.
OverlayLinkType: refers to the transport type that is used to deliver
responses from the destination peer to the relay peer.
IpAddressPort: refers to the transport address that the destination
peer should use for sending responses. This will be a relay peer
address for RPR.
<span class="grey">Zong, et al. Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
Destination: refers to the relay peer itself. If the routing mode is
RPR, then the destination contains two items: the relay peer's
Node-ID and the sending peer's Node-ID.
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. Creating a Request</span>
<span class="h4"><a class="selflink" id="section-5.3.1" href="#section-5.3.1">5.3.1</a>. Creating a Request for RPR</span>
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 ForwardingOption structure in the
ForwardingHeader. When constructing the ForwardingOption structure,
the fields 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 ForwardingOption 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 through which the sender wishes the message relayed.
2.4) The 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.
<span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a>. Request and Response Processing</span>
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 [<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>] for RELOAD base
procedures.
<span class="h4"><a class="selflink" id="section-5.4.1" href="#section-5.4.1">5.4.1</a>. Destination Peer: Receiving a Request and Sending a Response</span>
When the destination peer receives a request, it will check the
options in the forwarding header. If the destination peer cannot
understand the extensive_routing_mode option in the request, it MUST
attempt to use SRR to return an "Error_Unknown_Extension" response
(defined in Sections <a href="#section-6.3.3.1">6.3.3.1</a> and <a href="#section-14.9">14.9</a> of [<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>]) to the sending
peer.
<span class="grey">Zong, et al. Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
If the routing mode is RPR, the destination peer MUST construct a
destination_list for the response with two entries as defined in
[<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>]. The first entry MUST be set to the relay peer's Node-ID
from the option in the request, and the second entry MUST be the
sending peer's Node-ID from the option in the request.
In the event that the routing 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 in Sections <a href="#section-6.3.3.1">6.3.3.1</a> and
14.9 of [<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>]) 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 ForwardingOption. If the destination peer receives a
retransmit with SRR preference on the message it is trying to respond
to now, the responding peer SHOULD abort the RPR response and
use SRR.
<span class="h4"><a class="selflink" id="section-5.4.2" href="#section-5.4.2">5.4.2</a>. Sending Peer: Receiving a Response</span>
Upon receiving a response, the peer follows the rules in [<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>].
If the sender used RPR and did not get a response until the timeout,
it MAY resend the message using either RPR (but with a different
relay peer, if available) or SRR.
<span class="h4"><a class="selflink" id="section-5.4.3" href="#section-5.4.3">5.4.3</a>. Relay Peer Processing</span>
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
[<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>]. It receives the response, validates the message,
readjusts the destination_list, and forwards the response to the next
hop in the destination_list based on the connection table. There is
no added requirement for the relay peer.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Overlay Configuration Extension</span>
This document uses the new RELOAD overlay configuration element,
"route-mode", inside each "configuration" element, as defined in
<a href="./rfc7263#section-6">Section 6 of [RFC7263]</a>. The route mode MUST be "RPR".
<span class="grey">Zong, et al. Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Discovery of Relay Peers</span>
There are several ways to distribute 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 the relay peer as a service; some service
advertisement and discovery mechanism can then also be used for
discovering relay peers -- for example, using the same mechanism as
that used in Traversal Using Relays around NAT (TURN) server
discovery as discussed in [<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>]. Another option is to let a peer
advertise its capability to be a relay in the response to an Attach
or Join [<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>].
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Security Considerations</span>
The normative security recommendations of <a href="./rfc6940#section-13">Section 13 of [RFC6940]</a> are
applicable to this document. As a routing alternative, the security
part of RPR conforms to <a href="./rfc6940#section-13.6">Section 13.6 of [RFC6940]</a>, which describes
routing security. RPR behaves like a DRR requesting node towards the
destination node. The RPR relay peer is not necessarily an arbitrary
node -- for example, a managed network, a bootstrap node, or a
configured relay peer; it should be a trusted node, because a trusted
node will be less of a risk, as outlined in <a href="./rfc6940#section-13">Section 13 of [RFC6940]</a>.
In order to address possible DoS attacks, the 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 <a href="#section-4.1">Section 4.1</a>.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. IANA Considerations</span>
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>. A New RELOAD Forwarding Option</span>
A new RELOAD Forwarding Option type has been added to the "RELOAD
Forwarding Option Registry" defined in [<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>].
Code: 2
Forwarding Option: extensive_routing_mode
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Acknowledgments</span>
David Bryan helped extensively with this 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, Marc Petit-Huguenin, and Carlos
Jesus Bernardos Cano for their constructive comments.
<span class="grey">Zong, et al. Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. References</span>
<span class="h3"><a class="selflink" id="section-11.1" href="#section-11.1">11.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-RFC6940">RFC6940</a>] Jennings, C., Lowekamp, B., Rescorla, E., Baset, S., and
H. Schulzrinne, "REsource LOcation And Discovery (RELOAD)
Base Protocol", <a href="./rfc6940">RFC 6940</a>, January 2014.
[<a id="ref-RFC7263">RFC7263</a>] Zong, N., Jiang, X., Even, R., and Y. Zhang, "An Extension
to the REsource LOcation And Discovery (RELOAD) Protocol
to Support Direct Response Routing", <a href="./rfc7263">RFC 7263</a>, June 2014.
<span class="h3"><a class="selflink" id="section-11.2" href="#section-11.2">11.2</a>. Informative References</span>
[<a id="ref-RFC3424">RFC3424</a>] Daigle, L. and IAB, "IAB Considerations for UNilateral
Self-Address Fixing (UNSAF) Across Network Address
Translation", <a href="./rfc3424">RFC 3424</a>, November 2002.
[<a id="ref-RFC5780">RFC5780</a>] MacDonald, D. and B. Lowekamp, "NAT Behavior Discovery
Using Session Traversal Utilities for NAT (STUN)",
<a href="./rfc5780">RFC 5780</a>, May 2010.
<span class="grey">Zong, et al. Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Optional Methods to Investigate Peer Connectivity</span>
This section is for informational purposes only and provides some
mechanisms that can be used when the configuration 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) [<a href="./rfc3424" title=""IAB Considerations for UNilateral Self-Address Fixing (UNSAF) Across Network Address Translation"">RFC3424</a>] considerations by specifying a fallback plan to SRR
[<a href="./rfc6940" title=""REsource LOcation And Discovery (RELOAD) Base Protocol"">RFC6940</a>]. 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 can easily deliver a
request from a sending peer to a peer with whom the sending peer has
no direct connection. This makes it easy for a peer to ask other
peers to send unsolicited messages back to the requester.
The approaches for a peer to get the addresses needed for further
tests, as well as the test for learning whether a peer may be
publicly reachable, are the same as those for DRR. Please refer to
<a href="./rfc7263#appendix-A">Appendix A of [RFC7263]</a> for more details.
<span class="grey">Zong, et al. Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">Appendix B</a>. Comparison of Cost of SRR and RPR</span>
The major advantage of using RPR is that it reduces the number of
intermediate peers traversed by the response. This reduces the load,
such as processing and communication bandwidth, on those peers'
resources.
<span class="h3"><a class="selflink" id="appendix-B.1" href="#appendix-B.1">B.1</a>. Closed or Managed Networks</span>
As described in <a href="#section-3">Section 3</a>, 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 of hops for a response in SRR and in RPR are listed in the
following table. Note that the same types of illustrative settings
can be found in <a href="./rfc7263#appendix-B.1">Appendix B.1 of [RFC7263]</a>.
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 the above comparison, it is clear that:
1) In most cases when the number of peers (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 the cases where such resources
as CPU and bandwidth are limited, e.g., the case of mobile,
wireless networks.
2) In the cases when N > 512 (2^9), RPR also uses fewer messages
than SRR.
3) In the cases when N < 512, RPR uses more messages than SRR (but
still uses fewer hops than SRR), so the consideration of whether
to use RPR or SRR depends on other factors such as using less
resources (bandwidth and processing) from the intermediate peers.
<a href="#section-4">Section 4</a> provides use cases where RPR has a better chance of
working or where the considerations of intermediary resources are
important.
<span class="grey">Zong, et al. Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc7264">RFC 7264</a> P2PSIP RPR June 2014</span>
<span class="h3"><a class="selflink" id="appendix-B.2" href="#appendix-B.2">B.2</a>. Open Networks</span>
In open networks (e.g., the Internet) where RPR is not guaranteed to
work, RPR can fall back to SRR if it fails after trial, as described
in <a href="#section-4.2">Section 4.2</a>. Based on the same settings as those listed in
<a href="#appendix-B.1">Appendix B.1</a>, the number of hops, as well as the number of messages
for a response 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 be observed 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 as that for
DRR and can be found in [<a href="./rfc7263" title=""An Extension to the REsource LOcation And Discovery (RELOAD) Protocol to Support Direct Response Routing"">RFC7263</a>].
Authors' Addresses
Ning Zong
Huawei Technologies
EMail: zongning@huawei.com
Xingfeng Jiang
Huawei Technologies
EMail: jiang.x.f@huawei.com
Roni Even
Huawei Technologies
EMail: roni.even@mail01.huawei.com
Yunfei Zhang
CoolPad / China Mobile
EMail: hishigh@gmail.com
Zong, et al. Standards Track [Page 15]
</pre>
|