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

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 SYSTEM "reference.RFC.2119.xml">
<!ENTITY rfc2131 SYSTEM "reference.RFC.2131.xml">
<!ENTITY rfc3315 SYSTEM "reference.RFC.3315.xml">
<!ENTITY rfc2119 SYSTEM "reference.RFC.2119.xml">
<!ENTITY rfc2473 SYSTEM "reference.RFC.2473.xml">
<!ENTITY rfc6145 SYSTEM "reference.RFC.6145.xml">
<!ENTITY rfc6346 SYSTEM "reference.RFC.6346.xml">
<!ENTITY rfc7227 SYSTEM "reference.RFC.7227.xml">
]>

<?rfc toc="yes" ?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc comments="yes" ?>
<?rfc inline="yes" ?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc category="std" number="7598" ipr="trust200902" submissionType="IETF"
   consensus="yes">

  <front>
    <title abbrev="DHCPv6 for Softwire 46 CEs">DHCPv6 Options for
    Configuration of Softwire Address and&nbsp;Port&nbhy;Mapped&nbsp;Clients</title>

    <author fullname="Tomek Mrugalski" initials="T." surname="Mrugalski">
      <organization abbrev="ISC">Internet Systems Consortium,
      Inc.</organization>
      <address>
        <postal>
          <street>950 Charter Street</street>
          <city>Redwood City</city>
          <region>CA</region>
          <code>94063</code>
          <country>United States</country>
        </postal>
        <phone>+1 650 423 1345</phone>
        <email>tomasz.mrugalski@gmail.com</email>
        <uri>http://www.isc.org/</uri>
      </address>
    </author>

    <author fullname="Ole Troan" initials="O" surname="Troan">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>Philip Pedersens vei 1</street>
          <city>Lysaker</city>
          <code>1366</code>
          <country>Norway</country>
        </postal>
        <email>ot@cisco.com</email>
      </address>
    </author>

    <author fullname="Ian Farrer" initials="I." surname="Farrer">
      <organization>Deutsche Telekom AG</organization>
      <address>
      <postal>
      <street>CTO-ATI, Landgrabenweg 151</street>
      <city>Bonn</city>
      <region>NRW</region>
      <code>53227</code>
      <country>Germany</country>
      </postal>
      <email>ian.farrer@telekom.de</email>
      </address>
    </author>

    <author fullname="Simon Perreault" initials="S." surname="Perreault">
      <organization>Jive Communications</organization>
      <address>
      <postal>
      <street></street>
              <city>Quebec, QC</city>
              <region></region>
      <code></code>
      <country>Canada</country>
      </postal>
      <email>sperreault@jive.com</email>
      </address>
    </author>

    <author fullname="Wojciech Dec" initials="W" surname="Dec">
      <organization abbrev="Cisco Systems">Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <country>The Netherlands</country>
        </postal>
        <email>wdec@cisco.com</email>
        <uri>http://cisco.com</uri>
      </address>
    </author>

    <author fullname="Congxiao Bao" initials="C.X." surname="Bao">
      <organization abbrev="Tsinghua University">CERNET Center/Tsinghua
      University</organization>
      <address>
        <postal>
          <street>Room 225, Main Building, Tsinghua University</street>
          <city>Beijing</city>
          <code>100084</code>
          <country>China</country>
        </postal>
        <phone>+86 10-62785983</phone>
        <email>congxiao@cernet.edu.cn</email>
      </address>
    </author>

   <author fullname="Leaf Y. Yeh" initials="L." surname="Yeh">
     <organization>Freelancer Technologies</organization>
     <address>
       <postal>
         <street></street>
         <city></city>
         <region></region>
         <code></code>
         <country>China</country>
       </postal>
       <email>leaf.y.yeh@hotmail.com</email>
     </address>
   </author>

   <author fullname="Xiaohong Deng" initials="X." surname="Deng">
     <organization>The University of New South Wales</organization>
     <address>
       <postal>
         <street></street>
         <code>NSW 2052</code>
         <city>Sydney</city>
         <country>Australia</country>
       </postal>
       <email>dxhbupt@gmail.com</email>
       <uri>https://www.unsw.edu.au/</uri>
     </address>
   </author>

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

    <keyword>MAP</keyword>
    <keyword>DHCPv6</keyword>

    <abstract>
      <t>This document specifies DHCPv6 options, termed Softwire46
      options, for the provisioning of Softwire46 Customer Edge (CE)
      devices. Softwire46 is a collective term used to refer to
      architectures based on the notion of IPv4 Address plus Port (A+P)
      for providing IPv4 connectivity across an IPv6 network.</t>
      <t></t>
    </abstract>
  </front>

  <middle>

    <section title="Introduction">
      <t>A number of architectural solution proposals discussed in the
      IETF Softwire Working Group use Address plus Port (A+P) 
      <xref target="RFC6346"></xref> as their technology base for
      providing IPv4 connectivity to end users using Customer Edge (CE)
      devices across a service provider's IPv6 network, while allowing
      for shared or dedicated IPv4 addressing of CEs.</t>

      <t>An example is Mapping of Address and Port with Encapsulation
      (MAP&nbhy;E) as defined in <xref target="RFC7597"></xref>.
      The MAP solution consists of one or more MAP Border Relay (BR)
      routers responsible for stateless forwarding between a MAP
      IPv6 domain and an IPv4 network, and one or more MAP Customer
      Edge (CE) routers responsible for forwarding between a user's
      IPv4 network and the MAP IPv6 network domain. Collectively, the
      MAP CE and BR form a domain when configured with common service
      parameters. This characteristic is common to all of the
      Softwire46 mechanisms.</t>

      <t>To function in such a domain, a CE needs to be provisioned
      with the appropriate A+P service parameters for that
      domain. These consist primarily of the CE's IPv4 address and
      transport-layer port range(s). Furthermore, the IPv6 transport
      mode (i.e., encapsulation or translation) needs to be
      specified. Provisioning of other IPv4 configuration information
      not derived directly from the A+P service parameters is not
      covered in this document. It is expected that provisioning of
      other IPv4 configuration information will continue to use
      DHCPv4 <xref target="RFC2131"/>.</t>

      <t>This memo specifies a set of DHCPv6 <xref target="RFC3315"/>
      options to provision Softwire46 configuration information to CE
      routers. Although the focus is to deliver IPv4 service to an
      end-user network (such as a residential home network), it can
      equally be applied to an individual host acting as a CE.
      Configuration of the BR is out of scope for this document.</t>

    </section>

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

    <section title="Softwire46 Overview">

     <t>This document describes a set of common DHCPv6 options for
     configuring the Mapping of Address and Port with Encapsulation
     (MAP&nbhy;E) <xref target="RFC7597"/>, Mapping of Address and Port
     using Translation (MAP&nbhy;T) <xref target="RFC7599"/>, and
     Lightweight 4over6 <xref target="RFC7596"/> mechanisms. For
     definitions of the terminology used in this document, please see
     the relevant terminology sections in <xref target="RFC7597"/>,
     <xref target="RFC7599"/>, and <xref target="RFC7596"/>.</t>

     <t>MAP&nbhy;E, MAP&nbhy;T, and Lightweight 4over6 are essentially
     providing the same functionality: IPv4 service to a CE router over an
     IPv6-only access network. MAP&nbhy;E and MAP&nbhy;T may embed parts of
     the IPv4 address in IPv6 prefixes, thereby supporting many clients with a
     fixed set of mapping rules and Mesh mode (direct CE-to-CE
     communication). MAP&nbhy;E and MAP&nbhy;T CEs may also be provisioned in
     hub-and-spoke mode and in 1:1 mode (with no embedded address
     bits). The difference between MAP&nbhy;E and MAP&nbhy;T is that they use
     different means to connect to the IPv6 domain. 
     MAP&nbhy;E uses IPv4-over-IPv6 tunneling <xref target="RFC2473"/>,
     while MAP&nbhy;T uses IPv4-to-IPv6 translation
     based on <xref target="RFC6145"/>.
     Lightweight 4over6 is a hub-and-spoke IPv4-over-IPv6
     tunneling mechanism, with complete independence of IPv4 and IPv6
     addressing (zero embedded address bits).</t>

     <t>The DHCPv6 options described here tie the provisioning
     parameters, and hence the IPv4 service itself, to the End-user
     IPv6 prefix lifetime. The validity of a Softwire46's IPv4
     address, prefix, or shared IPv4 address; port set; and any
     authorization and accounting are tied to the lifetime of its
     associated End-user IPv6 prefix.</t>

     <t>To support more than one mechanism at a time and to allow for
     a possibility of transition between them, the DHCPv6 Option
     Request Option (ORO) <xref target="RFC3315"/> is used. Each mechanism
     has a corresponding DHCPv6 container option. A DHCPv6 client can
     request a particular mechanism by including the option code for a
     particular container option in its ORO. The provisioning
     parameters for that mechanism are expressed by embedding the
     common format options within the respective container option.</t>

     <t>This approach implies that all of the provisioning options
     appear only within the container options. Softwire46 DHCPv6 clients
     that receive provisioning options that are not encapsulated in
     container options MUST silently ignore these options.  DHCPv6 server
     administrators are advised to ensure that DHCPv6 servers are
     configured to send these options in the proper encapsulation.</t>

     <t>This document is organized with the common encapsulated options
     described first (<xref target="common-opts"/>), followed by the
     three container options (<xref target="container-opts"/>). Some
     encapsulated options are mandatory in some containers, some are
     optional, and some are not permitted. This is shown in <xref
     target="table_options"></xref> (<xref target="SW46-opt-format"/>).</t>

    </section>

    <section title="Common Softwire46 DHCPv6 Options" anchor="common-opts">
      <t>The DHCPv6 protocol is used for Softwire46 CE provisioning
      following regular DHCPv6 notions, with the CE assuming the role
      of a DHCPv6 client, and the DHCPv6 server providing options
      following DHCPv6 server-side policies. The format and usage of
      the options are defined in the following subsections.</t>

      <t>Each CE needs to be provisioned with enough information to
      calculate its IPv4 address, IPv4 prefix, or shared IPv4
      address. MAP&nbhy;E and MAP&nbhy;T use the OPTION_S46_RULE option,
      while Lightweight 4over6 uses the OPTION_S46_V4V6BIND option. A
      CE that needs to communicate outside of the A+P domain also
      needs the address or prefix of the BR. MAP&nbhy;E and Lightweight
      4over6 use the OPTION_S46_BR option to communicate the IPv6
      address of the BR. MAP&nbhy;T forms an IPv6 destination address by
      embedding an IPv4 destination address into the BR's IPv6 prefix
      conveyed via the OPTION_S46_DMR option. Optionally, all
      mechanisms can include the OPTION_S46_PORTPARAMS option to
      specify parameters and port sets for the port-range algorithm.</t>

      <t>Softwire46 options use addresses rather than Fully Qualified
      Domain Names (FQDNs). For the rationale behind this design
      choice, see Section 8 of <xref target="RFC7227"/>.</t>
   
      <section title="S46 Rule Option">
        <t><xref target="img-option-rule"></xref> shows the format of
        the S46 Rule option (OPTION_S46_RULE) used for conveying the
        Basic Mapping Rule (BMR) and Forwarding Mapping Rule (FMR).</t>

        <t>This option follows behavior described in Sections 17.1.1
        and 18.1.1 of <xref target="RFC3315"/>. Clients can send those
        options, encapsulated in their respective container options,
        with specific values as hints for the server. See
        <xref target="container-opts"/> for details. Depending on the
        server configuration and policy, it may accept or ignore the
        hints. Clients MUST be able to process received values that are
        different than the hints it sent earlier.</t>

        <figure align="center" anchor="img-option-rule"
                title="S46 Rule Option">
          <preamble></preamble>

          <artwork align="center"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        OPTION_S46_RULE        |         option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     flags     |     ea-len    |  prefix4-len  | ipv4-prefix   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                  (continued)                  |  prefix6-len  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           ipv6-prefix                         |
