<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="5"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc rfcedstyle="yes"?>


<rfc number="7488"
     category="std" 
     submissionType="IETF"
     consensus="yes"
     ipr="trust200902" 
     updates="6887">
  <front>
    <title abbrev="PCP Server Selection">Port Control Protocol (PCP) Server Selection</title>

    <author fullname="Mohamed Boucadair" initials="M." surname="Boucadair">
      <organization>France Telecom</organization>

      <address>
        <postal>
          <street></street>

          <city>Rennes</city>

          <region></region>

          <code>35000</code>

          <country>France</country>
        </postal>

        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>

    <author fullname="Reinaldo Penno" initials="R." surname="Penno">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street></street>

          <code></code>

          <country>United States</country>
        </postal>

        <email>repenno@cisco.com</email>
      </address>
    </author>

    <author fullname="Dan Wing" initials="D." surname="Wing">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street>170 West Tasman Drive</street>

          <city>San Jose</city>

          <region>California</region>

          <code>95134</code>

          <country>United States</country>
        </postal>

        <email>dwing@cisco.com</email>
      </address>
    </author>

    <author fullname="Prashanth Patil" initials="P." surname="Patil">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street></street>

          <city>Bangalore</city>

          <country>India</country>
        </postal>

        <email>praspati@cisco.com</email>
      </address>
    </author>

    <author fullname="Tirumaleswar Reddy" initials="T." surname="Reddy">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street>Cessna Business Park, Varthur Hobli</street>

          <street>Sarjapur Marathalli Outer Ring Road</street>

          <city>Bangalore</city>

          <region>Karnataka</region>

          <code>560103</code>

          <country>India</country>
        </postal>

        <email>tireddy@cisco.com</email>
      </address>
    </author>

    <date month="March" year="2015" />

    <workgroup>PCP Working Group</workgroup>

    <keyword>PCP Server discovery</keyword>
    <keyword>Port Mapping</keyword>
    <keyword>Shared Address</keyword>
    <keyword>Multiple PCP Servers</keyword>

    <abstract>
      <t>This document specifies the behavior to be followed by a Port Control
      Protocol (PCP) client to
      contact its PCP server(s) when one or several PCP server IP addresses
      are configured.</t>

      <t>This document updates RFC 6887.</t>
    </abstract>

  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>A host may have multiple network interfaces (e.g., 3G, IEEE 802.11,
      etc.), each configured with different PCP servers. Each PCP server
      learned must be associated with the interface on which it was learned.
      Generic multi-interface considerations are documented in Section 8.4 of
      <xref target="RFC6887"></xref>. Multiple PCP server IP addresses may be
      configured on a PCP client in some deployment contexts such as
      multihoming (see <xref target="multihoming"></xref>). A PCP server may
      also have multiple IP addresses associated with it. It is out of the scope
      of this document to enumerate all deployment scenarios that require
      multiple PCP server IP addresses to be configured.</t>

      <t>If a PCP client discovers multiple PCP server IP addresses, it needs
      to determine which actions it needs to undertake (e.g., whether PCP
      entries are to be installed in all or a subset of discovered IP
      addresses, whether some PCP entries are to be removed, etc.). This
      document makes the following assumptions:</t>

      <t><list style="symbols">
          <t>There is no requirement that multiple PCP servers configured on
          the same interface have the same capabilities.</t>

          <t>PCP requests to different PCP servers are independent, the result
          of a PCP request to one PCP server does not influence another.</t>

          <t>The configuration mechanism must distinguish IP addresses that
          belong to the same PCP server.</t>
        </list></t>

      <t>This document specifies the behavior to be followed by a PCP client
      <xref target="RFC6887"></xref> to contact its PCP server(s) <xref
      target="RFC6887"></xref> when it is configured with one or several PCP
      server IP addresses (e.g., using DHCP <xref target="RFC7291"></xref>).
      This document does not make any assumption on the type of these IP
      addresses (i.e., unicast/anycast). </t>
    </section>

    <section title="Terminology and Conventions">


    <section title="Requirements Language">
      <t>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 <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </section>



      <section title="Terminology">
      <t><list style="symbols">
          <t>PCP client: denotes a PCP software instance responsible for
          issuing PCP requests to a PCP server. Refer to <xref
          target="RFC6887"></xref>.</t>

          <t>PCP server: denotes a software instance that receives and
          processes PCP requests from a PCP client. A PCP server can be
          co-located with or be separated from the function it controls (e.g.,
          Network Address Translation (NAT) or firewall). Refer to <xref
          target="RFC6887"></xref>.</t>
        </list></t>
    </section>
    </section>

    <section anchor="selection"
             title="IP Address Selection: PCP Server with Multiple IP Addresses">
      <t>This section describes the behavior a PCP client follows to contact
      its PCP server when the PCP client has multiple IP addresses for a
      single PCP server.</t>

      <t><list style="numbers">
          <t>A PCP client should construct a set of candidate source addresses
          (see Section 4 of <xref target="RFC6724"></xref>) based on application
          input and PCP <xref target="RFC6887"></xref> constraints. For
          example, when sending a PEER or a MAP with a FILTER request for an
          existing TCP connection, the only candidate source address is the
          source address used for the existing TCP connection. But when
          sending a MAP request for a service that will accept incoming
          connections, the candidate source addresses may be all of the node's
          IP addresses or some subset of IP addresses on which the service is
          configured to listen.</t>

          <t>The PCP client then sorts the PCP server IP addresses as per
          Section 6 of <xref target="RFC6724"></xref> using the candidate
          source addresses selected in the previous step as input to the
          destination address selection algorithm.</t>

          <t>The PCP client initializes its Maximum Retransmission Count (MRC)
          to 4.</t>

          <t>The PCP client sends its PCP messages following the
          retransmission procedure specified in Section 8.1.1 of <xref
          target="RFC6887"></xref>. If no response is received after MRC
          attempts, the PCP client retries the procedure with the next IP
          address in the sorted list. <vspace blankLines="1" />The PCP client
          may receive a response from an IP address after exhausting MRC
          attempts for that particular IP address. The PCP client SHOULD
          ignore such a response because receiving a delayed response after
          exhausting four retransmissions sent with exponentially increasing
          intervals is an indication that problems are to be encountered in
          the corresponding forwarding path and/or when processing subsequent
          requests by that PCP server instance. <vspace blankLines="1" />If,
          when sending PCP requests, the PCP client receives a hard ICMP error
          <xref target="RFC1122"></xref>, it MUST immediately try the next IP
          address from the list of PCP server IP addresses.</t>

          <t>If the PCP client has exhausted all IP addresses configured for a
          given PCP server, the procedure SHOULD be repeated every 15
          minutes until the PCP request is successfully answered.</t>

          <t>Once the PCP client has successfully received a response from a
          PCP server's IP address, all subsequent PCP requests to that PCP
          server are sent on the same IP address until that IP address becomes
          unresponsive. In case the IP address becomes unresponsive, the PCP
          client clears the cache of sorted destination addresses and follows
          the steps described above to contact the PCP server again.</t>
        </list></t>

      <t>For efficiency, the PCP client SHOULD use the same Mapping Nonce for
      requests sent to all IP addresses belonging to the same PCP server. As a
      reminder, nonce validation checks are performed when operating in the
      Simple Threat Model (see Section 18.1 of <xref target="RFC6887"></xref>) to
      defend against some off-path attacks.</t>
    </section>

    <section anchor="sel" title="IP Address Selection: Multiple PCP Servers">
      <t>This section describes the behavior a PCP client follows to contact
      multiple PCP servers, with each PCP server reachable on a list of IP
      addresses. There is no requirement that these multiple PCP servers have
      the same capabilities.<list style="empty">
          <t>Note that how PCP clients are configured to separate lists of IP
          addresses of each PCP server is implementation specific and
          deployment specific. For example, a PCP client can be configured
          using DHCP with multiple lists of PCP server IP addresses; each list
          is referring to a distinct PCP server <xref
          target="RFC7291"></xref>. </t>
        </list>If several PCP servers are configured, each with multiple IP
      addresses, the PCP client contacts all PCP servers using the procedure
      described in <xref target="selection"></xref>.</t>

      <t>As specified in Sections 11.2 and 12.2 of <xref
      target="RFC6887"></xref>, the PCP client must use a different Mapping
      Nonce for each PCP server with which it communicates.</t>

      <t>If the PCP client is configured, using some means, with the
      capabilities of each PCP server, a PCP client may choose to contact all
      PCP servers simultaneously or iterate through them with a delay.</t>

      <t>This procedure may result in a PCP client instantiating multiple
      mappings maintained by distinct PCP servers. The decision to use all
      these mappings or delete some of them depends on the purpose of the PCP
      request. For example, if the PCP servers are configuring firewall (not
      NAT) functionality, then the client would, by default (i.e., unless it
      knows that they all replicate state among them), need to use all the PCP
      servers.</t>
    </section>

    <section title="Example: Multiple PCP Servers on a Single Interface">
      <t><xref target="ex"></xref> depicts an example that is used to
      illustrate the server selection procedure specified in Sections <xref
      target="selection" format="counter"></xref> and <xref target="sel" format="counter"></xref>. In this
      example, PCP servers (A and B) are co-located with edge routers (rtr1 and
      rtr2) with each PCP server controlling its own device.



