<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2131 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2131.xml">
<!ENTITY RFC2865 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2865.xml">
<!ENTITY RFC3306 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3306.xml">
<!ENTITY RFC3315 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3315.xml">
<!ENTITY RFC4818 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4818.xml">
<!ENTITY RFC4607 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4607.xml">
<!ENTITY RFC5777 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5777.xml">
<!ENTITY RFC6052 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6052.xml">
<!ENTITY RFC6333 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6333.xml">
<!ENTITY RFC6334 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6334.xml">
<!ENTITY RFC6519 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6519.xml">
<!ENTITY RFC6733 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6733.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-
Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-ietf-dime-4over6-provisioning-06"
     ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: trust200902, noModificationTrust200902,
noDerivativesTrust200902
     pre5378Trust200902
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only
necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="AVPs For 4over6 CE Provisioning">Attribute-Value Pairs For
    Provisioning Customer Equipment Supporting IPv4-Over-IPv6 Transitional
    Solutions</title>

    <author fullname="Cathy Zhou" initials="C." surname="Zhou">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Bantian, Longgang District</street>

          <city>Shenzhen</city>

          <code>518129</code>

          <country>P.R. China</country>
        </postal>

        <phone></phone>

        <email>cathy.zhou@huawei.com</email>
      </address>
    </author>

    <author fullname="Tom Taylor" initials="T." surname="Taylor">
      <organization>PT Taylor Consulting</organization>

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

          <city>Ottawa</city>

          <region></region>

          <code></code>

          <country>Canada</country>
        </postal>

        <phone></phone>

        <email>tom.taylor.stds@gmail.com</email>
      </address>
    </author>

    <author fullname="Qiong Sun" initials="Q." surname="Sun">
      <organization>China Telecom</organization>

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

          <city></city>

          <region></region>

          <code></code>

          <country>P.R.China</country>
        </postal>

        <phone>86 10 58552936</phone>

        <email>sunqiong@ctbri.com.cn</email>
      </address>
    </author>

    <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>

        <phone></phone>

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

    <date day="" month="" year="" />

    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>Internet Engineering Task Force</workgroup>

    <keyword>DS-Lite</keyword>

    <keyword>Lightweight 4over6</keyword>

    <keyword>MAP-E</keyword>

    <keyword>IPv4 service continuity</keyword>

    <keyword>IPv6 deployment</keyword>

    <keyword>IPv4 address sharing</keyword>

    <keyword>Diameter</keyword>

    <keyword>Multicast</keyword>

    <keyword>IPv4 over IPv6</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>During the transition from IPv4 to IPv6, customer equipment may have
      to support one of the various transition methods that have been defined
      for carrying IPv4 packets over IPv6. This document enumerates the
      information that needs to be provisioned on a customer edge router to
      support a list of transition techniques based on tunneling IPv4 in IPv6,
      with a view to defining reusable components for a reasonable transition
      path between these techniques. To the extent that the provisioning is
      done dynamically, AAA support is needed to provide the information to
      the network server responsible for passing the information to the
      customer equipment. This document specifies Diameter (RFC 6733)
      attribute-value pairs to be used for that purpose.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>A number of transition techniques have been defined to allow IPv4
      packets to pass between hosts and IPv4 networks over an intervening IPv6
      network while minimizing the number of public IPv4 addresses that need
      to be consumed by the hosts. Different operators will deploy different
      technologies, and sometimes one operator will use more than one
      technology, depending on what is supported by the available equipment
      and upon other factors both technical and economic.</t>

      <t>Each technique requires the provisioning of some subscriber-specific
      information on the customer edge device. The provisioning may be by
      DHCPv6 <xref target="RFC3315"></xref> or by some other method. This
      document is indifferent to the specific provisioning technique used, but
      assumes a deployment in which that information is managed by AAA
      (Authentication, Authorization, and Accounting) servers. It further
      assumes that this information is delivered to intermediate network nodes
      for onward provisioning using the Diameter protocol <xref
      target="RFC6733"></xref>.</t>

      <t>As described below, in the particular case where the Lightweight
      4over6 (lw4o6) <xref target="RFC7596"></xref> transition method has been
      deployed, per-subscriber-site information almost identical to that
      passed to the subscriber site <xref target="RFC7598"></xref> also needs
      to be delivered to the border router serving that site. The Diameter
      protocol may be used for this purpose too.</t>

      <t>This document analyzes the information required to configure the
      customer edge equipment for the following set of transition methods:
      <list style="symbols">
          <t>Dual-Stack Lite (DS-Lite) <xref target="RFC6333"></xref>,</t>

          <t>Lightweight 4over6 (lw4o6) <xref target="RFC7596"></xref>,
          and</t>

          <t>Mapping of Address and Port with Encapsulation (MAP-E) <xref
          target="RFC7597"></xref>.</t>
        </list></t>

      <t><xref target="I-D.ietf-softwire-dslite-multicast"></xref> specifies a
      generic solution for delivery of IPv4 multicast services to IPv4 clients
      over an IPv6 multicast network. The solution was developed with DS-Lite
      in mind but it is however not limited to DS-Lite. As such, it applies
      also for lw4o6 and MAP-E. This document analyzes the information
      required to configure the customer edge equipment for the support of
      multicast in the context of DS-Lite, MAP-E, and Lightweight 4over6 in
      particular.</t>

      <t>On the basis of those analyses it specifies a number of
      attribute-value pairs (AVPs) to allow the necessary
      subscriber-site-specific configuration information to be carried in
      Diameter.</t>

      <t>This document doesn't specify any new commands or Application-Ids.
      The specified AVPs could be used for any Diameter application suitable
      for provisioning.</t>

      <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"></xref>.</t>

        <t>The abbreviation "CE" denotes the equipment at the customer edge
        that terminates the customer end of an IPv6 transitional tunnel. This
        will usually be a router, but could be a host directly connected to
        the network.</t>

        <t>The term "tunnel source address" is used to denote the IPv6 source
        address used in the outer header of packets sent from the CE through
        an lw4o6 transitional tunnel to the border router.</t>
      </section>
    </section>

    <section anchor="reqts"
             title="Description of the Parameters Required By Each Transition Method">
      <t>This section reviews the parameters that need to be provisioned for
      each of the transition methods listed above. This enumeration provides
      the justification for the AVPs defined in the next section.</t>

      <t>A means is required to indicate which transition method(s) a given
      subscriber wants to use. The approach taken in this document is to
      specify Grouped AVPs specific to lw4o6 and MAP-E. The operator can
      control which of these two transition methods a given subscriber uses by
      ensuring that AAA passes only the Grouped AVP relevant to that method. A
      Grouped AVP is unnecessary for Dual-Stack Lite, since AAA has only to
      provide the Fully Qualified Domain Name (FQDN) of the DS-Lite Address
      Family Transition Router (AFTR) (see <xref target="dslite"></xref>).
      Hence when no Grouped AVP is provided either for lw4o6 or MAP-E and only
      the AFTR's FQDN is present, this indicates that the subscriber equipment
      will use the Dual-Stack Lite transition method. Provisioning of
      multicast is an orthogonal activity, since it is independent of the
      transition method.</t>

      <section anchor="dslite"
               title="Parameters For Dual-Stack Lite (DS-Lite)">
        <t>DS-Lite is documented in <xref target="RFC6333"></xref>. The Basic
        Bridging BroadBand (B4) element at the customer premises needs to
        discover the IPv6 address of the AFTR (border router). For the reasons
        discussed in <xref target="BRaddr"></xref>, the AAA server provisions
        the B4 element with the AFTR's Fully Qualified Domain Name (FQDN) that
        is passed to a B4's IP resolution library. The AFTR's FQDN is
        contained in the Border-Router-Name AVP (see <xref
        target="BRaddr"></xref>).</t>

        <t>The B4 element could also be configured with the IPv4 address of
        the B4 interface facing the tunnel, with valid values from 192.0.0.2
        to 192.0.0.7 and the default value of 192.0.0.2 in the absence of
        provisioning. Provisioning such information through AAA is problematic
        because it is most likely used in a case where multiple B4 instances
        occupy the same device. This document therefore assumes that the B4
        interface address is determined by other means than AAA
        (implementation-dependent or static assignment).</t>
      </section>

      <!-- dslite -->

      <section anchor="lw4o6" title="Lightweight 4over6 (lw4o6)">
        <t>Lightweight 4over6 (lw4o6) is documented in <xref
        target="RFC7596"></xref>. Lw4o6 requires four items to be provisioned
        to the customer equipment: <list style="symbols">
            <t>IPv6 address of the border router.</t>

            <t>IPv6 prefix used by the CE to construct the tunnel source
            address. In the terminology of <xref target="RFC7596"></xref>,
            this is the IPv6 Binding Prefix.</t>

            <t>an IPv4 address to be used on the external side of the CE;
            and</t>

            <t>if the IPv4 address is shared, a specification of the port set
            the subscriber site is allowed to use. Please see the description
            in <xref target="pset"></xref>. For lw4o6, all three of the
            parameters 'a', 'k', and PSID described in that section are
            required. The default value of the offset parameter 'a' is 0.</t>
          </list></t>

        <t>As discussed in Section 4 of <xref target="RFC7596"></xref>, it is
        necessary to synchronize this configuration with corresponding
        per-subscriber configuration at the border router. The border router
        information consists of the same public IPv4 address and port set
        parameters that are passed to the CE, bound together with the full
        /128 IPv6 address (not just the Binding Prefix) configured as the
        tunnel source address at the CE.</t>
      </section>

      <!-- lw4o6 -->

      <section anchor="pset" title="Port Set Specification">
        <t>When an external IPv4 address is shared, lw4o6 and MAP-E restrict
        the CE to use of a subset of all available ports on the external side.
        Both transition methods use the algorithm defined in Appendix B of
        <xref target="RFC7597"> </xref> to derive the values of the port
        numbers in the port set. This algorithm features three parameters,
        describing the positioning and value of the Port Set Identifier (PSID)
        within each port number of the generated set: <list style="symbols">
            <t>an offset 'a' from the beginning of the port number to the
            first bit of the PSID;</t>

            <t>the length 'k' of the PSID within the port number, in bits;
            and</t>

            <t>the value of the PSID itself.</t>
          </list></t>
      </section>

      <!-- pset -->

      <section anchor="map-e"
               title="Mapping of Address and Port with Encapsulation (MAP-E)">
        <t>Mapping of Address and Port with Encapsulation (MAP-E) is described
        in <xref target="RFC7597"></xref>. MAP-E requires the provisioning of
        the following per-subscriber information at the customer edge device:
        <list style="symbols">
            <t>the IPv6 address of one or more border routers, or in MAP-E
            terminology, MAP-E border relays.</t>

            <t>the unique End-user IPv6 prefix for the customer edge device.
            This may be provided by AAA or acquired by other means.</t>

            <t>the Basic Mapping Rule for the customer edge device. This
            includes the following parameters: <list style="symbols">
                <t>the rule IPv6 prefix and length;</t>

                <t>the rule IPv4 prefix and length. A prefix length of 0
                indicates that the entire IPv4 address or prefix is coded in
                the Extended Address (EA) bits of the End-user IPv6 prefix
                rather than in the mapping rule.</t>

                <t>the number of EA bits included in the End-user IPv6
                prefix;</t>

                <t>port set parameters giving the set of ports the CE is
                allowed to use when the IPv4 address is shared. Please see the
                description of these parameters in <xref
                target="pset"></xref>. At a minimum, the offset parameter 'a'
                is required. For MAP-E this has the default value 6. The
                parameters 'k' and PSID are needed if they cannot be derived
                from the mapping rule information and the EA bits (final case
                of Section 5.2 of <xref target="RFC7597"></xref>).</t>
              </list></t>

            <t>whether the device is to operate in mesh or hub-and-spoke
            mode;</t>

            <t>in mesh mode only, zero or more Forwarding Mapping Rules,
            described by the same set of parameters as the Basic Mapping
            Rule;</t>
          </list></t>

        <t>As indicated in Section 5, bullet 1 of <xref
        target="RFC7597"></xref>, a MAP CE can be provisioned with multiple
        End-user IPv6 prefixes, each associated with its own Basic Mapping
        Rule. This does not change the basic requirement for representation of
        the corresponding information in the form of Diameter AVPs, but adds a
        potential requirement for multiple instances of this information to be
        present in the Diameter message, differing in the value of the
        End-user IPv6 prefix (in contrast to the Forward Mapping Rule
        instances).</t>

        <t>The border router needs to be configured with the superset of the
        Mapping Rules passed to the customer sites it serves. Since this
        requirement does not require direct coordination with CE configuration
        in the way lw4o6 does, it is out of scope of the present document.
        However, the AVPs defined here may be useful if a separate Diameter
        application is used to configure the border router.</t>
      </section>

      <!-- map-e -->

      <section anchor="multiparm" title="Parameters For Multicast">
        <t><xref target="I-D.ietf-softwire-dslite-multicast"></xref> specifies
        a generic solution for delivery of IPv4 multicast services to IPv4
        clients over an IPv6 multicast network. The solution can be in
        particular deployed in a DS-Lite context, but is also adaptable to
        lw4o6 and MAP-E. For example, <xref
        target="I-D.ietf-softwire-multicast-prefix-option"></xref> specifies
        how DHCPv6 <xref target="RFC3315"></xref> can be used to provision
        multicast-related information. The following lists the
        multicast-related information that needs to be provisioned: <list
            style="symbols">
            <t>ASM-mPrefix64: the IPv6 multicast prefix to be used to
            synthesize the IPv4-embedded IPv6 addresses of the multicast
            groups in the Any-Source Multicast (ASM) mode. This is achieved by
            concatenating the ASM-mPrefix64 and a IPv4 multicast address; the
            IPv4 multicast address is inserted in the last 32 bits of the
            IPv4-embedded IPv6 multicast address.</t>

            <t>SSM-mPrefix64: the IPv6 multicast prefix to be used to
            synthesize the IPv4-embedded IPv6 addresses of the multicast
            groups in the Source-Specific Multicast (SSM, <xref
            target="RFC4607"></xref>) mode. This is achieved by concatenating
            the SSM-mPrefix64 and a IPv4 multicast address; the IPv4 multicast
            address is inserted in the last 32 bits of the IPv4-embedded IPv6
            multicast address.</t>

            <t>uPrefix64: the IPv6 unicast prefix to be used in SSM mode for
            constructing the IPv4-embedded IPv6 addresses representing the
            IPv4 multicast sources in the IPv6 domain. uPrefix64 may also be
            used to extract the IPv4 address from the received multicast data
            flows. The address mapping follows the guidelines documented in
            <xref target="RFC6052"></xref>.</t>
          </list></t>
      </section>

      <!-- multiparm -->

      <section anchor="sumreq" title="Summary and Discussion">
        <t>There are two items that are common to the different transition
        methods, and the corresponding AVPs to carry them can be reused: <list
            style="symbols">
            <t>a representation of the IPv6 address of a border router;</t>

            <t>A set of prefixes for delivery of multicast services to IPv4
            clients over an IPv6 multicast network.</t>
          </list></t>

        <t><xref target="RFC6519"></xref> sets a precedent for representation
        of the IPv6 address of a border router as an FQDN. This can be
        dereferenced to one or more IP addresses by the provisioning system
        before being passed to the customer equipment, or left as an FQDN as
        it is in <xref target="RFC6334"></xref>.</t>

        <t>The remaining requirements are transition-method-specific: <list
            style="symbols">
            <t>for lw4o6, a representation of a binding between (1) either the
            IPv6 Binding Prefix or a full /128 IPv6 address, (2) a public IPv4
            address, and (3) (if the IPv4 address is shared) a port set
            identifier;</t>

            <t>for MAP-E, a representation of the unique End-user IPv6 prefix
            for the CE, if not provided by other means;</t>

            <t>for MAP-E, a representation of a Mapping Rule;</t>

            <t>for MAP-E, an indication of whether mesh mode or hub-and-spoke
            mode is to be used.</t>
          </list></t>
      </section>

      <!-- sumreq -->
    </section>

    <!-- reqts -->

    <section anchor="AVPdefs" title="Attribute-Value Pair Definitions">
      <t>This section provides the specifications for the AVPs needed to meet
      the requirements summarized in <xref target="sumreq"></xref>.</t>

      <section anchor="IPplen" title="IP-Prefix-Length AVP">
        <t>The IP-Prefix-Length AVP (AVP code TBD00) is of type Unsigned32. It
        provides the length of an IPv4 or IPv6 prefix. Valid values are from 0
        to 32 for IPv4, and from 0 to 128 for IPv6. Tighter limits are given
        below for particular contexts of use of this AVP. <list style="empty">
            <t>NOTE: The IP-Prefix-Length AVP is only relevant when associated
            with an IP-Address AVP in a Grouped AVP.</t>
          </list></t>
      </section>

      <!-- IPplen -->

      <section anchor="BRaddr" title="Border-Router-Name AVP">
        <t>Following on the precedent set by <xref target="RFC6334"></xref>
        and <xref target="RFC6519"></xref>, this document identifies a border
        router using an FQDN rather than an address. The Border-Router-Name
        AVP (AVP Code TBD01) is of type OctetString. The FQDN encoding MUST
        follow the Name Syntax defined in <xref target="RFC1035"></xref><xref
        target="RFC1123"></xref><xref target="RFC2181"></xref> and are
        represented in ASCII form. Note, if Internationalized Domain Names
        (IDNs) are used, A-labels defined in <xref target="RFC5891"></xref>
        must be used (see Appendix D of <xref target="RFC6733"></xref>).</t>
      </section>

      <!-- BRaddr -->

      <section anchor="DSLiteMul" title="64-Multicast-Attributes AVP">
        <t>The 64-Multicast-Attributes AVP (AVP Code TBD02) is of type
        Grouped. It contains the multicast-related IPv6 prefixes needed for
        providing IPv4 multicast over IPv6 using DS-Lite, MAP-E, or lw4o6, as
        mentioned in <xref target="multiparm"></xref>.</t>

        <t>The syntax is shown in <xref target="DSLMul_AVP"></xref>.</t>

        <figure anchor="DSLMul_AVP" title="64-Multicast-Attributes AVP">
          <artwork><![CDATA[
        64-Multicast-Attributes  ::= < AVP Header: TBD02 >
                                     [ ASM-mPrefix64 ]
                                     [ SSM-mPrefix64 ]
                                     [ Delegated-IPv6-Prefix ]
                                    *[ AVP ]
          ]]></artwork>
        </figure>

        <t>64-Multicast-Attributes AVP MUST include the ASM-mPrefix64 AVP or
        the SSM-mPrefix64 AVP, and it MAY include both.</t>

        <t>The Delegated-IPv6-Prefix AVP MUST be present when the
        SSM-mPrefix64 AVP is present. The Delegated-IPv6-Prefix AVP MAY be
        present when the ASM-mPrefix64 AVP is present.</t>

        <section anchor="ASM_Pref64" title="ASM-mPrefix64 AVP">
          <t>The ASM-mPrefix64 AVP (AVP Code TBD03) conveys the value of
          ASM-mPrefix64 as mentioned in <xref target="multiparm"></xref>. The
          ASM-mPrefix64 AVP is of type Grouped, as shown in <xref
          target="fig_ASMPfx"></xref>.</t>

          <figure anchor="fig_ASMPfx" title="ASM-mPrefix64 AVP">
            <artwork><![CDATA[
          ASM-mPrefix64  ::= < AVP Header: TBD03 >
                             { IP-Address }
                             { IP-Prefix-Length }
                            *[ AVP ]
            ]]></artwork>
          </figure>

          <t>IP-Address (AVP code 518) is defined in <xref
          target="RFC5777"></xref> and is of type Address. Within the
          ASM-mPrefix64 AVP, it provides the value of an IPv6 prefix. The
          AddressType field in IP-Address MUST have value 2 (IPv6). The
          conveyed multicast IPv6 prefix MUST belong to the ASM range. Unused
          bits in IP-Address beyond the actual prefix MUST be set to zeroes by
          the sender and ignored by the receiver.</t>

          <t>The IP-Prefix-Length AVP (AVP code TBD00) provides the actual
          length of the prefix contained in the IP-Address AVP. Within the
          ASM-mPrefix64 AVP, valid values of the IP-Prefix-Length AVP are from
          24 to 96.</t>
        </section>

        <!-- ASM_Pref64 -->

        <section anchor="SSM_Pref64" title="SSM-mPrefix64 AVP">
          <t>The SSM-mPrefix64 AVP (AVP Code TBD04) conveys the value of
          SSM-mPrefix64 as mentioned in <xref target="multiparm"></xref>. The
          SSM-mPrefix64 AVP is of type Grouped, as shown in <xref
          target="fig_SSMPfx"></xref>.</t>

          <figure anchor="fig_SSMPfx" title="SSM-mPrefix64 AVP">
            <artwork><![CDATA[
          SSM-mPrefix64  ::= < AVP Header: TBD04 >
                             { IP-Address }
                             { IP-Prefix-Length }
                            *[ AVP ]
            ]]></artwork>
          </figure>

          <t>IP-Address (AVP code 518) provides the value of an IPv6 prefix.
          The AddressType field in IP-Address MUST have value 2 (IPv6). The
          conveyed multicast IPv6 prefix MUST belong to the SSM range. Unused
          bits in IP-Address beyond the actual prefix MUST be set to zeroes by
          the sender and ignored by the receiver.</t>

          <t>The IP-Prefix-Length AVP (AVP code TBD00) provides the actual
          length of the prefix contained in the IP-Address AVP.</t>
        </section>

        <!-- SSM_Pref64 -->

        <section anchor="UNIPref-64"
                 title="Delegated-IPv6-Prefix AVP As uPrefix64">
          <t>Within the 64-Multicast-Attributes AVP, the Delegated-IPv6-Prefix
          AVP (AVP Code 123) conveys the value of uPrefix64, a unicast IPv6
          prefix, as mentioned in <xref target="multiparm"></xref>. The
          Delegated-IPv6-Prefix AVP is defined in <xref
          target="RFC4818"></xref>. As specified by <xref
          target="RFC6052"></xref>, the value in the Prefix-Length field MUST
          be one of 32, 48, 56, 64 or 96.</t>
        </section>

        <!-- UNIPref-64 -->
      </section>

      <!-- DSLiteMul -->

      <section anchor="teppfx" title="Tunnel-Source-Pref-Or-Addr AVP">
        <t>The Tunnel-Source-Pref-Or-Addr AVP (AVP Code TBD05) conveys either
        the IPv6 Binding Prefix or the tunnel source address on the CE, as
        described in <xref target="lw4o6"></xref>. The
        Tunnel-Source-Pref-Or-Addr AVP is of type Grouped, with syntax as
        shown in <xref target="fig_teppix"></xref>. The
        Tunnel-Source-Pref-Or-Addr AVP MUST contain either the
        Delegated-IPv6-Prefix AVP or the Tunnel-Source-IPv6-Address AVP, not
        both.</t>

        <figure anchor="fig_teppix" title="Tunnel-Source-Pref-Or-Addr AVP">
          <artwork><![CDATA[
        Tunnel-Source-Pref-Or-Addr  ::= < AVP Header: TBD05 >
                                        [ Delegated-IPv6-Prefix ]
                                        [ Tunnel-Source-IPv6-Address ]
                                       *[ AVP ]
          ]]></artwork>
        </figure>

        <t>This AVP is defined separately from the lw4o6-Binding AVP (which
        includes it) to provide flexibility in the transport of the tunnel
        source address from the provisioning system to AAA while also
        supporting the provision of a complete binding to the lw4o6 border
        router.</t>

        <section anchor="bindPref"
                 title="Delegated-IPv6-Prefix As the IPv6 Binding Prefix">
          <t>The Delegated-IPv6-Prefix AVP (AVP code 123) is of type
          Octetstring, and is defined in <xref target="RFC4818"></xref>.
          Within the Tunnel-Source-Pref-Or-Addr AVP, it conveys the IPv6
          Binding Prefix assigned to the CE. Valid values in the Prefix-Length
          field are from 0 to 128 (full address).</t>
        </section>

        <!-- bindPref -->

        <section anchor="tunnAddr" title="Tunnel-Source-IPv6-Address AVP">
          <t>The Tunnel-Source-IPv6-Address AVP (AVP code TBD06) is of type
          Address. It provides the address that the CE has assigned to its end
          of an lw4o6 tunnel. The AddressType field in this AVP MUST be set to
          2 (IPv6).</t>
        </section>

        <!-- tunnAddr -->
      </section>

      <!-- teppfx -->

      <section anchor="psid" title="Port-Set-Identifier">
        <t>The Port-Set-Identifier AVP (AVP Code TBD07) is a structured
        OctetString with four octets of data, hence a total AVP length of 12.
        The description of the structure which follows refers to refers to the
        parameters described in <xref target="pset"></xref> (see <xref
        target="portset"></xref>). <list style="symbols">
            <t>The first (high-order) octet is the Offset field. It is
            interpreted as an 8-bit unsigned integer giving the offset 'a'
            from the beginning of a port number to the beginning of the port
            set identifier (PSID) to which that port belongs. Valid values are
            from 0 to 15.</t>

            <t>The next octet, the PSIDLength, is also interpreted as an 8-bit
            unsigned integer and gives the length 'k' in bits of the port set
            identifier (PSID). Valid values are from 0 to (16 - a). A value of
            0 indicates that the PSID is not present (probable case for MAP-E,
            see <xref target="map-e"></xref>), and the PSIDValue field MUST be
            ignored.</t>

            <t>The final two octets contain the PSIDValue field. They give the
            value of the PSID itself, right-justified within the field. That
            is, the value of the PSID occupies the 'k' lowest-order bits of
            the PSIDValue field.</t>
          </list><figure align="center" anchor="portset" title="Port Set">
            <artwork><![CDATA[    0                   1                   2                   3               
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |    Offset     |    Length     |        PSID  Value            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>
      </section>

      <!-- psid -->

      <section anchor="lw4o6-binding" title="Lw4o6-Binding AVP">
        <t>The Lw4o6-Binding AVP (AVP Code TBD08) is of type Grouped. It
        contains the elements of configuration that constitute the binding
        between an lw4o6 tunnel and IPv4 packets sent through that tunnel, as
        described in <xref target="lw4o6"></xref>.</t>

        <figure anchor="fig_lw4o6_AVP" title="Lw4o6-Binding AVP">
          <artwork><![CDATA[
                 Lw4o6-Binding  ::= < AVP Header: TBD08 >
                                    { Tunnel-Source-Pref-Or-Addr }
                                    { Lw4o6-External-IPv4-Addr }
                                    [ Port-Set-Identifier ]
                                   *[ AVP ]
          ]]></artwork>
        </figure>

        <t>The Tunnel-Source-Pref-Or-Addr AVP is defined in <xref
        target="teppfx"></xref> and provides either the Binding Prefix or the
        full IPv6 tunnel source address.</t>

        <t>The Lw4o6-External-IPv4-Addr AVP is defined in <xref
        target="lwa"></xref>.</t>

        <t>The Port-Set-Identifier AVP is defined in <xref
        target="psid"></xref>. It identifies the specific set of ports
        assigned to the lw4o6 tunnel, when the IPv4 address is being
        shared.</t>

        <section anchor="lwa" title="Lw4o6-External-IPv4-Addr AVP">
          <t>The Lw4o6-External-IPv4-Addr AVP (AVP Code TBD09) uses the
          Address derived data format defined in Section 4.3.1 of <xref
          target="RFC6733"></xref>. It provides the CE's external IPv4 address
          within the lw4o6 tunnel associated with the given binding. The
          AddressType field MUST be set to 1 (IPv4), and the total length of
          the AVP MUST be 14 octets.</t>
        </section>
      </section>

      <!-- lw4o6-attrib -->

      <section anchor="map-e-attrib" title="MAP-E-Attributes">
        <t>The MAP-E-Attributes AVP (AVP Code TBD10) is of type Grouped. It
        contains the configuration data identified in <xref
        target="map-e"></xref> for all of the mapping rules (Basic and
        Forwarding) in a single MAP domain. Multiple instances of this AVP
        will be present if the CE belongs to multiple MAP domains.</t>

        <figure anchor="fig_map_e_AVP" title="MAP-E-Attributes AVP">
          <artwork><![CDATA[
                 MAP-E-Attributes  ::= < AVP Header: TBD06 >
                                     1*{ Border-Router-Name }
                                     1*{ MAP-Mapping-Rule }
                                       [ MAP-Mesh-Mode ]
                                       [ Delegated-IPv6-Prefix ]
                                      *[ AVP ]
          ]]></artwork>
        </figure>

        <t>The Border-Router-Name AVP is defined in <xref
        target="BRaddr"></xref>. It provides the FQDN of a MAP border relay at
        the edge of the MAP domain to which the containing MAP-E-Attributes
        AVP relates. At least one instance of this AVP MUST be present.</t>

        <t>The MAP-Mapping-Rule AVP is defined in <xref
        target="mapRule"></xref>. At least one instance of this AVP MUST be
        present. If the MAP-E domain supports mesh mode (indicated by the
        presence of the MAP-Mesh-Mode AVP), additional MAP-Mapping-Rule
        instances MAY be present. If the MAP-E domain is operating in
        hub-and-spoke mode, additional MAP-Mapping-Rule instances MUST NOT be
        present.</t>

        <t>The MAP-Mesh-Mode AVP is defined in <xref
        target="mapmeshmode"></xref>. The absence of the mesh mode indicator
        attribute indicates that the CE is required to operate in
        hub-and-spoke mode.</t>

        <t>The Delegated-IPv6-Prefix AVP (AVP Code 123) provides the End-user
        IPv6 prefix assigned to the CE for the MAP domain to which the
        containing MAP-E-Attributes AVP relates. The AVP is defined in <xref
        target="RFC4818"></xref>. Valid values of the Prefix-Length field
        range from 0 to 128.</t>

        <t>The Delegated-IPv6-Prefix AVP is optional because, depending on
        deployment, the End-user IPv6 prefix may be provided by AAA or by
        other means. If multiple instances of the MAP-E-Attributes AVP
        containing the Delegated-IPv6-Prefix AVP are present, each instance of
        the latter MUST have a different value.</t>
      </section>

      <!-- map-e-attrib -->

      <section anchor="mapmeshmode" title="MAP-Mesh-Mode">
        <t>The MAP-Mesh-Mode AVP (AVP Code TBD11) is of type Enumerated and
        indicates whether the CE has to operate in mesh mode or hub-and-spoke
        when using MAP-E. The following values are supported: <list
            style="empty">
            <t>0 MESH</t>

            <t>1 HUB_AND_SPOKE</t>
          </list></t>

        <t>The absence of the mesh mode indicator attribute indicates that the
        CE is required to operate in hub-and-spoke mode.</t>
      </section>

      <section anchor="mapRule" title="MAP-Mapping-Rule">
        <t>The MAP-Mapping-Rule AVP (AVP Code TBD12) is of type Grouped, and
        is used only in conjunction with MAP-based transition methods. Mapping
        rules are required both by the MAP border relay and by the CE. The
        components of the MAP-Mapping-Rule AVP provide the contents of a
        mapping rule as described in <xref target="map-e"></xref>.</t>

        <t>The syntax of the MAP-Mapping-Rule AVP is as follows:</t>

        <figure anchor="fig_map" title="MAP-Mapping-Rule AVP">
          <artwork><![CDATA[
         MAP-Mapping-Rule  ::= < AVP Header: TBD12 >
                               { Rule-IPv4-Addr-Or-Prefix }
                               { Rule-IPv6-Prefix    }
                               { EA-Field-Length     }
                               { Port-Set-Identifier }
                              *[ AVP ]
          ]]></artwork>
        </figure>

        <t>The Rule-IPv4-Addr-Or-Prefix, Rule-IPv6-Prefix, EA-Field-Length,
        and Port-Set-Identifier AVPs MUST all be present.</t>

        <t>The Port-Set-Identifier AVP provides information to identify the
        specific set of ports assigned to the CE. For more information see
        <xref target="map-e"></xref> and <xref target="pset"></xref>. The
        Port-Set-Identifier AVP is defined in <xref target="psid"></xref>.</t>

        <section anchor="ruleV4" title="Rule-IPv4-Addr-Or-Prefix AVP">
          <t>The Rule-IPv4-Addr-Or-Prefix AVP (AVP Code TBD13) conveys the
          rule IPv4 prefix and length as described in <xref
          target="map-e"></xref>. The Rule-IPv4-Addr-Or-Prefix AVP is of type
          Grouped, as shown in <xref target="fig_ruleV4"></xref>.</t>

          <figure anchor="fig_ruleV4" title="Rule-IPv4-Addr-Or-Prefix AVP">
            <artwork><![CDATA[
          Rule-IPv4-Addr-Or-Prefix  ::= < AVP Header: TBD13 >
                                        { IP-Address }
                                        { IP-Prefix-Length }
                                       *[ AVP ]
            ]]></artwork>
          </figure>

          <t>IP-Address (AVP code 518) is defined in <xref
          target="RFC5777"></xref> and is of type Address. Within the
          Rule-IPv4-Addr-Or-Prefix AVP, it provides the value of a unicast
          IPv4 address or prefix. The AddressType field in IP-Address MUST
          have value 1 (IPv4). Unused bits in IP-Address beyond the actual
          prefix MUST be set to zeroes by the sender and ignored by the
          receiver.</t>

          <t>The IP-Prefix-Length AVP (AVP code TBD00) provides the actual
          length of the prefix contained in the IP-Address AVP. Within the
          Rule-IPv4-Addr-Or-Prefix AVP, valid values of the IP-Prefix-Length
          AVP are from 0 to 32 (full address), based on the different cases
          identified in Section 5.2 of <xref target="RFC7597"></xref>.</t>
        </section>

        <!-- ruleV4 -->

        <section anchor="ruleV6" title="Rule-IPv6-Prefix AVP">
          <t>The Rule-IPv6-Prefix AVP (AVP Code TBD14) conveys the rule IPv6
          prefix and length as described in <xref target="map-e"></xref>. The
          Rule-IPv6-Prefix AVP is of type Grouped, as shown in <xref
          target="fig_ruleV6"></xref>.</t>

          <figure anchor="fig_ruleV6" title="Rule-IPv6-Prefix AVP">
            <artwork><![CDATA[
          Rule-IPv6-Prefix  ::= < AVP Header: TBD14 >
                                { IP-Address }
                                { IP-Prefix-Length }
                               *[ AVP ]
          ]]></artwork>
          </figure>

          <t>IP-Address (AVP code 518) is defined in <xref
          target="RFC5777"></xref> and is of type Address. Within the
          Rule-IPv6-Prefix AVP, it provides the value of a unicast IPv6
          prefix. The AddressType field in IP- Address MUST have value 2
          (IPv6). Unused bits in IP-Address beyond the actual prefix MUST be
          set to zeroes by the sender and ignored by the receiver.</t>

          <t>The IP-Prefix-Length AVP (AVP code TBD00) provides the actual
          length of the prefix contained in the IP-Address AVP. Within the
          Rule-IPv6-Prefix AVP, the minimum valid prefix length is 0. The
          maximum value is bounded by the length of the End-user IPv6 prefix
          associated with the mapping rule, if present in the form of the
          Delegated-IPv6-Prefix AVP in the enclosing MAP-E-Attributes AVP.
          Otherwise the maximum value is 128.</t>
        </section>

        <!-- ruleV6 -->

        <section anchor="eaLen" title="EA-Field-Length AVP">
          <t>The EA-Field-Length AVP (AVP Code TBD15) is of type Unsigned32.
          Valid values range from 0 to 48. See Section 5.2 of <xref
          target="RFC7597"></xref> for a description of the use of this
          parameter in deriving IPv4 address and port number
          configuration.</t>
        </section>

        <!-- eaLen -->

        <!-- rulePSID -->
      </section>

      <!-- maprule -->
    </section>

    <!-- AVPdefs -->

    <section anchor="mbit" title="Attribute Value Pair Flag Rules">
      <t></t>

      <t><figure>
          <artwork><![CDATA[                                                           +---------+
                                                           |AVP flag |
                                                           |rules    |
                                                           +----+----+
                                AVP   Section              |    |MUST|
    Attribute Name              Code  Defined  Value Type  |MUST| NOT|
   +-------------------------------------------------------+----+----+
   |IP-Prefix-Length            TBD00  3.1     Unsigned32  |    | V  |
   +-------------------------------------------------------+----+----+
   |Border-Router-Name          TBD01  3.2     OctetString |    | V  |
   +-------------------------------------------------------+----+----+
   |64-Multicast-Attributes     TBD02  3.3     Grouped     |    | V  |
   +-------------------------------------------------------+----+----+
   |ASM-mPrefix64               TBD03  3.3.1   Grouped     |    | V  |
   +-------------------------------------------------------+----+----+
   |SSM-mPrefix64               TBD04  3.3.2   Grouped     |    | V  |
   +-------------------------------------------------------+----+----+
   |Tunnel-Source-Pref-Or-Addr  TBD05  3.4     Grouped     |    | V  |
   +-------------------------------------------------------+----+----+
   |Tunnel-Source-IPv6-Address  TBD06  3.4.2   Address     |    | V  |
   +-------------------------------------------------------+----+----+
   |Port-Set-Identifier         TBD07  3.5     OctetString |    | V  |
   +-------------------------------------------------------+----+----+
   |Lw4o6-Binding               TBD08  3.6     Grouped     |    | V  |
   +-------------------------------------------------------+----+----+
   |Lw4o6-External-IPv4-Addr    TBD09  3.6.1   Address     |    | V  |
   +-------------------------------------------------------+----+----+
   |MAP-E-Attributes            TBD10  3.7     Grouped     |    | V  |
   +-------------------------------------------------------+----+----+
   |MAP-Mesh-Mode               TBD11  3.8     Enumerated  |    | V  |
   +-------------------------------------------------------+----+----+
   |MAP-Mapping-Rule            TBD12  3.9     Grouped     |    | V  |
   +-------------------------------------------------------+----+----+
   |Rule-IPv4-Addr-Or-Prefix    TBD13  3.9.1   Grouped     |    | V  |
   +-------------------------------------------------------+----+----+
   |Rule-IPv6-Prefix            TBD14  3.9.2   Grouped     |    | V  |
   +-------------------------------------------------------+----+----+
   |EA-Field-Length             TBD15  3.9.3   Unsigned32  |    | V  |
   +-------------------------------------------------------+----+----+

]]></artwork>
        </figure>As described in the Diameter base protocol <xref
      target="RFC6733"></xref>, the M-bit usage for a given AVP in a given
      command may be defined by the application.</t>
    </section>

    <!-- Possibly a 'Contributors' section ... -->

    <section anchor="IANA" title="IANA Considerations">
      <t>This memo requests to IANA to register the following Diameter AVP
      codes:</t>

      <texttable anchor="tt_codes" title="">
        <ttcol align="center">Code</ttcol>

        <ttcol align="left">Attribute Name</ttcol>

        <ttcol align="left">Reference</ttcol>

        <c>TBD00</c>

        <c>IP-Prefix-Length</c>

        <c>This document</c>

        <c>TBD01</c>

        <c>Border-Router-Name</c>

        <c>This document</c>

        <c>TBD02</c>

        <c>64-Multicast-Attributes</c>

        <c>This document</c>

        <c>TBD03</c>

        <c>ASM-mPrefix64</c>

        <c>This document</c>

        <c>TBD04</c>

        <c>SSM-mPrefix64</c>

        <c>This document</c>

        <c>TBD05</c>

        <c>Tunnel-Source-Pref-Or-Addr</c>

        <c>This document</c>

        <c>TBD06</c>

        <c>Tunnel-Source-IPv6-Address</c>

        <c>This document</c>

        <c>TBD07</c>

        <c>Port-Set-Identifier</c>

        <c>This document</c>

        <c>TBD08</c>

        <c>Lw4o6-Binding</c>

        <c>This document</c>

        <c>TBD09</c>

        <c>Lw4o6-External-IPv4-Addr</c>

        <c>This document</c>

        <c>TBD10</c>

        <c>MAP-E-Attributes</c>

        <c>This document</c>

        <c>TBD11</c>

        <c>MAP-Mesh-Mode</c>

        <c>This document</c>

        <c>TBD12</c>

        <c>MAP-Mapping-Rule</c>

        <c>This document</c>

        <c>TBD13</c>

        <c>Rule-IPv4-Addr-Or-Prefix</c>

        <c>This document</c>

        <c>TBD14</c>

        <c>Rule-IPv6-Prefix</c>

        <c>This document</c>

        <c>TBD15</c>

        <c>EA-Field-Length</c>

        <c>This document</c>
      </texttable>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t></t>

      <section title="Man-In-The-Middle (MITM) Attacks">
        <t>The AVPs defined in this document face two threats, both dependent
        on man-in-the-middle (MITM) attacks on the Diameter delivery path.
        </t>

        <t>The first threat is denial-of-service (DoS) through modification of
        the AVP contents leading to misconfiguration, e.g., a subscriber may
        fail to access its connectivity service if an invalid IP address was
        configured, the subscriber's traffic can be intercepted by a
        misbehaving node if a fake Border Node has been configured, etc. </t>

        <t>The second threat is that Diameter security is currently provided
        on a hop-by-hop basis (see Section 2.2 of <xref
        target="RFC6733"></xref>). At the time of writing, the Diameter
        end-to-end security problem has not been solved, so MITM attacks by
        Diameter peers along the path are possible. Diameter-related security
        considerations are discussed in Section 13 of <xref
        target="RFC6733"></xref>. </t>
      </section>

      <section anchor="privacy" title="Privacy">
        <t>Given that the AVPs defined in this document reveal privacy-related
        information (e.g., subscriber addresses) that can be used for tracking
        proposes, all these AVPs are considered to be security-sensitive.
        Therefore the considerations discussed in Section 13.3 of <xref
        target="RFC6733"></xref> MUST be followed for Diameter messages
        containing these AVPs. </t>
      </section>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>Huawei Technologies funded Tom Taylor's work on earlier versions of
      this document.</t>

      <t>Special thanks to Lionel Morand for the detailed review.</t>

      <t>Many thanks to Russ Housley, Tim Chown, Spencer Dawkins, and Ben
      Campbell for the review and comments.</t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <references title="Normative References">
      <?rfc include='reference.RFC.7596'?>

      <?rfc include='reference.RFC.7597'?>

      <?rfc include='reference.RFC.2181'?>

      <?rfc include='reference.RFC.2119'?>

      <?rfc include='reference.RFC.4818'?>

      <?rfc include='reference.RFC.5777'?>

      <?rfc include='reference.RFC.6333'?>

      <?rfc include='reference.RFC.6733'?>

      <?rfc include='reference.RFC.1035'?>

      <?rfc include='reference.RFC.1123'?>

      <?rfc include='reference.RFC.5891'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.ietf-softwire-multicast-prefix-option'?>

      <?rfc include='reference.I-D.ietf-softwire-dslite-multicast'?>

      <?rfc include='reference.RFC.3315'?>

      <?rfc include='reference.RFC.4607'?>

      <?rfc include='reference.RFC.6334'?>

      <?rfc include='reference.RFC.6052'?>

      <?rfc include='reference.RFC.6519'?>

      <?rfc include='reference.RFC.7598'?>
    </references>
  </back>
</rfc>
