idnits 2.17.1 draft-mdt-softwire-mapping-address-and-port-01.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 1 instance 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 == Line 87 has weird spacing: '...ference and...' == Line 1154 has weird spacing: '...ference and r...' -- The document date (October 31, 2011) is 4560 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'RFC 3041' is mentioned on line 916, but not defined ** Obsolete undefined reference: RFC 3041 (Obsoleted by RFC 4941) == Missing Reference: 'RFC4941' is mentioned on line 1085, but not defined ** Obsolete undefined reference: RFC 4941 (Obsoleted by RFC 8981) == Unused Reference: 'I-D.mdt-softwire-map-dhcp-option' is defined on line 704, but no explicit reference was found in the text == Unused Reference: 'RFC2766' is defined on line 835, but no explicit reference was found in the text == Outdated reference: A later version (-03) exists of draft-mdt-softwire-map-dhcp-option-00 ** Obsolete normative reference: RFC 5342 (Obsoleted by RFC 7042) ** Downref: Normative reference to an Experimental RFC: RFC 6346 == Outdated reference: A later version (-06) exists of draft-despres-softwire-4rd-u-01 == Outdated reference: A later version (-02) exists of draft-despres-softwire-stateless-analysis-tool-00 == Outdated reference: A later version (-08) exists of draft-xli-behave-divi-04 -- Obsolete informational reference (is this intentional?): RFC 1933 (Obsoleted by RFC 2893) -- Obsolete informational reference (is this intentional?): RFC 2766 (Obsoleted by RFC 4966) Summary: 4 errors (**), 0 flaws (~~), 12 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group O. Troan, Ed. 3 Internet-Draft cisco 4 Intended status: Standards Track October 31, 2011 5 Expires: May 3, 2012 7 Mapping of Address and Port (MAP) 8 draft-mdt-softwire-mapping-address-and-port-01 10 Abstract 12 This document describes a generic mechanism for mapping between an 13 IPv4 prefix, address or parts thereof, and transport layer ports and 14 an IPv6 prefix or address. 16 Status of this Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at http://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on May 3, 2012. 33 Copyright Notice 35 Copyright (c) 2011 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (http://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 51 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 6 52 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 7 53 4. Mapping Rules . . . . . . . . . . . . . . . . . . . . . . . . 9 54 4.1. Port mapping algorithm . . . . . . . . . . . . . . . . . . 10 55 4.1.1. Bit Representation of the Algorithm . . . . . . . . . 11 56 4.1.2. GMA examples . . . . . . . . . . . . . . . . . . . . . 11 57 4.1.3. GMA Provisioning Considerations . . . . . . . . . . . 12 58 4.1.4. Features of the Algorithm . . . . . . . . . . . . . . 12 59 4.2. Basic mapping rule (BMR) . . . . . . . . . . . . . . . . . 13 60 4.3. Forwarding mapping rule (FMR) . . . . . . . . . . . . . . 15 61 4.4. Default mapping rule (DMR) . . . . . . . . . . . . . . . . 16 62 5. Use of the IPv6 Interface identifier . . . . . . . . . . . . . 18 63 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 64 7. Security Considerations . . . . . . . . . . . . . . . . . . . 21 65 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 22 66 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 23 67 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 24 68 10.1. Normative References . . . . . . . . . . . . . . . . . . . 24 69 10.2. Informative References . . . . . . . . . . . . . . . . . . 24 70 Appendix A. Open issues / New features . . . . . . . . . . . . . 28 71 A.1. Max PSID . . . . . . . . . . . . . . . . . . . . . . . . . 28 72 A.2. Interface identifier - V octet and Checksum neutrality . . 28 73 A.3. Optional BR per Rule within a domain . . . . . . . . . . . 29 74 Appendix B. Requirements . . . . . . . . . . . . . . . . . . . . 30 75 Appendix C. Deployment considerations . . . . . . . . . . . . . . 32 76 C.1. Flexible Assigment of Port Sets . . . . . . . . . . . . . 32 77 C.2. Traffic Classification . . . . . . . . . . . . . . . . . . 32 78 C.3. Prefix Delegation Deployment . . . . . . . . . . . . . . . 32 79 C.4. Coexisting Deployment . . . . . . . . . . . . . . . . . . 32 80 C.5. Friendly to Network Provisioning . . . . . . . . . . . . . 33 81 C.6. Enable privacy addresses . . . . . . . . . . . . . . . . . 33 82 C.7. Facilitating 4v6 Service . . . . . . . . . . . . . . . . . 33 83 C.8. Independency with IPv6 Routing Planning . . . . . . . . . 33 84 C.9. Optimized Routing Path . . . . . . . . . . . . . . . . . . 33 85 Appendix D. Guidelines for Operators . . . . . . . . . . . . . . 34 86 D.1. Additional terms . . . . . . . . . . . . . . . . . . . . . 34 87 D.2. Understanding address formats: their difference and 88 relevance . . . . . . . . . . . . . . . . . . . . . . . . 34 89 D.3. Residual deployment with MAP . . . . . . . . . . . . . . . 38 90 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 42 92 1. Introduction 94 The mechanism of mapping IPv4 addresses in IPv6 address has been 95 described in numerous mechanisms dating back to [RFC1933] from 1996. 96 The Automatic tunneling mechanism described in RFC1933, assigned a 97 globally unique IPv6 address to a host by combining the hosts IPv4 98 address with a well known IPv6 prefix. Given an IPv6 packet with an 99 destination address with an embedded IPv4 address, a node could 100 automatically tunnel this packet by extracting the IPv4 tunnel end- 101 point address from the IPv6 destination address. 103 There are numerous variations of this idea, described in 6over4 104 [RFC2529], ISATAP [RFC5214] and 6rd [RFC5969]. The differences are 105 the use of well known IPv6 prefixes, or Service Provider assigned 106 IPv6 prefixes, and the exact position of the IPv4 bits embedded in 107 the IPv6 address. Teredo [RFC4380] added a twist to this to achieve 108 NAT traversal by also encoding transport layer ports into the IPv6 109 address. 6rd to achieve more efficient encoding, allowed for only an 110 IPv4 address suffix to be embedded, with the IPv4 prefix being 111 deducted from other provisioning mechanisms. 113 NAT-PT [RFC2766](deprecated) combined with a DNS ALG used address 114 mapping to put NAT state, namely the IPv6 to IPv4 binding encoded in 115 an IPv6 address. This characteristic has been inherited by NAT64 116 [RFC6146] and DNS64 [RFC6147] which rely on an address format defined 117 in [RFC6052]. [RFC6052] specifies the algorithmic translation of an 118 IPv6 address to IPv4 address suffix to be embedded, with the deducted 119 from other provisioning mechanisms. DNS ALG used address IPv4 120 binding encoded in it a corresponding IPv4 address, and vice versa. 121 In particular, [RFC6052] specifies the address format to build IPv4- 122 converted and IPv4-translatable IPv6 addresses. RFC6052 discusses 123 the transport of the port set information in an IPv4-embedded IPv6 124 address but the conclusion was the following (excerpt from 125 [RFC6052]): 127 "There have been proposals to complement stateless translation with a 128 port range feature. Instead of mapping an IPv4 address to exactly 129 one IPv6 prefix, the options would allow several IPv6 nodes to share 130 an IPv4 address, with each node managing a different set of ports. 131 If a port set extension is needed, could be defined later, using bits 132 currently reserved as null in the suffix." 134 The commonalities of all these mechanisms are: 136 o Provisions an IPv6 address for a host or an IPv6 prefix for a site 138 o Algorithmic or implicit address resolution for tunneling or 139 encapsulation. Given an IPv6 destination address, an IPv4 tunnel 140 endpoint address can be calculated. Likewise for translation, an 141 IPv4 address can be calculated from an IPv6 destination address 142 and vice versa. 144 o Embedding of an IPv4 address or part thereof and optionally 145 transport layer ports into an IPv6 address. 147 In the later phases of IPv4 to IPv6 migration, IPv6 only networks 148 will be common, while there will still be a need for residual IPv4 149 deployment. This document describes a more generic mapping of IPv4 150 to IPv6 that can be used both for encapsulation (IPv4 over IPv6) and 151 for translation between the two protocols. 153 Just as the IPv6 over IPv4 mechanisms refereed to above, the residual 154 IPv4 over IPv6 mechanisms must be capable of: 156 o Provisioning an IPv4 prefix, an IPv4 address or a shared IPv4 157 address. 159 o Algorithmically map between an IPv4 prefix, IPv4 address or a 160 shared IPv4 address and an IPv6 address. 162 The unified mapping scheme described here supports translation mode, 163 encapsulation mode, in both mesh and hub and spoke topologies. 165 This document describes delivery of IPv4 unicast service across an 166 IPv6 infrastructure. IPv4 multicast is not considered further in 167 this document. 169 Other work that has motivated the work on a unified mapping mechanism 170 for translation and encapsulation are: 171 [I-D.sun-softwire-stateless-4over6] 172 [I-D.murakami-softwire-4v6-translation] 173 [I-D.despres-softwire-4rd-addmapping] 174 [I-D.chen-softwire-4v6-add-format] [I-D.bcx-address-fmt-extension] 175 [I-D.mrugalski-dhc-dhcpv6-4rd] 176 [I-D.boucadair-dhcpv6-shared-address-option] 177 [I-D.despres-softwire-sam] [I-D.chen-softwire-4v6-pd] 178 [I-D.boucadair-softwire-stateless-requirements] 179 [I-D.dec-stateless-4v6] [I-D.boucadair-behave-ipv6-portrange] 180 [I-D.bsd-softwire-stateless-port-index-analysis] 181 [I-D.despres-softwire-stateless-analysis-tool] 182 [I-D.xli-behave-divi-pd] [I-D.murakami-softwire-4rd]. 184 In particular the architecture of a shared IPv4 address by 185 distributing the port space is described in [RFC6346]. The 186 corresponding stateful solution DS-lite is described in [RFC6333] 187 Outstanding issues, Requirements and deployment considerations are 188 temporarily kept in Appendix A to D. The appendixes are in no way to 189 be considered normative. 191 2. Conventions 193 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 194 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 195 document are to be interpreted as described in RFC 2119 [RFC2119]. 197 3. Terminology 199 MAP domain: A set of MAP CEs and BRs connected to the same 200 virtual link. A service provider may deploy a 201 single MAP domain, or may utilize multiple MAP 202 domains. 204 MAP Rule A set of parameters describing the mapping 205 between an IPv4 prefix, IPv4 address or shared 206 IPv4 address and an IPv6 prefix or address. 207 Each MAP node in the domain has the same set of 208 rules. 210 MAP Border Relay (BR): A MAP enabled router managed by the service 211 provider at the edge of a MAP domain. A Border 212 Relay router has at least an IPv6-enabled 213 interface and an IPv4 interface connected to 214 the native IPv4 network. A MAP BR may also be 215 referred to simply as a "BR" within the context 216 of MAP. 218 MAP Customer Edge (CE): A device functioning as a Customer Edge 219 router in a MAP deployment. In a residential 220 broadband deployment, this type of device is 221 sometimes referred to as a "Residential 222 Gateway" (RG) or "Customer Premises Equipment" 223 (CPE). A typical MAP CE adopting MAP rules 224 will serve a residential site with one WAN side 225 interface, one or more LAN side interfaces. A 226 MAP CE may also be referred to simply as a "CE" 227 within the context of MAP. 229 Shared IPv4 address: An IPv4 address that is shared among multiple 230 CEs. Each node has a separate part of the 231 transport layer port space; denoted as a port 232 set. Only ports that belong to the assigned 233 port set can be used for communication. 235 End-user IPv6 prefix: The IPv6 prefix assigned to an End-user CE by 236 other means than MAP itself. 238 MAP IPv6 address: The IPv6 address used to reach the MAP function 239 of a CE from other CE's and from BR's. 241 Port-set ID (PSID): Algorithmically identifies a set of ports 242 exclusively assigned to the CE. 244 Rule IPv6 prefix: An IPv6 prefix assigned by a Service Provider 245 for a mapping rule. 247 Rule IPv4 prefix: An IPv4 prefix assigned by a Service Provider 248 for a mapping rule. 250 IPv4 Embedded Address (EA) bits: The IPv4 EA-bits in the IPv6 251 address identify an IPv4 prefix/address (or 252 part thereof) or a shared IPv4 address (or part 253 thereof and a port set identifier. 255 4. Mapping Rules 257 A MAP node is provisioned with one or more mapping rules. 259 Mapping rules are used differently depending on their function. 260 Every MAP node must be provisioned with a Basic mapping rule. This 261 is used by the node to map from an End-user IPv6 prefix to an IPv4 262 prefix, address or shared IPv4 address. This same basic rule can 263 also be used for forwarding, where an IPv4 destination address and 264 optionally a destination port is mapped into an IPv6 address or 265 prefix. Additional mapping rules can be specified to allow for e.g. 266 multiple different IPv4 subnets to exist within the domain. 267 Additional mapping rules are recognized by having a Rule IPv6 prefix 268 different from the base End-user IPv6 prefix. 270 Traffic outside of the domain (IPv4 address not matching (using 271 longest matching prefix) any Rule IPv4 prefix in the Rules database) 272 will be forward using the Default Rule. The Default Rule maps 273 outside destinations to the BR's IPv6 address. 275 There are three types of mapping rules: 277 1. Basic Mapping Rule - used for IPv4 prefix, address or port set 278 assignment. There can only be one Basic Mapping Rule per End- 279 user IPv6 prefix. 281 * Rule IPv6 prefix (including prefix length) 283 * Rule IPv4 prefix (including prefix length) 285 * Rule EA-bits length (in bits) 287 * Rule Port Parameters (optional) 289 2. Forwarding Mapping Rule - used for forwarding. The Basic Mapping 290 Rule is also a Forwarding Mapping Rule. Each Forwarding Mapping 291 Rule will result in a route in a conceptual RIB for the Rule IPv4 292 prefix. 294 * Rule IPv6 prefix (including prefix length) 296 * Rule IPv4 prefix (including prefix length) 298 * Rule EA-bits length (in bits) 300 * Rule Port Parameters (optional) 302 3. Default Mapping Rule - used for destinations outside the MAP 303 domain. A 0.0.0.0/0 route is installed in the RIB for this rule. 305 * Rule IPv6 prefix (including prefix length) 307 * Rule BR IPv4 address 309 A MAP node finds its Basic Mapping Rule by doing a longest match 310 between the End-user IPv6 prefix and the Rule IPv6 prefix in the 311 Mapping Rule database. The rule is then used for IPv4 prefix, 312 address or shared address assignment. 314 Routes in the conceptual RIB are installed for all the Forwarding 315 Mapping Rules and an IPv4 default route for the Default Mapping Rule. 317 In the hub and spoke mode, all traffic should be forwarded using the 318 Default Mapping Rule. 320 4.1. Port mapping algorithm 322 Several port mapping algorithms have been proposed with their own set 323 of advantages and disadvantages. Since different PSID MUST have non- 324 overlapping port sets, the two extreme cases are: (1) the port number 325 is not contiguous for each PSID, but uniformly distributed across the 326 whole port range (0-65535); (2) the port number is contiguous in a 327 single range for each PSID. The port mapping algorithm proposed here 328 is called generalized modulus algorithm (GMA) and supports both these 329 cases. 331 For a given sharing ratio (R) and the maximum number of contiguous 332 ports (M), the GMA algorithm is defined as: 334 1. The port number (P) of a given PSID (K) is composed of: 336 P = R * M * j + M * K + i 338 Where: 340 * PSID: K = 0 to R - 1 342 * Port range index: j = (1024 / M) / R to ((65536 / M) / R) - 1, 343 if the well-known port numbers (0 - 1024) are excluded. 345 * Contiguous Port index: i = 0 to M - 1 347 2. The PSID (K) of a given port number (P) is determined by: 349 K = (floor(P/M)) % R 350 Where: 352 * % is the modulus operator 354 * floor(arg) is a function that returns the largest integer not 355 greater than arg 357 4.1.1. Bit Representation of the Algorithm 359 Given a sharing ratio (R=2^k), the maximum number of contiguous ports 360 (M=2^m), for any PSID (K) and available ports (P) can be represented 361 as: 363 0 8 15 364 +---------------+----------+------+-------------------+ 365 | P | 366 ----------------+-----------------+-------------------+ 367 | A (j) | PSID (K) | M (i) | 368 +---------------+----------+------+-------------------+ 369 |<----a bits--->|<-----k bits---->|<------m bits----->| 370 |k-c |<--c bits-->|<------m bits----->| 372 Figure 1: Bit representation 374 Where j and i are the same indexes defined in the port mapping 375 algorithm. 377 For any port number, the PSID can be obtained by bit mask operation. 379 Note that in above figure there is a PSID prefix length (c). Based 380 on this definition, PSID can also be represented in "CIDR style" and 381 more ports can be assigned to a single CE when PSID prefix length (c 382 < k). 384 When m = 0, GMA becomes a modulo operation. When a = 0, GMA becomes 385 division operation. The port mapping algorithm in 386 [I-D.despres-softwire-4rd-addmapping] can be represented by the 387 algorithm usng a=4 and each PSID may have different prefix length c). 389 4.1.2. GMA examples 390 For example, for R=128, M=4, 392 Port set-1 Port set-2 393 PSID=0 | 1024, 1025, 1026, 1027, | 1536, 1537, 1538, 1539, | 2048 394 PSID=1 | 1028, 1029, 1030, 1031, | 1540, 1541, 1542, 1543, | .... 395 PSID=2 | 1032, 1033, 1034, 1035, | 1544, 1545, 1546, 1547, | .... 396 PSID=3 | 1036, 1037, 1038, 1039, | 1548, 1549, 1550, 1551, | .... 397 ... 398 PSID=127 | 1532, 1533, 1534, 1535, | 2044, 2045, 2046, 2047, | .... 400 Figure 2: Example 402 4.1.3. GMA Provisioning Considerations 404 The sharing ratio (R), the PSID (K) and the PSID length are derived 405 from existing information. 407 The number of offset bits (A) and excluded ports are optionally 408 provisioned via the "Rule Port Mapping Parameters" in the Basic 409 Mapping Rule. 411 The defaults are: 413 o Excluded ports : 0-1023 415 o Offset bits (A) : 6 417 The defaults of Offset bits (A), which determines excluded ports, 418 remains to be chosen. At least if MAP and native-IPv6 prefixes are 419 the same, two values are considered: 6 and 4. With offset=6, there 420 are 1024 excluded ports, but the maximum sharing ratio is less than 421 the requirement of R-4 (1024). With offset=4, compliance with R-4 is 422 ensured, but there are 4096 excluded ports, which reduces by 4.8% the 423 number of non-well-known ports that can be unused 4096-1024)/ 424 (65536-1024). Comparative merits of R-4 compliance and full 425 optimization of port-set sizes remain to be evaluated. If MAP and 426 native-IPv6 prefixes are different, having a different default, e.g. 427 offset=0 has also been proposed. 429 4.1.4. Features of the Algorithm 431 The GMA algorithm has the following features: 433 1. There is no waste of the port numbers, except the well-known 434 ports. 436 2. The algorithm is flexible, the control parameters are sharing 437 ratio (R), the continue port range (M) and PSID prefix length 438 (c). 440 3. The algorithm is simple to perform effectively. 442 4. It allows Service Providers to define their own address sharing 443 ratio, the theoretical value is from 1:1 to 1:65536 and a more 444 practical value is from 1:1 to 1:4096. 446 5. It supports deployments using differentiated port ranges. 448 6. It could support differentiated port ranges within a single 449 shared IPv4 address, depending on the IPv6 format chosen (see 450 Appendix A). 452 7. It support excluding the well known ports 0-1023. 454 8. It supports assigning well known ports to a CE. 456 9. It supports legacy RTP/RTCP compatibility. 458 4.2. Basic mapping rule (BMR) 460 | n bits | o bits | m bits | 128-n-o-m bits | 461 +--------------------+-----------+---------+------------+----------+ 462 | Domain IPv6 prefix | EA bits |subnet ID| interface ID | 463 +--------------------+-----------+---------+-----------------------+ 464 |<--- End-user IPv6 prefix --->| 466 Figure 3: IPv6 address format 468 The Embedded Address bits (EA bits) are unique per end user within a 469 Domain IPv6 prefix. The Domain IPv6 prefix is the part of the End- 470 user IPv6 prefix that is common among all CEs using the same Basic 471 Mapping Rule within the MAP domain. There MUST be a Basic Mapping 472 Rule with a Rule IPv6 prefix equal to the Domain IPv6 prefix. The EA 473 bits encode the CE specific IPv4 address and port information. The 474 EA bits can contain a full or part of an IPv4 prefix or address, and 475 in the shared IPv4 address case contains a Port Set Identifier 476 (PSID). 478 Shared IPv4 address: 480 | r bits | p bits | | q bits | 481 +-------------+---------------------+ +------------+ 482 | Domain IPv4 | IPv4 Address suffix | |Port Set ID | 483 +-------------+---------------------+ +------------+ 484 | 32 bits | 486 Figure 4 488 Complete IPv4 address: 490 | r bits | p bits | 491 +-------------+---------------------+ 492 | Domain IPv4 | IPv4 Address suffix | 493 +-------------+---------------------+ 494 | 32 bits | 496 Figure 5 498 IPv4 prefix: 500 | r bits | p bits | 501 +-------------+---------------------+ 502 | Domain IPv4 | IPv4 Address suffix | 503 +-------------+---------------------+ 504 | < 32 bits | 506 Figure 6 508 If only a part of the IPv4 address/prefix is encoded in the EA bits, 509 the Domain IPv4 prefix is provisioned to the CE by other means (e.g. 510 a DHCPv6 option). To create a complete IPv4 address (or prefix), the 511 IPv4 address suffix from the EA bits, are concatenated with the 512 Domain IPv4 prefix (r bits). 514 The offset of the EA bits field in the IPv6 address is equal to the 515 BMR Rule IPv6 prefix length. The length of the EA bits field (o) is 516 given in the Rule EA-bits length parameter. 518 If o + r < 32, then an IPv4 prefix is assigned. The IPv4 prefix 519 length is equal to r bits + Rule EA-bits length. 521 If o + r is equal to 32, then a full IPv4 address is to be assigned. 522 The address is created by concatenating the Domain IPv4 prefix and 523 the EA-bits. 525 If o + r is > 32, then a shared IPv4 address is to be assigned. The 526 number of IPv4 address bits (p) in the EA bits is given by 32 - r 527 bits. The PSID bits are used to create a port set. The length of 528 the PSID bit field within EA bits is: o - p. 530 | Port range (16 bits) | 531 +---------------+----------+------+-------------------+ 532 | P | 533 ----------------+-----------------+-------------------+ 534 | A (j) | PSID (K) | M (i) | 535 +---------------+----------+------+-------------------+ 536 |<----a bits--->|<-----k bits---->|<------m bits----->| 537 |<---c bits--->|<-----(k+m-c) bits--->| 539 Figure 7 541 Example: 543 Given: 544 End-user IPv6 prefix: 2001:db8:0012:34::/56 545 Domain IPv6 prefix: 2001:db8:00::/40 546 IPv4 prefix: 192.0.2.0/24 547 Basic Mapping Rule: {2001:db8:00::/40, 192.0.2.0/24, 256, 6} 549 We get IPv4 address and port set: 550 EA bits offset: 40 551 IPv4 suffix bits (p): 32 - 24 = 8 552 IPv4 address: 192.0.2.18 554 PSID start: 40 + p = 40 + 8 = 48 555 PSID length: o - p = log2(256) - 8 = 8. 556 PSID: 0x34. 558 4.3. Forwarding mapping rule (FMR) 560 On adding a FMR rule an IPv4 route is installed the RIB (conceptual) 561 for the Rule IPv4 prefix. 563 On forwarding an IPv4 packet a lookup is done in the RIB and the 564 correct FMR is used. 566 | 32 bits | | 16 bits | 567 +--------------------------+ +-------------------+ 568 | IPv4 destination address | | IPv4 dest port | 569 +--------------------------+ +-------------------+ 570 : : ___/ : 571 | p bits | / q bits : 572 +----------+ +------------+ 573 |IPv4 sufx| |Port Set ID | 574 +----------+ +------------+ 575 \ / ____/ ________/ 576 \ : __/ _____/ 577 \ : / / 578 | n bits | o bits | m bits | 128-n-o-m bits | 579 +--------------------+-----------+---------+------------+----------+ 580 | Domain IPv6 prefix | EA bits |subnet ID| interface ID | 581 +--------------------+-----------+---------+-----------------------+ 582 |<--- End-user IPv6 prefix --->| 584 Figure 8 586 The subnet ID for MAP is defined to be ~0. I.e. the last subnet in 587 an End-user IPv6 prefix allocation is used for MAP. A MAP node MUST 588 reserve the topmost IPv6 prefix in a End-user IPv6 prefix for the 589 purpose of MAP. This prefix MUST NOT be used for native IPv6 590 traffic. 592 Example: 594 Given: 595 IPv4 destination address: 192.0.2.18 596 IPv4 destination port: 1232 597 Forwarding Mapping Rule: {2001:db8:00::/40, 192.0.2.0/24, 598 Sharing ratio: 256, PSID offset: 6} 600 We get IPv6 address: 601 IPv4 suffix bits (p): 32 - 24 = 8 (18) 602 PSID length: 8 (sharing ratio) 603 PSID: 0x34 (1232) 604 EA bits: 0x1234 605 IPv6 address: 2001:db8:0012:34FF: 607 4.4. Default mapping rule (DMR) 609 The Default Mapping rule is used to reach IPv4 destinations outside 610 of the MAP domain. Traffic using this rule will be sent from a CE to 611 a BR. 613 The Rule IPv4 prefix in the DMR is: 0.0.0.0/0. The Rule IPv6 prefix 614 is the IPv6 address or prefix of the BR. Which is used is dependent 615 on the mode used. For example translation requires that the IPv4 616 destination address is encoded in the BR IPv6 address, so only a 617 prefix is used in the DMR to allow for a generated interface 618 identifier. For the encapsulation mode the Rule IPv6 prefix can be 619 the full IPv6 address of the BR. 621 An example of a DMR is: 623 Default Mapping Rule: {2001:db8:0001:0000::/128, 624 0.0.0.0/0, BR IPv4 address: 192.0.2.1, } 626 In most implementations of a RIB, the next-hop address must be of the 627 same address family as the prefix. To satisfy this requirement a BR 628 IPv4 address is included in the rule. Giving a default route in the 629 RIB: 631 0.0.0.0 -> 192.0.2.1, MAP-Interface0 633 5. Use of the IPv6 Interface identifier 635 In an encapsulation solution, an IPv4 address and port is mapped to 636 an IPv6 address. This is the address of the tunnel end point of the 637 receiving MAP CE. For traffic outside the MAP domain, the IPv6 638 tunnel end point address is the IPv6 address of the BR. As long as 639 the interface-id is well known or provisioned and the same for all 640 MAP nodes, it can be any interface identifier. E.g. ::1. 642 When translating, the destination IPv4 address is translated into a 643 corresponding IPv6 address. In the case of traffic outside of the 644 MAP domain, it is translated to the BR's IPv6 prefix. For the BR to 645 be able to reverse the translation, the full destination IPv4 address 646 must be encoded in the IPv6 address. The same thing applies if an 647 IPv4 prefix is encoded in the IPv6 address, then the reverse 648 translator needs to know the full destination IPv4 address, which has 649 to be encoded in the interface-id. 651 There are multiple proposals for how to encode the IPv4 address, and 652 if also the destinatin port or PSID should also be included. A 653 couple of the proposals are shown in the figure below. 655 Note: The encoding of the full IPv4 address into the interface 656 identifier, both for the source and destination IPv6 addresses have 657 been shown to be useful for troubleshooting. The format finally 658 agreed upon here, will apply for both encapsulation and translation. 660 Existing IANA assigned format [RFC5342]: 662 | 32 bits | 32 bits | 663 +------------------+------------------+ 664 | 02-00-5E-FE | IPv4 address | 665 +------------------+------------------+ 667 Figure 9 669 Parsable format including the extended IPv4 prefix length (L) and 670 PSID: 672 <-8-><-------- L>=32 -------><48-L><8-> 673 +---+----------------+------+-----+---+ 674 | u | IPv4 address | PSID | 0 | L | 675 +---+----------------+------+-----+---+ 676 Figure 10 678 If the End-user IPv6 prefix length is larger than 64, the most 679 significant parts of the interface identifier is overwritten by the 680 prefix. 682 6. IANA Considerations 684 This specification does not require any IANA actions. 686 7. Security Considerations 688 There are no new security considerations pertaining to this document. 690 8. Contributors 692 The members of the MAP design team are: 694 Congxiao Bao, Mohamed Boucadair, Gang Chen, Maoke Chen, Wojciech 695 Dec, Xiaohong Deng, Remi Despres, Jouni Korhonen, Xing Li, Satoru 696 Matsushima, Tomasz Mrugalski, Tetsuya Murakami, Jacni Qin, Qiong 697 Sun, Tina Tsou, Dan Wing, Leaf Yeh and Jan Zorz. 699 9. Acknowledgements 700 10. References 702 10.1. Normative References 704 [I-D.mdt-softwire-map-dhcp-option] 705 Mrugalski, T., Boucadair, M., and O. Troan, "DHCPv6 706 Options for Mapping of Address and Port", 707 draft-mdt-softwire-map-dhcp-option-00 (work in progress), 708 October 2011. 710 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 711 Requirement Levels", BCP 14, RFC 2119, March 1997. 713 [RFC5342] Eastlake, D., "IANA Considerations and IETF Protocol Usage 714 for IEEE 802 Parameters", BCP 141, RFC 5342, 715 September 2008. 717 [RFC6346] Bush, R., "The Address plus Port (A+P) Approach to the 718 IPv4 Address Shortage", RFC 6346, August 2011. 720 10.2. Informative References 722 [I-D.bcx-address-fmt-extension] 723 Bao, C. and X. Li, "Extended IPv6 Addressing for Encoding 724 Port Range", draft-bcx-address-fmt-extension-02 (work in 725 progress), October 2011. 727 [I-D.boucadair-behave-ipv6-portrange] 728 Boucadair, M., Levis, P., Grimault, J., Villefranque, A., 729 Kassi-Lahlou, M., Bajko, G., Lee, Y., Melia, T., and O. 730 Vautrin, "Flexible IPv6 Migration Scenarios in the Context 731 of IPv4 Address Shortage", 732 draft-boucadair-behave-ipv6-portrange-04 (work in 733 progress), October 2009. 735 [I-D.boucadair-dhcpv6-shared-address-option] 736 Boucadair, M., Levis, P., Grimault, J., Savolainen, T., 737 and G. Bajko, "Dynamic Host Configuration Protocol 738 (DHCPv6) Options for Shared IP Addresses Solutions", 739 draft-boucadair-dhcpv6-shared-address-option-01 (work in 740 progress), December 2009. 742 [I-D.boucadair-softwire-stateless-requirements] 743 Boucadair, M., Bao, C., Skoberne, N., and X. Li, 744 "Requirements for Extending IPv6 Addressing with Port 745 Sets", draft-boucadair-softwire-stateless-requirements-00 746 (work in progress), September 2011. 748 [I-D.bsd-softwire-stateless-port-index-analysis] 749 Boucadair, M., Skoberne, N., and W. Dec, "Analysis of Port 750 Indexing Algorithms", 751 draft-bsd-softwire-stateless-port-index-analysis-00 (work 752 in progress), September 2011. 754 [I-D.chen-softwire-4v6-add-format] 755 Chen, G. and Z. Cao, "Design Principles of a Unified 756 Address Format for 4v6", 757 draft-chen-softwire-4v6-add-format-00 (work in progress), 758 October 2011. 760 [I-D.chen-softwire-4v6-pd] 761 Chen, G., Sun, T., and H. Deng, "Prefix Delegation in 762 4V6", draft-chen-softwire-4v6-pd-00 (work in progress), 763 August 2011. 765 [I-D.dec-stateless-4v6] 766 Dec, W., Asati, R., Bao, C., Deng, H., and M. Boucadair, 767 "Stateless 4Via6 Address Sharing", 768 draft-dec-stateless-4v6-04 (work in progress), 769 October 2011. 771 [I-D.despres-softwire-4rd-addmapping] 772 Despres, R., Qin, J., Perreault, S., and X. Deng, 773 "Stateless Address Mapping for IPv4 Residual Deployment 774 (4rd)", draft-despres-softwire-4rd-addmapping-01 (work in 775 progress), September 2011. 777 [I-D.despres-softwire-4rd-u] 778 Despres, R., "Unifying Double Translation and 779 Encapsulation for 4rd (4rd-U)", 780 draft-despres-softwire-4rd-u-01 (work in progress), 781 October 2011. 783 [I-D.despres-softwire-sam] 784 Despres, R., "Stateless Address Mapping (SAM) - a 785 Simplified Mesh-Softwire Model", 786 draft-despres-softwire-sam-01 (work in progress), 787 July 2010. 789 [I-D.despres-softwire-stateless-analysis-tool] 790 Despres, R., "Analysis of Stateless Solutions for IPv4 791 Service across IPv6 Networks - A synthetic Analysis Tool", 792 draft-despres-softwire-stateless-analysis-tool-00 (work in 793 progress), September 2011. 795 [I-D.mrugalski-dhc-dhcpv6-4rd] 796 Mrugalski, T., "DHCPv6 Options for IPv4 Residual 797 Deployment (4rd)", draft-mrugalski-dhc-dhcpv6-4rd-00 (work 798 in progress), July 2011. 800 [I-D.murakami-softwire-4rd] 801 Murakami, T., Troan, O., and S. Matsushima, "IPv4 Residual 802 Deployment on IPv6 infrastructure - protocol 803 specification", draft-murakami-softwire-4rd-01 (work in 804 progress), September 2011. 806 [I-D.murakami-softwire-4v6-translation] 807 Murakami, T., Chen, G., Deng, H., Dec, W., and S. 808 Matsushima, "4via6 Stateless Translation", 809 draft-murakami-softwire-4v6-translation-00 (work in 810 progress), July 2011. 812 [I-D.sun-softwire-stateless-4over6] 813 Sun, Q., Xie, C., Cui, Y., Wu, J., Wu, P., Zhou, C., and 814 Y. Lee, "Stateless 4over6 in access network", 815 draft-sun-softwire-stateless-4over6-00 (work in progress), 816 September 2011. 818 [I-D.xli-behave-divi] 819 Bao, C., Li, X., Zhai, Y., and W. Shang, "dIVI: Dual- 820 Stateless IPv4/IPv6 Translation", draft-xli-behave-divi-04 821 (work in progress), October 2011. 823 [I-D.xli-behave-divi-pd] 824 Li, X., Bao, C., Dec, W., Asati, R., Xie, C., and Q. Sun, 825 "dIVI-pd: Dual-Stateless IPv4/IPv6 Translation with Prefix 826 Delegation", draft-xli-behave-divi-pd-01 (work in 827 progress), September 2011. 829 [RFC1933] Gilligan, R. and E. Nordmark, "Transition Mechanisms for 830 IPv6 Hosts and Routers", RFC 1933, April 1996. 832 [RFC2529] Carpenter, B. and C. Jung, "Transmission of IPv6 over IPv4 833 Domains without Explicit Tunnels", RFC 2529, March 1999. 835 [RFC2766] Tsirtsis, G. and P. Srisuresh, "Network Address 836 Translation - Protocol Translation (NAT-PT)", RFC 2766, 837 February 2000. 839 [RFC3194] Durand, A. and C. Huitema, "The H-Density Ratio for 840 Address Assignment Efficiency An Update on the H ratio", 841 RFC 3194, November 2001. 843 [RFC4380] Huitema, C., "Teredo: Tunneling IPv6 over UDP through 844 Network Address Translations (NATs)", RFC 4380, 845 February 2006. 847 [RFC5214] Templin, F., Gleeson, T., and D. Thaler, "Intra-Site 848 Automatic Tunnel Addressing Protocol (ISATAP)", RFC 5214, 849 March 2008. 851 [RFC5969] Townsley, W. and O. Troan, "IPv6 Rapid Deployment on IPv4 852 Infrastructures (6rd) -- Protocol Specification", 853 RFC 5969, August 2010. 855 [RFC6052] Bao, C., Huitema, C., Bagnulo, M., Boucadair, M., and X. 856 Li, "IPv6 Addressing of IPv4/IPv6 Translators", RFC 6052, 857 October 2010. 859 [RFC6146] Bagnulo, M., Matthews, P., and I. van Beijnum, "Stateful 860 NAT64: Network Address and Protocol Translation from IPv6 861 Clients to IPv4 Servers", RFC 6146, April 2011. 863 [RFC6147] Bagnulo, M., Sullivan, A., Matthews, P., and I. van 864 Beijnum, "DNS64: DNS Extensions for Network Address 865 Translation from IPv6 Clients to IPv4 Servers", RFC 6147, 866 April 2011. 868 [RFC6333] Durand, A., Droms, R., Woodyatt, J., and Y. Lee, "Dual- 869 Stack Lite Broadband Deployments Following IPv4 870 Exhaustion", RFC 6333, August 2011. 872 Appendix A. Open issues / New features 874 A.1. Max PSID 876 It has been proposed to keep independence of IPv6 routing plans from 877 IPv4 considerations and yet to be able to support variable sized port 878 sets per shared IPv4 address. A mechanism proposed for this is 879 called "MAX PSID". The idea is that a source, transmitting a packet 880 to a CE doesn't need to know the length of the PSID field of that CE. 881 All port bits after offset bits are copied in the encoded IPv6 882 address. This implies that a MAP CE be capable of receiving MAP 883 traffic for multiple addresses within its delegated prefix, e.g. 884 using the same mechanism as used for double translation when CEs are 885 allocated IPv4 prefixes shorter than /32. 887 A.2. Interface identifier - V octet and Checksum neutrality 889 There are multiple issues related to the Interface-identifier 890 encoding. 892 o The V octet is required to distinguish between MAP and native IPv6 893 traffic if the same End-user IPv6 prefix is used. If a separate 894 End-user IPv6 prefix is used for MAP traffic, requiring a special 895 flag in the interface-identifier is not required. 897 o The Checksum-neutrality preserver (CNP). It is for MAP packets to 898 be acceptable by IPv6 functions that check UDP/TCP checksums, 899 without needing for this to consider transport-layer fields. 900 Checksum neutrality is useful for double translation and, possibly 901 more important, it permits to envisage a unified solution which 902 has significant advantages of both encapsulation and double 903 translation [I-D.despres-softwire-4rd-u]. With encapsulation, the 904 field can be set to 0. 906 With both mechanisms, IPv6 addresses have the following format: 908 |<--------------- 64 ------------><8><----- 40 ------><--16---> 909 +---------------------------------+-+----------------+--------+ 910 | Unformatted IPv6 prefix (part 1)|V| (part 2) |CNP or 0| 911 +---------------------------------+-+----------------+--------+ 913 The V octet deterministically differentiates MAP addresses from other 914 IPv6 addresses by having its bits 6 and 7 set to 1 and 1 (they are 1 915 and 0 in modified EUI-64 Interface-ID format, and bit 6 is 0 in the 916 privacy extension of [RFC 3041]. V is proposed to be 0x03 (which 917 leaves 2^6 values of bits 0 to 5 for other Interface ID formats that 918 could be useful in the future). 920 The Unformatted IPv6 prefix starts with bits derived from the IPv4 921 address being mapped (e.g. Rule IPv6 prefix, IPv4 suffix, and PSID, 922 or Max PSID if applicable). The remainder to reach 104 bits is 923 filled with 0s. 925 The CNP field is, in one's complement arithmetic, the sum of the two 926 halves of the IPv4 address, minus the sum of the seven 16-bit fields 927 that precede the CNP in the IPv6 address. 929 A.3. Optional BR per Rule within a domain 931 With BR IPv6 address/prefix as optional parameters in mapping rules, 932 it has been proposed to support ISP networks that have IPv4 prefixes 933 coming from several providers necessitating geographically dispersed 934 BRs. In such configurations, each provider exercises ingress 935 filtering so that a CE MUST sent its traffic going to the Internet 936 via the right BR (that whose locally routed IPv4 prefixes include one 937 that matches the IPv4 address or prefix of the CE) 938 [I-D.despres-softwire-4rd-addmapping]. 940 Appendix B. Requirements 942 This list of requirements for a stateless mapping of address and 943 ports solution may not be complete. The requirements are listed in 944 no particular order, and they may be conflicting. 946 R-1: To allow for a single user delegated IPv6 prefix to be used 947 for native IPv6 service and for MAP, the representation of an 948 IPv4 prefix, address or shared IPv4 address and PSID must be 949 efficient. As an example it must be possible to represent a 950 shared IPv4 address and PSID in 24 bits or less. (Given a 951 typical prefix assignment of /56 to the end-user and a MAP 952 IPv6 prefix of /32.) 954 R-2: The IPv6 address format and mapping must be flexible, and 955 support any placement of the embedded bits from IPv4 prefix/ 956 address and port set in the IPv6 address. 958 R-3: Algorithm complexity. The mapping from an IPv4 address and 959 port to an IPv6 address is done in the forwarding plane on MAP 960 nodes. It is important that the algorithm is bounded and as 961 efficient as possible. 963 R-4: MAP must allow service providers to define their own address 964 sharing ratio. MAP MUST NOT in particular restrict by design 965 the possible address sharing ratio; ideally 1:1 and 1:65536 966 should be supported. The mapping must at least support a 967 sharing ratio of 64, 1024 ports per end-user. 969 R-5: The mapping may support deployments using differentiated port- 970 sets. That is, end-users are assigned different sized port- 971 sets and direct communication between MAP CEs are permitted. 973 R-6: The mapping should support differentiated port sets within a 974 single shared IPv4 address. (i.e., be able to assign port sets 975 of different sizes to customers without requiring any per 976 customer state to be instantiated in network elements involved 977 in data transfer). 979 R-7: The MAP solution should support excluding the well known ports 980 0-1023. 982 R-8: It MUST be possible to assign well known ports to a CE. 984 R-9: There must not be any dependency between IPv6 addressing and 985 IPv4 addressing. With the exception where full IPv4 addresses 986 or prefixes are encoded. Then IPv6 prefix assignment must be 987 done so that martian IPv4 addresses are not assigned. 989 R-10: The mapping must not require IPv4 routing to be imported in 990 IPv6 routing. 992 R-11: The mapping should support legacy RTP/RTCP compatibility. 993 (Allocating two consecutive ports). 995 R-12: The mapping may be UPnP 1.0 friendly. A UPnP client will keep 996 asking for the next port (as in current port + 1) a scattered 997 port allocation will be more UPnP friendly. 999 R-13: For out of domain traffic the mapping must support embedding a 1000 full IPv4 address in the IPv6 interface identifier. This is 1001 required in the translation case. It also simplifies pretty 1002 printing and other operational tools. 1004 R-14: For Service Providers requiring to apply specific policies on 1005 per Address-Family (e.g., IPv4, IPv6), some provisioning tools 1006 (e.g., DHCPv6 option) may be required to derive in a 1007 deterministic way the IPv6 address to be used for the IPv4 1008 traffic based on the IPv6 prefix delegated to the home 1009 network. 1011 R-15: It should/must/may be possible to use the same IPv6 prefix 1012 (/64) for native IPv6 traffic and MAPed traffic. 1014 R-16: When only one single IPv6 prefix is assigned for both native 1015 IPv6 communications and the transport of IPv4 packets, the 1016 IPv4-translatable IPv6 prefix MUST have a length less than 1017 /64. When distinct prefixes are used, this requirement is 1018 relaxed. 1020 R-17: The same mapping must support both translation and 1021 encapsulation solutions. 1023 Appendix C. Deployment considerations 1025 C.1. Flexible Assigment of Port Sets 1027 Different classes of customers require port sets of different size. 1028 In the context of shared IPv4 addresses, some customers would be 1029 satisfied with an shared IPv4 addresses, while others may need to be 1030 assigned a single IPv4 address or delegated an IPv4 subnet. 1032 C.2. Traffic Classification 1034 Usually, ISPs adopt traffic classification to ensure service quality 1035 for different classes of customers. This feature is also helpful for 1036 customer behavior monitoring and security protection. For example, 1037 DIA (Dedicated Internet Access) has been provided by operators for 1038 corporations to cater for their Internet communications needs. 1039 Service is made by means of the edge router features and key systems, 1040 like ACL (Access List Control) to classify different traffic. Five 1041 tuples would be identified from IP header and UDP/TCP header. 1042 Currently, it is very well supported in IPv4. Vendors are delivering 1043 or committed to support that feature for IPv6. In order to 1044 facilitating IPv6 deployment, MAP solution should support this 1045 feature on IPv6 plane. 1047 C.3. Prefix Delegation Deployment 1049 Prefix delegation is an important feature both for broadband and 1050 mobile network. In mobile network, prefix delegation is introduced 1051 in 3GPP network in Release 10. The deployment of PD would be 1052 supported in 4v6 case. Variable length of IPv6 prefix is assigned to 1053 CPE for deriving IPv4 information. 1055 C.4. Coexisting Deployment 1057 4v6 solutions(i.e. encapsulation and translation) would not only 1058 coexist with each other, but also can harmonize with other deployment 1059 cases. Here lists some coexisting cases. (Note: more coexisting 1060 cases are expected to be investigated in future.) 1062 o Case 1: Coexisting between 4v6 encapsulation and 4v6 translation 1064 o Case 2: Coexisting between 4v6 translation and NAT64 (Single 1065 Translation) 1067 o Case 3: Coexisting between 4v6 solutions and SLAAC 1069 C.5. Friendly to Network Provisioning 1071 Network management plane normally has an ability to to identify 1072 different users and the compatible with the address assignment 1073 techniques in the domain. 4v6 would conform to current practices on 1074 management plane. In 3GPP network, for example, only the IPv6 prefix 1075 is assigned to the devices, used to identify different users. And 1076 management plane for one family address is better than two, namely 1077 the operating platform does not need to manage both IPv4 and IPv6. 1078 Since only IPv6 prefix is assigned, 4v6 on the management plane is 1079 naturally conducted only via IPv6. 1081 C.6. Enable privacy addresses 1083 User privacy should be taken into account when 4v6 solution is 1084 deployed. Some security concern associated with non-changing IPv6 1085 interface identifiers has been expressed in RFC4941[RFC4941]. 1086 Ability to change the interface identifier over time makes it more 1087 difficult for eavesdroppers and other information collectors to 1088 identify when different addresses used in different sessions actually 1089 correspond to the same node. 1091 C.7. Facilitating 4v6 Service 1093 Some ISPs may need to offer services in a 4v6 domain with a shared 1094 address, e.g. 4v6 node hosts FTP server. The service provisioning 1095 may require well-know port range(i.e. port range belong to 0-1023). 1096 MAP would provide operators with possibilities to generate a port 1097 range including the 0-1023. Afterwards, operators could decide to 1098 assign it to any requesting user. 1100 C.8. Independency with IPv6 Routing Planning 1102 The IPv6 routing is easier to plan if it's not impacted by the 1103 encoded IPv4 or port ID information. MAP would prohibit IPv4 routing 1104 imported in IPv6. 1106 C.9. Optimized Routing Path 1108 MAP could achieve optimized routing path both for hub case and mesh 1109 case. Traffic in hub and spoke case could follow asymmetric routing, 1110 in which incoming routes would not be binded to a given border point 1111 but others geographically closed to traffic initiators. In mesh 1112 cases, traffic between CPEs could directly communicate without going 1113 through remote border point. 1115 Appendix D. Guidelines for Operators 1117 This appendix is purposed to (1) clarify the difference and relevance 1118 of MAP address mapping format and what has published in standard 1119 track; (2) provide a referential guideline to operators, illustrating 1120 a common use-case of MAP deployment. 1122 D.1. Additional terms 1124 The following terms are listed, mainly used in this appendix only, as 1125 an add-on to the terminology of the main text. 1127 4pfx the index for an IPv4 prefix, either generated 1128 with coding or as same as the IPv4 prefix 1129 itslef. 1131 ug-octet the octet consisting of 64-71 bits in the IPv6 1132 address, containing the bits u and g defined by 1133 EUI-64 standard. 1135 Common prefix an aggregate decided by a domain for the MAP 1136 deployment. It is a subset of the operator's 1137 aggregates by its RIR or provider. 1139 IPv4 suffix the part of IPv4 address bits used for 1140 identifying CEs. 1142 Host suffix the IPv6 suffix assigning to an end system. 1143 NOTE: it doesn't mean this should be really 1144 configured on a certain interface of a host. 1146 MAP-format the address mapping format defined by this 1147 document. 1149 RFC6052-format the address mapping format defined by [RFC6052] 1150 and its succeeding extensions (or updates) for 1151 port-space sharing, for example, 1152 [I-D.xli-behave-divi]. 1154 D.2. Understanding address formats: their difference and relevance 1156 MAP introduces an address format of embedding IPv4 information to 1157 IPv6 address. On the other hand, we also have [RFC6052] defines an 1158 address format with the similar property. With extending port-set 1159 id, it can also support address sharing among different CEs 1160 [I-D.xli-behave-divi]. What are their difference and relevance? 1162 We present a common abstract format for them both, as is depicted in 1163 Figure 11. For the easy expression, we exclude the ug-octet, which 1164 is not concerned in this appendix. 1166 |<----- 120 bits (IPv6 address excluding ug-octet) --------->| 1167 +-------------+------+-------------+------+-----------//-----+ 1168 |Common Prefix| 4pfx | IPv4 suffix | PSID | Host Suffix | 1169 +-------------+------+-------------+------+-----------//-----+ 1171 Figure 11: Abstract view of MAP- and RFC6052-formats 1173 Only two parts in Figure 11 are different for MAP- and RFC6052- 1174 formats. We compare them in Figure 12 and following paragraphs. 1176 +----------------+--------------+------------+ 1177 | | MAP | RFC6052 | 1178 +----------------+--------------+------------+ 1179 | from IPv4 | coding with | same, w/o | 1180 | prefix to 4pfx | compression | change | 1181 +----------------+--------------+------------+ 1182 | Host | full v4.addr | padding to | 1183 | Suffix | or 4rd IID | zero | 1184 +----------------+--------------+------------+ 1186 Figure 12: Difference between MAP- and RFC6052-formats 1188 The comparison clarifies that the major role of full IPv4 address 1189 embedded in the RFC6052 format is replaced by the MAP's coded IPv4 1190 prefix index and the uncoded IPv4 suffix. The Figure 13 illustrates 1191 this relevance. 1193 (delegated prefix in RFC6052 format, w/o rule) 1194 +-------------+-------------+-------------+------+ 1195 |Common Prefix| full IPv4 address (32bit) | PSID | 1196 +-------------+-------------+-------------+------+ 1197 : : : : 1198 +-------------+-------------+ 1199 32 bits: | 4pfx | IPv4 suffix | : 1200 +-------------+-------------+ + 1201 : . . . 1202 : . . . 1203 : . . . 1204 +-----+-------------+ + 1205 m bits: |4pfx | IPv4 suffix | : (w/ rules) 1206 +-----+-------------+ 1207 : : : : 1208 +-------------+-----+-------------+------+ 1209 | Rule IPv6 Prefix | CE index | 1210 +-------------+-----+-------------+------+ 1211 (delegated prefix in MAP format) 1213 Figure 13: Relevance between MAP- and RFC6052-formats 1215 o Why is it needed to compress the IPv4 prefix? 1217 Precisely speaking, it is not "to compress the IPv4 prefix" but 1218 "to establish correspondence between IPv6 delegated prefixes and 1219 the residual IPv4 prefixes." 1221 It is important for an operator to understand what the MAP is 1222 designed for and where it could be applied. A keyword for MAP is 1223 "residual deployment", referring to the deployment of an IPv6 1224 network with utilizing the residual IPv4 address spaces for the 1225 subnets/host having IPv4 communication, without introducing per- 1226 session states. 1228 Therefore, the delegated CE prefixes are determined prior to 1229 finding a proper IPv4 address block in hand to be mapped to the CE 1230 index and the IPv4 prefix index (4pfx) as well as the Rule IPv6 1231 prefix. 1233 IPv6 delegation planning, independent of the IPv4 addressing, also 1234 implies to follow the common convention of assigning a /64 prefix 1235 to any IPv6 local network. It is highly impossible to directly 1236 match some IPv4 prefixes to the already-determined IPv6 prefixes, 1237 and therefore the prefixes have to be coded and typically it is a 1238 compression. 1240 If we have a short-enough Common Prefix, it is also possible to 1241 deploy a direct matching where 4pfx is equal to IPv4 prefix. Only 1242 in this case, the MAP-format is equivalent to the RFC6052-format 1243 and the rule set could be simplified to a unique rule for 1244 0.0.0.0/0. 1246 Once the unique rule for 0.0.0.0/0 is defined, the special rule 1247 for the out-of-domain traffic towards the BR is not needed any 1248 more. The route with the common prefix itself can play the role 1249 of less-specific routes for the whole IPv4 space. This is a 1250 feature of the RFC6052-format. 1252 o Why does MAP copy IPv4 address in the suffix? 1254 The full IPv4 address is copied in the Host suffix of MAP with two 1255 reasons. 1257 First of all, for the traffic going out of the domain, compress 1258 coding makes full IPv4 address information not directly appear in 1259 the IPv6 prefix for BR at all. To enable the double translation, 1260 it is had to embed this information in the Host Suffix of MAP- 1261 format for the peer IPv4 address outside of the domain. 1263 Further, it is not necessary to separate the processing for the 1264 in-domain addresses and that for the out-domain addresses. Making 1265 a symmetric format is perferred. 1267 Another concern is the simplicity. Even though the delegated 1268 prefix is theorectally sufficient to extract the corresponding 1269 IPv4 address for the CE, it relies on retrieving rules for every 1270 datagram. Embedding the full IPv4 address in the suffix 1271 simplifies the processing at IPv6-to-IPv4 translator when 1272 utilizing MAP for double translation. It also helps in setting 1273 filters at middle boxes, with exposing the IPv4 full addresses 1274 dispatched to the CEs. 1276 MAP is designed for the residual deployment, including the case of 1277 recalling deployed IPv4 addresses and reallocating them for the 1278 deployment in IPv6 networks. To this extent, MAP can understood as 1279 "4rd-MAP". 1281 In practice, MAP-format can be also used for the objective of 1282 providing stateless encapsulation or double translation for the 1283 already deployed IPv4 networks, without renumbering, whose provider 1284 backbone is upgraded to IPv6. Unlike the residual deployment, this 1285 use-case unavoidably introduces IPv4 routing entropy into the IPv6 1286 routing infrastrucutre. On the other hand, for the old IPv4 network 1287 or IPv6 network upgraded from IPv4, it is not necessarily having 64 1288 bits for their host identifiers. Therefore longer-than-/64 prefix is 1289 not a strict constrain. Therefore, RFC6052-format is recommended in 1290 this case of non-residual deployment. RFC6052-format is motivated 1291 with keeping temporal uniqueness of end-to-end identifiers throughout 1292 the period of transition and providing the rule-free simplicity. 1294 D.3. Residual deployment with MAP 1296 This section illustrate how we can use MAP in the operation of 1297 residual deployment. 1299 NOTE: Applying MAP for a use-case other than residual deployment 1300 should follow different logic of address planning and therefore, 1301 because of the reason mentioned above, not included in this Appendix. 1303 Residual deployment starts from IPv6 address planning. A simple 1304 example is taken inline for easy understanding. 1306 (A) IPv6 considerations 1308 (A1) Determine the maximum number N of CEs to be supported, and, for 1309 generality, suppose N = 2^n. 1311 For example, we suppose n = 20. It means there will be up to 1312 about one million CEs. 1314 (A2) Choose the length x of IPv6 prefixes to be assigned to ordinary 1315 customers. 1317 Considering we have a /32 IPv6 block, it is not a problem for 1318 the IPv6 deployment with the given number of CEs. Let x = 60, 1319 allowing subnets inside in each CE delegated networks. 1321 (A3) Multiply N by a margin coefficient K, a power of two (K = 2 ^ 1322 k), to take into account that: 1324 - Some privileged customers may be assigned IPv6 prefixes of 1325 length x', shorter than x, to have larger addressing spaces 1326 than ordinary customers, both in IPv6 and IPv4; 1328 - Due to the hierarchy of routable prefixes, many theoretically 1329 delegatable prefixes may not be actually delegatable (ref: host 1330 density ratio of [RFC3194]). 1332 In our example, let's take k = 0 for simplicity. 1334 (B) IPv4 considerations 1336 (B1) List all (non overlapping, not yet assigned to any in-running 1337 networks) IPv4 prefixes Hi that are available for IPv4 residual 1338 deployment. 1340 Suppose that we hold two blocks and not yet assigned to any 1341 fixed network: 192.32../16 and 63.245../16. 1343 (B2) Take enough of them, among the shortest ones, to get a total 1344 whose size M is a power of two (M = 2 ^ m), and includes a good 1345 proportion of the available IPv4 space. 1347 If the M < N, addresses should be shared by N CEs and thus each 1348 is shared by N/M = 2^(n - m) CEs with PSID length of (n - m). 1350 If we use both blocks, M = 2^16 + 2^16, and therefore m = 17. 1351 Then PSID length could be 3 bits, the corresponding sharing 1352 ratio is also determined so that each CE can have 8192 ports to 1353 use under the shared global IPv4 address. 1355 (B3) For each IPv4 prefix Hi of length hi, choose a "rule index", 1356 i.e., the 4pfx in Fig.C-1 and Fig.C-3, say Ri of length ri = m 1357 - (32 - hi). 1359 All these indexes must be non overlapping prefixes (e.g. 0, 10, 1360 110, 111 for one /10, one /11, and two /12). 1362 Then we have: 1364 H1 = 192.32../16, h1 = 16, r1 = 1 => R1 = bin(0); 1365 H2 = 63.245../16, h2 = 16, r2 = 1 => R2 = bin(1); 1367 (C) After (A) and (B), derive the rule(s) 1369 (C1) Derive the length c of the "Common prefix" C that will appear 1370 at the beginning of all delegated prefixes (c = x - (n + k)). 1372 (C2) Take any prefix for this C of length c that starts with a RIR- 1373 allocated IPv6 prefix. 1375 (C3) For each IPv4 prefix Hi, make a rule, in which the key is Hi, 1376 and the value is the Common prefix C followed by the Rule index 1377 Ri. Then this i-th rule's Rule IPv6 Prefix will have the 1378 length of (c + ri). 1380 Then we can do that: 1382 c = 40 => C = 2001:0db8:ff00::/40 1383 Rule 1: Rule IPv6 Prefix = 2001:0db8:ff00::/41 1384 Rule 2: Rule IPv6 Prefix = 2001:0db8:ff80::/41 1386 As a result, for a certain CE delegating 2001:0db8:ff98: 1387 7650::/60, its parameters are: 1389 Rule IPv6 Prefix = 2001:0db8:ff80::/41 => Rule 2 1390 IPv4 Suffix = bin(001 1000 0111 0110 0) 1391 PSID = bin(101) = 0x5 1392 Rule IPv4 Prefix = 63.245../16 1393 CE IPv4 Address = 63.245.48.236 1395 If different sharing ratio is expected, we may partition CEs into 1396 groups and do (A) and (B) for each group, determining the PSID length 1397 for them separately. However, this might cause a fairly complicated 1398 work in the address planning. 1400 Author's Address 1402 Ole Troan (editor) 1403 cisco 1404 Oslo 1405 Norway 1407 Email: ot@cisco.com