draft-ietf-softwire-map-t-00.txt   draft-ietf-softwire-map-t-01.txt 
Network Working Group X. Li Network Working Group X. Li
Internet-Draft C. Bao Internet-Draft C. Bao
Intended status: Experimental CERNET Center/Tsinghua Intended status: Experimental CERNET Center/Tsinghua
Expires: April 15, 2013 University Expires: August 22, 2013 University
W. Dec W. Dec
O. Troan O. Troan
Cisco Systems Cisco Systems
S. Matsushima S. Matsushima
SoftBank Telecom SoftBank Telecom
T. Murakami T. Murakami
IP Infusion IP Infusion
October 12, 2012 February 18, 2013
Mapping of Address and Port using Translation (MAP-T) Mapping of Address and Port using Translation (MAP-T)
draft-ietf-softwire-map-t-00 draft-ietf-softwire-map-t-01
Abstract Abstract
This document specifies the "Mapping of Address and Port" double This document specifies the "Mapping of Address and Port" double
stateless translation based solution (MAP-T) for providing shared or stateless NAT64 translation based solution (MAP-T) for providing
uniquely addressed IPv4 host connectivity to and across an IPv6 shared or uniquely addressed IPv4 device connectivity to and across
domain, an IPv6 domain.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 15, 2013. This Internet-Draft will expire on August 22, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the Copyright (c) 2013 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
4. Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 6
5. Mapping Rules . . . . . . . . . . . . . . . . . . . . . . . . 6 5. Mapping Rules . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1. Basic mapping rule (BMR) . . . . . . . . . . . . . . . . . 8 5.1. Port mapping algorithm . . . . . . . . . . . . . . . . . . 10
5.2. Forwarding mapping rule (FMR) . . . . . . . . . . . . . . 11 5.2. Basic mapping rule (BMR) . . . . . . . . . . . . . . . . . 11
5.3. Default mapping rule (DMR) . . . . . . . . . . . . . . . . 12 5.3. Forwarding mapping rule (FMR) . . . . . . . . . . . . . . 14
5.4. MAP IPv6 Interface Identifier . . . . . . . . . . . . . . 13 5.4. Default mapping rule (DMR) . . . . . . . . . . . . . . . . 14
5.5. Port mapping algorithm . . . . . . . . . . . . . . . . . . 14 5.5. The IPv6 Interface Identifier . . . . . . . . . . . . . . 15
5.5.1. Bit Representation of the Algorithm . . . . . . . . . 14 6. Configuration and Packet Forwarding . . . . . . . . . . . . . 15
5.5.2. GMA examples . . . . . . . . . . . . . . . . . . . . . 15 6.1. IPv4 to IPv6 at the CE . . . . . . . . . . . . . . . . . . 15
5.5.3. GMA Excluded Ports . . . . . . . . . . . . . . . . . . 16 6.2. IPv6 to IPv4 at the CE . . . . . . . . . . . . . . . . . . 16
6. Packet Forwarding . . . . . . . . . . . . . . . . . . . . . . 16 6.3. IPv6 to IPv4 at the BR . . . . . . . . . . . . . . . . . . 16
6.1. IPv4 to IPv6 at the CE . . . . . . . . . . . . . . . . . . 16
6.2. IPv6 to IPv4 at the CE . . . . . . . . . . . . . . . . . . 17
6.3. IPv6 to IPv4 at the BR . . . . . . . . . . . . . . . . . . 17
6.4. IPv4 to IPv6 at the BR . . . . . . . . . . . . . . . . . . 17 6.4. IPv4 to IPv6 at the BR . . . . . . . . . . . . . . . . . . 17
7. ICMP Handling . . . . . . . . . . . . . . . . . . . . . . . . 18 7. ICMP Handling . . . . . . . . . . . . . . . . . . . . . . . . 17
8. Fragmentation and Path MTU Discovery . . . . . . . . . . . . . 19 8. Fragmentation and Path MTU Discovery . . . . . . . . . . . . . 18
8.1. Fragmentation in the MAP domain . . . . . . . . . . . . . 19 8.1. Fragmentation in the MAP domain . . . . . . . . . . . . . 18
8.2. Receiving IPv4 Fragments on the MAP domain borders . . . . 19 8.2. Receiving IPv4 Fragments on the MAP domain borders . . . . 18
8.3. Sending IPv4 fragments to the outside . . . . . . . . . . 19 8.3. Sending IPv4 fragments to the outside . . . . . . . . . . 19
9. Usage Considerations . . . . . . . . . . . . . . . . . . . . . 20 9. Usage Considerations . . . . . . . . . . . . . . . . . . . . . 19
9.1. Hub and spoke with per subscriber rules . . . . . . . . . 20 9.1. Address Independence . . . . . . . . . . . . . . . . . . . 19
9.2. Communication with IPv6 servers in the MAP-T domain . . . 20 9.2. Mesh vs Hub and spoke mode . . . . . . . . . . . . . . . . 19
9.3. Backwards compatibility . . . . . . . . . . . . . . . . . 20 9.3. Communication with IPv6 servers in the MAP-T domain . . . 19
9.4. Backwards compatibility . . . . . . . . . . . . . . . . . 20
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20
11. Security Considerations . . . . . . . . . . . . . . . . . . . 20 11. Security Considerations . . . . . . . . . . . . . . . . . . . 20
12. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 21 12. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 21
13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 23 13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 22
14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 23 14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 23
14.1. Normative References . . . . . . . . . . . . . . . . . . . 23 14.1. Normative References . . . . . . . . . . . . . . . . . . . 23
14.2. Informative References . . . . . . . . . . . . . . . . . . 23 14.2. Informative References . . . . . . . . . . . . . . . . . . 23
Appendix A. Example of MAP-T translation . . . . . . . . . . . . 25 Appendix A. Examples of MAP-T translation . . . . . . . . . . . . 25
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 28 Appendix B. Port mapping algorithm . . . . . . . . . . . . . . . 29
B.1. Bit Representation of the Algorithm . . . . . . . . . . . 30
B.2. GMA examples . . . . . . . . . . . . . . . . . . . . . . . 31
B.3. GMA Excluded Ports . . . . . . . . . . . . . . . . . . . . 31
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 32
1. Introduction 1. Introduction
Experiences from initial IPv6 deployments indicate that transitioning Experiences from initial IPv6 deployments indicate that transitioning
a network providers' domain fully to IPv6 requires not only the a network providers' domain fully to IPv6 requires not only the
continued support of legacy IPv4 users connected to the boundary of continued support of legacy IPv4 users connected to the boundary of
that domain, allowing IPv4 address sharing, but also the need for that domain, allowing IPv4 address sharing, but also the need for
carrying out IPv6-only operational practices in that domain [, also carrying out IPv6-only operational practices in that domain [, also
for traffic from IPv4 users. The use of an double NAT64 translation for traffic from IPv4 users. The use of an double NAT64 translation
based solutions is an optimal way to address these requirements, based solutions is an optimal way to address these requirements,
particularly in combination with stateless translation techniques particularly in combination with stateless translation techniques
that seek to minimize challenges outlined in that seek to minimize challenges outlined in
[I-D.ietf-softwire-stateless-4v6-motivation]. [I-D.ietf-softwire-stateless-4v6-motivation].
The Mapping of Address and Port - Translation (MAP-T) solution The Mapping of Address and Port - Translation (MAP-T) solution
defined in this document is such a solution, that builds on existing defined in this document is such a solution, that builds on existing
stateless NAT64 techniques specified in [RFC6145], along with a stateless NAT64 techniques specified in [RFC6145], along with a
stateless algorithmic address & port mapping scheme to allow the stateless algorithmic address & transport layer port mapping scheme
sharing of IPv4 addresses across an IPv6 network. The MAP-T solution to allow the sharing of IPv4 addresses across an IPv6 network. The
is closely related to MAP-E [I-D.ietf-softwire-map], with both MAP-T solution is closely related to MAP-E [I-D.ietf-softwire-map],
utilizing the same algorithmic method, but differing in their choice with both utilizing the same address and port mapping method, but
of translation [RFC6145] and encapsulation [RFC2473]based IPv6 differing in their choice of IPv6 domain transport, i.e. Translation
transports. [RFC6145] and encapsulation [RFC2473]. The translation mode is
required for environments where the IP encapsulation overhead or IPv6
traffic interaction & processing (eg use of IPv6 only servers)
requirements, or both, make the use of the encapsulation solution not
attractive.
A companion draft defines the DHCPv6 options for provisioning of MAP A companion draft defines the DHCPv6 options for provisioning of MAP
[I-D.mdt-softwire-map-dhcp-option], applicable to both MAP-T and [I-D.mdt-softwire-map-dhcp-option], applicable to both MAP-T and
MAP-E. MAP-E.
2. Conventions 2. Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
skipping to change at page 5, line 17 skipping to change at page 6, line 23
thereof) or a shared IPv4 address (or part thereof) or a shared IPv4 address (or part
thereof) and a port-set identifier. thereof) and a port-set identifier.
MRT: MAP Rule table. Address and Port aware data MRT: MAP Rule table. Address and Port aware data
structure, supporting longest match lookups. structure, supporting longest match lookups.
The MRT is used by the MAP forwarding The MRT is used by the MAP forwarding
function. function.
4. Architecture 4. Architecture
Figure 1 depicts the overall MAP-T architecture with IPv4 users (N Figure 1 depicts the overall MAP-T architecture with IPv4 users N and
and M) networks connected by means of MAP CEs to an IPv6 network that M connected by means of MAP-T CEs to an IPv6 network that is equipped
is equipped with one or more MAP BR. with one or more MAP-T BR.
User N User N
Private IPv4 Private IPv4
| Network | Network
| |
O--+---------------O O--+---------------O
| | MAP-T CE | | | MAP-T CE |
| +-----+--------+ | | +-----+--------+ |
| NAPT44| MAP-T | `-. | NAPT44| MAP-T | `-.
| +-----+ | | -._ ,-------. .------. | +-----+ | | -._ ,-------. .------.
skipping to change at page 5, line 49 skipping to change at page 7, line 33
| +-----+ | | IPv6 Server(s) | +-----+ | | IPv6 Server(s)
| | +--------+ | (w/ v4 mapped | | +--------+ | (w/ v4 mapped
O---.--------------O address) O---.--------------O address)
| |
User M User M
Private IPv4 Private IPv4
Network Network
Figure 1: Network Topology Figure 1: Network Topology
The MAP-T CE is responsible for connecting a users' private IPv4, The MAP-T CE is responsible for translating a users' private IPv4
along with any native IPv6 network to the IPv6-only MAP-T domain. space to a shared IPv4 address that is then mapped into the IPv6
domain using stateless NAT64.
The MAP-T BR is responsible for connecting external IPv4 networks to The MAP-T BR is responsible for connecting external IPv4 networks to
all devices in one or more MAP-T domains, using stateless NAT64 as all devices in one or more MAP-T domains, using stateless NAT64 as
extended by the MAP-T rules in this document. extended by the MAP-T rules in this document.
Besides the CE and BR, the MAP-T domain can contain any regular IPv6- Besides the CE and BR, the MAP-T domain can contain any regular (i.e.
only hosts/servers that have an IPv4 mapped IPv6 address (IPv4- Not equipped with MAP-T capabilities) IPv6-only hosts or servers that
translatable address per [RFC6052]) using a prefix assigned to the have an IPv4 mapped IPv6 address (IPv4-translatable address per
MAP-T domain. Communication with such devices is naturally possible [RFC6052]) using the prefix assigned to the MAP-T domain, e.g. An
in the MAP-T architecture from inside or outside the MAP-T domain internal web server, or cache. The MAP-T architecture support
including from any IPv4-only hosts. In this mode, any IPv6-only communication initiated towards such devices from both inside or
servers SHOULD have both A and AAAA DNS server records. DNS64 outside the MAP-T domain including from any IPv4-only hosts. An
[RFC6147] becomes required only when IPv6 servers in the MAP-T domain optional (not shown) DNS64 [RFC6147] component would be required if
are expected themselves to initiate communication to internal/ the said IPv6 devices are expected to themselves to initiate
external IPv4-only entities. communication to IPv4-only entities outside of the domain.
Functionally the MAP-T CE and BR use existing standard functional Functionally the MAP-T CE and BR extend well established building
building blocks, or extensions to these as follows: blocks as follows:
o A standard NAPT [RFC2663] function on a MAP CE is extended with o A regular (NAT44) NAPT [RFC2663] function on a MAP CE is extended
support for restricting the allowable TCP/UDP ports for a given with support for restricting the allowable TCP/UDP ports for a
IPv4 address. The enforcement of NAPT function, as well as the given IPv4 address. The IPv4 address and port range used are
port restriction is conditional upon the MAP CE's configuration as determined by the MAP provisioning process and identical to MAP-E
applied by the network operator. [I-D.ietf-softwire-map].
o A standard stateless NAT64 function [RFC6145]is extended for o A standard stateless NAT64 function [RFC6145] is extended to allow
translating IPv4 traffic to IPv6, based on a lookup of source/ stateless mapping of IPv4 and transport layer port ranges to IPv6
destination IPv4 address + TCP/UDP port or ICMP id information address space. This algorithmic mapping is specified in section
that is then mapped to the source/destination IPv6 address. This 5.
algorithmic mapping is specified in section 5.
Section 6 describes how these functional blocks are combined with the The operation of the above functions is modelled by means of Mapping
Mapping Rules of Section 4 to enable IPv4-IPv6 communication between Rules covered in Section 5. Section 6 describes how the functions
the CE and BR and IPv6-only servers in the domain. are used in packet forwarding operations.
5. Mapping Rules 5. Mapping Rules
A MAP node is provisioned with one or more mapping rules. EDITORIAL NOTE: This section is effectively identical of the Mapping
Rules section[I-D.ietf-softwire-map], and will be re-factored &
reconciled as the MAP-E draft finalizes.
Mapping rules are used differently depending on their function. Any MAP node needs to be provisioned with one or more mapping rules,
Every MAP node must be provisioned with a Basic mapping rule. This that form a mapping rule table.
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 or prefix.
Additional mapping rules are specified to allow for e.g. Multiple
different IPv4 subnets to exist within the domain and optimize
forwarding between them.
Traffic outside of the domain (i.e. When the destination IPv4 Every MAP node MUST be provisioned with a Basic Mapping Rule (BMR).
address does not match (using longest matching prefix) any Rule IPv4 All node's sharing a BMR are said to be part of the same MAP domain.
prefix in the Rules database) will be forward using the Default On a CE this rule in combination with its natively assigned IPv6
mapping rule. The Default mapping rule maps outside destinations to prefix, allows the CE node to determine its IPv4 address and port
the BR's IPv6 address or prefix. range. This same BMR, when can also be used to enable direct
communication (a.k.a. mesh mode), that bypasses the BR, between CEs
in the same MAP-T domain. In practical terms this equates to the CE
having an IPv4 route entry for the IPv4 prefix assigned to that
domain, and forwarding corresponding traffic using the parameters
defined in the rule. Additional mapping rules, termed Forward
Mapping Rules (FMRs), are used to allow for multiple different IPv4
subnets to exist within the domain and optimize forwarding between
them. These are equivalent to more specific IPv4 routes.
In summary, there are three types of mapping rules: Destination outside of a MAP domain are reached (represented) by a
Default Mapping Rule, that directs traffic to a MAP BR. i.e. Traffic
for destination IPv4 addresses that do not match using a longest
lookup to any IPv4 prefix in the Rules database, is forwarded to the
MAP BR. In MAP-T terms the CE uses stateless NAT64 to map such
traffic to the BR's IPv6 prefix. While there can be only one Default
Mapping Rule within a MAP domain, however there can be multiple BR's
operating on that rule.
In specific terms the three types of mapping rules are defined as:
1. Basic Mapping Rule (BMR) - used for configuring the CE's IPv4 1. Basic Mapping Rule (BMR) - used for configuring the CE's IPv4
address and/or port set assignment as well as deriving the MAP address and/or port set assignment as well as deriving the MAP
IPv6 address that the CE is to use. There can only be one Basic IPv6 address that the CE is to use. For a given IPv6 prefix
Mapping Rule per End-user IPv6 prefix. The BMR is composed of there can be only one BMR. By default a BMR MUST NOT be used to
the following parameters: create an IPv4 route entry for the Rule IPv4 prefix.The BMR is
composed of the following parameters:
* Rule IPv6 prefix (including prefix length) * Rule IPv6 prefix (including prefix length)
* Rule IPv4 prefix (including prefix length) * Rule IPv4 prefix (including prefix length)
* Rule EA-bits length (in bits) * Rule EA-bits length (in bits)
* Rule Port Parameters (optional) * Optional Rule Parameters
2. Forwarding Mapping Rule - used for forwarding in the MAP domain. 2. Forwarding Mapping Rule - used for forwarding within the MAP
The Basic Mapping Rule is also a Forwarding Mapping Rule. Each domain. Each Forwarding Mapping Rule will result in an entry in
Forwarding Mapping Rule will result in an entry in the MRT for the mapping rules table for the Rule IPv4 prefix + any port
the Rule IPv4 prefix + any port range. The FMR consists of the range. The FMR consists of the following parameters (an
following parameters: attentive reader will note that a BMR can be set as an FMR,
thereby enabling mesh-mode communication):
* Rule IPv6 prefix (including prefix length) * Rule IPv6 prefix (including prefix length)
* Rule IPv4 prefix (including prefix length) * Rule IPv4 prefix (including prefix length)
* Rule EA-bits length (in bits) * Rule EA-bits length (in bits)
* Rule Port Parameters (optional) * Optional Rule Port Parameters
3. Default Mapping Rule - used for destinations outside the MAP 3. Default Mapping Rule - used for reaching destinations outside the
domain. An IPv4 0.0.0.0/0 entry is installed in the MRT for this MAP domain. A DMR will result in an IPv4 0.0.0.0/0 entry in the
rule. rules table.
* IPv6 prefix of the BR * IPv6 prefix of the BR
* Rule BR IPv4 address (Optional - can be used for testing a * Rule BR IPv4 address (Optional - can be used for testing a
BR's reachability) BR's reachability)
4. Optional Rule Parameters - used to represent additional
configuration settings. Currently defined parameters are:
* Offset: Specifies the numeric value for the MAP algorithm's
excluded port range/offset bits (A-bits). Unless explicitly
defined this value MUST default to 4.
A MAP node finds its Basic Mapping Rule by doing a longest match A MAP node finds its Basic Mapping Rule by doing a longest match
between the End-user IPv6 prefix and the Rule IPv6 prefix in the between its assigned IPv6 prefix (e.g. via DHCPv6 PD) and the Rule
Mapping Rule database. The rule is then used for IPv4 prefix, IPv6 prefix in the Mapping Rule database. The assigned IPv6 prefix,
address or shared address assignment. is the prefix that the operator assigns to the CE using regular means
like DHCP-PD. It should be noted that this prefix is simply the
prefix that any device, including non MAP CEs get assigned, i.e. MAP
does not require an additional prefix to be assigned.
A MAP IPv6 address is formed from the BMR Rule IPv6 prefix. This The selected BMR rule is then used for determining the IPv4 address
address MUST be recognized by the MAP node, typically a CE, and used and port range assignment as well as forming the CE's MAP IPv6
to terminate all MAP traffic received by the node. address within the assigned IPv6 prefix. This IPv6 address MUST be
used for sending and receiving all MAP traffic by the CE.
Port-aware IPv4 entries in the MRT are installed for all the Port-aware IPv4 entries in the rules table are installed for all the
Forwarding Mapping Rules and an IPv4 default route for the Default Forwarding Mapping Rules and an IPv4 default route for the Default
Mapping Rule. Mapping Rule.
In hub and spoke mode, all traffic MUST be forwarded using the Forwarding rules are used to allow direct communication between MAP
Default Mapping Rule. CEs, known as mesh mode. In hub and spoke mode, there are no
forwarding rules, all traffic MUST be forwarded directly to the BR
using the Default Mapping Rule.
5.1. Basic mapping rule (BMR) The following subsections specify the MAP algorithm and Rule
processing.
The BMR is used in combination with the CE's IPv6 prefix to derive 5.1. Port mapping algorithm
the MAP IPv4 address, port-set and also the MAP IPv6 address. The
structure of a MAP CE's IPv6 address is shown below, along with the
Interface-identifer that is defined in Section 5.4.
| p bits | | q bits | The port mapping algorithm is used in domains whose rules allow IPv4
+----------+ +------------+ address sharing.
|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 --->|
Figure 2: IPv6 address format 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).
The Rule IPv6 prefix is the part of the End-user IPv6 prefix (i.e. To minimise dependencies between the End-user IPv6 prefix and the
the regular IPv6 prefix or address that is assigned to any IPv6 resulting port set, a PSID of 0, would, in the naive representation
device) that is common among all CEs within the MAP domain. The assign the system ports [I-D.ietf-tsvwg-iana-ports] to the user.
Embedded Address bits (EA bits) are the unique per end user within Instead using an infix representation, and requiring that the first
that Rule IPv6 prefix (some readers may want to think of these as bit field (A) is greater than 0, the well known ports are excluded.
"MAP customer identifier" bits for a given MAP domain covered by the
Rule IPv6 prefix). When present, the EA bits encode the CE specific
full or part of an IPv4 prefix or address, and in the shared IPv4
address case contain a Port-Set Identifier (PSID) that ultimately
determines the allowed port-range for the CE. An EA-bit length of 0
signifies that all relevant MAP IPv4 addressing information is passed
directly in the BMR rule
The MAP subnet ID is defined to be the first subnet (all bits set to This algorithm allocates ports to a given CE as a series of
zero) of length s required to make n+o+s=64. A MAP CE node MUST contiguous ranges.
reserve the first IPv6 prefix in a End-user IPv6 prefix for the
purpose of MAP.
CE's MAP IPv6 address is created by concatenating the End-user IPv6 0 1
prefix with the all zeros MAP subnet-id and the interface-id as 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6
specified in Section 5.4. +-------+-----------+-----------+
Ports in | A | PSID | M |
the CE port set | > 0 | | any value |
+-------+-----------+-----------+
|a bits | k bits | m bits |
The CE's IPv4 address is synthesized from the CE's IPv6 address and Figure 2: PSID
the parameters obtained in the BMR, namely by extracting the IPv4
suffix from the EA-bits, if any, and combining it with the Rule's A For a > 0, A MUST be larger than 0. This ensures that the
IPv4 prefix. Figures below show the synthesis for cases of a Shared algorithm excludes the system ports.
IPv4 address, and a non-shared, complete, IPv4 address:
a-bits The number of offset bits. The default Offset bits (a) are:
4. To simplify the port mapping algorithm the defaults are chosen
so that the PSID field starts on a nibble boundary and the
excluded port range (0-1023) is extended to 0-4095.
PSID The Port Set Identifier. Different Port-Set Identifiers (PSID)
MUST have non-overlapping port-sets.
k-bits The length in bits of the PSID field. The sharing ratio is
k^2. The number of ports assigned to the user is 2^(16-k) - 2^m
(excluded ports)
M The contiguous ports.
m bits The size contiguous ports. The number of contiguous ports is
given by 2^m.
This algorithm allocates ports to a given CE as a series of
contiguous ranges.
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.
| 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: IPv6 address format
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 rule, 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-id (if the End-user IPv6 prefix is shorter
than 64 bits) and the interface-id as specified in Section 5.5.
The MAP subnet ID is defined to be the first subnet (all bits set to
zero). Unless configured differently, a MAP node MUST reserve the
first IPv6 prefix in an End-user IPv6 prefix for the purpose of MAP.
The MAP IPv6 is created by combining the End-User IPv6 prefix with
the all zeros subnet-id and the MAP IPv6 interface identifier.
Shared IPv4 address: Shared IPv4 address:
| r bits | p bits | | q bits | | r bits | p bits | | q bits |
+-------------+---------------------+ +------------+ +-------------+---------------------+ +------------+
| Rule IPv4 | IPv4 Address suffix | |Port-Set ID | | Rule IPv4 | IPv4 Address suffix | |Port-Set ID |
+-------------+---------------------+ +------------+ +-------------+---------------------+ +------------+
| 32 bits | | 32 bits |
Figure 3: Shared IPv4 address Figure 4: Shared IPv4 address
Complete IPv4 address: Complete IPv4 address:
| r bits | p bits | | r bits | p bits |
+-------------+---------------------+ +-------------+---------------------+
| Rule IPv4 | IPv4 Address suffix | | Rule IPv4 | IPv4 Address suffix |
+-------------+---------------------+ +-------------+---------------------+
| 32 bits | | 32 bits |
Figure 4: Complete IPv4 address Figure 5: Complete IPv4 address
IPv4 prefix: IPv4 prefix:
| r bits | p bits | | r bits | p bits |
+-------------+---------------------+ +-------------+---------------------+
| Rule IPv4 | IPv4 Address suffix | | Rule IPv4 | IPv4 Address suffix |
+-------------+---------------------+ +-------------+---------------------+
| < 32 bits | | < 32 bits |
Figure 5: IPv4 prefix Figure 6: IPv4 prefix
The length of r MAY be zero, in which case the complete IPv4 address The length of 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 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 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 provisioned to the CE by other means (e.g. a DHCPv6 option). To
create a complete IPv4 address (or prefix), the IPv4 address suffix create a complete IPv4 address (or prefix), the IPv4 address suffix
(p) from the EA bits, are concatenated with the Rule IPv4 prefix (r (p) from the EA bits, are concatenated with the Rule IPv4 prefix (r
bits). bits).
The offset of the EA bits field in the IPv6 address is equal to the The offset of the EA bits field in the IPv6 address is equal to the
BMR Rule IPv6 prefix length. The length of the EA bits field (o) is BMR Rule IPv6 prefix length. The length of the EA bits field (o) is
given by the BMR Rule EA-bits length. The sum of the Rule IPv6 given by the BMR Rule EA-bits length, and can be between 0 and 48.
Prefix length and the Rule EA-bits length MUST be less or equal than The sum of the Rule IPv6 Prefix length and the Rule EA-bits length
the End-user IPv6 prefix 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 If o + r < 32 (length of the IPv4 address in bits), then an IPv4
prefix is assigned. prefix is assigned.
If o + r is equal to 32, then a full IPv4 address is to be assigned. 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 The address is created by concatenating the Rule IPv4 prefix and the
EA-bits. EA-bits.
If o + r is > 32, then a shared IPv4 address is to be assigned. The 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 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 - r bits. The PSID bits are used to create a port-set. The length
of the PSID bit field within EA bits is: o - p. of the PSID bit field within EA bits is: o - p.
The length of r MAY be 32, with no part of the IPv4 address embedded 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 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 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), 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 meaning that also the PSID is provisioned using e.g. The DHCP
option. option.
In the following examples, only the suffix (last 8 bits) of the IPv4 See Appendix A for an example of the Basic Mapping Rule.
address is embedded in the EA bits (r = 24), while the IPv4 prefix
(first 24 bits) is given in the BMR Rule IPv4 prefix.
Example:
Given:
End-user IPv6 prefix: 2001:db8:0012:3400::/56
Basic Mapping Rule: {2001:db8:0000::/40 (Rule IPv6 prefix),
192.0.2.0/24 (Rule IPv4 prefix),
16 (Rule EA-bits length)}
Sharing ratio: 256 (16 - (32 - 24) = 8. 2^8 = 256)
PSID offset: 4 (default value as per section 5.1.3)
We get IPv4 address and port-set:
EA bits offset: 40
IPv4 suffix bits (p): Length of IPv4 address (32) -
IPv4 prefix length (24) = 8
IPv4 address: 192.0.2.18 (0x12)
PSID start: 40 + p = 40 + 8 = 48 5.3. Forwarding mapping rule (FMR)
PSID length: o - p = 16 (56 - 40) - 8 = 8
PSID: 0x34
Port-set-1: 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935,
4936, 4937, 4938, 4939, 4940, 4941, 4942, 4943
Port-set-2: 9024, 9025, 9026, 9027, 9028, 9029, 9030, 9031,
9032, 9033, 9034, 9035, 9036, 9037, 9038, 9039
...
Port-set-15: 62272, 62273, 62274, 62275,
62276, 62277, 62278, 62279,
62280, 62281, 62282, 62283,
62284, 62285, 62286, 62287,
5.2. Forwarding mapping rule (FMR) The Forwarding Mapping Rule is optional, and used in mesh mode to
merit direct CE to CE connectivity.
On adding an FMR rule, an IPv4 route is installed in the MRT for the On adding an FMR rule, an IPv4 route is installed in the Rules table
Rule IPv4 prefix. for the Rule IPv4 prefix.
On forwarding an IPv4 packet, a best matching prefix lookup is done On forwarding an IPv4 packet, a best matching prefix look up is done
in the MRT and the correct FMR is chosen. in the Rules table and the correct FMR is chosen.
| 32 bits | | 16 bits | | 32 bits | | 16 bits |
+--------------------------+ +-------------------+ +--------------------------+ +-------------------+
| IPv4 destination address | | IPv4 dest port | | IPv4 destination address | | IPv4 dest port |
+--------------------------+ +-------------------+ +--------------------------+ +-------------------+
: : ___/ : : : ___/ :
| p bits | / q bits : | p bits | / q bits :
+----------+ +------------+ +----------+ +------------+
|IPv4 sufx| |Port-Set ID | |IPv4 sufx| |Port-Set ID |
+----------+ +------------+ +----------+ +------------+
\ / ____/ ________/ \ / ____/ ________/
\ : __/ _____/ \ : __/ _____/
\ : / / \ : / /
| n bits | o bits | s bits | 128-n-o-s bits | | n bits | o bits | s bits | 128-n-o-s bits |
+--------------------+-----------+---------+------------+----------+ +--------------------+-----------+---------+------------+----------+
| Rule IPv6 prefix | EA bits |subnet ID| interface ID | | Rule IPv6 prefix | EA bits |subnet ID| interface ID |
+--------------------+-----------+---------+-----------------------+ +--------------------+-----------+---------+-----------------------+
|<--- End-user IPv6 prefix --->| |<--- End-user IPv6 prefix --->|
Given: Figure 7: Deriving of MAP IPv6 address
IPv4 destination address: 192.0.2.18
IPv4 destination port: 9030
Forwarding Mapping Rule: {2001:db8:0000::/40 (Rule IPv6 prefix),
192.0.2.0/24 (Rule IPv4 prefix),
16 (Rule EA-bits length)}
PSID offset: 4 (default value as per section 5.1.3)
We get IPv6 address:
IPv4 suffix bits (p): 32 - 24 = 8 (18 (0x12))
PSID length: 8
PSID: 0x34 (9030 (0x2346))
EA bits: 0x1234
MAP IPv6 address: 2001:db8:0012:3400:00c0:0002:1200:3400
Figure 6: Deriving of MAP IPv6 address
5.3. Default mapping rule (DMR) See Appendix A for an example of the Forwarding Mapping Rule.
The Default Mapping rule is used to represent as IPv6 destinations 5.4. Default mapping rule (DMR)
all IPv4 destinations outside of the MAP IPv4 domain. For MAP-T, the
DMR is specified in terms of the BR IPv6 prefix. The Rule IPv4
prefix in the MRT is: 0.0.0.0/0, i.e. the default IPv4 route.
There MUST be only one Default Mapping Rule within a MAP domain. The Default Mapping rule is used to reach all IPv4 destinations
outside of the MAP-T domain. For MAP-T, the DMR is specified in
terms of the BR IPv6 prefix that MAP-T CEs will use to form IPv6
addresses out of IPv4 destination addresses.
Default Mapping Rule: Default Mapping Rule:
{2001:db8:0001::/Prefix-length (Rule IPv6 prefix), {2001:db8:0001::/Prefix-length (Rule IPv6 prefix),
0.0.0.0/0 (Rule IPv4 prefix)} 0.0.0.0/0 (Rule IPv4 prefix)}
Example: Default Mapping Rule Example: Default Mapping Rule
The Deafult Rule's IPv6 prefix is combined by a MAP-T CE with the Note that the BR prefix-length is variable and can be both shorter or
IPv4 destination addresses, using RFC6052, to form a full IPv6
destination address for any IPv4 destination following the IPv4
default route. Figure 7 below shows such an address format. Note
that the BR prefix-length is variable and can be both shorter or
longer than 64 bits, up to 96 bits. In the respective cases the IPv4 longer than 64 bits, up to 96 bits. In the respective cases the IPv4
address and the BR prefix are shifted and "bit spread" across the address and the BR prefix are shifted and "bit spread" across the
fixed u-octet boundary as per [RFC6052]. All trailing bits after the fixed u-octet boundary as per [RFC6052]. All trailing bits after the
IPv4 address are set to 0x0. IPv4 address are set to 0x0.
<---------- 64 ------------>< 8 ><----- 32 -----><--- 24 ---> 5.5. The IPv6 Interface Identifier
+--------------------------+----+---------------+-----------+
| BR IPv6 prefix | u | IPv4 address | 0 |
+--------------------------+----+---------------+-----------+
Figure 7: IPv6-IPv4 Mapped Address
5.4. MAP IPv6 Interface Identifier
The IPv6 Interface identifier format of a MAP node is based on the
format specified in section 2.2 of [RFC6052], with the added PSID
field if present, as shown in Figure 8.
+--+---+---+---+---+---+---+---+---+ The Interface identifier format of a MAP node is described below.
|PL| 8 16 24 32 40 48 56 |
+--+---+---+---+---+---+---+---+---+
|64| u | IPv4 address | PSID | 0 |
+--+---+---+---+---+---+---+---+---+
Figure 8: MAP IPv6 Interface Identifier | 128-n-o-s bits |
| 16 bits| 32 bits | 16 bits|
+--------+----------------+--------+
| 0 | IPv4 address | PSID |
+--------+----------------+--------+
The encoding of the full IPv4 address into the interface identifier Figure 8
into the IPv6 addresses have been shown to be useful for
troubleshooting.
In the case of an IPv4 prefix, the IPv4 address field is right-padded In the case of an IPv4 prefix, the IPv4 address field is right-padded
with zeros up to 32 bits. The PSID field is left-padded to create a 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 16 bit field. For an IPv4 prefix or a complete IPv4 address, the
PSID field is zero. PSID field is zero.
5.5. Port mapping algorithm If the End-user IPv6 prefix length is larger than 64, the most
significant parts of the interface identifier is overwritten by the
The Generalized Modulus Algorithm (GMA) is used in MAP domains whose prefix.
rules allow IPv4 address sharing. Each CE in such a domain has an
IPv4 address and a unique Port-Set Identifier (PSID), that is derived
by means of the BMR. For a given IPv4 address, the algorithm allows
each PSID to be processed to reveal a set of unique non-overlapping
ports, or alternatively for any given port to derive the PSID it
corresponds to. Two extreme cases supported by algorithm are: (1)
the port numbers are not contiguous for each PSID, but uniformly
distributed across the port range (0-65535); (2) the port numbers are
contiguous in a single range for each PSID.
For a given sharing ratio (R) and the maximum number of contiguous
ports (M), the GMA algorithm is defined as:
1. The port (P) of a given PSID (K) is composed of:
P = R * M * j + M * K + i
Where:
* PSID: K = 0 to R - 1
* Port range index: j = (4096 / M) / R to ((65536 / M) / R) - 1,
if the port numbers (0 - 4095) are excluded.
* Contiguous Port index: i = 0 to M - 1
2. The PSID (K) of a given port number (P) is determined by:
K = (floor(P/M)) % R
Where:
* % is the modulus operator
* floor(arg) is a function that returns the largest integer not
greater than arg.
5.5.1. Bit Representation of the Algorithm
Given a sharing ratio (R=2^k), the maximum number of contiguous ports
(M=2^m), for any PSID (K) and available ports (P) can be represented
as:
0 8 15
+---------------+----------+------+-------------------+
| Port (P) |
----------------+-----------------+-------------------+
| j | PSID (K) | M (i) |
+---------------+----------+------+-------------------+
|<----a bits--->|<-----k bits---->|<------m bits----->|
Figure 9: Bit representation
Where j and i are the same indexes defined in the port mapping
algorithm.
For any port number, the PSID can be obtained by a bit mask
operation.
For a > 0, j MUST be larger than 0. This ensures that the algorithm
excludes the system ports ([I-D.ietf-tsvwg-iana-ports]). For a = 0,
j MAY be 0 to allow for the provisioning of the system ports.
5.5.2. GMA examples
For example, for R = 1024, PSID offset: a = 4 and PSID length: k = 10
bits
Port-set-1 Port-set-2
PSID=0 | 4096, 4097, 4098, 4099, | 8192, 8193, 8194, 8195, | ...
PSID=1 | 4100, 4101, 4102, 4103, | 8196, 8197, 8198, 8199, | ...
PSID=2 | 4104, 4105, 4106, 4107, | 8200, 8201, 8202, 8203, | ...
PSID=3 | 4108, 4109, 4110, 4111, | 8204, 8205, 8206, 8207, | ...
...
PSID=1023| 8188, 8189, 8190, 8191, | 12284, 12285, 12286, 12287,| ...
Example 1: with offset = 4 (a = 4)
For example, for R = 64, a = 0 (PSID offset = 0 and PSID length = 6
bits):
Port-set
PSID=0 | [ 0 - 1023]
PSID=1 | [1024 - 2047]
PSID=2 | [2048 - 3071]
PSID=3 | [3072 - 4095]
...
PSID=63 | [64512 - 65535]
Example 2: with offset = 0 (a = 0)
5.5.3. GMA Excluded Ports
By default the GMA ensures that a number of "well known" ports are
excluded from use by the algorithm. This number is determined by the
number of offset bits (a), in the figure above. This value can be
optionally provisioned via the "Rule Port Mapping Parameters" in the
Basic Mapping Rule. In the absence of such provisioning, the
defaults are:
o Excluded ports : 0-4095
o Offset bits (a) : 4
For (a) offset bits, the range of excluded ports is 0 to 2 ^ (16-a) -
1.
6. Packet Forwarding 6. Configuration and Packet Forwarding
The mapping rules and architectual building blocks are combined at The mapping rules and architectural building blocks are combined at
the CE and BR to enable IPv4-IPv6 communication as follows. the CE and BR to enable IPv4-IPv6 communication as follows.
The MAP-T CE and BR are set-up as described in Section 7 of
[I-D.ietf-softwire-map] with the only difference being that they are
set-up to operate in translation mode rather than encapsulation.
6.1. IPv4 to IPv6 at the CE 6.1. IPv4 to IPv6 at the CE
A MAP-T CE receiving IPv4 packets SHOULD perform NAT44 function first A MAP-T CE receiving IPv4 packets SHOULD perform NAT44 function first
and create appropriate NAT44 stateful bindings. The resulting IPv4 and create appropriate NAT44 stateful bindings. The resulting IPv4
packets MUST contain the source IPv4 address and source transport packets MUST contain the source IPv4 address and source transport
port number assigned to the CE by means of the MAP Basic Mapping Rule port number assigned to the CE by means of the MAP Basic Mapping Rule
(BMR). (BMR).
The IPv4 traffic is subject to a longest IPv4 address + port match The IPv4 traffic is subject to a longest IPv4 address + port match
MAP rule selection using the MRT, which then determines the MAP rule selection using the MRT, which then determines the
skipping to change at page 20, line 7 skipping to change at page 19, line 22
address sends fragments to an IPv4 destination host outside the address sends fragments to an IPv4 destination host outside the
domain. Those hosts may use the same IPv4 fragmentation identifier, domain. Those hosts may use the same IPv4 fragmentation identifier,
resulting in incorrect reassembly of the fragments at the destination resulting in incorrect reassembly of the fragments at the destination
host. Given that the IPv4 fragmentation identifier is a 16 bit host. Given that the IPv4 fragmentation identifier is a 16 bit
field, it could be used similarly to port ranges. A MAP CE SHOULD field, it could be used similarly to port ranges. A MAP CE SHOULD
rewrite the IPv4 fragmentation identifier to be within its allocated rewrite the IPv4 fragmentation identifier to be within its allocated
port set. port set.
9. Usage Considerations 9. Usage Considerations
9.1. Hub and spoke with per subscriber rules 9.1. Address Independence
Existing IPv4 service can be realized with MAP using a mapping rule The MAP solution supports use and configuration of domains in so
per subscriber. By embedding no part of the IPv4 address in the IPv6 called 1:1 mode (meaning 1 mapping rule set per CE), which allows
prefix, no dependency between the two address families is created. complete independence between the IPv6 prefix assigned to the CE and
This may be useful in cases where the IPv6 address allocation is the IPv4 address and/or port-range it uses. This is achieved in all
sparse, or for other reasons it is difficult to create efficient cases when the EA-bit length is set to 0.
mapping rules.
The operator has to the choice of provisioning a full IPv4 address to The constraint imposed is that each such MAP domain be composed of
the end-user, or a shared IPv4 address by also provisioning the PSID just 1 MAP CE which has a predetermined IPv6 prefix, i.e. The BR
in the DHCPv6 option. A hybrid of this use case is to provision the would be configured with a rule-set per CPE, where the FMR would
full IPv4 address in the DHCPv6 option, while embedding the PSID in uniquely describe the IPv6 prefix of a given CE. Each CE would have
the IPv6 prefix. That will result in one mapping rule per IPv4 a distinct BMR, that would fully describe that CE's IPv4 address, and
address, e.g. With a sharing ratio of 64, one rule per 64 customers. PSID if any.
9.2. Communication with IPv6 servers in the MAP-T domain 9.2. Mesh vs Hub and spoke mode
The hub and spoke mode of communication, whereby all traffic sent by
a MAP-T CE is forwarded via a BR, and the mesh mode, whereby a CE is
directly able to forward traffic to another CE in the same MAP-T
domain, are governed by the activation of a Basic Mapping Rule as a
Forward Mapping Rule. By default, a MAP CE will interpret its BMR
only to setup its IPv4 parameters and IPv6 MAP address and not as an
FMR.
9.3. Communication with IPv6 servers in the MAP-T domain
MAP-T allows communication between both IPv4-only and any IPv6 MAP-T allows communication between both IPv4-only and any IPv6
enabled end hosts, with native IPv6-only servers which are using enabled end hosts, with native IPv6-only servers which are using
IPv4-mapped IPv6 address based on DMR in the MAP-T domain. In this IPv4-mapped IPv6 address based on DMR in the MAP-T domain. In this
mode, the IPv6-only servers SHOULD have both A and AAAA records in mode, the IPv6-only servers SHOULD have both A and AAAA records in
DNS [RFC6219]. DNS64 [RFC6147] become required only when IPv6 DNS [RFC6219]. DNS64 [RFC6147] become required only when IPv6
servers in the MAP-T domain are expected themselves to initiate servers in the MAP-T domain are expected themselves to initiate
communication to external IPv4-only hosts. communication to external IPv4-only hosts.
9.3. Backwards compatibility 9.4. Backwards compatibility
A MAP-T CE, in all configuration modes, is by default compatible with A MAP-T CE, in all configuration modes, is by default compatible with
regular [RFC6146] stateful NAT64 devices that are configured to use/ regular [RFC6146] stateful NAT64 devices that are configured to use/
advertise BR prefixes. This allows the use of MAP-T CEs in advertise BR prefixes. This allows the use of MAP-T CEs in
environments that require statistical multiplexing of IPv4 addresses environments that require statistical multiplexing of IPv4 addresses
while being able to compromise on the stateful nature. Furthermore, while being able to compromise on the stateful nature. Furthermore,
a MAP-T CE configured to operate without address sharing (no PSID) is a MAP-T CE configured to operate without address sharing (no PSID) is
compatible with any stateless NAT64 [RFC6146] devices positioned as compatible with any stateless NAT64 [RFC6146] devices positioned as
BRs. BRs.
skipping to change at page 24, line 8 skipping to change at page 23, line 34
14.2. Informative References 14.2. Informative References
[I-D.dec-stateless-4v6] [I-D.dec-stateless-4v6]
Dec, W., Asati, R., and H. Deng, "Stateless 4Via6 Address Dec, W., Asati, R., and H. Deng, "Stateless 4Via6 Address
Sharing", draft-dec-stateless-4v6-04 (work in progress), Sharing", draft-dec-stateless-4v6-04 (work in progress),
October 2011. October 2011.
[I-D.ietf-softwire-map] [I-D.ietf-softwire-map]
Troan, O., Dec, W., Li, X., Bao, C., Matsushima, S., and Troan, O., Dec, W., Li, X., Bao, C., Matsushima, S., and
T. Murakami, "Mapping of Address and Port with T. Murakami, "Mapping of Address and Port with
Encapsulation (MAP)", draft-ietf-softwire-map-02 (work in Encapsulation (MAP)", draft-ietf-softwire-map-04 (work in
progress), September 2012. progress), February 2013.
[I-D.ietf-softwire-stateless-4v6-motivation] [I-D.ietf-softwire-stateless-4v6-motivation]
Boucadair, M., Matsushima, S., Lee, Y., Bonness, O., Boucadair, M., Matsushima, S., Lee, Y., Bonness, O.,
Borges, I., and G. Chen, "Motivations for Carrier-side Borges, I., and G. Chen, "Motivations for Carrier-side
Stateless IPv4 over IPv6 Migration Solutions", Stateless IPv4 over IPv6 Migration Solutions",
draft-ietf-softwire-stateless-4v6-motivation-04 (work in draft-ietf-softwire-stateless-4v6-motivation-05 (work in
progress), August 2012. progress), November 2012.
[I-D.ietf-tsvwg-iana-ports] [I-D.ietf-tsvwg-iana-ports]
Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S.
Cheshire, "Internet Assigned Numbers Authority (IANA) Cheshire, "Internet Assigned Numbers Authority (IANA)
Procedures for the Management of the Service Name and Procedures for the Management of the Service Name and
Transport Protocol Port Number Registry", Transport Protocol Port Number Registry",
draft-ietf-tsvwg-iana-ports-10 (work in progress), draft-ietf-tsvwg-iana-ports-10 (work in progress),
February 2011. February 2011.
[I-D.mdt-softwire-map-dhcp-option] [I-D.mdt-softwire-map-dhcp-option]
skipping to change at page 25, line 13 skipping to change at page 24, line 41
Address Spoofing", BCP 38, RFC 2827, May 2000. Address Spoofing", BCP 38, RFC 2827, May 2000.
[RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic [RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic
Host Configuration Protocol (DHCP) version 6", RFC 3633, Host Configuration Protocol (DHCP) version 6", RFC 3633,
December 2003. December 2003.
[RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control [RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control
Message Protocol (ICMPv6) for the Internet Protocol Message Protocol (ICMPv6) for the Internet Protocol
Version 6 (IPv6) Specification", RFC 4443, March 2006. Version 6 (IPv6) Specification", RFC 4443, March 2006.
[RFC4632] Fuller, V. and T. Li, "Classless Inter-domain Routing
(CIDR): The Internet Address Assignment and Aggregation
Plan", BCP 122, RFC 4632, August 2006.
[RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks",
RFC 4953, July 2007. RFC 4953, July 2007.
[RFC5508] Srisuresh, P., Ford, B., Sivakumar, S., and S. Guha, "NAT [RFC5508] Srisuresh, P., Ford, B., Sivakumar, S., and S. Guha, "NAT
Behavioral Requirements for ICMP", BCP 148, RFC 5508, Behavioral Requirements for ICMP", BCP 148, RFC 5508,
April 2009. April 2009.
[RFC5961] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's [RFC5961] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's
Robustness to Blind In-Window Attacks", RFC 5961, Robustness to Blind In-Window Attacks", RFC 5961,
August 2010. August 2010.
skipping to change at page 25, line 46 skipping to change at page 25, line 29
Coexistence and Transition", RFC 6219, May 2011. Coexistence and Transition", RFC 6219, May 2011.
[RFC6269] Ford, M., Boucadair, M., Durand, A., Levis, P., and P. [RFC6269] Ford, M., Boucadair, M., Durand, A., Levis, P., and P.
Roberts, "Issues with IP Address Sharing", RFC 6269, Roberts, "Issues with IP Address Sharing", RFC 6269,
June 2011. June 2011.
[RFC6324] Nakibly, G. and F. Templin, "Routing Loop Attack Using [RFC6324] Nakibly, G. and F. Templin, "Routing Loop Attack Using
IPv6 Automatic Tunnels: Problem Statement and Proposed IPv6 Automatic Tunnels: Problem Statement and Proposed
Mitigations", RFC 6324, August 2011. Mitigations", RFC 6324, August 2011.
Appendix A. Example of MAP-T translation Appendix A. Examples of MAP-T translation
Example 1: Example 1 - BMR:
Given the MAP domain information and an IPv6 address of Given the MAP domain information and an IPv6 address of
an endpoint: an endpoint:
IPv6 prefix assigned to the end user: 2001:db8:0012:3400::/56 IPv6 prefix assigned to the end user: 2001:db8:0012:3400::/56
Basic Mapping Rule: {2001:db8:0000::/40 (Rule IPv6 prefix), Basic Mapping Rule: {2001:db8:0000::/40 (Rule IPv6 prefix),
192.0.2.0/24 (Rule IPv4 prefix), 16 (Rule EA-bits length)} 192.0.2.0/24 (Rule IPv4 prefix), 16 (Rule EA-bits length)}
Sharing ratio: 256 (16 - (32 - 24) = 8. 2^8 = 256) PSID length: (16 - (32 - 24) = 8. (Sharing ratio of 256)
PSID offset: 4 PSID offset: 4
A MAP node (CE or BR) can via the BMR determine the IPv4 address A MAP node (CE or BR) can via the BMR, or equivalent FMR,
and port-set as shown below: determine the IPv4 address and port-set as shown below:
EA bits offset: 40 EA bits offset: 40
IPv4 suffix bits (p) Length of IPv4 address (32) - IPv4 prefix IPv4 suffix bits (p) Length of IPv4 address (32) - IPv4 prefix
length (24) = 8 length (24) = 8
IPv4 address 192.0.2.18 (0xc0000212) IPv4 address 192.0.2.18 (0xc0000212)
PSID start: 40 + p = 40 + 8 = 48 PSID start: 40 + p = 40 + 8 = 48
PSID length: o - p = 16 (56 - 40) - 8 = 8 PSID length: o - p = (56 - 40) - 8 = 8
PSID: 0x34 PSID: 0x34
Port-set-1: 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935, 4936, Port-set-1: 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935, 4936,
4937, 4938, 4939, 4940, 4941, 4942, 4943 4937, 4938, 4939, 4940, 4941, 4942, 4943
Port-set-2: 9024, 9025, 9026, 9027, 9028, 9029, 9030, 9031, 9032, Port-set-2: 9024, 9025, 9026, 9027, 9028, 9029, 9030, 9031, 9032,
9033, 9034, 9035, 9036, 9037, 9038, 9039 9033, 9034, 9035, 9036, 9037, 9038, 9039
... ... ... ...
Port-set-15 62272, 62273, 62274, 62275, 62276, 62277, 62278, Port-set-15 62272, 62273, 62274, 62275, 62276, 62277, 62278,
62279, 62280, 62281, 62282, 62283, 62284, 62285, 62286, 62287 62279, 62280, 62281, 62282, 62283, 62284, 62285, 62286, 62287
skipping to change at page 28, line 5 skipping to change at page 28, line 5
PSID length: 8 PSID length: 8
PSID: 0x34 (9030 (0x2346)) PSID: 0x34 (9030 (0x2346))
The resulting IPv6 packet will have the following key fields: The resulting IPv6 packet will have the following key fields:
IPv6 source address 2001:db8:ffff:0:0001:0203:0400:: IPv6 source address 2001:db8:ffff:0:0001:0203:0400::
IPv6 destination address: 2001:db8:0012:3400:00c0:0002:1200:3400 IPv6 destination address: 2001:db8:0012:3400:00c0:0002:1200:3400
IPv6 source Port: 80 IPv6 source Port: 80
IPv6 destination Port: 9030 IPv6 destination Port: 9030
Example 3: Example 3- FMR:
An IPv4 host behind the MAP-T CE (addressed as per the previous An IPv4 host behind the MAP-T CE (addressed as per the previous
examples) corresponding with IPv4 host 1.2.3.4 will have its examples) corresponding with IPv4 host 1.2.3.4 will have its
packets converted into IPv6 using the DMR configured on the MAP-T packets converted into IPv6 using the DMR configured on the MAP-T
CE as follows: CE as follows:
Default Mapping Rule used by MAP-T CE: {2001:db8:ffff::/64 Default Mapping Rule used by MAP-T CE: {2001:db8:ffff::/64
(Rule IPv6 prefix), 0.0.0.0/0 (Rule IPv4 prefix), null (BR IPv4 (Rule IPv6 prefix), 0.0.0.0/0 (Rule IPv4 prefix), null (BR IPv4
address)} address)}
IPv4 source address (post NAT44 if present) 192.0.2.18 IPv4 source address (post NAT44 if present) 192.0.2.18
IPv4 destination address: 1.2.3.4 IPv4 destination address: 1.2.3.4
IPv4 source port (post NAT44 if present): 9030 IPv4 source port (post NAT44 if present): 9030
IPv4 destination port: 80 IPv4 destination port: 80
IPv6 source address of MAP-T CE: IPv6 source address of MAP-T CE:
2001:db8:0012:3400:00c0:0002:1200:3400 2001:db8:0012:3400:00c0:0002:1200:3400
IPv6 destination address: 2001:db8:ffff:0:0001:0203:0400:: IPv6 destination address: 2001:db8:ffff:0:0001:0203:0400::
Example 4 - 1:1 Rule with no address sharing
IPv6 prefix assigned to the end user: 2001:db8:0012:3400::/56
Basic Mapping Rule: {2001:db8:0012:3400::/56 (Rule IPv6 prefix),
192.0.2.1/32 (Rule IPv4 prefix), 0 (Rule EA-bits length)}
PSID length: 0 (Sharing ratio is 1)
PSID offset: n/a
A MAP node (CE or BR) can via the BMR or equivalent FMR, determine
the IPv4 address and port-set as shown below:
EA bits offset: 0
IPv4 suffix bits (p) Length of IPv4 address (32) - IPv4 prefix
length (32) = 0
IPv4 address 192.0.2.1 (0xc0000201)
PSID start: 0
PSID length: 0
PSID: null
The BMR information allows a MAP CE also to determine (complete)
its full IPv6 address by combining the IPv6 prefix with the MAP
interface identifier (that embeds the IPv4 address).
IPv6 address of MAP CE: 2001:db8:0012:3400:00c0:0002:0100:0000
Example 5 - 1:1 Rule with address sharing (sharing ratio 256)
IPv6 prefix assigned to the end user: 2001:db8:0012:3400::/56
Basic Mapping Rule: {2001:db8:0012:3400::/56 (Rule IPv6 prefix),
192.0.2.1/32 (Rule IPv4 prefix), 0 (Rule EA-bits length)}
PSID length: (16 - (32 - 24) = 8. (Sharing ratio of 256)
PSID offset: 4
A MAP node (CE or BR) can via the BMR or equivalent FMR determine
the IPv4 address and port-set as shown below:
EA bits offset: 0
IPv4 suffix bits (p) Length of IPv4 address (32) - IPv4 prefix
length (32) = 0
IPv4 address 192.0.2.1 (0xc0000201)
PSID start: 0
PSID length: 8
PSID: 0x34
Port-set-1: 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935, 4936,
4937, 4938, 4939, 4940, 4941, 4942, 4943
Port-set-2: 9024, 9025, 9026, 9027, 9028, 9029, 9030, 9031, 9032,
9033, 9034, 9035, 9036, 9037, 9038, 9039
... ...
Port-set-15 62272, 62273, 62274, 62275, 62276, 62277, 62278,
62279, 62280, 62281, 62282, 62283, 62284, 62285, 62286, 62287
The BMR information allows a MAP CE also to determine (complete)
its full IPv6 address by combining the IPv6 prefix with the MAP
interface identifier (that embeds the IPv4 address and PSID).
IPv6 address of MAP CE: 2001:db8:0012:3400:00c0:0002:1200:3400
Note that the IPv4 address and PSID is not derived from the IPv6
prefix assigned to the CE.
Appendix B. Port mapping algorithm
The Generalized Modulus Algorithm (GMA) used in MAP domains can also
be expressed mathematically. Each CE in such a domain has an IPv4
address and a unique Port-Set Identifier (PSID), that is derived by
means of the BMR. For a given IPv4 address, the algorithm allows
each PSID to be processed to reveal a set of unique non-overlapping
ports, or alternatively for any given port to derive the PSID it
corresponds to. Two extreme cases supported by algorithm are: (1)
the port numbers are not contiguous for each PSID, but uniformly
distributed across the port range (0-65535); (2) the port numbers are
contiguous in a single range for each PSID.
For a given sharing ratio (R) and the maximum number of contiguous
ports (M), the GMA algorithm is defined as:
1. The port (P) of a given PSID (K) is composed of:
P = R * M * j + M * K + i
Where:
* PSID: K = 0 to R - 1
* Port range index: j = (4096 / M) / R to ((65536 / M) / R) - 1,
if the port numbers (0 - 4095) are excluded.
* Contiguous Port index: i = 0 to M - 1
2. The PSID (K) of a given port number (P) is determined by:
K = (floor(P/M)) % R
Where:
* % is the modulus operator
* floor(arg) is a function that returns the largest integer not
greater than arg.
B.1. Bit Representation of the Algorithm
Given a sharing ratio (R=2^k), the maximum number of contiguous ports
(M=2^m), for any PSID (K) and available ports (P) can be represented
as:
0 8 15
+---------------+----------+------+-------------------+
| Port (P) |
----------------+-----------------+-------------------+
| j | PSID (K) | M (i) |
+---------------+----------+------+-------------------+
|<----a bits--->|<-----k bits---->|<------m bits----->|
Figure 9: Bit representation
Where j and i are the same indexes defined in the port mapping
algorithm.
For any port number, the PSID can be obtained by a bit mask
operation.
For a > 0, j MUST be larger than 0. This ensures that the algorithm
excludes the system ports ([I-D.ietf-tsvwg-iana-ports]). For a = 0,
j MAY be 0 to allow for the provisioning of the system ports.
B.2. GMA examples
For example, for R = 1024, PSID offset: a = 4 and PSID length: k = 10
bits
Port-set-1 Port-set-2
PSID=0 | 4096, 4097, 4098, 4099, | 8192, 8193, 8194, 8195, | ...
PSID=1 | 4100, 4101, 4102, 4103, | 8196, 8197, 8198, 8199, | ...
PSID=2 | 4104, 4105, 4106, 4107, | 8200, 8201, 8202, 8203, | ...
PSID=3 | 4108, 4109, 4110, 4111, | 8204, 8205, 8206, 8207, | ...
...
PSID=1023| 8188, 8189, 8190, 8191, | 12284, 12285, 12286, 12287,| ...
Example 1: with offset = 4 (a = 4)
For example, for R = 64, a = 0 (PSID offset = 0 and PSID length = 6
bits):
Port-set
PSID=0 | [ 0 - 1023]
PSID=1 | [1024 - 2047]
PSID=2 | [2048 - 3071]
PSID=3 | [3072 - 4095]
...
PSID=63 | [64512 - 65535]
Example 2: with offset = 0 (a = 0)
B.3. GMA Excluded Ports
By default the GMA ensures that a number of "well known" ports are
excluded from use by the algorithm. This number is determined by the
number of offset bits (a), in the figure above. This value can be
optionally provisioned via the "Rule Port Mapping Parameters" in the
Basic Mapping Rule. In the absence of such provisioning, the
defaults are:
o Excluded ports : 0-4095
o Offset bits (a) : 4
For (a) offset bits, the range of excluded ports is 0 to 2 ^ (16-a) -
1.
Authors' Addresses Authors' Addresses
Xing Li Xing Li
CERNET Center/Tsinghua University CERNET Center/Tsinghua University
Room 225, Main Building, Tsinghua University Room 225, Main Building, Tsinghua University
Beijing 100084 Beijing 100084
CN CN
Email: xing@cernet.edu.cn Email: xing@cernet.edu.cn
 End of changes. 79 change blocks. 
380 lines changed or deleted 474 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/