idnits 2.17.1 draft-ietf-softwire-map-t-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 3 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 2, 2013) is 3882 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Unused Reference: 'I-D.xli-behave-divi' is defined on line 1067, but no explicit reference was found in the text ** Obsolete normative reference: RFC 6145 (Obsoleted by RFC 7915) == Outdated reference: A later version (-13) exists of draft-ietf-softwire-map-08 == Outdated reference: A later version (-12) exists of draft-ietf-softwire-map-dhcp-04 == Outdated reference: A later version (-06) exists of draft-maglione-softwire-map-t-scenarios-02 == Outdated reference: A later version (-08) exists of draft-xli-behave-divi-05 -- Obsolete informational reference (is this intentional?): RFC 3633 (Obsoleted by RFC 8415) Summary: 1 error (**), 0 flaws (~~), 7 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group X. Li 3 Internet-Draft C. Bao 4 Intended status: Experimental CERNET Center/Tsinghua 5 Expires: March 6, 2014 University 6 W. Dec, Ed. 7 O. Troan 8 Cisco Systems 9 S. Matsushima 10 SoftBank Telecom 11 T. Murakami 12 IP Infusion 13 September 2, 2013 15 Mapping of Address and Port using Translation (MAP-T) 16 draft-ietf-softwire-map-t-04 18 Abstract 20 This document specifies the "Mapping of Address and Port" double 21 stateless IPv6-IPv4 Network Address Translation (NAT64) based 22 solution, called MAP-T, for providing shared or non-shared IPv4 23 address connectivity to and across an IPv6 network. 25 Status of this Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on March 6, 2014. 42 Copyright Notice 44 Copyright (c) 2013 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 62 4. Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 6 63 5. Mapping Rules . . . . . . . . . . . . . . . . . . . . . . . . 8 64 5.1. Basic mapping rule (BMR) . . . . . . . . . . . . . . . . . 9 65 5.2. Forwarding mapping rule (FMR) . . . . . . . . . . . . . . 12 66 5.3. Port mapping algorithm . . . . . . . . . . . . . . . . . . 13 67 5.4. Default mapping rule (DMR) . . . . . . . . . . . . . . . . 14 68 5.5. The IPv6 Interface Identifier . . . . . . . . . . . . . . 15 69 6. MAP-T Configuration . . . . . . . . . . . . . . . . . . . . . 15 70 6.1. MAP CE . . . . . . . . . . . . . . . . . . . . . . . . . . 16 71 6.2. MAP BR . . . . . . . . . . . . . . . . . . . . . . . . . . 17 72 7. MAP-T Packet Forwarding . . . . . . . . . . . . . . . . . . . 17 73 7.1. IPv4 to IPv6 at the CE . . . . . . . . . . . . . . . . . . 17 74 7.2. IPv6 to IPv4 at the CE . . . . . . . . . . . . . . . . . . 18 75 7.3. IPv6 to IPv4 at the BR . . . . . . . . . . . . . . . . . . 18 76 7.4. IPv4 to IPv6 at the BR . . . . . . . . . . . . . . . . . . 19 77 8. ICMP Handling . . . . . . . . . . . . . . . . . . . . . . . . 19 78 9. Fragmentation and Path MTU Discovery . . . . . . . . . . . . . 20 79 9.1. Fragmentation in the MAP domain . . . . . . . . . . . . . 20 80 9.2. Receiving IPv4 Fragments on the MAP domain borders . . . . 20 81 9.3. Sending IPv4 fragments to the outside . . . . . . . . . . 20 82 10. Usage Considerations . . . . . . . . . . . . . . . . . . . . . 21 83 10.1. EA-bit length of 0 . . . . . . . . . . . . . . . . . . . . 21 84 10.2. Mesh and Hub and spoke modes . . . . . . . . . . . . . . . 21 85 10.3. Communication with IPv6 servers in the MAP-T domain . . . 21 86 10.4. Compatibility with other NAT64 solutions . . . . . . . . . 21 87 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 88 12. Security Considerations . . . . . . . . . . . . . . . . . . . 22 89 13. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 23 90 14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 23 91 15. References . . . . . . . . . . . . . . . . . . . . . . . . . . 24 92 15.1. Normative References . . . . . . . . . . . . . . . . . . . 24 93 15.2. Informative References . . . . . . . . . . . . . . . . . . 24 94 Appendix A. Examples of MAP-T translation . . . . . . . . . . . . 27 95 Appendix B. Port mapping algorithm . . . . . . . . . . . . . . . 30 96 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 30 98 1. Introduction 100 Experiences from IPv6 deployments in service provider networks such 101 as [RFC6219] indicate that a successful transition to IPv6 can happen 102 while allowing for continued support of IPv4 users, without the use 103 of an full end-end dual stack network. Due to IPv4 address 104 exhaustion, this requires an IPv6 network technology that supports 105 shared IPv4 address usage, and also allows the network operator to 106 optimize network equipment functionality and operational practices 107 around IPv6. The use of double NAT64 translation based solutions is 108 an optimal way to address these requirements, especially in 109 combination with stateless translation techniques that minimize 110 several operational challenges, as outlined in 111 [I-D.ietf-softwire-stateless-4v6-motivation]. 113 The Mapping of Address and Port - Translation (MAP-T) solution 114 specified in this document is a double NAT64 based solution, that 115 builds on existing stateless NAT64 techniques specified in [RFC6145], 116 along with a stateless algorithmic address & transport layer port 117 mapping scheme, to allow the sharing of IPv4 addresses across an IPv6 118 network. The MAP-T solution is closely related to MAP-E 119 [I-D.ietf-softwire-map], with both utilizing the same address and 120 port mapping & indexing method, but differing in their choice of IPv6 121 domain transport, i.e. Translation [RFC6145] for MAP-T and 122 encapsulation [RFC2473] for MAP-E. The translation mode is deemed 123 valuable for environments where the encapsulation overhead, or IPv6 124 oriented practices (e.g. use of IPv6 only servers, or IPv6 traffic 125 classification) requirements, contribute to an encapsulation based 126 solution being not feasable. These scenarios are presented in 127 [I-D.maglione-softwire-map-t-scenarios] 129 A companion document, applicable to both MAP-T and MAP-E, defines the 130 DHCPv6 options for MAP provisioning [I-D.ietf-softwire-map-dhcp]. 132 2. Conventions 134 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 135 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 136 document are to be interpreted as described in RFC 2119 [RFC2119]. 138 3. Terminology 139 MAP domain: One or more MAP CEs and BRs connected by 140 means of an IPv6 network and sharing a common 141 set of MAP Rules. A service provider may 142 deploy a single MAP domain, or may utilize 143 multiple MAP domains. 145 MAP Rule: A set of parameters describing the mapping 146 between an IPv4 prefix, IPv4 address or 147 shared IPv4 address and an IPv6 prefix or 148 address. Each MAP domain uses a different 149 mapping rule set. 151 MAP Rule set: A Rule set is composed out of all the MAP 152 Rules communicated to a device, that are 153 intended for determining the devices' traffic 154 forwarding operations. A set has at least 155 one entry, known as a default map rule. The 156 Rule set is interchangeably referred to in 157 this document as a Rule table. 159 MAP Rule table: See MAP Rule set. 161 MAP node: A device that implements MAP. 163 MAP Border Relay (BR): A MAP enabled router managed by the service 164 provider at the edge of a MAP domain. A 165 Border Relay router has at least an IPv6- 166 enabled interface and an IPv4 interface 167 connected to the native IPv4 network. A MAP 168 BR may also be referred to simply as a "BR" 169 within the context of MAP. 171 MAP Customer Edge (CE): A device functioning as a Customer Edge 172 router in a MAP deployment. A typical MAP CE 173 adopting MAP rules will serve a residential 174 site with one WAN side interface, and one or 175 more LAN side interfaces. A MAP CE may also 176 be referred to simply as a "CE" within the 177 context of MAP. 179 Port-set: Each node has a separate part of the 180 transport layer port space; denoted as a 181 port-set. 183 Port-set ID (PSID): Algorithmically identifies a set of ports 184 exclusively assigned to the CE. 186 Shared IPv4 address: An IPv4 address that is shared among multiple 187 CEs. Only ports that belong to the assigned 188 port-set can be used for communication. Also 189 known as a Port-Restricted IPv4 address. 191 End-user IPv6 prefix: The IPv6 prefix assigned to an End-user CE by 192 other means than MAP itself. E.g. 193 Provisioned using DHCPv6 PD [RFC3633], 194 assigned via SLAAC [RFC4862], or configured 195 manually. It is unique for each CE. 197 MAP IPv6 address: The IPv6 address used to reach the MAP 198 function of a CE from other CEs and from BRs. 200 Rule IPv6 prefix: An IPv6 prefix assigned by a Service Provider 201 for a MAP rule. 203 Rule IPv4 prefix: An IPv4 prefix assigned by a Service Provider 204 for a MAP rule. 206 Embedded Address (EA) bits: The IPv4 EA-bits in the IPv6 address 207 identify an IPv4 prefix/address (or part 208 thereof) or a shared IPv4 address (or part 209 thereof) and a port-set identifier. 211 4. Architecture 213 Figure 1 depicts the overall MAP-T architecture, which sees any 214 number of IPv4 users (N and M used as examples), connected by means 215 of MAP-T CEs to an IPv6 network that is equipped with one or more 216 MAP-T BR. The CEs and BRs form the MAP-T Domain, by means of 217 configuration that they share. 219 Functionally the MAP-T CE and BR utilize and extend some well 220 established technical building blocks to allow the IPv4 users to 221 correspond with nodes on the Public IPv4 network, or IPv6 network as 222 follows: 224 o A regular (NAT44) NAPT [RFC2663] function on a MAP CE is extended 225 with support for restricting the allowable TCP/UDP ports for a 226 given IPv4 address. The IPv4 address and port range used are 227 determined by the MAP provisioning process and identical to MAP-E 228 [I-D.ietf-softwire-map]. 230 o A standard stateless NAT64 function [RFC6145] is extended to allow 231 stateless mapping of IPv4 and transport layer port ranges to IPv6 232 address space. This algorithmic mapping is specified in section 233 5. 235 User N 236 Private IPv4 237 | Network 238 | 239 O--+---------------O 240 | | MAP-T CE | 241 | +-----+--------+ | 242 | NAPT44| MAP-T | | 243 | +-----+ | | -._ ,-------. .------. 244 | +--------+ | ,-' `-. ,-' `-. 245 O------------------O / \ O---------O / Public \ 246 / IPv6 only \ | MAP-T |/ IPv4 \ 247 ( Network --+ Border +- Network ) 248 \ / | Relay |\ / 249 O------------------O \ / O---------O \ / 250 | MAP-T CE | ;". ,-' `-. ,-' 251 | +-----+--------+ | ," `----+--' ------' 252 | NAPT44| MAP-T | |, | 253 | +-----+ | | IPv6 node(s) 254 | | +--------+ | (w/ v4 mapped 255 O---.--------------O address) 256 | 257 User M 258 Private IPv4 259 Network 261 Figure 1: MAP-T Architecture 263 Each MAP-T CE is configured by means of MAP procedures with an IPv4 264 address and a port-range that is indexed by means of a Port Set 265 Identifier (PSID). Each CE is responsible for translating between a 266 given users' private IPv4 address space and the CE's MAP derived IPv4 267 address + port set, as well as adapting traffic between IPv4 and IPv6 268 using NAT64 procedures that are in accordance with the MAP Rules 269 applicable for a given domain. The MAP procedures can operate with 270 CE's using a shared IPv4 address, full IPv4 addresses or IPv4 271 prefixes, and place no assumption on the IPv6 addressing, other than 272 an IPv6 prefix of adequate size being allocated. 274 The MAP-T BR is responsible for connecting one or more MAP-T domains 275 to external IPv4 networks, using stateless NAT64 as extended by the 276 MAP rules in this document, to relay traffic between the two. 278 The intended role for NAT64 technology in the architecture is two 279 fold. Firstly, it is intended to allow the IPv6 network to focus on 280 IPv6 operational procedures with minimal consideration of IPv4-only 281 nodes attached to the domain. Secondly, it is intended to allow 282 IPv4-only nodes to correspond directly with IPv6-only nodes, provided 283 they have an IPv4 mapped IPv6 address belonging to the IPv6 prefix 284 assigned to the MAP-T domain (as per [RFC6052]). 286 The detailed operation of the above mechanism is governed by means of 287 MAP Rules and an address+port mapping algorithm covered in Section 5. 288 Section 7 describes how the mechanism is used for packet forwarding 289 operations. 291 5. Mapping Rules 293 A MAP node is provisioned with one or more mapping rules that govern 294 the IPv4 address and port-set are to a node in the IPv6 domain, as 295 well specific or default path forwarding behavior for the domain. 296 Three specific types of mapping rules are defined: 298 1. Basic Mapping Rule (BMR) - used for determining the CE's IPv4 299 address and/or port set, as well as determining the MAP IPv6 300 address that the CE is to use. For a given end-user IPv6 prefix 301 there can be only one BMR. The BMR is defined out of the 302 following parameters: 304 * Rule IPv6 prefix (including prefix length) 306 * Rule IPv4 prefix (including prefix length) 308 * Rule EA-bits length (in bits) 310 * Optional Rule Port Parameters 312 2. Forwarding Mapping Rule (FMR) - used for setting up forwarding 313 between CEs in the MAP domain (a.k.a. Mesh mode). Each 314 Forwarding Mapping Rule will result in a forwarding entry for the 315 Rule IPv4 prefix + the given port range, i.e. Specific IPv4 + 316 port routes.The FMR consists of the following parameters, which 317 are shared with the BMR: 319 * Rule IPv6 prefix (including prefix length) 321 * Rule IPv4 prefix (including prefix length) 323 * Rule EA-bits length (in bits) 325 * Optional Rule Port Parameters 327 3. Default Mapping Rule (DMR) - used for mapping and forwarding to 328 destinations outside the MAP domain, i.e. a default route for the 329 MAP domain leading to the MAP BR. It consists of: 331 * The IPv6 prefix (including prefix length) used to represent 332 destinations outside the MAP domain. Typically a routed 333 prefix to one or more BRs. 335 4. Optional Rule Port Parameters - used to represent additional 336 configuration settings. Currently defined parameters are 338 * Offset: Specifies the numeric value for the MAP algorithm's 339 excluded port range/offset bits (A-bits). Unless explicitly 340 defined this value MUST default to 6. 342 By default, every MAP node belonging to a MAP domain node, MUST be 343 provisioned with a Basic Mapping Rule (BMR). The rule is then used 344 for IPv4 prefix, address or shared address assignment. 346 A MAP IPv6 address is formed from the BMR Rule IPv6 prefix. This 347 address MUST be assigned to an interface of the MAP node and is used 348 to terminate all MAP traffic being sent or received to the node. 350 Port-aware IPv4 entries in the Rules table are installed for all the 351 Forwarding Mapping Rules and a default route to the MAP BR as per the 352 DMR (see section Section 5.3). A given domain can have only one DMR, 353 however be deployed for load balancing using multiple BRs, for 354 example by means of anycast addressing of the BRs. 356 Forwarding rules are used to allow direct communication between MAP 357 CEs, known as mesh mode. In hub and spoke mode, there are no 358 forwarding rules, and all traffic is forwarded from the CE to the BR 359 by means of the DMR. 361 The following subsections specify the MAP algorithm and its use of 362 Rules. 364 5.1. Basic mapping rule (BMR) 366 The Basic Mapping Rule is used to derive a CE's IPv4 prefix, IPv4 367 address and any associated port-set-id, which are related to the MAP 368 domain represented by an IPv6 prefix. Recall from Section 5 that the 369 BMR consists of the following parameters: 371 o Rule IPv6 prefix, of a length n. 373 o Rule IPv4 prefix, of a length r. 375 o Rule EA-bits of length o. 377 o Optional Rule Port Parameters (a, k) 379 Figure 2 shows the structure of the complete MAP IPv6 address of a CE 380 as specified in this document, and its relation to the information 381 contained in the BMR and End-user IP6 prefix. The MAP CE IPv6 382 address is determined by concatenating the End-user IPv6 prefix with 383 the MAP subnet-id (if the End-user IPv6 prefix is shorter than 64 384 bits) and the MAP interface ID. The MAP interface-id is derived as 385 specified in Section 5.5. The MAP subnet ID is defined to be the 386 first subnet (all bits set to zero). For End-user IPv6 prefixes 387 longer than 64 bits, no MAP subnet id is used. 389 | n bits | o bits | s bits | 128-n-o-s bits | 390 +--------------------+-----------+---------+------------+----------+ 391 | Rule IPv6 prefix | EA bits |subnet ID| interface ID | 392 +--------------------+-----------+---------+-----------------------+ 393 |<--- End-user IPv6 prefix --->| 395 Figure 2: IPv6 address format 397 The MAP CE's IPv4 address is determined by completing the r-bits of 398 the Rule IPv4 prefix with the remaining IPv4 suffix 32-r bits of 399 information (p), along with the optional k bits of the Port Set 400 Identifier (PSID). These remaining p + k bits of information 401 themselves come from the (o) Embedded-Address (EA) bits of the end- 402 user IPv6 prefix. The End-user IPv6 prefix is the IPv6 prefix 403 assigned to the CE and is unique per CE. 405 The n bit Rule IPv6 prefix, is the part of the End-user IPv6 prefix 406 that is common among all CEs using the same Basic Mapping Rule within 407 the MAP domain. Similarly, the Rule IPv4 prefix of length r is the 408 IPv4 prefix common among all CEs using the same BMR within the MAP 409 domain. An EA-bit length of 0 signifies that all relevant p and k 410 bits of addressing information are passed directly in the BMR, and 411 not derived from the EA bits of the End-user IPv6 prefix. Examples 412 of these and other cases are given in Appendix A. 414 For a given BMR, if o + r < 32 (length of the IPv4 address in bits), 415 then an IPv4 prefix is being intended for use by the BMR. This case 416 is shown in Figure 3. 418 | r bits | 32-r bits | 419 +-------------+---------------------+ 420 | Rule IPv4 | IPv4 Address suffix | 421 +-------------+---------------------+ 422 | < 32 bits | 424 Figure 3: IPv4 prefix 426 If o + r is equal to 32, then a full IPv4 address is to be assigned. 427 The address is created by concatenating the Rule IPv4 prefix and the 428 EA-bits. This case is shown in Figure 4. 430 | r bits | 32-r bits | 431 +-------------+---------------------+ 432 | Rule IPv4 | IPv4 Address suffix | 433 +-------------+---------------------+ 434 | 32 bits | 436 Figure 4: Complete IPv4 address 438 If o + r is > 32, then a shared IPv4 address is to be assigned, and 439 is the case shown in Figure 5. The number of IPv4 address suffix 440 bits (p) in the EA bits is given by 32 - r. The PSID bits are used 441 to create a port-set. The length of the PSID bit field within EA 442 bits is: k = o - 32 + r. 444 | r bits | 32-r bits | | k bits | 445 +-------------+---------------------+ +------------+ 446 | Rule IPv4 | IPv4 Address suffix | |Port-Set ID | 447 +-------------+---------------------+ +------------+ 448 | 32 bits | 450 Figure 5: Shared IPv4 address 452 It should be noted that the length r MAY be zero, in which case the 453 complete IPv4 address or prefix is encoded in the EA bits. Similarly 454 the length of o MAY, in which case no part of the CE's IPv6 end-user 455 prefix is used to derive the CE's IPv4 address. To create a complete 456 IPv4 address (or prefix), the IPv4 address suffix (p = 32-r) from the 457 EA bits, is concatenated with the Rule IPv4 prefix (r bits). 459 The BMR is provisioned to the CE by means (e.g. a DHCPv6 option) not 460 specified in this document. 462 See Appendix A for an example of the Basic Mapping Rule. 464 5.2. Forwarding mapping rule (FMR) 466 The Forwarding Mapping Rule is an optional rule used in mesh mode to 467 enable direct CE to CE connectivity. 469 The processing of an FMR rule results in a route entry being 470 installed on the processing MAP device for the IPv4 Rule prefix and 471 any associated port range. The "next hop" of such a route is the MAP 472 transformation defined by the rule's key elements: 474 o The Rule IPv6 prefix, of a length n. 476 o The Rule IPv4 prefix, of a length r. 478 o The Rule EA-bits of length o. 480 o Optional Rule Port Parameters (e.g. offset, port set id) 482 On forwarding an IPv4 packet, a best matching prefix look up is done 483 and the closest matching FMR is chosen. The IPv6 destination address 484 is derived from the destination IPv4 + port in combination with the 485 rule's parameters as exemplified in Figure 6. 487 | 32 bits | | 16 bits | 488 +--------------------------+ +-------------------+ 489 | IPv4 destination address | | IPv4 dest port | 490 +--------------------------+ +-------------------+ 491 : : ___/ : 492 | r bits |32-r bits | / k bits : 493 +---------------+----------+ +------------+ 494 | Rule IPv4 |IPv4 sufx| |Port-Set ID | 495 +---------------+----------+ +------------+ 496 \ / ____/ ________/ 497 \ : __/ _____/ 498 \ : / / 499 | n bits | o bits | s bits | 128-n-o-s bits | 500 +--------------------+-----------+---------+------------+----------+ 501 | Rule IPv6 prefix | EA bits |subnet ID| interface ID | 502 +--------------------+-----------+---------+-----------------------+ 503 |<--- End-user IPv6 prefix --->| 505 Figure 6: Deriving of MAP IPv6 address 507 See Appendix A for an example of the Forwarding Mapping Rule. 509 5.3. Port mapping algorithm 511 The port mapping algorithm is used in domains whose MAP Rules allows 512 IPv4 address sharing, and is intended to allow the a range of ports 513 to be represented by an algorithmically computable index, the Port 514 Set Identifier (PSID) that is unique for each CE. 516 The simplest way to represent a port range is using a notation 517 similar to CIDR [RFC4632]. For example the first 256 ports are 518 represented as port prefix 0.0/8. The last 256 ports as 255.0/8. In 519 hexadecimal, 0x0000/8 (PSID = 0) and 0xFF00/8 (PSID = 0xFF). Using 520 this technique, but wishing to avoid allocating the system ports 521 [I-D.ietf-tsvwg-iana-ports] to a give CE, one would have to exclude 522 the use of one or more PSIDs. 524 As will be seen shortly, the PSID forms a portion of the End-user 525 IPv6 prefix, however it is desirable to minimize the dependencies 526 between the End-user IPv6 prefix and the assigned port set. This is 527 achieved by using an infix representation of the port value. Using 528 such a representation, the well-known ports are excluded by 529 restrictions on the value of the first A high-order bits of the 530 transport port space, known as the A-bit field, rather than the PSID 531 itself, whihc directly follows. For a given A-bit field value, and a 532 given PSID, the range of contiguous ports being represented are all 533 the combinations of the remaining m wildcard bits (i.e. 2^m 534 combinations) out of the 16-bit field, as shown in the figure below. 536 0 1 537 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 538 +-------+-----------+-----------+ 539 Ports in | A | PSID | M | 540 the CE port set | > 0 | | any value | 541 +-------+-----------+-----------+ 542 |a bits | k bits | m bits | 544 Figure 7: PSID 546 A Selects the range of the port number. For a > 0, A MUST be larger 547 than 0. This ensures that the algorithm excludes the system 548 ports. For this value of a, the system ports, but no others, are 549 excluded by requiring that A be greater than 0. For smaller 550 values of a, A still has to be greater than 0, but this excludes 551 ports above 1023. For larger values of a, the minimum value of A 552 has to be higher to exclude all the system ports. The interval 553 between successive contiguous ranges assigned to the same user is 554 2^a. 556 a-bits The number of offset bits. The default Offset bits (a) are: 557 6. To simplify the port mapping algorithm the defaults are chosen 558 so that the PSID field starts on a nibble boundary and the 559 excluded port range (0-1023) is extended to 0-4095. 561 PSID The Port Set Identifier. Different Port-Set Identifiers (PSID) 562 MUST have non-overlapping port-sets. 564 k-bits The length in bits of the PSID field. The sharing ratio is 565 2^k. The number of ports assigned to the user is 2^(16-k) - 2^m 566 (excluded ports) 568 M Selects the specific port within the particular range specified by 569 the concatenation of A and the PSID. 571 m bits The contiguous port size, i.e. the number of contiguous ports 572 allocated to a given PSID. The number of contiguous ports is 573 given by 2^m. 575 5.4. Default mapping rule (DMR) 577 IPv4 traffic between MAP-T nodes that are all within one MAP domain 578 is translated to IPv6, with the senders MAP IPv6 address as the IPv6 579 source address and the receiving MAP node's MAP IPv6 address as the 580 IPv6 destination address. To reach destinations outside the MAP-T 581 domain and/or for the case when the MAP domain is defined to be 582 composed out of a single CE and BR, the Default Mapping rule is used. 583 The DMR is specified in terms of the BR IPv6 prefix that MAP-T CEs 584 will use for mapping an IPv4 destination address. 586 Default Mapping Rule: 587 {2001:db8:0001::/Prefix-length (Rule IPv6 prefix), 588 0.0.0.0/0 (Rule IPv4 prefix)} 590 Example: Default Mapping Rule 592 It is recommended that the BR prefix-length SHOULD be by default 64 593 bits long, and in any case MUST NOT exceed 96 bits. The mapping of 594 the IPv4 destination behind the IPv6 prefix will by default follow 595 the /64 rule as per [RFC6052]. Any trailing bits after the IPv4 596 address are set to 0x0. 598 5.5. The IPv6 Interface Identifier 600 The Interface identifier format of a MAP node is described below. 602 | 128-n-o-s bits | 603 | 16 bits| 32 bits | 16 bits| 604 +--------+----------------+--------+ 605 | 0 | IPv4 address | PSID | 606 +--------+----------------+--------+ 608 Figure 8 610 In the case of an IPv4 prefix, the IPv4 address field is right-padded 611 with zeros up to 32 bits. The k-bit PSID is zero left-padded to 612 create a 16 bit field. For an IPv4 prefix or a complete IPv4 613 address, the PSID field is zero. 615 If the End-user IPv6 prefix length is larger than 64, the most 616 significant parts of the interface identifier is overwritten by the 617 prefix. 619 6. MAP-T Configuration 621 For a given MAP domain, the BR and CE MUST be configured with the 622 following MAP elements. The configured values for these elements are 623 identical for all CEs and BRs within a given MAP domain. 625 o The Basic Mapping Rule and optionally the Forwarding Mapping 626 Rules, including the Rule IPv6 prefix, Rule IPv4 prefix, and 627 Length of EA bits 629 o Hub and spoke mode or Mesh mode. (If all traffic should be sent 630 to the BR, or if direct CE to CE traffic should be supported). 632 o Use of Translation mode (MAP-T) 634 o The BR's IPv6 prefix used in the DMR 636 The MAP-T CE and BR configuration is the same as for MAP-E described 637 in Section 7 of [I-D.ietf-softwire-map] except for two differences: 639 o Translation mode is used instead of Encapsulation 641 o Use of the BR's IPv6 prefix instead of address 643 6.1. MAP CE 645 The MAP elements are set to values that are the same across all CEs 646 within a MAP domain. The values may be configured in a variety of 647 manners, including provisioning methods such as the Broadband Forum's 648 "TR-69" Residential Gateway management interface, an XML-based object 649 retrieved after IPv6 connectivity is established, DHCPv6, or manual 650 configuration by an administrator. This document does not prescribe 651 any of these methods, but recommends that a MAP CE SHOULD implement 652 DHCPv6 options as per [I-D.ietf-softwire-map-dhcp]. Other 653 configuration and management methods may use the format described by 654 this option for consistency and convenience of implementation on CEs 655 that support multiple configuration methods. 657 The only remaining provisioning information the CE requires in order 658 to calculate the MAP IPv4 address and enable IPv4 connectivity is the 659 IPv6 prefix for the CE. The End-user IPv6 prefix is configured as 660 part of obtaining IPv6 Internet access, and requires no special 661 handling. 663 The MAP provisioning parameters, and hence the IPv4 service itself, 664 is tied to the End-user IPv6 prefix; thus, the MAP service is also 665 tied to this in terms of authorization, accounting, etc. The MAP 666 IPv4 address, prefix or shared IPv4 address and port set has the same 667 lifetime as its associated End-user IPv6 prefix. 669 A single MAP CE MAY be connected to more than one MAP domain, just as 670 any router may have more than one IPv4-enabled service provider 671 facing interface and more than one set of associated addresses 672 assigned by DHCPv6. Each domain a given CE operates within would 673 require its own set of MAP configuration elements and would generate 674 its own IPv4 address. The MAP DHCPv6 option is specified in 675 [I-D.ietf-softwire-map-dhcp] 677 6.2. MAP BR 679 The MAP BR MUST be configured with the same MAP elements as the MAP 680 CEs operating within the same domain. 682 For increased reliability and load balancing, the BR IPv6 prefix MAY 683 be shared across a given MAP domain. As MAP is stateless, any BR may 684 be used at any time. 686 Since MAP uses provider address space, no specific routes need to be 687 advertised externally for MAP to operate, neither in IPv6 nor IPv4 688 BGP. However, the BR prefix needs to be advertised in the service 689 provider's IGP. 691 7. MAP-T Packet Forwarding 693 The end-end packet flow in MAP-T involves an IPv4 or IPv6 packet 694 being forwarded across one or both of a CE and a BR, in one of two 695 directions in for each such case. 697 7.1. IPv4 to IPv6 at the CE 699 A MAP-T CE receiving IPv4 packets SHOULD perform NAPT NAT44 function, 700 and create any necessary NAPT44 bindings. The source address and 701 port of the packet obtained as a result of the NAPT44 process MUST 702 correspond to the source IPv4 address and source transport port 703 number derived to belong to the CE by means of the MAP Basic Mapping 704 Rule (BMR). 706 The resulting IPv4 packet is subject to a longest IPv4 address + port 707 match MAP rule selection, which then determines the parameters for 708 the subsequent NAT64 operation. By default, all traffic is matched 709 to the default mapping rule (DMR), and subject to the stateless NAT64 710 operation using the DMR parameters for the MAP algorithm and NAT64. 711 Packets matching destinations covered by any (optional) forward 712 mapping rules (FMRs) are subject to the stateless NAT64 operation 713 using the FMR parameters for the MAP algorithm and stateless NAT64. 715 A MAP-T CE MUST support a default mapping rule and SHOULD support one 716 or more forward mapping rules. 718 7.2. IPv6 to IPv4 at the CE 720 A MAP-T CE receiving an IPv6 packet performs its regular IPv6 721 operations (filtering, pre-routing, etc). Only packets that are 722 addressed to the CE's MAP-T addresses, and with source addresses 723 matching the IPv6 map-rule prefixes of a DMR or FMR, are processed by 724 the MAP-T CE. All other IPv6 traffic SHOULD be forwarded as per the 725 CE's IPv6 routing rules. The CE SHOULD check that MAP-T received 726 packets' destination transport-layer destination port number is in 727 the range allowed for by the CE's MAP BMR configuration. The CE 728 SHOULD drop any non conforming packet and respond with an ICMPv6 729 "Address Unreachable" (Type 1, Code 3). For packets whose source 730 address matches an FMR, the CE SHOULD perform a check of consistency 731 of the source against the allowed values from the source port-range. 732 If the packets' source port number is found to be outside the range 733 allowed, the CE MUST drop the packet and SHOULD respond with an 734 ICMPv6 "Destination Unreachable, Source address failed ingress/egress 735 policy" (Type 1, Code 5). 737 For each MAP-T processed packet, the CE's NAT64 function MUST derive 738 the IPv4 source and destination addresses. The IPv4 destination 739 address is derived by extracting relevant information from the IPv6 740 destination and the information stored in the BMR as per Section 5.1 741 of this document. The IPv4 source address is formed by classifying 742 the packet's source as matching a DMR or FMR rule prefix, and then 743 using that NAT64 rule-set, as per Section 5.4 or Section 5.2 744 respectively. 746 The resulting IPv4 packet is then forwarded to the CE's NAPT NAT44 747 function, where the destination IPv4 address and port number MUST be 748 mapped to their original value, before being forwarded according to 749 the CE's regular IPv4 rules. When the NAPT function is not enabled, 750 the traffic from the stateless NAT64 function is directly forwarded 751 according to the CE's IPv4 rules. 753 7.3. IPv6 to IPv4 at the BR 755 A MAP-T BR receiving IPv6 packets MUST select a matching MAP rule 756 based on a longest address match of the packets' source address 757 against the BR's configured MAP Rules. In combination with the port- 758 set-id contained in the packet's source IPv6 address, the selected 759 MAP rule allows the BR to verify that the CE is using its allowed 760 address and port range. Thus, the BR MUST perform a validation of 761 the consistency of the source against the allowed values from the 762 identified port-range. If the packets' source port number is found 763 to be outside the range allowed, the BR MUST drop the packet and 764 respond with an ICMPv6 "Destination Unreachable, Source address 765 failed ingress/egress policy" (Type 1, Code 5). 767 When constructing the IPv4 packet, the BR MUST derive the source and 768 destination IPv4 addresses as per Section 5 of this document and 769 translate the IPv6 to IPv4 headers as per [RFC6145]. The resulting 770 IPv4 packets are then passed to regular IPv4 forwarding. 772 7.4. IPv4 to IPv6 at the BR 774 A MAP-T BR receiving IPv4 packets uses a longest match IPv4 + 775 transport layer port lookup to identify the target MAP-T domain and 776 rule. The MAP-T BR MUST then compute the IPv6 destination addresses 777 from the IPv4 destination address and port as per Section 5.1 of this 778 document. The MAP-T BR MUST also compute the IPv6 source addresses 779 from the IPv4 source address as per Section 5.4 (i.e. It needs to 780 form an IPv6 mapped IPv4 address using the BR's DMR prefix). 781 Throughout the generic IPv4 to IPv6 header procedures following 782 [RFC6145] apply. The resulting IPv6 packets are then passed to 783 regular IPv6 forwarding. 785 Note that the operation of a BR when forwarding to MAP-T domains that 786 are defined without IPv4 address sharing is the same as stateless 787 NAT64 IPv4/IPv6 translation. 789 8. ICMP Handling 791 ICMP messages supported in the MAP-T domain need to take into 792 consideration also the NAPT44 component and best current practice 793 documented in [RFC5508] along with some additional specific 794 considerations. 796 MAP-T CEs and BRs MUST follow ICMP/ICMPv6 translation as per 797 [RFC6145], with the following extension to cover the address sharing/ 798 port-range feature. 800 Unlike TCP and UDP, which provide two transport protocol port fields 801 to represent both source and destination, the ICMP/ICMPv6 [RFC0792], 802 [RFC4443] Query message header has only one ID field which needs to 803 be used to identify a sending IPv4 host. 805 When receiving IPv4 ICMP messages, the MAP-T CE MUST rewrite the ID 806 field to a port value derived from the CE's Port-set-id. 808 In the return path, when MAP-T BR receives an IPv4 ICMP packet 809 containing an ID field which is bound for a shared address in the 810 MAP-T domain, the MAP-T BR SHOULD use the ID value as a substitute 811 for the destination port in determining the IPv6 destination address. 812 In all other cases, the MAP-T BR MUST derive the destination IPv6 813 address by simply mapping the destination IPv4 address without 814 additional port info. Throughout the ICMP message MUST be translated 815 as per [RFC6145] with the the ID field preserved. 817 9. Fragmentation and Path MTU Discovery 819 Due to the different sizes of the IPv4 and IPv6 header, handling the 820 maximum packet size is relevant for the operation of any system 821 connecting the two address families. There are three mechanisms to 822 handle this issue: Path MTU discovery (PMTUD), fragmentation, and 823 transport-layer negotiation such as the TCP Maximum Segment Size 824 (MSS) option [RFC0897]. MAP uses all three mechanisms to deal with 825 different cases. 827 9.1. Fragmentation in the MAP domain 829 Translating an IPv4 packet to carry it across the MAP domain will 830 increase its size by 20 bytes respectively. It is strongly 831 recommended that the MTU in the MAP domain is well managed and that 832 the IPv6 MTU on the CE WAN side interface is set so that no 833 fragmentation occurs within the boundary of the MAP domain. 835 Fragmentation in MAP-T domain is to be handled as described in 836 section 4 and 5 of [RFC6145]. 838 9.2. Receiving IPv4 Fragments on the MAP domain borders 840 Forwarding of an IPv4 packet received from the outside of the MAP 841 domain requires the IPv4 destination address and the transport 842 protocol destination port. The transport protocol information is 843 only available in the first fragment received. As described in 844 section 5.3.3 of [RFC6346] a MAP node receiving an IPv4 fragmented 845 packet from outside has to reassemble the packet before sending the 846 packet onto the MAP link. If the first packet received contains the 847 transport protocol information, it is possible to optimize this 848 behavior by using a cache and forwarding the fragments unchanged. A 849 description of this algorithm is outside the scope of this document. 851 9.3. Sending IPv4 fragments to the outside 853 If two IPv4 host behind two different MAP CE's with the same IPv4 854 address sends fragments to an IPv4 destination host outside the 855 domain. Those hosts may use the same IPv4 fragmentation identifier, 856 resulting in incorrect reassembly of the fragments at the destination 857 host. Given that the IPv4 fragmentation identifier is a 16 bit 858 field, it could be used similarly to port ranges. A MAP CE SHOULD 859 rewrite the IPv4 fragmentation identifier to be within its allocated 860 port set. 862 10. Usage Considerations 864 10.1. EA-bit length of 0 866 The MAP solution supports use and configuration of domains with a BMR 867 expressing an EA-bit length of 0. This results in independence 868 between the end-user IPv6 prefix assigned to the CE and the IPv4 869 address and/or port-range used by MAP. The k-bits of PSID 870 information may in this case be derived from the BMR. 872 The constraint imposed is that each such MAP domain be composed of 873 just 1 MAP CE which has a predetermined IPv6 prefix. The BR would be 874 configured with an FRM rule per CPE, where the FMR would uniquely 875 describe the IPv6 prefix of a given CE. Each CE would have a 876 distinct BMR, that would fully describe that CE's IPv4 address, and 877 PSID if any. 879 10.2. Mesh and Hub and spoke modes 881 The hub and spoke mode of communication, whereby all traffic sent by 882 a MAP-T CE is forwarded via a BR, and the mesh mode, whereby a CE is 883 directly able to forward traffic to another CE, are governed by the 884 activation of Forward Mapping Rule that cover the IPv4-prefix 885 destination, and port-index range. By default, a MAP CE configured 886 only with a BMR, as per this specification, will use it to configure 887 its IPv4 parameters and IPv6 MAP address without enabling mesh mode. 889 10.3. Communication with IPv6 servers in the MAP-T domain 891 By default, MAP-T allows communication between both IPv4-only and any 892 IPv6 enabled devices, as well as with native IPv6-only servers 893 provided that the servers are configured with an IPv4-mapped IPv6 894 address. This address could be part of the the IPv6 prefix used by 895 the DMR in the MAP-T domain. Such IPv6 servers (e.g. an HTTP server, 896 or a web content cache device) are thus able to serve both IPv6 users 897 as well as IPv4-only users users alike utilizing IPv6. Any such 898 IPv6-only servers SHOULD have both A and AAAA records in DNS. DNS64 899 [RFC6147] become required only when IPv6 servers in the MAP-T domain 900 are expected themselves to initiate communication to external IPv4- 901 only hosts. 903 10.4. Compatibility with other NAT64 solutions 905 A MAP-T CE is by default compatible with [RFC6146] stateful NAT64 906 devices that are placed to use/advertise the BR prefix. This in 907 effect allows the use of MAP-T CEs in environments that need to 908 perform statistical multiplexing of IPv4 addresses, while utilizing 909 stateful NAT64 devices, and can take the role of a CLAT as defined in 911 [RFC6877]. 913 Furthermore, a MAP-T CE configured to operate without address sharing 914 (no PSID) is compatible with any stateless NAT64 devices positioned 915 as BRs. 917 11. IANA Considerations 919 This specification does not require any IANA actions. 921 12. Security Considerations 923 Spoofing attacks: With consistency checks between IPv4 and IPv6 924 sources that are performed on IPv4/IPv6 packets received by MAP 925 nodes, MAP does not introduce any new opportunity for spoofing 926 attacks that would not already exist in IPv6. 928 Denial-of-service attacks: In MAP domains where IPv4 addresses are 929 shared, the fact that IPv4 datagram reassembly may be necessary 930 introduces an opportunity for DOS attacks. This is inherent to 931 address sharing, and is common with other address sharing 932 approaches such as DS-Lite and NAT64/DNS64. The best protection 933 against such attacks is to accelerate IPv6 enablement in both 934 clients and servers so that, where MAP is supported, it is less 935 and less used. 937 Routing-loop attacks: This attack may exist in some automatic 938 tunneling scenarios are documented in [RFC6324]. They cannot 939 exist with MAP because each BRs checks that the IPv6 source 940 address of a received IPv6 packet is a CE address based on 941 Forwarding Mapping Rule. 943 Attacks facilitated by restricted port set: From hosts that are not 944 subject to ingress filtering of [RFC2827], some attacks are 945 possible by an attacker injecting spoofed packets during ongoing 946 transport connections ([RFC4953], [RFC5961], [RFC6056]. The 947 attacks depend on guessing which ports are currently used by 948 target hosts, and using an unrestricted port set is preferable, 949 i.e. Using native IPv6 connections that are not subject to MAP 950 port range restrictions. To minimize this type of attacks when 951 using a restricted port set, the MAP CE's NAT44 filtering behavior 952 SHOULD be "Address-Dependent Filtering". Furthermore, the MAP CEs 953 SHOULD use a DNS transport proxy function to handle DNS traffic, 954 and source such traffic from IPv6 interfaces not assigned to 955 MAP-T. Practicalities of these methods are discussed in Section 956 5.9 of [I-D.dec-stateless-4v6]. 958 ICMP Flood Given the necessity to process and translate ICMP and 959 ICMPv6 messages by the BR and CE nodes, a foreseeable attack 960 vector is that of a flood of such messages leading to a saturation 961 of the nodes' compute resources. This attack vector is not 962 specific to MAP, and its mitigation lies a combination of policing 963 the rate of ICMP messages, policing the rate at which such 964 messages can get processed by the MAP nodes, and of course 965 identifying and blocking off the source(s) of such traffic. 967 [RFC6269] outlines general issues with IPv4 address sharing. 969 13. Contributors 971 The following individuals authored major contribution to this 972 document: 974 Chongfeng Xie (China Telecom) Room 708, No.118, Xizhimennei Street 975 Beijing 100035 CN Phone: +86-10-58552116 Email: xiechf@ctbri.com.cn 977 Qiong Sun (China Telecom) Room 708, No.118, Xizhimennei Street 978 Beijing 100035 CN Phone: +86-10-58552936 Email: sunqiong@ctbri.com.cn 980 Rajiv Asati (Cisco Systems) 7025-6 Kit Creek Road Research Triangle 981 Park NC 27709 USA Email: rajiva@cisco.com 983 Gang Chen (China Mobile) 53A,Xibianmennei Ave. Beijing 100053 984 P.R.China Email: chengang@chinamobile.com 986 Wentao Shang (CERNET Center/Tsinghua University) Room 225, Main 987 Building, Tsinghua University Beijing 100084 CN Email: 988 wentaoshang@gmail.com 990 Guoliang Han (CERNET Center/Tsinghua University) Room 225, Main 991 Building, Tsinghua University Beijing 100084 CN Email: 992 bupthgl@gmail.com 994 Yu Zhai CERNET Center/Tsinghua University Room 225, Main Building, 995 Tsinghua University Beijing 100084 CN Email: jacky.zhai@gmail.com 997 14. Acknowledgements 999 This document is based on the ideas of many. In particular Remi 1000 Despres, who has tirelessly worked on generalized mechanisms for 1001 stateless address mapping. 1003 The authors would like to thank Mohamed Boucadair, Guillaume Gottard, 1004 Dan Wing, Jan Zorz, Necj Scoberne, Tina Tsou, , Gang Chen, Maoke 1005 Chen, Xiaohong Deng, Jouni Korhonen, Tomasz Mrugalski, Jacni Qin, 1006 Chunfa Sun, Qiong Sun, Leaf Yeh, Andrew Yourtchenko for their review 1007 and comments. 1009 15. References 1011 15.1. Normative References 1013 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1014 Requirement Levels", BCP 14, RFC 2119, March 1997. 1016 [RFC6052] Bao, C., Huitema, C., Bagnulo, M., Boucadair, M., and X. 1017 Li, "IPv6 Addressing of IPv4/IPv6 Translators", RFC 6052, 1018 October 2010. 1020 [RFC6145] Li, X., Bao, C., and F. Baker, "IP/ICMP Translation 1021 Algorithm", RFC 6145, April 2011. 1023 [RFC6346] Bush, R., "The Address plus Port (A+P) Approach to the 1024 IPv4 Address Shortage", RFC 6346, August 2011. 1026 15.2. Informative References 1028 [I-D.dec-stateless-4v6] 1029 Dec, W., Asati, R., and H. Deng, "Stateless 4Via6 Address 1030 Sharing", draft-dec-stateless-4v6-04 (work in progress), 1031 October 2011. 1033 [I-D.ietf-softwire-map] 1034 Troan, O., Dec, W., Li, X., Bao, C., Matsushima, S., 1035 Murakami, T., and T. Taylor, "Mapping of Address and Port 1036 with Encapsulation (MAP)", draft-ietf-softwire-map-08 1037 (work in progress), August 2013. 1039 [I-D.ietf-softwire-map-dhcp] 1040 Mrugalski, T., Deng, X., Troan, O., Bao, C., Dec, W., and 1041 l. leaf.yeh.sdo@gmail.com, "DHCPv6 Options for 1042 configuration of Softwire Address and Port Mapped 1043 Clients", draft-ietf-softwire-map-dhcp-04 (work in 1044 progress), July 2013. 1046 [I-D.ietf-softwire-stateless-4v6-motivation] 1047 Boucadair, M., Matsushima, S., Lee, Y., Bonness, O., 1048 Borges, I., and G. Chen, "Motivations for Carrier-side 1049 Stateless IPv4 over IPv6 Migration Solutions", 1050 draft-ietf-softwire-stateless-4v6-motivation-05 (work in 1051 progress), November 2012. 1053 [I-D.ietf-tsvwg-iana-ports] 1054 Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 1055 Cheshire, "Internet Assigned Numbers Authority (IANA) 1056 Procedures for the Management of the Service Name and 1057 Transport Protocol Port Number Registry", 1058 draft-ietf-tsvwg-iana-ports-10 (work in progress), 1059 February 2011. 1061 [I-D.maglione-softwire-map-t-scenarios] 1062 Maglione, R., Dec, W., Kuarsingh, V., and E. Mallette, 1063 "Use cases for MAP-T", 1064 draft-maglione-softwire-map-t-scenarios-02 (work in 1065 progress), June 2013. 1067 [I-D.xli-behave-divi] 1068 Bao, C., Li, X., Zhai, Y., and W. Shang, "dIVI: Dual- 1069 Stateless IPv4/IPv6 Translation", draft-xli-behave-divi-05 1070 (work in progress), June 2013. 1072 [RFC0792] Postel, J., "Internet Control Message Protocol", STD 5, 1073 RFC 792, September 1981. 1075 [RFC0897] Postel, J., "Domain name system implementation schedule", 1076 RFC 897, February 1984. 1078 [RFC2473] Conta, A. and S. Deering, "Generic Packet Tunneling in 1079 IPv6 Specification", RFC 2473, December 1998. 1081 [RFC2663] Srisuresh, P. and M. Holdrege, "IP Network Address 1082 Translator (NAT) Terminology and Considerations", 1083 RFC 2663, August 1999. 1085 [RFC2827] Ferguson, P. and D. Senie, "Network Ingress Filtering: 1086 Defeating Denial of Service Attacks which employ IP Source 1087 Address Spoofing", BCP 38, RFC 2827, May 2000. 1089 [RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic 1090 Host Configuration Protocol (DHCP) version 6", RFC 3633, 1091 December 2003. 1093 [RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control 1094 Message Protocol (ICMPv6) for the Internet Protocol 1095 Version 6 (IPv6) Specification", RFC 4443, March 2006. 1097 [RFC4632] Fuller, V. and T. Li, "Classless Inter-domain Routing 1098 (CIDR): The Internet Address Assignment and Aggregation 1099 Plan", BCP 122, RFC 4632, August 2006. 1101 [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless 1102 Address Autoconfiguration", RFC 4862, September 2007. 1104 [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", 1105 RFC 4953, July 2007. 1107 [RFC5508] Srisuresh, P., Ford, B., Sivakumar, S., and S. Guha, "NAT 1108 Behavioral Requirements for ICMP", BCP 148, RFC 5508, 1109 April 2009. 1111 [RFC5961] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's 1112 Robustness to Blind In-Window Attacks", RFC 5961, 1113 August 2010. 1115 [RFC6056] Larsen, M. and F. Gont, "Recommendations for Transport- 1116 Protocol Port Randomization", BCP 156, RFC 6056, 1117 January 2011. 1119 [RFC6146] Bagnulo, M., Matthews, P., and I. van Beijnum, "Stateful 1120 NAT64: Network Address and Protocol Translation from IPv6 1121 Clients to IPv4 Servers", RFC 6146, April 2011. 1123 [RFC6147] Bagnulo, M., Sullivan, A., Matthews, P., and I. van 1124 Beijnum, "DNS64: DNS Extensions for Network Address 1125 Translation from IPv6 Clients to IPv4 Servers", RFC 6147, 1126 April 2011. 1128 [RFC6219] Li, X., Bao, C., Chen, M., Zhang, H., and J. Wu, "The 1129 China Education and Research Network (CERNET) IVI 1130 Translation Design and Deployment for the IPv4/IPv6 1131 Coexistence and Transition", RFC 6219, May 2011. 1133 [RFC6269] Ford, M., Boucadair, M., Durand, A., Levis, P., and P. 1134 Roberts, "Issues with IP Address Sharing", RFC 6269, 1135 June 2011. 1137 [RFC6324] Nakibly, G. and F. Templin, "Routing Loop Attack Using 1138 IPv6 Automatic Tunnels: Problem Statement and Proposed 1139 Mitigations", RFC 6324, August 2011. 1141 [RFC6877] Mawatari, M., Kawashima, M., and C. Byrne, "464XLAT: 1142 Combination of Stateful and Stateless Translation", 1143 RFC 6877, April 2013. 1145 Appendix A. Examples of MAP-T translation 1147 Example 1 - Basic Mapping Rule: 1149 Given the following MAP domain information and IPv6 end-user 1150 prefix assigned to a MAP CE: 1152 IPv6 prefix assigned to the end-user: 2001:db8:0012:3400::/56 1153 Basic Mapping Rule: {2001:db8:0000::/40 (Rule IPv6 prefix), 1154 192.0.2.0/24 (Rule IPv4 prefix), 16 (Rule EA-bits length)} 1155 PSID length: (16 - (32 - 24) = 8. (Sharing ratio of 256) 1156 PSID offset: 6 (default) 1158 A MAP node (CE or BR) can via the BMR, or equivalent FMR, 1159 determine the IPv4 address and port-set as shown below: 1161 EA bits offset: 40 1162 IPv4 suffix bits (p) Length of IPv4 address (32) - IPv4 prefix 1163 length (24) = 8 1164 IPv4 address 192.0.2.18 (0xc0000212) 1165 PSID start: 40 + p = 40 + 8 = 48 1166 PSID length (q): o - p = (End-user prefix len - 1167 rule IPv6 prefix len) - p = (56 - 40) - 8 = 8 1168 PSID: 0x34 1170 Available ports (63 ranges) : 1232-1235, 2256-2259, ...... , 1171 63696-63699, 64720-64723 1173 The BMR information allows a MAP CE to determine (complete) 1174 its IPv6 address within the indicated end-user IPv6 prefix. 1176 IPv6 address of MAP CE: 2001:db8:0012:3400:0000:c000:0212:0034 1178 Example 2 - BR: 1180 Another example can be made of a MAP-T BR, 1181 configured with the following FMR when receiving a packet 1182 with the following characteristics: 1184 IPv4 source address: 1.2.3.4 (0x01020304) 1185 TCP source port: 80 1186 IPv4 destination address: 192.0.2.18 (0xc0000212) 1187 TCP destination port: 1232 1189 Configured Forwarding Mapping Rule: {2001:db8::/40 1190 (Rule IPv6 prefix), 192.0.2.0/24 (Rule IPv4 prefix), 1191 16 (Rule EA-bits length)} 1193 MAP-T BR Prefix (DMR) 2001:db8:ffff::/64 1195 The above information allows the BR to derive as follows 1196 the mapped destination IPv6 address for the corresponding 1197 MAP-T CE, and also the source IPv6 address for 1198 the mapped IPv4 source address. 1200 IPv4 suffix bits (p) 32 - 24 = 8 (18 (0x12)) 1201 PSID length: 8 1202 PSID: 0x34 (1232) 1204 The resulting IPv6 packet will have the following header fields: 1206 IPv6 source address 2001:db8:ffff:0:0001:0203:0400:: 1207 IPv6 destination address: 2001:db8:0012:3400:0000:c000:0212:0034 1208 TCP source Port: 80 1209 TCP destination Port: 1232 1211 Example 3- FMR: 1213 An IPv4 host behind a MAP-T CE (configured as per the previous 1214 examples) corresponding with an IPv4 host 1.2.3.4 will have its 1215 packets converted into IPv6 using the DMR configured on the MAP-T 1216 CE as follows: 1218 Default Mapping Rule used by MAP-T CE: {2001:db8:ffff::/64 1219 (Rule IPv6 prefix), 0.0.0.0/0 (Rule IPv4 prefix), null (BR IPv4 1220 address)} 1222 IPv4 source address (post NAT44 if present) 192.0.2.18 1223 IPv4 destination address: 1.2.3.4 1224 IPv4 source port (post NAT44 if present): 1232 1225 IPv4 destination port: 80 1226 IPv6 source address of MAP-T CE: 1227 2001:db8:0012:3400:0000:c000:0212:0034 1228 IPv6 destination address: 2001:db8:ffff:0:0001:0203:0400:: 1230 Example 4 - Rule with no embedded address bits and no address sharing 1232 End-user IPv6 prefix: 2001:db8:0012:3400::/56 1233 Basic Mapping Rule: {2001:db8:0012:3400::/56 (Rule IPv6 prefix), 1234 192.0.2.1/32 (Rule IPv4 prefix), 0 (Rule EA-bits length)} 1235 PSID length: 0 (Sharing ratio is 1) 1236 PSID offset: n/a 1238 A MAP node can via the BMR or equivalent FMR, determine 1239 the IPv4 address and port-set as shown below: 1241 EA bits offset: 0 1242 IPv4 suffix bits (p) Length of IPv4 address - IPv4 prefix 1243 length = 32 - 32 = 0 1244 IPv4 address 192.0.2.1 (0xc0000201) 1245 PSID start: 0 1246 PSID length: 0 1247 PSID: null 1249 The BMR information allows a MAP CE also to determine (complete) 1250 its full IPv6 address by combining the IPv6 prefix with the MAP 1251 interface identifier (that embeds the IPv4 address). 1253 IPv6 address of MAP CE: 2001:db8:0012:3400:0000:c000:0201:0000 1255 Example 5 - Rule with no embedded address bits and address sharing 1256 (sharing ratio 256) 1258 End-user IPv6 prefix: 2001:db8:0012:3400::/56 1259 Basic Mapping Rule: {2001:db8:0012:3400::/56 (Rule IPv6 prefix), 1260 192.0.2.1/32 (Rule IPv4 prefix), 0 (Rule EA-bits length)} 1261 PSID length: (16 - (32 - 24)) = 8. (Provisioned with DHCPv6. 1262 Sharing ratio of 256.). 1263 PSID offset: 6 (default) 1264 PSID: 0x20 (Provisioned with DHCPv6) 1266 A MAP node can via the BMR determine the IPv4 address and port-set 1267 as shown below: 1269 EA bits offset: 0 1270 IPv4 suffix bits (p): Length of IPv4 address - IPv4 prefix 1271 length = 32 -32 = 0 1272 IPv4 address 192.0.2.1 (0xc0000201) 1273 PSID start: 0 1274 PSID length: 8 1275 PSID: 0x20 1277 Available ports (63 ranges) : 1536-1551, 2560-2575, ...... , 1278 64000-64015, 65024-65039 1280 The BMR information allows a MAP CE also to determine (complete) 1281 its full IPv6 address by combining the IPv6 prefix with the MAP 1282 interface identifier (that embeds the IPv4 address and PSID). 1284 IPv6 address of MAP CE: 2001:db8:0012:3400:0000:c000:0212:0034 1286 Note that the IPv4 address and PSID is not derived from the IPv6 1287 prefix assigned to the CE, but provisioned separately using for 1288 example MAP options in DHCPv6. 1290 Appendix B. Port mapping algorithm 1292 The driving principles and the mathematical expression of the mapping 1293 algorithm used by MAP can be found in Appendix B of 1294 [I-D.ietf-softwire-map] 1296 Authors' Addresses 1298 Xing Li 1299 CERNET Center/Tsinghua University 1300 Room 225, Main Building, Tsinghua University 1301 Beijing 100084 1302 CN 1304 Email: xing@cernet.edu.cn 1306 Congxiao Bao 1307 CERNET Center/Tsinghua University 1308 Room 225, Main Building, Tsinghua University 1309 Beijing 100084 1310 CN 1312 Email: congxiao@cernet.edu.cn 1314 Wojciech Dec (editor) 1315 Cisco Systems 1316 Haarlerbergpark Haarlerbergweg 13-19 1317 Amsterdam, NOORD-HOLLAND 1101 CH 1318 Netherlands 1320 Phone: 1321 Email: wdec@cisco.com 1323 Ole Troan 1324 Cisco Systems 1325 Oslo 1326 Norway 1328 Email: ot@cisco.com 1330 Satoru Matsushima 1331 SoftBank Telecom 1332 1-9-1 Higashi-Shinbashi, Munato-ku 1333 Tokyo 1334 Japan 1336 Email: satoru.matsushima@tm.softbank.co.jp 1337 Tetsuya Murakami 1338 IP Infusion 1339 1188 East Arques Avenue 1340 Sunnyvale 1341 USA 1343 Email: tetsuya@ipinfusion.com