|                       (variable length)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                        S46_RULE-options                       .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>
        </figure>

        <t><list style="symbols">
            <t>option-code: OPTION_S46_RULE (89)</t>

            <t>option-length: length of the option, excluding option-code and
            option-length fields, including length of all encapsulated
            options; expressed in octets.</t>

            <t>flags: 8 bits long; carries flags applicable to the rule.
            The meanings of the specific bits are explained in <xref
            target="img-rule-flags"></xref>.</t>

            <t>ea-len: 8 bits long; specifies the Embedded Address (EA)
            bit length. Allowed values range from 0 to 48.</t>

            <t>prefix4-len: 8 bits long; expresses the prefix length of
            the Rule&nbsp;IPv4&nbsp;prefix specified in the ipv4-prefix field.
            Allowed values range from 0 to 32.</t>

            <t>ipv4-prefix: a fixed-length 32-bit field that specifies
            the IPv4 prefix for the S46 rule. The bits in the prefix
            after prefix4-len number of bits are reserved and MUST be
            initialized to zero by the sender and ignored by the
            receiver.</t>

            <t>prefix6-len: 8 bits long; expresses the length of the
            Rule&nbsp;IPv6&nbsp;prefix specified in the ipv6-prefix field.
            Allowed values range from 0 to 128.</t>

            <t>ipv6-prefix: a variable-length field that specifies the
            IPv6 domain prefix for the S46 rule.  The field is padded
            on the right with zero bits up to the nearest octet
            boundary when prefix6-len is not evenly divisible by 8.</t>

            <t>S46_RULE-options: a variable-length field that may contain
            zero or more options that specify additional parameters
            for this S46 rule. This document specifies one such
            option: OPTION_S46_PORTPARAMS.</t>
          </list></t>

        <t>The format of the S46 Rule Flags field is:<figure align="center"
            anchor="img-rule-flags" title="S46 Rule Flags">
            <preamble></preamble>

            <artwork align="center"><![CDATA[
 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|Reserved     |F|
+-+-+-+-+-+-+-+-+]]></artwork>
          </figure></t>

        <t><list style="symbols">
            <t>Reserved: 7 bits; reserved for future use as flags.</t>

            <t>F-flag: 1-bit field that specifies whether the rule is
            to be used for forwarding (FMR). If set, this rule is used
            as an FMR; if not set, this rule is a BMR only and MUST NOT
            be used for forwarding. Note: A BMR can also be used as
            an FMR for forwarding if the F-flag is set. The BMR is
            determined by a longest-prefix match of the
            Rule IPv6 prefix against the End-user IPv6 prefix(es).</t>
          </list></t>

        <t>It is expected that in a typical mesh deployment scenario
        there will be a single BMR, which could also be designated as
        an FMR using the F-flag.</t>
      </section>

      <section title="S46 BR Option">
        <t>The S46 BR option (OPTION_S46_BR) is used to convey the
        IPv6 address of the Border Relay. <xref
        target="img-option-br"></xref> shows the format of the
        OPTION_S46_BR option.</t>

        <t><figure align="center" anchor="img-option-br"
            title="S46 BR Option">
            <preamble></preamble>

            <artwork align="center"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         OPTION_S46_BR         |         option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      br-ipv6-address                          |
