Subject: [Softwires] WGLC review of draft-ietf-softwire-map

From: Simon Perreault <[email-masked]>
Date: Wed, 11 Dec 2013 10:54:55 -0500

Problem identified by the IETF MTA admin. Resending...

Point #2 below was discussed yesterday with the editors.

Simon

=================

WG,

Here's my WGLC review of draft-ietf-softwire-map. The major comments are:

1. The distinction between BMR and FMR is very confusing. And it's going 
to get even more confusing when the reader gets to 
draft-ietf-softwire-map-dhcp, where there is only a single unified 
"rule" parameter. Suggestion: remove the concept of FMR. The text 
already says that the BMR is an FMR, so this means that FMR is already 
conceptually equal to "MAP rule". So just replace FMR with "MAP rule". 
Then say that one of the MAP rules is special: it is the BMR. I've 
provided text inline below.

2. Section 5 says:

    1.  Basic Mapping Rule (BMR) - mandatory. [...]
        The Basic Mapping Rule is also a Forwarding Mapping Rule. [...]
    In hub and spoke mode, there are no forwarding rules [...]

Contradiction? There must be at least one FMR since the BMR is an FMR 
and it is mandatory.

3. I can't make sense of this part from section 5.1:

    For a > 0, A MUST be larger than 0. [...]
    For smaller values of a, A still has to be greater than 0 [...]
    For larger values of a, the minimum value of A has to be higher [...]

Smaller than what? Larger than what? If a is smaller than a>0, that 
means a=0. How can A then be greater than 0 if it is 0 bits long?

Further comments inline...