<figure title="Single Uplink, Multiple PCP Servers"
          align="center" anchor="ex">
          <artwork><![CDATA[                               ISP Network
                             |              |
       .........................................................
                             |              |        Subscriber Network
                  +----------+-----+  +-----+----------+
                  | PCP-Server-A   |  | PCP-Server-B   |
                  |    (rtr1)      |  |   (rtr2)       |
                  +-------+--------+  +--+-------------+
         192.0.2.1        |              |     198.51.100.1
         2001:db8:1111::1 |              |     2001:db8:2222::1
                          |              |
                          |              |
                   -------+-------+------+-----------
                                  |      
                                  |    203.0.113.0
                                  |    2001:db8:3333::1
                              +---+---+ 
                              | Host  | 
                              +-------+

Edge Routers (rtr1, rtr2)]]></artwork>
        </figure></t>

      <t>The example describes behavior when a single IP address for one PCP
      server is not responsive. The PCP client is configured with two PCP
      servers for the same interface, PCP-Server-A and PCP-Server-B, each of which
      have two IP addresses: an IPv4 address and an IPv6 address. The PCP
      client wants an IPv4 mapping, so it orders the addresses as follows:</t>

      <t><list style="symbols">
          <t>PCP-Server-A: <list style="symbols">
              <t>192.0.2.1</t>

              <t>2001:db8:1111::1</t>
            </list></t>

          <t>PCP-Server-B: <list style="symbols">
              <t>198.51.100.1</t>

              <t>2001:db8:2222::1</t>
            </list></t>
        </list></t>

      <t>Suppose that:</t>

      <t><list style="symbols">
          <t>The path to reach 192.0.2.1 is broken</t>

          <t>The path to reach 2001:db8:1111::1 is working</t>

          <t>The path to reach 198.51.100.1 is working</t>

          <t>The path to reach 2001:db8:2222::1 is working</t>
        </list></t>

      <t>It sends two PCP requests at the same time, the first to 192.0.2.1
      (corresponding to PCP-Server-A) and the second to 198.51.100.1
      (corresponding to PCP-Server-B). The path to 198.51.100.1 is working, so
      a PCP response is received. Because the path to 192.0.2.1 is broken, no
      PCP response is received. The PCP client retries four times to elicit a
      response from 192.0.2.1 and finally gives up on that address and sends a
      PCP message to 2001::db8:1111:1. That path is working, and a response is
      received. Thereafter, the PCP client should continue using that
      responsive IP address for PCP-Server-A (2001:db8:1111::1). In this
      particular case, it will have to use the THIRD_PARTY option for IPv4
      mappings.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>PCP-related security considerations are discussed in <xref
      target="RFC6887"></xref>.</t>

      <t><!--add a sentence about pcp auth if required.-->This document does
      not specify how PCP server addresses are provisioned on the PCP client.
      It is the responsibility of PCP server provisioning document(s) to
      elaborate on security considerations to discover legitimate PCP
      servers.</t>
    </section>

  </middle>

  <back>
    <references title="Normative References">

    <reference  anchor='RFC2119' target='http://www.rfc-editor.org/info/rfc2119'>
    <front>
    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
    <author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author>
    <date year='1997' month='March' />
    </front>
    <seriesInfo name='BCP' value='14'/>
    <seriesInfo name='RFC' value='2119'/>
    <format type='ASCII' octets='4723'/>
    </reference>

    <reference  anchor='RFC6887' target='http://www.rfc-editor.org/info/rfc6887'>
    <front>
    <title>Port Control Protocol (PCP)</title>
    <author initials='D.' surname='Wing' fullname='D. Wing' role='editor'><organization /></author>
    <author initials='S.' surname='Cheshire' fullname='S. Cheshire'><organization /></author>
    <author initials='M.' surname='Boucadair' fullname='M. Boucadair'><organization /></author>
    <author initials='R.' surname='Penno' fullname='R. Penno'><organization /></author>
    <author initials='P.' surname='Selkirk' fullname='P. Selkirk'><organization /></author>
    <date year='2013' month='April' />
    </front>
    <seriesInfo name='RFC' value='6887'/>
    <format type='ASCII' octets='221314'/>
    </reference>

    <reference  anchor='RFC6724' target='http://www.rfc-editor.org/info/rfc6724'>
    <front>
    <title>Default Address Selection for Internet Protocol Version 6 (IPv6)</title>
    <author initials='D.' surname='Thaler' fullname='D. Thaler' role='editor'><organization /></author>
    <author initials='R.' surname='Draves' fullname='R. Draves'><organization /></author>
    <author initials='A.' surname='Matsumoto' fullname='A. Matsumoto'><organization /></author>
    <author initials='T.' surname='Chown' fullname='T. Chown'><organization /></author>
    <date year='2012' month='September' />
    </front>
    <seriesInfo name='RFC' value='6724'/>
    <format type='ASCII' octets='74407'/>
    </reference>
    </references>

    <references title="Informative References">

    <reference  anchor='RFC1122' target='http://www.rfc-editor.org/info/rfc1122'>
    <front>
    <title>Requirements for Internet Hosts - Communication Layers</title>
    <author initials='R.' surname='Braden' fullname='R. Braden' role='editor'><organization /></author>
    <date year='1989' month='October' />
    </front>
    <seriesInfo name='STD' value='3'/>
    <seriesInfo name='RFC' value='1122'/>
    <format type='ASCII' octets='295992'/>
    </reference>

    <reference  anchor='RFC4116' target='http://www.rfc-editor.org/info/rfc4116'>
    <front>
    <title>IPv4 Multihoming Practices and Limitations</title>
    <author initials='J.' surname='Abley' fullname='J. Abley'><organization /></author>
    <author initials='K.' surname='Lindqvist' fullname='K. Lindqvist'><organization /></author>
    <author initials='E.' surname='Davies' fullname='E. Davies'><organization /></author>
    <author initials='B.' surname='Black' fullname='B. Black'><organization /></author>
    <author initials='V.' surname='Gill' fullname='V. Gill'><organization /></author>
    <date year='2005' month='July' />
    </front>
    <seriesInfo name='RFC' value='4116'/>
    <format type='ASCII' octets='26598'/>
    </reference>

    <reference  anchor='RFC7291' target='http://www.rfc-editor.org/info/rfc7291'>
    <front>
    <title>DHCP Options for the Port Control Protocol (PCP)</title>
    <author initials='M.' surname='Boucadair' fullname='M. Boucadair'><organization /></author>
    <author initials='R.' surname='Penno' fullname='R. Penno'><organization /></author>
    <author initials='D.' surname='Wing' fullname='D. Wing'><organization /></author>
    <date year='2014' month='July' />
    </front>
    <seriesInfo name='RFC' value='7291'/>
    <format type='ASCII' octets='20868'/>
    </reference>
    </references>

    <section anchor="multihoming" title="Multihoming">
      <t>The main problem of a PCP multihoming situation can be succinctly
      described as "one PCP client, multiple PCP servers." As described in
      <xref target="selection"></xref>, if a PCP client discovers multiple PCP
      servers, it should send requests to all of them with assumptions
      described in <xref target="intro"></xref>.</t>

      <t>The following sub-sections describe multihoming examples to
      illustrate the PCP client behavior.</t>

      <section title="IPv6 Multihoming">
        <t>In this example of an IPv6 multihomed network, two or more routers
        co-located with firewalls are present on a single link shared with the
        host(s). Each router is, in turn, connected to a different service
        provider network, and the host in this environment would be offered
        multiple prefixes and advertised multiple DNS servers. Consider a
        scenario in which firewalls within an IPv6 multihoming environment
        also implement a PCP server. The PCP client learns the available PCP
        servers using DHCP <xref target="RFC7291"></xref> or any other
        provisioning mechanism. In reference to <xref
        target="Figure1"></xref>, a typical model is to embed DHCP servers in
        rtr1 and rtr2. A host located behind rtr1 and rtr2 can contact these
        two DHCP servers and retrieve from each server the IP address(es) of
        the corresponding PCP server.</t>

        <t>The PCP client will send PCP requests in parallel to each of the
        PCP servers.</t>

        <t><?rfc needLines="20"?><figure anchor="Figure1"
            title="IPv6 Multihoming">
            <artwork align="left"><![CDATA[                       ==================
                       |    Internet    |
                       ==================
                          |          |
                          |          | 
                     +----+-+      +-+----+
                     | ISP1 |      | ISP2 |               
                     +----+-+      +-+----+      ISP Network
                          |          |
    .........................................................
                          |          | 
                          |          |        Subscriber Network
                  +-------+---+ +----+------+
                  | rtr1 with | | rtr2 with | 
                  |   FW1     | |    FW2    |
                  +-------+---+ +----+------+
                          |          |
                          |          |
                   -------+----------+------
                               |
                           +---+---+ 
                           | Host  | 
                           +-------+
]]><?rfc needLines="20"?></artwork>
          </figure></t>
      </section>

      <section title="IPv4 Multihoming">
        <t>In this example of an IPv4 multihomed network described in "NAT- or
        RFC2260-based Multihoming" (Section 3.3 of <xref
        target="RFC4116"></xref>), the gateway router is connected to
        different service provider networks. This method uses
        Provider-Aggregatable (PA) addresses assigned by each transit provider
        to which the site is connected. The site uses NAT to translate the
        various provider addresses into a single set of private-use addresses
        within the site. In such a case, two PCP servers might have to be
        present to configure NAT to each of the transit providers. The PCP
        client learns the available PCP servers using DHCP <xref
        target="RFC7291"></xref> or any other provisioning mechanism. In
        reference to <xref target="Figure3"></xref>, a typical model is to
        embed the DHCP server and the PCP servers in rtr1. A host located
        behind rtr1 can contact the DHCP server to obtain IP addresses of the
        PCP servers. The PCP client will send PCP requests in parallel to each
        of the PCP servers.</t>

        <t><?rfc needLines="20"?><figure anchor="Figure3"
            title="IPv4 Multihoming">
            <artwork><![CDATA[
                     =====================
                     |    Internet       |
                     =====================
                        |              |
                        |              | 
                   +----+--------+   +-+------------+
                   | ISP1        |   | ISP2         |
                   |             |   |              |
                   +----+--------+   +-+------------+ ISP Network  
                        |              |               
                        |              |        
      ..............................................................
                        |              |
                        | Port1        | Port2    Subscriber Network
                        |              |                 
                   +----+--------------+----+            
                   |rtr1: NAT & PCP servers |         
                   |       GW Router        |             
                   +----+-------------------+             
                        |                                
                        |    
                        |
                   -----+--------------
                        |
                      +-+-----+ 
                      | Host  |  (private address space)
                      +-------+]]></artwork>
          </figure></t>
      </section>
    </section>

<section title="Acknowledgements" anchor="acknowledgements" numbered="no">
<t>Many thanks to Dave Thaler, Simon Perreault, Hassnaa Moustafa, Ted
   Lemon, Chris Inacio, and Brian Haberman for their reviews and
   comments.</t></section>
  </back>
</rfc>