|                                                               |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>

        <t><list style="symbols">
            <t>option-code: OPTION_S46_BR (90)</t>
            <t>option-length: 16</t>
            <t>br-ipv6-address: a fixed-length field of 16 octets that
            specifies the IPv6 address for the S46 BR.</t>
          </list></t>

          <t>BR redundancy can be implemented by using an anycast
          address for the BR IPv6 address. Multiple OPTION_S46_BR
          options MAY be included in the container; this document does
          not further explore the use of multiple BR IPv6 addresses.</t>
      </section>

      <section title="S46 DMR Option">
        <t>The S46 DMR option (OPTION_S46_DMR) is used to convey
        values for the Default Mapping Rule (DMR). <xref
        target="img-option-dmr"></xref> shows the format of the
        OPTION_S46_DMR option used for conveying a DMR.</t>

        <t><figure align="center" anchor="img-option-dmr"
            title="S46 DMR Option">
            <preamble></preamble>

            <artwork align="center"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        OPTION_S46_DMR         |         option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|dmr-prefix6-len|            dmr-ipv6-prefix                    |
+-+-+-+-+-+-+-+-+           (variable length)                   |
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>

        <t><list style="symbols">
            <t>option-code: OPTION_S46_DMR (91)</t>
            <t>option-length: 1 + length of dmr-ipv6-prefix specified
            in octets.</t>
            <t>dmr-prefix6-len: 8 bits long; expresses the bitmask length
            of the IPv6 prefix specified in the dmr-ipv6-prefix field.
            Allowed values range from 0 to 128.</t>
            <t>dmr-ipv6-prefix: a variable-length field specifying the
            IPv6 prefix or address for the BR. This field is right-padded
            with zeros to the nearest octet boundary when dmr-prefix6-len
            is not divisible by 8.</t>

          </list></t>
      </section>

      <section anchor="option-v4v6bind"
               title="S46 IPv4/IPv6 Address Binding Option">
        <t>The S46 IPv4/IPv6 Address Binding option (OPTION_S46_V4V6BIND)
        MAY be used to specify the full or shared IPv4 address of the CE. The
        IPv6 prefix field is used by the CE to identify the correct prefix
        to use for the tunnel source.</t>

        <figure align="center" anchor="img-option-v4v6bind"
                title="S46 IPv4/IPv6 Address Binding Option">
          <preamble></preamble>

          <artwork align="center"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      OPTION_S46_V4V6BIND      |         option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         ipv4-address                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|bindprefix6-len|             bind-ipv6-prefix                  |