>
>
>
> Network Working Group                                      O. Troan, Ed.
> Internet-Draft                                                    W. Dec
> Intended status: Standards Track                           Cisco Systems
> Expires: February 13, 2014                                         X. Li
>                                                                   C. Bao
>                                        CERNET Center/Tsinghua University
>                                                            S. Matsushima
>                                                         SoftBank Telecom
>                                                              T. Murakami
>                                                              IP Infusion
>                                                           T. Taylor, Ed.
>                                                      Huawei Technologies
>                                                          August 12, 2013
>
>
>           Mapping of Address and Port with Encapsulation (MAP)
>                        draft-ietf-softwire-map-08
>
> Abstract
>
>    This document describes a mechanism for transporting IPv4 packets
>    across an IPv6 network using IP encapsulation, and a generic
>    mechanism for mapping between IPv6 addresses and IPv4 addresses and
>    transport layer ports.
>
> Status of This Memo
>
>    This Internet-Draft is submitted in full conformance with the
>    provisions of BCP 78 and BCP 79.
>
>    Internet-Drafts are working documents of the Internet Engineering
>    Task Force (IETF).  Note that other groups may also distribute
>    working documents as Internet-Drafts.  The list of current Internet-
>    Drafts is at http://datatracker.ietf.org/drafts/current/.
>
>    Internet-Drafts are draft documents valid for a maximum of six months
>    and may be updated, replaced, or obsoleted by other documents at any
>    time.  It is inappropriate to use Internet-Drafts as reference
>    material or to cite them other than as "work in progress."
>
>    This Internet-Draft will expire on February 13, 2014.
>
> Copyright Notice
>
>    Copyright (c) 2013 IETF Trust and the persons identified as the
>    document authors.  All rights reserved.
>
>
>
>
>
>
>
> Troan, et al.          Expires February 13, 2014                [Page 1]
> 
> Internet-Draft                    MAP                        August 2013
>
>
>    This document is subject to BCP 78 and the IETF Trust's Legal
>    Provisions Relating to IETF Documents
>    (http://trustee.ietf.org/license-info) in effect on the date of
>    publication of this document.  Please review these documents
>    carefully, as they describe your rights and restrictions with respect
>    to this document.  Code Components extracted from this document must
>    include Simplified BSD License text as described in Section 4.e of
>    the Trust Legal Provisions and are provided without warranty as
>    described in the Simplified BSD License.
>
> Table of Contents
>
>    1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  2
>    2.  Conventions  . . . . . . . . . . . . . . . . . . . . . . . . .  4
>    3.  Terminology  . . . . . . . . . . . . . . . . . . . . . . . . .  4
>    4.  Architecture . . . . . . . . . . . . . . . . . . . . . . . . .  5
>    5.  Mapping Algorithm  . . . . . . . . . . . . . . . . . . . . . .  7
>      5.1.  Port mapping algorithm . . . . . . . . . . . . . . . . . .  8
>      5.2.  Basic mapping rule (BMR) . . . . . . . . . . . . . . . . .  9
>      5.3.  Forwarding mapping rule (FMR)  . . . . . . . . . . . . . . 12
>      5.4.  Destinations outside the MAP domain  . . . . . . . . . . . 12
>    6.  The IPv6 Interface Identifier  . . . . . . . . . . . . . . . . 13
>    7.  MAP Configuration  . . . . . . . . . . . . . . . . . . . . . . 13
>      7.1.  MAP CE . . . . . . . . . . . . . . . . . . . . . . . . . . 14
>      7.2.  MAP BR . . . . . . . . . . . . . . . . . . . . . . . . . . 14
>      7.3.  Backwards compatibility  . . . . . . . . . . . . . . . . . 15
>    8.  Forwarding Considerations  . . . . . . . . . . . . . . . . . . 15
>      8.1.  Receiving Rules  . . . . . . . . . . . . . . . . . . . . . 15
>      8.2.  ICMP . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
>      8.3.  Fragmentation and Path MTU Discovery . . . . . . . . . . . 16
>        8.3.1.  Fragmentation in the MAP domain  . . . . . . . . . . . 16
>        8.3.2.  Receiving IPv4 Fragments on the MAP domain borders . . 17
>        8.3.3.  Sending IPv4 fragments to the outside  . . . . . . . . 17
>    9.  NAT44 Considerations . . . . . . . . . . . . . . . . . . . . . 18
>    10. IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 18
>    11. Security Considerations  . . . . . . . . . . . . . . . . . . . 18
>    12. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 19
>    13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 20
>    14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 20
>      14.1.  Normative References  . . . . . . . . . . . . . . . . . . 20
>      14.2.  Informative References  . . . . . . . . . . . . . . . . . 20
>    Appendix A.  Examples  . . . . . . . . . . . . . . . . . . . . . . 22
>    Appendix B.  A More Detailed Description of the Derivation of the
>                 Port Mapping Algorithm  . . . . . . . . . . . . . . . 26
>      B.1.  Bit Representation of the Algorithm  . . . . . . . . . . . 28
>      B.2.  GMA examples . . . . . . . . . . . . . . . . . . . . . . . 28
>    Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 29
>
> 1.  Introduction
>
>
>
>
>
> Troan, et al.          Expires February 13, 2014                [Page 2]
> 
> Internet-Draft                    MAP                        August 2013
>
>
>    Mapping of IPv4 addresses in IPv6 addresses has been described in
>    numerous mechanisms dating back to 1996 [RFC1933].  The Automatic
>    tunneling mechanism described in RFC1933, assigned a globally unique

Remove comma.

>    IPv6 address to a host by combining the host's IPv4 address with a
>    well-known IPv6 prefix.  Given an IPv6 packet with a destination
>    address with an embedded IPv4 address, a node could automatically
>    tunnel this packet by extracting the IPv4 tunnel end-point address
>    from the IPv6 destination address.
>
>    There are numerous variations of this idea, described in 6over4
>    [RFC2529], 6to4 [RFC3056], ISATAP [RFC5214], and 6rd [RFC5969].
>
>    The commonalities of all these IPv6 over IPv4 mechanisms are:
>
>    o  Automatically provisions an IPv6 address for a host or an IPv6
>       prefix for a site
>
>    o  Algorithmic or implicit address resolution of tunnel end point
>       addresses.  Given an IPv6 destination address, an IPv4 tunnel
>       endpoint address can be calculated.
>
>    o  Embedding of an IPv4 address or part thereof into an IPv6 address.
>
>    In phases of IPv4 to IPv6 migration, IPv6 only networks will be

In later phases of IPv4 to IPv6 migration, it is expected that IPv6-only 
networks will be

>    common, while there will still be a need for residual IPv4
>    deployment.  This document describes a generic mapping of IPv4 to
>    IPv6, and a mechanism for encapsulating IPv4 over IPv6.
>
>    Just as the IPv6 over IPv4 mechanisms referred to above, the residual
>    IPv4 over IPv6 mechanism must be capable of:
>
>    o  Provisioning an IPv4 prefix, an IPv4 address or a shared IPv4
>       address.
>
>    o  Algorithmically map between an IPv4 prefix, IPv4 address or a

s/IPv4 address/an IPv4 address/

>       shared IPv4 address and an IPv6 address.
>
>    The mapping scheme described here supports encapsulation of IPv4
>    packets in IPv6 in both mesh and hub and spoke topologies, including
>    address mappings with full independence between IPv6 and IPv4
>    addresses.
>
>    This document describes delivery of IPv4 unicast service across an
>    IPv6 infrastructure.  IPv4 multicast is not considered further in
>    this document.
>
>    The A+P (Address and Port) architecture of sharing an IPv4 address by
>    distributing the port space is described in [RFC6346].  Specifically
>    section 4 of [RFC6346] covers stateless mapping.  The corresponding
>    stateful solution DS-lite is described in [RFC6333].  The motivation
>    for the work is described in [I-D.ietf-softwire-stateless-

s/the/this/

>    4v6-motivation].
>
>
> Troan, et al.          Expires February 13, 2014                [Page 3]
> 
> Internet-Draft                    MAP                        August 2013
>
>
>    A companion document defines a DHCPv6 option for provisioning of MAP

A companion document defines DHCPv6 options for provisioning of Softwire 
clients

>    [I-D.ietf-softwire-map-dhcp].  Other means of provisioning is

s/is/are/

>    possible.  Deployment considerations are described in [I-D.ietf-
>    softwire-map-deployment].
>
>    MAP relies on IPv6 and is designed to deliver production-quality

"production-quality" sounds like marketing. Remove.

>    dual-stack service while allowing IPv4 to be phased out within the SP

Spell it out the first time it is used:

s/SP/service provider's (SP)/

>    network.  The phasing out of IPv4 within the SP network is
>    independent of whether the end user disables IPv4 service or not.
>    Further, "Greenfield"; IPv6-only networks may use MAP in order to

s/Greenfield/greenfield/

>    deliver IPv4 to sites via the IPv6 network.
>
> 2.  Conventions
>
>    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
>    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
>    document are to be interpreted as described in RFC 2119 [RFC2119].
>
> 3.  Terminology
>
>    MAP domain:             One or more MAP CEs and BRs connected to the
>                            same virtual link.  A service provider may
>                            deploy a single MAP domain, or may utilize
>                            multiple MAP domains.
>
>    MAP Rule                A set of parameters describing the mapping

Use consistent capitalization: s/MAP Rule/MAP rule/

>                            between an IPv4 prefix, IPv4 address or
>                            shared IPv4 address and an IPv6 prefix or
>                            address.  Each domain uses a different
>                            mapping rule set.
>
>    MAP node                A device that implements MAP.

Implementation has nothing to do with it.

s/implements MAP/participates in a MAP domain/

>
>    MAP Border Relay (BR):  A MAP enabled router managed by the service
>                            provider at the edge of a MAP domain.  A
>                            Border Relay router has at least an
>                            IPv6-enabled interface and an IPv4 interface
>                            connected to the native IPv4 network.  A MAP
>                            BR may also be referred to simply as a "BR"
>                            within the context of MAP.
>
>    MAP Customer Edge (CE): A device functioning as a Customer Edge
>                            router in a MAP deployment.  A typical MAP CE
>                            adopting MAP rules will serve a residential
>                            site with one WAN side interface, and one or
>                            more LAN side interfaces.  A MAP CE may also
>                            be referred to simply as a "CE" within the
>                            context of MAP.
>
>    Port-set:               The separate part of the transport layer port
>
>
>
>
> Troan, et al.          Expires February 13, 2014                [Page 4]
> 
> Internet-Draft                    MAP                        August 2013
>
>                            space; denoted as a port-set.
>
>    Port-set ID (PSID):     Algorithmically identifies a set of ports
>                            exclusively assigned to a CE.
>
>    Shared IPv4 address:    An IPv4 address that is shared among multiple
>                            CEs.  Only ports that belong to the assigned
>                            port-set can be used for communication.  Also
>                            known as a Port-Restricted IPv4 address.
>
>    End-user IPv6 prefix:   The IPv6 prefix assigned to an End-user CE by
>                            other means than MAP itself.  E.g.
>                            Provisioned using DHCPv6 PD [RFC3633],
>                            assigned via SLAAC [RFC4862], or configured
>                            manually.  It is unique for each CE.
>
>    MAP IPv6 address:       The IPv6 address used to reach the MAP
>                            function of a CE from other CEs and from BRs.
>
>    Rule IPv6 prefix:       An IPv6 prefix assigned by a Service Provider
>                            for a mapping rule.
>
>    Rule IPv4 prefix:       An IPv4 prefix assigned by a Service Provider
>                            for a mapping rule.
>
>    Embedded Address (EA) bits: The IPv4 EA-bits in the IPv6 address
>                            identify an IPv4 prefix/address (or part
>                            thereof) or a shared IPv4 address (or part
>                            thereof) and a port-set identifier.
>
> 4.  Architecture
>
>    In accordance with the requirements stated above, the MAP mechanism
>    can operate with shared IPv4 addresses, full IPv4 addresses or IPv4
>    prefixes.  Operation with shared IPv4 addresses is described here,
>    and the differences for full IPv4 addresses and prefixes are
>    described below.
>
>    The MAP mechanism uses existing standard building blocks.  The
>    existing NAPT on the CE is used with additional support for
>    restricting transport protocol ports, ICMP identifiers and fragment
>    identifiers to the configured port set.  For packets outbound from
>    the private IPv4 network, the CE NAPT MUST translate transport
>    identifiers (e.g.  TCP and UDP port numbers) so that they fall within
>    the CE's assigned port-range.
>
>    The NAPT MUST in turn be connected to a MAP aware forwarding

s/MAP aware/MAP-aware/

>    function, that does encapsulation/ decapsulation of IPv4 packets in
>    IPv6.  MAP supports the encapsulation mode specified in [RFC2473].
>    In addition MAP specifies an algorithm to do "address resolution"
>
>
>
>
>
> Troan, et al.          Expires February 13, 2014                [Page 5]
> 
> Internet-Draft                    MAP                        August 2013
>
>    from an IPv4 address and port to an IPv6 address.  This algorithmic
>    mapping is specified in Section 5.
>
>    The MAP architecture described here, restricts the use of the shared

Remove superfluous comma.

>    IPv4 address to only be used as the global address (outside) of the
>    NAPT [RFC2663] running on the CE.  A shared IPv4 address MUST NOT be
>    used to identify an interface.  While it is theoretically possible to
>    make host stacks and applications port-aware, that is considered too

Considered by who? Remove those weasel words and just say "it would be".

>    drastic a change to the IP model [RFC6250].
>
>    For full IPv4 addresses and IPv4 prefixes, the architecture just
>    described applies with two differences.  First, a full IPv4 address
>    or IPv4 prefix can be used as it is today, e.g., for identifying an
>    interface or as a DHCP pool, respectively.  Secondly, the NAPT is not
>    required to restrict the ports used on outgoing packets.
>
>    This architecture is illustrated in Figure 1.
>
>
>          User N
>        Private IPv4
>       |  Network
>       |
>    O--+---------------O
>    |  |  MAP CE       |
>    | +-----+--------+ |
>    | NAPT44|  MAP   | |
>    | +-----+      | | |\     ,-------.                      .------.

Remove this --------^

>    |       +--------+ | \ ,-'         `-.                 ,-'       `-.
>    O------------------O  /              \   O---------O  /   Public   \
>                          /   IPv6 only   \  |  MAP    | /     IPv4     \
>                         (    Network      --+  Border +-   Network     )
>                          \  (MAP Domain) /  |  Relay  | \              /
>    O------------------O  \              /   O---------O  \             /
>    |    MAP   CE      |  /".         ,-'                 `-.       ,-'
>    | +-----+--------+ | /   `----+--'                       ------'
>    | NAPT44|  MAP   | |/
>    | +-----+        | |
>    |   |   +--------+ |
>    O---.--------------O

s/./+/

>        |
>         User M
>       Private IPv4
>         Network
>
>
>
>
>
>
>
>
>
>
>
> Troan, et al.          Expires February 13, 2014                [Page 6]
> 
> Internet-Draft                    MAP                        August 2013
>
>                        Figure 1: Network Topology
>
>    The MAP BR is responsible for connecting external IPv4 networks to
>    the IPv4 nodes in one or more MAP domains.

Simplify: s/IPv4 nodes in one or more MAP domains/MAP nodes/

>
> 5.  Mapping Algorithm
>
>    A MAP node is provisioned with one or more mapping rules.
>
>    Mapping rules are used differently depending on their function.
>    Every MAP node must be provisioned with a Basic mapping rule.  This
>    is used by the node to configure its IPv4 address, IPv4 prefix or
>    shared IPv4 address.  This same basic rule can also be used for
>    forwarding, where an IPv4 destination address and optionally a
>    destination port is mapped into an IPv6 address.  Additional mapping

s/is/are/

>    rules are specified to allow for multiple different IPv4 sub-nets to
>    exist within the domain and optimize forwarding between them.
>
>    Traffic outside of the domain (i.e.  When the destination IPv4

s/When/when/

>    address does not match (using longest matching prefix) any Rule IPv4
>    prefix in the Rules database) is forwarded to the BR.

Remove the following...

>    There are two types of mapping rules:
>
>    1.  Basic Mapping Rule (BMR) - mandatory.  A CE can be provisioned
>        with multiple End-user IPv6 prefixes.  There can only be one
>        Basic Mapping Rule per End-user IPv6 prefix.  However all CE's
>        having End-user IPv6 prefixes within (aggregated by) the same
>        Rule IPv6 prefix may share the same Basic Mapping Rule.  In
>        combination with the End-user IPv6 prefix, the Basic Mapping Rule
>        is used to derive the IPv4 prefix, address, or shared address and
>        the PSID assigned to the CE.
>
>    2.  Forwarding Mapping Rule (FMR) - optional, used for forwarding.
>        The Basic Mapping Rule is also a Forwarding Mapping Rule.

...up to here.

>        Each
>        Forwarding Mapping Rule will result in an entry in the Rules

s/Forwarding Mapping Rule/MAP rule/

>        table for the Rule IPv4 prefix.  Given a destination IPv4 address
>        and port within the MAP domain, a MAP node can use the matching
>        FMR to derive the End-user IPv6 address of the interface through
>        which that IPv4 destination address and port combination can be
>        reached.
>
>    Both mapping rules share the same parameters:

s/Both mapping rules share the same/MAP rules contain the following/

>
>    o  Rule IPv6 prefix (including prefix length)
>
>    o  Rule IPv4 prefix (including prefix length)
>
>    o  Rule EA-bits length (in bits)

Add this here:

At least one MAP rule MUST be provisioned on each MAP node.

One of the MAP rules is the Basic Mapping Rule (BMR). In combination 
with the End-User IPv6 prefix, the BMR is used to derive the IPv4 
prefix, address, or shared address, as well as the PSID assigned to the CE.

>    A MAP node finds its Basic Mapping Rule by doing a longest match

s/Basic Mapping Rule/BMR/

>    between the End-user IPv6 prefix and the Rule IPv6 prefix in the
>    Mapping Rules table.  The rule is then used for IPv4 prefix, address
>    or shared address assignment.
>
> Troan, et al.          Expires February 13, 2014                [Page 7]
> 
> Internet-Draft                    MAP                        August 2013
>
>
>    A MAP IPv6 address is formed from the BMR Rule IPv6 prefix.  This
>    address MUST be assigned to an interface of the MAP node and is used
>    to terminate all MAP traffic being sent or received to the node.
>
>    Port-aware IPv4 entries in the Rules table are installed for all the

What is a "port-aware IPv4 entry"?

>    Forwarding Mapping Rules and an default route to the MAP BR (see

s/Forwarding Mapping Rules/MAP rules/

s/an/a/

>    section Section 5.4.

That paragraph was very unclear. Reword.

>    Forwarding rules are used to allow direct communication between MAP

s/Forwarding/MAP/

>    CEs, known as mesh mode.  In hub and spoke mode, there are no
>    forwarding rules, all traffic MUST be forwarded directly to the BR.

Contradiction? There must be at least one FMR since the BMR is an FMR 
and it is mandatory.

> 5.1.  Port mapping algorithm
>
>    The port mapping algorithm is used in domains whose rules allow IPv4
>    address sharing.
>
>    The simplest way to represent a port range is using a notation
>    similar to CIDR [RFC4632].  For example the first 256 ports are
>    represented as port prefix 0.0/8.  The last 256 ports as 255.0/8.  In
>    hexadecimal, 0x0000/8 (PSID = 0) and 0xFF00/8 (PSID = 0xFF).  Using
>    this technique, but wishing to avoid allocating the system ports [I-D
>    .ietf-tsvwg-iana-ports] to the user, one would have to exclude the
>    use of one or more PSIDs (e.g., PSIDs 0 to 3 in the example just
>    given).
>
>    When the PSID is embedded in the End-user IPv6 prefix, then to
>    minimise dependencies between the End-user IPv6 prefix and the
>    assigned port set, it is desirable to minimize the restrictions of
>    possible PSID values.  This is achieved by using an infix
>    representation of the port value.  Using such a representation, the
>    well-known ports are excluded by restrictions on the value of the
>    high-order bitfield (A) rather than the PSID.
>
>    The infix algorithm allocates ports to a given CE as a series of
>    contiguous ranges spaced at regular intervals throughout the complete
>    range of possible port set values.
>
>                      0                   1
>                      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6

Move the two lines above to the right by one character.

>                      +-----------+-----------+-------+
>        Ports in      |     A     |    PSID   |   M   |
>     the CE port set  |    > 0    |           |       |
>                      +-----------+-----------+-------+
>                      |  a bits   |  k bits   |m bits |
>
>           Figure 2: Structure of a port-restricted port field
>
>    a-bits The number of offset bits.  The default Offset bits (a) are 6,
>       this excludes the system ports (0-1023).

For readability, add colons and remove dashes: s/a-bits/a bits:/

Also: s/The default Offset bits (a) are 6/6 by default, as/

> Troan, et al.          Expires February 13, 2014                [Page 8]
> 
> Internet-Draft                    MAP                        August 2013
>
>
>    A  Selects the range of the port number.  For a > 0, A MUST be larger

s/A/A:/

>       than 0.  This ensures that the algorithm excludes the system
>       ports.  For this value of a, the system ports, but no others, are
>       excluded by requiring that A be greater than 0.  For smaller
>       values of a,

so... for a=0?

>       A still has to be greater than 0,

How is this possible for a=0?

>       but this excludes
>       ports above 1023.  For larger values of a,

Larger than what? I'm lost.

>      the minimum value of A
>       has to be higher to exclude all the system ports.  The interval
>       between successive contiguous ranges assigned to the same user is
>       2^a.
>
>    PSID The Port Set Identifier.  Different Port-Set Identifiers (PSID)

s/PSID/PSID:/

s/Port-Set Identifiers (PSID)/PSIDs/

>       guarantee non-overlapping port-sets.
>
>    k-bits The length in bits of the PSID field.  The sharing ratio is

s/k-bits/k bits:/

>       2^k.  The number of ports assigned to the user is 2^(16-k) - 2^m
>       (excluded ports)
>
>    M  Selects the specific port within the particular range specified by

s/M/M:/

s/the/a/

>       the concatenation of A and the PSID.
>
>    m bits The size contiguous ports.  The number of contiguous ports is

s/m bits/m bits:/

s/The size contiguous ports.//

>       given by 2^m.
>
> 5.2.  Basic mapping rule (BMR)
>
>    The Basic Mapping Rule is mandatory, used by the CE to provision
>    itself with an IPv4 prefix, IPv4 address or shared IPv4 address.
>    Recall from Section 5 that the BMR consists of the following

s/the BMR/a MAP rule/

>    parameters:
>
>    o  Rule IPv6 prefix (including prefix length)
>
>    o  Rule IPv4 prefix (including prefix length)
>
>    o  Rule EA-bits length (in bits)
>
>    Figure 3 shows the structure of the complete MAP IPv6 address as
>    specified in this document.
>
>
>
>    |     n bits         |  o bits   | s bits  |   128-n-o-s bits      |
>    +--------------------+-----------+---------+-----------------------+
>    |  Rule IPv6 prefix  |  EA bits  |subnet ID|     interface ID      |
>    +--------------------+-----------+---------+-----------------------+
>    |<---  End-user IPv6 prefix  --->|
>
>
>                    Figure 3: MAP IPv6 Address Format
>
>
>
>
>
> Troan, et al.          Expires February 13, 2014                [Page 9]
> 
> Internet-Draft                    MAP                        August 2013
>
>
>    The Rule IPv6 prefix is the part of the End-user IPv6 prefix that is
>    common among all CEs using the same Basic Mapping Rule within the MAP
>    domain.  The EA bits encode the CE specific IPv4 address and port
>    information.  The EA bits, which are unique for a given Rule IPv6
>    prefix, can contain a full or part of an IPv4 address and, in the
>    shared IPv4 address case, a Port-Set Identifier (PSID).  An EA-bit
>    length of 0 signifies that all relevant MAP IPv4 addressing
>    information is passed directly in the BMR, and not derived from the
>    End-user IPv6 prefix.
>
>    The MAP IPv6 address is created by concatenating the End-user IPv6
>    prefix with the MAP subnet identifier (if the End-user IPv6 prefix is
>    shorter than 64 bits) and the interface identifier as specified in
>    Section 6.
>
>    The MAP subnet identifier is defined to be the first subnet (all bits

s/all/s/

>    set to zero).
>
>    Define:
>
>       r = length of the IPv4 prefix given by the BMR;
>
>       o = length of the EA bit field as given by the BMR;
>
>       p = length of the IPv4 suffix contained in the EA bit field.
>
>    The length r MAY be zero, in which case the complete IPv4 address or
>    prefix is encoded in the EA bits.  If only a part of the IPv4 address
>    /prefix is encoded in the EA bits, the Rule IPv4 prefix is
>    provisioned to the CE by other means (e.g.  a DHCPv6 option).  To
>    create a complete IPv4 address (or prefix), the IPv4 address suffix
>    (p) from the EA bits, is concatenated with the Rule IPv4 prefix (r
>    bits).
>
>    The offset of the EA bits field in the IPv6 address is equal to the
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Troan, et al.          Expires February 13, 2014               [Page 10]
> 
> Internet-Draft                    MAP                        August 2013
>
>    BMR Rule IPv6 prefix length.  The length of the EA bits field (o) is
>    given by the BMR Rule EA-bits length, and can be between 0 and 48.  A
>    length of 48 means that the complete IPv4 address and port is
>    embedded in the End-user IPv6 prefix (a single port is assigned).  A
>    length of 0 means that no part of the IPv4 address or port is
>    embedded in the address.  The sum of the Rule IPv6 Prefix length and
>    the Rule EA-bits length MUST be less or equal than the End-user IPv6
>    prefix length.
>
>    If o + r < 32 (length of the IPv4 address in bits), then an IPv4
>    prefix is assigned.  This case is shown in Figure 4.
>
>                                IPv4 prefix:
>
>
>                  |   r bits    |        p bits       |

For clarity: s/p bits/o bits = p bits/

>                  +-------------+---------------------+
>                  |  Rule IPv4  | IPv4 Address suffix |
>                  +-------------+---------------------+
>                  |           < 32 bits               |
>
>                          Figure 4: IPv4 prefix
>
>    If o + r is equal to 32, then a full IPv4 address is to be assigned.
>    The address is created by concatenating the Rule IPv4 prefix and the
>    EA-bits.  This case is shown in Figure 5.
>
>                           Complete IPv4 address:
>
>
>                  |   r bits    |        p bits       |

For clarity: s/p bits/o bits = p bits/

>                  +-------------+---------------------+
>                  |  Rule IPv4  | IPv4 Address suffix |
>                  +-------------+---------------------+
>                  |            32 bits                |
>
>
>                     Figure 5: Complete IPv4 address
>
>    If o + r is > 32, then a shared IPv4 address is to be assigned.  The
>    number of IPv4 address suffix bits (p) in the EA bits is given by 32
>    - r bits.  The PSID bits are used to create a port-set.  The length

s/port-set/port set/

>    of the PSID bit field within EA bits is: q = o - p.
>
>                            Shared IPv4 address:
>
>
>       |   r bits    |        p bits       |         |   q bits   |
>       +-------------+---------------------+         +------------+
>       |  Rule IPv4  | IPv4 Address suffix |         |Port-Set ID |
>       +-------------+---------------------+         +------------+
>       |            32 bits                |
>
>
>
> Troan, et al.          Expires February 13, 2014               [Page 11]
> 
> Internet-Draft                    MAP                        August 2013
>
>
>
>                      Figure 6: Shared IPv4 address
>
>    The length of r MAY be 32, with no part of the IPv4 address embedded
>    in the EA bits.  This results in a mapping with no dependence between
>    the IPv4 address and the IPv6 address.  In addition the length of o
>    MAY be zero (no EA bits embedded in the End-User IPv6 prefix),
>    meaning that also the PSID is provisioned using e.g.  the DHCP
>    option.
>
>    See Appendix A for an example of the Basic Mapping Rule.
>
> 5.3.  Forwarding mapping rule (FMR)

Rename this section to: "Deriving IPv4 routes from MAP rules"

>    The Forwarding Mapping Rule is optional, and used in mesh mode to
>    enable direct CE to CE connectivity.

Remove the above paragraph.

>    On adding an FMR rule, an IPv4 route is installed in the Rules table

s/an FMR rule/a MAP rule (including the BMR)/

>    for the Rule IPv4 prefix.
>
>    On forwarding an IPv4 packet, a best matching prefix look up is done
>    in the Rules table and the correct FMR is chosen.

s/FMR/MAP rule/

>
>    |        32 bits           |         |    16 bits        |
>    +--------------------------+         +-------------------+
>    | IPv4 destination address |         |  IPv4 dest port   |
>    +--------------------------+         +-------------------+
>                    :          :           ___/       :
>                    | p bits   |          /  q bits   :
>                    +----------+         +------------+
>                    |IPv4  sufx|         |Port-Set ID |
>                    +----------+         +------------+
>                    \          /    ____/    ________/
>                      \       :  __/   _____/
>                        \     : /     /
>    |     n bits         |  o bits   | s bits  |   128-n-o-s bits      |
>    +--------------------+-----------+---------+------------+----------+
>    |  Rule IPv6 prefix  |  EA bits  |subnet ID|     interface ID      |
>    +--------------------+-----------+---------+-----------------------+
>    |<---  End-user IPv6 prefix  --->|

Remove the above line, because only the BMR contains the End-user IPv6 
prefix. In general, MAP rules do not (unless we start referring to other 
user's End-user IPv6 prefix, but that would become confusing very quickly).

>                  Figure 7: Deriving of MAP IPv6 address

s/MAP IPv6 address/IPv4 route/

>    See Appendix A for an example of the Forwarding Mapping Rule.

s/ of the Forwarding Mapping Rule//

> 5.4.  Destinations outside the MAP domain
>
>
>
>
>
>
> Troan, et al.          Expires February 13, 2014               [Page 12]
> 
> Internet-Draft                    MAP                        August 2013
>
>
>    IPv4 traffic between MAP nodes that are all within one MAP domain is
>    encapsulated in IPv6, with the senders MAP IPv6 address as the IPv6

s/senders/sender's/

>    source address and the receiving MAP node's MAP IPv6 address as the
>    IPv6 destination address.  To reach IPv4 destinations outside of the
>    MAP domain, traffic is also encapsulated in IPv6, but the destination
>    IPv6 address is set to the configured IPv6 address of the MAP BR.
>
>    On the CE, the path to the BR can be represented as a point to point
>    IPv4 over IPv6 tunnel [RFC2473] with the source address of the tunnel
>    being the CE's MAP IPv6 address and the BR IPv6 address as the remote
>    tunnel address.  When MAP is enabled, a typical CE router will
>    install a default route to the BR.

s/default route/default IPv4 route/

>
>    The BR forwards traffic received from the outside to CE's using the
>    normal MAP forwarding rules.
>
> 6.  The IPv6 Interface Identifier
>
>    The Interface identifier format of a MAP node is described below.
>
>
>    |          128-n-o-s bits          |
>    | 16 bits|    32 bits     | 16 bits|
>    +--------+----------------+--------+
>    |   0    |  IPv4 address  |  PSID  |
>    +--------+----+-----------+--------+
>
>
>                                 Figure 8
>
>    In the case of an IPv4 prefix, the IPv4 address field is right-padded
>    with zeroes up to 32 bits.  The PSID field is left-padded to create a
>    16 bit field.  For an IPv4 prefix or a complete IPv4 address, the
>    PSID field is zero.
>
>    If the End-user IPv6 prefix length is larger than 64, the most
>    significant parts of the interface identifier is overwritten by the
>    prefix.
>
> 7.  MAP Configuration
>
>    For a given MAP domain, the BR and CE MUST be configured with the
>    following MAP elements.  The configured values for these elements are
>    identical for all CEs and BRs within a given MAP domain.
>
>    o  The Basic Mapping Rule and optionally the Forwarding Mapping
>
>
>
>
>
>
>
>
> Troan, et al.          Expires February 13, 2014               [Page 13]
> 
> Internet-Draft                    MAP                        August 2013
>
>       Rules, including the Rule IPv6 prefix, Rule IPv4 prefix, and
>       Length of EA bits

Replace the entire previous bullet with "At least one MAP rule."

>
>    o  Hub and spoke mode or Mesh mode.  (If all traffic should be sent
>       to the BR, or if direct CE to CE traffic should be supported).
>
>    In addition the MAP CE MUST be configured with the IPv6 address(es)
>    of the MAP BR (Section 5.4).
>
> 7.1.  MAP CE
>
>    The MAP elements are set to values that are the same across all CEs
>    within a MAP domain.  The values may be configured in a variety of
>    manners, including provisioning methods such as the Broadband Forum's
>    "TR-69" Residential Gateway management interface, an XML-based object
>    retrieved after IPv6 connectivity is established, or manual
>    configuration by an administrator.  This document focuses on how to
>    configure the necessary parameters via IPv6 DHCP.

Is this still true?

>    A CE that allows
>    IPv6 configuration by DHCP SHOULD implement this option.

Which one? It needs to be introduced earlier.

>    Other
>    configuration and management methods may use the format described by
>    this option for consistency and convenience of implementation on CEs
>    that support multiple configuration methods.
>
>    The only remaining provisioning information the CE requires in order
>    to calculate the MAP IPv4 address and enable IPv4 connectivity is the
>    IPv6 prefix for the CE.  The End-user IPv6 prefix is configured as
>    part of obtaining IPv6 Internet access.
>
>    The MAP provisioning parameters, and hence the IPv4 service itself,
>    is tied to the End-user IPv6 prefix lease; thus, the MAP service is

s/is tied/are tied/

>    also tied to this in terms of authorization, accounting, etc.  The
>    MAP IPv4 address, prefix or shared IPv4 address and port set has the
>    same lifetime as its associated End-user IPv6 prefix.
>
>    A single MAP CE MAY be connected to more than one MAP domain, just as
>    any router may have more than one IPv4-enabled service provider
>    facing interface and more than one set of associated addresses
>    assigned by DHCP.  Each domain a given CE operates within would
>    require its own set of MAP configuration elements and would generate
>    its own IPv4 address.

But we're still limited to one MAP domain per End-user IPv6 prefix, right?

>    The MAP DHCP option is specified in [I-D.ietf-softwire-map-dhcp].
>
> 7.2.  MAP BR
>
>    The MAP BR MUST be configured with the same MAP elements as the MAP
>    CEs operating within the same domain.
>
>    For increased reliability and load balancing, the BR IPv6 address MAY
>    be an anycast address shared across a given MAP domain.  As MAP is
>    stateless, any BR may be used at any time.  If the BR IPv6 address is
>    anycast the relay MUST use this anycast IPv6 address as the source
>
>
>
> Troan, et al.          Expires February 13, 2014               [Page 14]
> 
> Internet-Draft                    MAP                        August 2013
>
>    address in packets relayed to CEs.

What about IPv4 anycast?

>
>    Since MAP uses provider address space, no specific routes need to be
>    advertised externally for MAP to operate, neither in IPv6 nor IPv4
>    BGP.  However, if anycast is used for the MAP IPv6 relays, the
>    anycast addresses must be advertised in the service provider's IGP.
>
> 7.3.  Backwards compatibility
>
>    A MAP-E CE provisioned with only the IPv6 address of the BR, and with
>    no IPv4 address and port range configured by other means, MUST
>    disable its NAT44 functionality.  This characteristic makes a MAP CE
>    compatible with DS-Lite [RFC6333] AFTRs, whose addresses are
>    configured as the MAP BR.

As discussed in a separate thread, I suggest to remove section 7.3 entirely.

>
> 8.  Forwarding Considerations
>
>    Figure 1 depicts the overall MAP architecture with IPv4 users (N and
>    M) networks connected to a routed IPv6 network.
>
>    MAP supports Encapsulation mode as specified in [RFC2473].

It not clear what "supports" mean in this context. I would have expected 
"uses" instead.

>
>    For a shared IPv4 address, a MAP CE forwarding IPv4 packets from the
>    LAN performs NAT44 functions first and creates appropriate NAT44
>    bindings.  The resulting IPv4 packets MUST contain the source IPv4
>    address and source transport identifiers defined by MAP.  The IPv4

s/defined by/obtained with/

>    packet is forwarded using the CE's MAP forwarding function.  The IPv6
>    source and destination addresses MUST then be derived as per Section
>    5 of this draft.
>
> 8.1.  Receiving Rules
>
>    A MAP CE receiving an IPv6 packet to its MAP IPv6 address sends this
>    packet to the CE's MAP function where it is decapsulated.  All other
>    IPv6 traffic is forwarded as per the CE's IPv6 routing rules.  The
>    resulting IPv4 packet is then forwarded to the CE's NAT44 function
>    where the destination port number MUST be checked against the
>    stateful port mapping session table and the destination port number
>    MUST be mapped to its original value.

The previous sentence should be reworded to allow static port forwarding.

>    A MAP BR receiving IPv6 packets selects a best matching MAP domain
>    rule based on a longest address match of the packets' source address
>    against the BR's configured MAP BMR prefix(es), as well as a match of

The BR, being a MAP node, can only have a single BMR, and therefore only 
one BMR prefix. The alternative would be when the BR is part of multiple 
MAP domains, which is not what I think you're trying to say. So I'm 
confused.

>    the packet destination address against the configured BR IPv6 address
>    or FMR prefix(es).  The selected MAP rule allows the BR to determine

The "FMR prefix" concept has not been defined by this point.

It should be possible to express this using only "MAP rule".

>    the EA-bits from the source IPv6 address.  The BR MUST perform a
>    validation of the consistency of the source IPv6 address and source
>    port number for the packet using BMR.  If the packets source port

"source IPv6 address and source port number" --> I don't know which port 
number this refers to. Especially since later text deals with port 
numbers...

>    number is found to be outside the range allowed for this CE and the
>    BMR, the BR MUST drop the packet and respond with an ICMPv6
>    "Destination Unreachable, Source address failed ingress/egress
>
>
>
>
> Troan, et al.          Expires February 13, 2014               [Page 15]
> 
> Internet-Draft                    MAP                        August 2013
>
>    policy" (Type 1, Code 5).

What happens if the IPv6 source address is invalid?

>
>    In order to prevent spoofing of IPv4 addresses, the MAP node MUST
>    validate the embedded IPv4 source address and transport layer port of
>    the encapsulated IPv6 packet with the IPv4 source address and

s/encapsulated/encapsulating/

>    transport layer port it is encapsulated by according to the

s/it is encapsulated by/of the encapsulated IPv4 packet/

>    parameters of the matching mapping rule.  If the two source addresses
>    and transport layer ports do not match, the packet MUST be silently
>    discarded and a counter incremented to indicate that a potential
>    spoofing attack may be underway.  Additionally, a CE MUST allow
>    forwarding of packets sourced by the configured BR IPv6 address.
>
>    By default, the CE router MUST drop packets received on the MAP
>    virtual interface (i.e., after decapsulation of IPv6) for IPv4
>    destinations not for its own IPv4 shared address, full IPv4 address
>    or IPv4 prefix.
>
> 8.2.  ICMP
>
>    ICMP message should be supported in MAP domain.  Hence, the NAT44 in
>    MAP CE must implement the behavior for ICMP message conforming to the

s/must/MUST/

>    best current practice documented in [RFC5508].
>
>    If a MAP CE receives an ICMP message having ICMP identifier field in
>    ICMP header, NAT44 in the MAP CE must rewrite this field to a

s/must/MUST/

>    specific value assigned from the port-set.  BR and other CEs must

s/port-set/port set/

>    handle this field similar to the port number in the TCP/UDP header
>    upon receiving the ICMP message with ICMP identifier field.
>
>    If a MAP node receives an ICMP error message without the ICMP
>    identifier field for errors that is detected inside a IPv6 tunnel, a
>    node should relay the ICMP error message to the original source.
>    This behavior should be implemented conforming to the section 8 of

s/should/SHOULD/

>    [RFC2473].
>
> 8.3.  Fragmentation and Path MTU Discovery
>
>    Due to the different sizes of the IPv4 and IPv6 header, handling the
>    maximum packet size is relevant for the operation of any system
>    connecting the two address families.  There are three mechanisms to
>    handle this issue: Path MTU discovery (PMTUD), fragmentation, and
>    transport-layer negotiation such as the TCP Maximum Segment Size
>    (MSS) option [RFC0897].  MAP uses all three mechanisms to deal with
>    different cases.
>
> 8.3.1.  Fragmentation in the MAP domain
>
>    Encapsulating an IPv4 packet to carry it across the MAP domain will
>    increase its size (40 bytes).  It is strongly recommended that the

s/40 bytes/40 bytes typically/

>    MTU in the MAP domain is well managed and that the IPv6 MTU on the CE

s/is/be/

>    WAN side interface is set so that no fragmentation occurs within the

s/is/be/

>
>
>
>
> Troan, et al.          Expires February 13, 2014               [Page 16]
> 
> Internet-Draft                    MAP                        August 2013
>
>    boundary of the MAP domain.
>
>    Fragmentation on MAP domain entry is described in section 7.2 of
>    [RFC2473]

Add missing period.

>
>    The use of an anycast source address could lead to any ICMP error

Anycast IPv4 or IPv6 source address?

s/any/an/

>    message generated on the path being sent to a different BR.
>    Therefore, using dynamic tunnel MTU Section 6.7 of [RFC2473] is
>    subject to IPv6 Path MTU black-holes.  A MAP BR SHOULD NOT by default
>    use Path MTU discovery across the MAP domain.

But PMTUD sounds like a good idea when not using anycast. Could this 
last statement be adjusted to reflect this?

>
>    Multiple BRs using the same anycast source address could send
>    fragmented packets to the same CE at the same time.  If the
>    fragmented packets from different BRs happen to use the same fragment
>    ID, incorrect reassembly might occur.  See [RFC4459] for an analysis
>    of the problem.  Section 3.4 suggests solving the problem by
>    fragmenting the inner packet.
>
> 8.3.2.  Receiving IPv4 Fragments on the MAP domain borders
>
>    Forwarding of an IPv4 packet received from the outside of the MAP
>    domain requires the IPv4 destination address and the transport
>    protocol destination port.  The transport protocol information is
>    only available in the first fragment received.  As described in
>    section 5.3.3 of [RFC6346] a MAP node receiving an IPv4 fragmented
>    packet from outside has to reassemble the packet before sending the
>    packet onto the MAP link.  If the first packet received contains the
>    transport protocol information, it is possible to optimize this
>    behavior by using a cache and forwarding the fragments unchanged.  A
>    description of this algorithm is outside the scope of this document.

Maybe we could be inspired by RFC 6146 and add text like this:

       Implementers of NAT64 should be aware that there are a number of
       well-known attacks against IP fragmentation; see [RFC1858] and
       [RFC3128].  Implementers should also be aware of additional issues
       with reassembling packets at high rates, described in [RFC4963].

> 8.3.3.  Sending IPv4 fragments to the outside
>
>    If two IPv4 host behind two different MAP CE's with the same IPv4
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Troan, et al.          Expires February 13, 2014               [Page 17]
> 
> Internet-Draft                    MAP                        August 2013
>
>    address sends fragments to an IPv4 destination host outside the
>    domain.

Sentence contains only a subordinate clause. Reword.

>    Those hosts may use the same IPv4 fragmentation identifier,
>    resulting in incorrect reassembly of the fragments at the destination
>    host.  Given that the IPv4 fragmentation identifier is a 16 bit
>    field, it could be used similarly to port ranges.  A MAP CE SHOULD

s/could/can/

Why not MUST?

>    rewrite the IPv4 fragmentation identifier to be within its allocated
>    port set.
>
> 9.  NAT44 Considerations
>
>    The NAT44 implemented in the MAP CE SHOULD conform with the behavior

s/SHOULD/MUST/

That's all!

Simon
-- 
DTN made easy, lean, and smart --> http://postellation.viagenie.ca
NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
STUN/TURN server               --> http://numb.viagenie.ca