+-+-+-+-+-+-+-+-+             (variable length)                 |
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                      S46_V4V6BIND-options                     .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>

        </figure>

        <t><list style="symbols">
            <t>option-code: OPTION_S46_V4V6BIND (92)</t>
            <t>option-length: length of the option, excluding option-code and
            option-length fields, including length of all encapsulated
            options; expressed in octets.</t>
            <t>ipv4-address: a fixed-length field of 4 octets specifying
            an IPv4 address.</t>
            <t>bindprefix6-len: 8 bits long; expresses the bitmask length
            of the IPv6 prefix specified in the bind-ipv6-prefix field.
            Allowed values range from 0 to 128.</t>
            <t>bind-ipv6-prefix: a variable-length field specifying the
            IPv6 prefix or address for the S46 CE. This field is
            right-padded with zeros to the nearest octet boundary when
            bindprefix6-len is not divisible by 8.</t>
            <t>S46_V4V6BIND-options: a variable-length field that may
            contain zero or more options that specify additional
            parameters. This document specifies one such option:
            OPTION_S46_PORTPARAMS.</t>
        </list></t>
      </section>

      <section anchor="option-portparams"
               title="S46 Port Parameters Option">
        <t>The S46 Port Parameters option (OPTION_S46_PORTPARAMS)
        specifies optional port set information that MAY be provided
        to CEs.</t>

        <t>See Section 5.1 of <xref target="RFC7597"></xref> for a
        description of the MAP algorithm and detailed explanation of all
        of the parameters.</t>

        <figure align="center" anchor="img-option-portparams"
                title="S46 Port Parameters Option">
          <preamble></preamble>

          <artwork align="center"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OPTION_S46_PORTPARAMS     |         option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   offset      |    PSID-len   |              PSID             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
        </figure>

        <t><list style="symbols">
            <t>option-code: OPTION_S46_PORTPARAMS (93)</t>

            <t>option-length: 4</t>

            <t>offset: Port Set Identifier (PSID) offset. &nbsp;8 bits long;
            specifies the numeric value for the S46 algorithm's excluded port
            range/offset bits (a-bits), as per Section 5.1 of <xref
            target="RFC7597"></xref>. Allowed values are
            between 0 and 15. Default values for this field are
            specific to the softwire mechanism being implemented and
            are defined in the relevant specification document.</t>

            <t>PSID-len: 8 bits long; specifies the number of significant
            bits in the PSID field (also known as 'k'). When set to
            0, the PSID field is to be ignored. After the first 'a'
            bits, there are k bits in the port number representing the
            value of the PSID. Consequently, the address-sharing ratio
            would be 2^k.</t>

            <t>PSID: 16 bits long. The PSID value algorithmically
            identifies a set of ports assigned to a CE. The first
            k&nbsp;bits on the left of this field contain the PSID
            binary value. The remaining (16 - k) bits on the right
            are padding zeros.</t>
          </list></t>

          <t>When receiving the OPTION_S46_PORTPARAMS option with an
          explicit PSID, the client MUST use this explicit PSID when
          configuring its softwire interface. The
          OPTION_S46_PORTPARAMS option with an explicit PSID MUST be
          discarded if the S46 CE isn't configured with a full
          IPv4 address (e.g., IPv4 prefix).</t>

        <t>The OPTION_S46_PORTPARAMS option is contained within an
        OPTION_S46_RULE option or an OPTION_S46_V4V6BIND option.</t>

      </section>
    </section>

    <section title="Softwire46 Containers" anchor="container-opts">
      <section anchor="option-mape" title="S46 MAP-E Container Option">
        <t>The S46 MAP&nbhy;E Container option (OPTION_S46_CONT_MAPE)
        specifies the container used to group all rules and optional port
        parameters for a specified domain.</t>

        <figure align="center" anchor="img-mape-option"
                title="S46 MAP-E Container Option">
          <preamble></preamble>

          <artwork align="center"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        OPTION_S46_CONT_MAPE   |         option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.            encapsulated-options (variable length)             .
.                                                               .
+---------------------------------------------------------------+
        ]]></artwork>
        </figure>

        <t><list style="symbols">
            <t>option-code: OPTION_S46_CONT_MAPE (94)</t>
            <t>option-length: length of encapsulated options, expressed in
               octets.</t>
            <t>encapsulated-options: options associated with this Softwire46
               MAP&nbhy;E domain.</t>
          </list></t>

        <t>The encapsulated-options field conveys options specific
        to the OPTION_S46_CONT_MAPE option. Currently, there are two 
        encapsulated options specified: OPTION_S46_RULE and
        OPTION_S46_BR. There MUST be at least one OPTION_S46_RULE
        option and at least one OPTION_S46_BR option.</t>

        <t>Other options applicable to a domain may be defined in the
        future. A DHCPv6 message MAY include multiple
        OPTION_S46_CONT_MAPE options (representing multiple
        domains).</t>
      </section>

      <section anchor="option-mapt" title="S46 MAP-T Container Option">
        <t>The S46 MAP&nbhy;T Container option (OPTION_S46_CONT_MAPT)
        specifies the container used to group all rules and optional port
        parameters for a specified domain.</t>

        <figure align="center" anchor="img-mapt-option"
                title="S46 MAP-T Container Option">
          <preamble></preamble>

          <artwork align="center"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OPTION_S46_CONT_MAPT      |         option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.            encapsulated-options (variable length)             .
.                                                               .
+---------------------------------------------------------------+
        ]]></artwork>
        </figure>

        <t><list style="symbols">
            <t>option-code: OPTION_S46_CONT_MAPT (95)</t>
            <t>option-length: length of encapsulated options, expressed in
               octets.</t>
            <t>encapsulated-options: options associated with this
               Softwire46 MAP&nbhy;T domain.</t>
          </list></t>

        <t>The encapsulated-options field conveys options specific to
        the OPTION_S46_CONT_MAPT option. Currently, there are two
        options specified: the OPTION_S46_RULE and OPTION_S46_DMR
        options. There MUST be at least one OPTION_S46_RULE option and
        exactly one OPTION_S46_DMR option.</t>

      </section>


      <section anchor="option-lw46" title="S46 Lightweight 4over6 Container Option">
        <t>The S46 Lightweight 4over6 Container option (OPTION_S46_CONT_LW)
        specifies the container used to group all rules and optional port
        parameters for a specified domain.</t>

        <figure align="center" anchor="img-lw-option"
                title="S46 Lightweight 4over6 Container Option">
          <preamble></preamble>

          <artwork align="center"><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      OPTION_S46_CONT_LW       |         option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+            encapsulated-options (variable length)             .
.                                                               .
+---------------------------------------------------------------+
        ]]></artwork>
        </figure>

        <t><list style="symbols">
            <t>option-code: OPTION_S46_CONT_LW (96)</t>
            <t>option-length: length of encapsulated options, expressed in
               octets.</t>
            <t>encapsulated-options: options associated with this
               Softwire46 Lightweight 4over6 domain.</t>
          </list></t>

        <t>The encapsulated-options field conveys options specific to
        the OPTION_S46_CONT_LW option. Currently, there are two options
        specified: OPTION_S46_V4V6BIND and OPTION_S46_BR. There MUST
        be at most one OPTION_S46_V4V6BIND option and at least one
        OPTION_S46_BR option.</t>

      </section>

    </section>

    <section title="Softwire46 Options Encapsulation" anchor="SW46-opt-format">

      <t>The table below shows which encapsulated options are mandatory,
      optional, or not permitted for each defined container option.</t>

      <texttable anchor="table_options" title="Options for Container Mappings">
    <ttcol align='left'>Option</ttcol>
    <ttcol align='center'>MAP-E</ttcol>
    <ttcol align='center'>MAP-T</ttcol>
    <ttcol align='center'>Lightweight 4over6</ttcol>

    <c>OPTION_S46_RULE</c><c>M</c><c>M</c><c>N/P</c>
    <c>OPTION_S46_BR</c><c>M</c><c>N/P</c><c>M</c>
    <c>OPTION_S46_PORTPARAMS</c><c>O</c><c>O</c><c>O</c>
    <c>OPTION_S46_DMR</c><c>N/P</c><c>M</c><c>N/P</c>
    <c>OPTION_S46_V4V6BIND</c><c>N/P</c><c>N/P</c><c>O</c>

    <postamble>M - Mandatory, O - Optional, N/P - Not Permitted</postamble>
      </texttable>

      <t>Softwire46 DHCPv6 clients that receive container options that violate
      any of the above rules MUST silently ignore such container options.</t>

    </section>
    <section title="DHCPv6 Server Behavior">
      <t>Section 17.2.2 of <xref target="RFC3315"/> describes how a
      DHCPv6 client and server negotiate configuration values using
      the ORO.  As a convenience for the reader, we mention here
      that by default a server will not reply with a Softwire46
      container option if the client has not explicitly enumerated
      one in its ORO.</t>

      <t>A CE router may support several (or all) of the mechanisms
      mentioned here.  In the case where a client requests multiple
      mechanisms in its ORO, the server will reply with the
      corresponding Softwire46 container options for which it has
      configuration information.</t>
    </section>

    <section title="DHCPv6 Client Behavior">
      <t>An S46 CE acting as a DHCPv6 client will request S46
      configuration parameters from the DHCPv6 server located in the
      IPv6 network. Such a client MUST request the S46 container option(s)
      that it is configured for in its ORO in SOLICIT, REQUEST, RENEW,
      REBIND, and INFORMATION-REQUEST messages.</t>

      <t>When processing received S46 container options, the following
      behavior is expected:<list style="symbols">
          <t>A client MUST support processing multiple received
          OPTION_S46_RULE options in a container OPTION_S46_CONT_MAPE or
          OPTION_S46_CONT_MAPT option.</t>

          <t>A client receiving an unsupported S46 option or an invalid
          parameter value SHOULD discard that S46 container option and
          log the event.</t>
      </list></t>

      <t>The behavior of a client that supports multiple Softwire46
      mechanisms is out of scope for this document. <xref
      target="Unified-v4-in-v6"/> describes client behavior
      for the prioritization and handling of multiple mechanisms
      simultaneously.</t>

      <t>Note that a system implementing CE functionality may have
      multiple network interfaces, and these interfaces may be
      configured differently; some may be connected to networks using
      a Softwire46 mechanism, and some may be connected to networks
      that are using normal dual-stack or other means. The CE should
      approach this specification on an interface-by-interface
      basis. For example, if the CE system is MAP&nbhy;E capable and is
      attached to multiple networks that provide the
      OPTION_S46_CONT_MAPE option, then the CE MUST configure MAP&nbhy;E
      for each interface separately.</t>

      <t>Failure modes are out of scope for this document. Failure
      recovery mechanisms may be defined in the future. See Section 5 of
      <xref target="RFC7597" /> for a discussion of valid MAP Rule
      combinations. See Section 11 of <xref target="RFC7227" /> and
      Sections 18.1.3, 18.1.4, and 19.1 of <xref target="RFC3315"/> for
      parameter-update mechanisms in DHCPv6 that can be leveraged to
      update configuration after a failure.</t>
    </section>

    <section title="Security Considerations">
      <t>Section 23 of <xref target="RFC3315"></xref> discusses DHCPv6-related
      security issues.</t>

      <t>As with all DHCPv6-derived configuration states, it is
      possible that configuration is actually being delivered by a
      third party (Man in the Middle). As such, there is no basis on
      which access over MAP or Lightweight 4over6 can be trusted.
      Therefore, softwires should not bypass any security mechanisms
      such as IP firewalls.</t>

      <t>In IPv6-only networks that lack IPv4 firewalls, a device that
      supports MAP could be tricked into enabling its IPv4 stack and
      directing IPv4 traffic to the attacker, thus exposing itself to
      previously infeasible IPv4 attack vectors.</t>

      <t>Section 10 of <xref target="RFC7597"></xref> discusses
      security issues related to the MAP&nbhy;E mechanism,
      Section 9 of <xref target="RFC7596"></xref> discusses
      security issues related to the Lightweight 4over6 mechanism,
      and Section 13 of <xref target="RFC7599"></xref> discusses
      security issues related to the MAP&nbhy;T mechanism.</t>

      <t>Readers concerned with the security of Softwire46 provisioning
      over DHCPv6 are encouraged to read <xref target="Secure-DHCPv6"/>.</t>

    </section>

    <section title="IANA Considerations">
      <t>IANA has allocated the following DHCPv6
      option codes:<list>
      <t>89 for OPTION_S46_RULE</t>
      <t>90 for OPTION_S46_BR</t>
      <t>91 for OPTION_S46_DMR</t>
      <t>92 for OPTION_S46_V4V6BIND</t>
      <t>93 for OPTION_S46_PORTPARAMS</t>
      <t>94 for OPTION_S46_CONT_MAPE</t>
      <t>95 for OPTION_S46_CONT_MAPT</t>
      <t>96 for OPTION_S46_CONT_LW</t>
    </list>
      All values have been added to the "Dynamic Host Configuration Protocol
      for IPv6 (DHCPv6)" option code space 
      defined in Section 24.3 of <xref target="RFC3315"/>.</t>
    </section>

  </middle>

  <back>

    <references title="Normative References">
      &rfc3315;
      &rfc2119;

    </references>

    <references title="Informative References">
      &rfc2473;
      &rfc2131;
      &rfc6346;
      &rfc7227;

<!-- draft-ietf-softwire-lw4over6 (RFC7596; "n" per RFC Ed. Note) -->
<reference anchor='RFC7596' target="http://www.rfc-editor.org/info/rfc7596">
<front>
<title>Lightweight 4over6: An Extension to the Dual-Stack Lite Architecture</title>
<author initials='Y' surname='Cui' fullname='Yong Cui'>
    <organization />
</author>
<author initials='Q' surname='Sun' fullname='Qiong Sun'>
    <organization />
</author>
<author initials='M' surname='Boucadair' fullname='Mohamed Boucadair'>
    <organization />
</author>
<author initials='T' surname='Tsou' fullname='Tina Tsou'>
    <organization />
</author>
<author initials='Y' surname='Lee' fullname='Yiu Lee'>
    <organization />
</author>
<author initials='I' surname='Farrer' fullname='Ian Farrer'>
    <organization />
</author>
<date month='July' year='2015' />
</front>
<seriesInfo name='RFC' value='7596' />
<seriesInfo name='DOI' value='10.17487/RFC7596'/>
</reference>

<!-- draft-ietf-softwire-map (RFC7597; "n+1" per RFC Ed. Note) -->
<reference anchor='RFC7597' target="http://www.rfc-editor.org/info/rfc7597">
<front>
<title>Mapping of Address and Port with Encapsulation (MAP-E)</title>
<author initials='O' surname='Troan' fullname='Ole Troan' role="editor">
    <organization />
</author>
<author initials='W' surname='Dec' fullname='Wojciech Dec'>
    <organization />
</author>
<author initials='X' surname='Li' fullname='Xing Li'>
    <organization />
</author>
<author initials='C' surname='Bao' fullname='Congxiao Bao'>
    <organization />
</author>
<author initials='S' surname='Matsushima' fullname='Satoru Matsushima'>
    <organization />
</author>
<author initials='T' surname='Murakami' fullname='Tetsuya Murakami'>
    <organization />
</author>
<author initials='T' surname='Taylor' fullname='Tom Taylor' role="editor">
    <organization />
</author>
<date month='July' year='2015' />
</front>
<seriesInfo name='RFC' value='7597' />
<seriesInfo name='DOI' value='10.17487/RFC7597'/>
</reference>

<!-- draft-ietf-softwire-map-t (RFC7599; "n+3" per RFC Ed. Note) -->
<reference anchor='RFC7599' target="http://www.rfc-editor.org/info/rfc7599">
<front>
<title>Mapping of Address and Port using Translation (MAP-T)</title>
<author initials='X' surname='Li' fullname='Xing Li'>
    <organization />
</author>
<author initials='C' surname='Bao' fullname='Congxiao Bao'>
    <organization />
</author>
<author initials='W' surname='Dec' fullname='Wojciech Dec' role="editor">
    <organization />
</author>
<author initials='O' surname='Troan' fullname='Ole Troan'>
    <organization />
</author>
<author initials='S' surname='Matsushima' fullname='Satoru Matsushima'>
    <organization />
</author>
<author initials='T' surname='Murakami' fullname='Tetsuya Murakami'>
    <organization />
</author>
<date month='July' year='2015' />
</front>
<seriesInfo name='RFC' value='7599' />
<seriesInfo name='DOI' value='10.17487/RFC7599'/>
</reference>

<!-- draft-ietf-dhc-sedhcpv6 (AD Evaluation::Revised I-D Needed) -->
<reference anchor='Secure-DHCPv6'>
<front>
<title>Secure DHCPv6</title>
<author initials='S' surname='Jiang' fullname='Sheng Jiang' role="editor">
    <organization />
</author>
<author initials='S' surname='Shen' fullname='Sean Shen'>
    <organization />
</author>
<author initials='D' surname='Zhang' fullname='Dacheng Zhang'>
    <organization />
</author>
<author initials='T' surname='Jinmei' fullname='Tatuya Jinmei'>
    <organization />
</author>
<date month='June' year='2015' />
</front>
<seriesInfo name='Work in Progress,' value='draft-ietf-dhc-sedhcpv6-08' />
</reference>

<!-- draft-ietf-softwire-unified-cpe (Expired) -->
<reference anchor='Unified-v4-in-v6'>
<front>
<title>Unified IPv4-in-IPv6 Softwire CPE</title>
<author initials='M' surname='Boucadair' fullname='Mohamed Boucadair'>
    <organization />
</author>
<author initials='I' surname='Farrer' fullname='Ian Farrer'>
    <organization />
</author>
<author initials='S' surname='Perreault' fullname='Simon Perreault' role="editor">
    <organization />
</author>
<author initials='S' surname='Sivakumar' fullname='Senthil Sivakumar' role="editor">
    <organization />
</author>
<date month='May' year='2013' />
</front>
<seriesInfo name='Work in Progress,' value='draft-ietf-softwire-unified-cpe-01' />
</reference>

      &rfc6145;
    </references>

    <section title="Acknowledgements" numbered="no">
      <t>This document was created as a product of a MAP design team.
      The following people were members of that team: Congxiao Bao, Mohamed
      Boucadair, Gang Chen, Maoke Chen, Wojciech Dec, Xiaohong Deng, Jouni
      Korhonen, Xing Li, Satoru Matsushima, Tomek Mrugalski, Tetsuya
      Murakami, Jacni Qin, Necj Scoberne, Qiong Sun, Tina Tsou, Dan Wing,
      Leaf Yeh, and Jan Zorz.</t>

      <t>The authors would like to thank Bernie Volz and Tom Taylor for
      their insightful comments and suggestions.</t>
    </section>

  </back>
</rfc>
