idnits 2.17.1 draft-ietf-softwire-map-02.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 5, 2012) is 4252 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) == Outdated reference: A later version (-12) exists of draft-ietf-softwire-map-dhcp-01 ** Downref: Normative reference to an Experimental RFC: RFC 6346 == Outdated reference: A later version (-05) exists of draft-ietf-softwire-stateless-4v6-motivation-04 -- Obsolete informational reference (is this intentional?): RFC 1933 (Obsoleted by RFC 2893) -- Obsolete informational reference (is this intentional?): RFC 3633 (Obsoleted by RFC 8415) Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group O. Troan 3 Internet-Draft W. Dec 4 Intended status: Standards Track Cisco Systems 5 Expires: March 9, 2013 X. Li 6 C. Bao 7 CERNET Center/Tsinghua 8 University 9 S. Matsushima 10 SoftBank Telecom 11 T. Murakami 12 IP Infusion 13 September 5, 2012 15 Mapping of Address and Port with Encapsulation (MAP) 16 draft-ietf-softwire-map-02 18 Abstract 20 This document describes a mechanism for transporting IPv4 packets 21 across an IPv6 network, and a generic mechanism for mapping between 22 IPv6 addresses and IPv4 addresses and transport layer ports. 24 Status of this Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on March 9, 2013. 41 Copyright Notice 43 Copyright (c) 2012 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 59 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 4. Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 5 62 5. Mapping Algorithm . . . . . . . . . . . . . . . . . . . . . . 7 63 5.1. Port mapping algorithm . . . . . . . . . . . . . . . . . . 9 64 5.1.1. Bit Representation of the Algorithm . . . . . . . . . 9 65 5.1.2. GMA examples . . . . . . . . . . . . . . . . . . . . . 10 66 5.1.3. Port Algorithm Provisioning Considerations . . . . . . 11 67 5.2. Basic mapping rule (BMR) . . . . . . . . . . . . . . . . . 11 68 5.3. Forwarding mapping rule (FMR) . . . . . . . . . . . . . . 14 69 5.4. Default mapping rule (DMR) . . . . . . . . . . . . . . . . 15 70 6. The IPv6 Interface Identifier . . . . . . . . . . . . . . . . 16 71 7. MAP Configuration . . . . . . . . . . . . . . . . . . . . . . 16 72 7.1. MAP CE . . . . . . . . . . . . . . . . . . . . . . . . . . 17 73 7.2. MAP BR . . . . . . . . . . . . . . . . . . . . . . . . . . 17 74 7.3. Backwards compatibility . . . . . . . . . . . . . . . . . 17 75 8. Forwarding Considerations . . . . . . . . . . . . . . . . . . 18 76 8.1. Receiving rules . . . . . . . . . . . . . . . . . . . . . 18 77 8.2. MAP BR . . . . . . . . . . . . . . . . . . . . . . . . . . 18 78 8.2.1. IPv6 to IPv4 . . . . . . . . . . . . . . . . . . . . . 18 79 9. ICMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 80 10. Fragmentation and Path MTU Discovery . . . . . . . . . . . . . 19 81 10.1. Fragmentation in the MAP domain . . . . . . . . . . . . . 19 82 10.2. Receiving IPv4 Fragments on the MAP domain borders . . . . 20 83 10.3. Sending IPv4 fragments to the outside . . . . . . . . . . 20 84 11. NAT44 Considerations . . . . . . . . . . . . . . . . . . . . . 20 85 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 86 13. Security Considerations . . . . . . . . . . . . . . . . . . . 21 87 14. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 21 88 15. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 22 89 16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 23 90 16.1. Normative References . . . . . . . . . . . . . . . . . . . 23 91 16.2. Informative References . . . . . . . . . . . . . . . . . . 23 92 Appendix A. Example of MAP . . . . . . . . . . . . . . . . . . . 25 93 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 28 95 1. Introduction 97 Mapping of IPv4 addresses in IPv6 addresses has been described in 98 numerous mechanisms dating back to 1996 [RFC1933]. The Automatic 99 tunneling mechanism described in RFC1933, assigned a globally unique 100 IPv6 address to a host by combining the host's IPv4 address with a 101 well-known IPv6 prefix. Given an IPv6 packet with a destination 102 address with an embedded IPv4 address, a node could automatically 103 tunnel this packet by extracting the IPv4 tunnel end-point address 104 from the IPv6 destination address. 106 There are numerous variations of this idea, described in 6over4 107 [RFC2529], 6to4 [RFC3056], ISATAP [RFC5214], and 6rd [RFC5969]. 109 The commonalities of all these IPv6 over IPv4 mechanisms are: 111 o Automatically provisions an IPv6 address for a host or an IPv6 112 prefix for a site 114 o Algorithmic or implicit address resolution of tunnel end point 115 addresses. Given an IPv6 destination address, an IPv4 tunnel 116 endpoint address can be calculated. 118 o Embedding of an IPv4 address or part thereof into an IPv6 address. 120 In phases of IPv4 to IPv6 migration, IPv6 only networks will be 121 common, while there will still be a need for residual IPv4 122 deployment. This document describes a generic mapping of IPv4 to 123 IPv6, and a mechanism for encapsulating IPv4 over IPv6. 125 Just as the IPv6 over IPv4 mechanisms referred to above, the residual 126 IPv4 over IPv6 mechanism must be capable of: 128 o Provisioning an IPv4 prefix, an IPv4 address or a shared IPv4 129 address. 131 o Algorithmically map between an IPv4 prefix, IPv4 address or a 132 shared IPv4 address and an IPv6 address. 134 The mapping scheme described here supports encapsulation of IPv4 135 packets in IPv6 in both mesh and hub and spoke topologies, including 136 address mappings with full independence between IPv6 and IPv4 137 addresses. 139 This document describes delivery of IPv4 unicast service across an 140 IPv6 infrastructure. IPv4 multicast is not considered further in 141 this document. 143 The A+P (Address and Port) architecture of sharing an IPv4 address by 144 distributing the port space is described in [RFC6346]. Specifically 145 section 4 of [RFC6346] covers stateless mapping. The corresponding 146 stateful solution DS-lite is described in [RFC6333]. The motivation 147 for the work is described in 148 [I-D.ietf-softwire-stateless-4v6-motivation]. 150 A companion document defines a DHCPv6 option for provisioning of MAP 151 [I-D.ietf-softwire-map-dhcp]. Other means of provisioning is 152 possible. Deployment considerations are described in [I-D.mdt- 153 softwire-map-deployment]. 155 MAP relies on IPv6 and is designed to deliver production-quality 156 dual-stack service while allowing IPv4 to be phased out within the SP 157 network. The phasing out of IPv4 within the SP network is 158 independent of whether the end user disables IPv4 service or not. 159 Further, "Greenfield"; IPv6-only networks may use MAP in order to 160 deliver IPv4 to sites via the IPv6 network. 162 2. Conventions 164 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 165 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 166 document are to be interpreted as described in RFC 2119 [RFC2119]. 168 3. Terminology 170 MAP domain: One or more MAP CEs and BRs connected to the 171 same virtual link. A service provider may 172 deploy a single MAP domain, or may utilize 173 multiple MAP domains. 175 MAP Rule A set of parameters describing the mapping 176 between an IPv4 prefix, IPv4 address or 177 shared IPv4 address and an IPv6 prefix or 178 address. Each domain uses a different 179 mapping rule set. 181 MAP node A device that implements MAP. 183 MAP Border Relay (BR): A MAP enabled router managed by the service 184 provider at the edge of a MAP domain. A 185 Border Relay router has at least an IPv6- 186 enabled interface and an IPv4 interface 187 connected to the native IPv4 network. A MAP 188 BR may also be referred to simply as a "BR" 189 within the context of MAP. 191 MAP Customer Edge (CE): A device functioning as a Customer Edge 192 router in a MAP deployment. A typical MAP CE 193 adopting MAP rules will serve a residential 194 site with one WAN side interface, and one or 195 more LAN side interfaces. A MAP CE may also 196 be referred to simply as a "CE" within the 197 context of MAP. 199 Port-set: The separate part of the transport layer port 200 space; denoted as a port-set. 202 Port-set ID (PSID): Algorithmically identifies a set of ports 203 exclusively assigned to a CE. 205 Shared IPv4 address: An IPv4 address that is shared among multiple 206 CEs. Only ports that belong to the assigned 207 port-set can be used for communication. Also 208 known as a Port-Restricted IPv4 address. 210 End-user IPv6 prefix: The IPv6 prefix assigned to an End-user CE by 211 other means than MAP itself. E.g. 212 provisioned using DHCPv6 PD [RFC3633] or 213 configured manually. It is unique for each 214 CE. 216 MAP IPv6 address: The IPv6 address used to reach the MAP 217 function of a CE from other CEs and from BRs. 219 Rule IPv6 prefix: An IPv6 prefix assigned by a Service Provider 220 for a mapping rule. 222 Rule IPv4 prefix: An IPv4 prefix assigned by a Service Provider 223 for a mapping rule. 225 Embedded Address (EA) bits: The IPv4 EA-bits in the IPv6 address 226 identify an IPv4 prefix/address (or part 227 thereof) or a shared IPv4 address (or part 228 thereof) and a port-set identifier. 230 4. Architecture 232 The MAP mechanism uses existing standard building blocks. The 233 existing NAT44 on the CE is used with additional support for 234 restricting transport protocol ports, ICMP identifiers and fragment 235 identifiers to the configured port set. MAP supports the 236 encapsulation mode specified in [RFC2473]. In addition MAP specifies 237 an algorithm to do "address resolution" from an IPv4 address and port 238 to an IPv6 address. This algorithmic mapping is specified in 239 Section 5. 241 A full IPv4 address or IPv4 prefix can be used like today, e.g. for 242 identifying an interface or as a DHCP pool. A shared IPv4 address on 243 the other hand, MUST NOT be used to identify an interface. While it 244 is theoretically possible to make host stacks and applications port- 245 aware, that is considered a too drastic change to the IP model 246 [RFC6250]. 248 The MAP architecture described here, restricts the use of the shared 249 IPv4 address to only be used as the global address (outside) of the 250 NAPT [RFC2663] running on the CE. The NAPT MUST in turn be connected 251 to a MAP aware forwarding function, that does encapsulation/ 252 decapsulation of IPv4 packets in IPv6. 254 When MAP is used to provision a full IPv4 address or an IPv4 prefix 255 to the CE, these restrictions do not apply. 257 For packets outbound from the private IPv4 network, the CE NAPT MUST 258 translate transport identifiers (e.g. TCP and UDP port numbers) so 259 that they fall within the assigned CE's port-range. 261 The forwarding function uses the Rules table to make forwarding 262 decisions. The table consists of the mapping rules. An entry in the 263 table consists of an IPv4 prefix and PSID. 265 User N 266 Private IPv4 267 | Network 268 | 269 O--+---------------O 270 | | MAP CE | 271 | +-----+--------+ | 272 | NAPT44| MAP | | 273 | +-----+ | | |\ ,-------. .------. 274 | +--------+ | \ ,-' `-. ,-' `-. 275 O------------------O / \ O---------O / Public \ 276 / IPv6 only \ | MAP |/ IPv4 \ 277 ( Network --+ Border +- Network ) 278 \ (MAP Domain) / | Relay |\ / 279 O------------------O \ / O---------O \ / 280 | MAP CE | /". ,-' `-. ,-' 281 | +-----+--------+ | / `----+--' ------' 282 | NAPT44| MAP | |/ 283 | +-----+ | | 284 | | +--------+ | 285 O---.--------------O 286 | 287 User M 288 Private IPv4 289 Network 291 Figure 1: Network Topology 293 The MAP BR is responsible for connecting external IPv4 networks to 294 the IPv4 nodes in one or more MAP domains. 296 5. Mapping Algorithm 298 A MAP node is provisioned with one or more mapping rules. 300 Mapping rules are used differently depending on their function. 301 Every MAP node must be provisioned with a Basic mapping rule. This 302 is used by the node to configure its IPv4 address, IPv4 prefix or 303 shared IPv4 address. This same basic rule can also be used for 304 forwarding, where an IPv4 destination address and optionally a 305 destination port is mapped into an IPv6 address. Additional mapping 306 rules are specified to allow for multiple different IPv4 sub-nets to 307 exist within the domain and optimize forwarding between them. 309 Traffic outside of the domain (i.e. when the destination IPv4 address 310 does not match (using longest matching prefix) any Rule IPv4 prefix 311 in the Rules database) will be forward using the Default mapping 312 rule. The Default mapping rule maps outside destinations to the BR's 313 IPv6 address. 315 There are three types of mapping rules: 317 1. Basic Mapping Rule - used for IPv4 prefix, address or port set 318 assignment. There can only be one Basic Mapping Rule per End- 319 user IPv6 prefix. The Basic Mapping Rule is used to configure 320 the MAP IPv6 address or prefix. 322 * Rule IPv6 prefix (including prefix length) 324 * Rule IPv4 prefix (including prefix length) 326 * Rule EA-bits length (in bits) 328 * Rule Port Parameters (optional) 330 2. Forwarding Mapping Rule - used for forwarding. The Basic Mapping 331 Rule is also a Forwarding Mapping Rule. Each Forwarding Mapping 332 Rule will result in an entry in the Rules table for the Rule IPv4 333 prefix. The FMR consists of the same parameters as the BMR. 335 3. Default Mapping Rule - used for destinations outside the MAP 336 domain. A 0.0.0.0/0 entry is installed in the Rules table for 337 this rule. 339 * IPv6 address of BR 341 A MAP node finds its Basic Mapping Rule by doing a longest match 342 between the End-user IPv6 prefix and the Rule IPv6 prefix in the 343 Mapping Rules table. The rule is then used for IPv4 prefix, address 344 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 an IPv4 default route for the Default 352 Mapping Rule. 354 In hub and spoke mode, all traffic MUST be forwarded using the 355 Default Mapping Rule. 357 5.1. Port mapping algorithm 359 The port mapping algorithm is used in domains whose rules allow IPv4 360 address sharing. Different Port-Set Identifiers (PSID) MUST have 361 non-overlapping port-sets. The two extreme cases are: (1) the port 362 numbers are not contiguous for each PSID, but uniformly distributed 363 across the port range (0-65535); (2) the port numbers are contiguous 364 in a single range for each PSID. The port mapping algorithm proposed 365 here is called the Generalized Modulus Algorithm (GMA) and supports 366 both these cases. 368 For a given sharing ratio (R) and the maximum number of contiguous 369 ports (M), the GMA algorithm is defined as: 371 1. The port number (P) of a given PSID (K) is composed of: 373 P = R * M * j + M * K + i 375 Where: 377 * PSID: K = 0 to R - 1 379 * Port range index: j = (4096 / M) / R to ((65536 / M) / R) - 1, 380 if the port numbers (0 - 4095) are excluded. 382 * Contiguous Port index: i = 0 to M - 1 384 2. The PSID (K) of a given port number (P) is determined by: 386 K = (floor(P/M)) % R 388 Where: 390 * % is the modulus operator 392 * floor(arg) is a function that returns the largest integer not 393 greater than arg. 395 5.1.1. Bit Representation of the Algorithm 397 Given a sharing ratio (R=2^k), the maximum number of contiguous ports 398 (M=2^m), for any PSID (K) and available ports (P) can be represented 399 as: 401 0 8 15 402 +---------------+----------+------+-------------------+ 403 | P | 404 ----------------+-----------------+-------------------+ 405 | A (j) | PSID (K) | M (i) | 406 +---------------+----------+------+-------------------+ 407 |<----a bits--->|<-----k bits---->|<------m bits----->| 409 Figure 2: Bit representation 411 Where j and i are the same indexes defined in the port mapping 412 algorithm. 414 For any port number, the PSID can be obtained by bit mask operation. 416 For a > 0, j MUST be larger than 0. This ensures that the algorithm 417 excludes the system ports ([I-D.ietf-tsvwg-iana-ports]). For a = 0, 418 j MAY be 0 to allow for the provisioning of the system ports. 420 5.1.2. GMA examples 422 For example, for R = 1024, PSID offset: a = 4 and PSID length: k = 10 423 bits 425 Port-set-1 Port-set-2 426 PSID=0 | 4096, 4097, 4098, 4099, | 8192, 8193, 8194, 8195, | ... 427 PSID=1 | 4100, 4101, 4102, 4103, | 8196, 8197, 8198, 8199, | ... 428 PSID=2 | 4104, 4105, 4106, 4107, | 8200, 8201, 8202, 8203, | ... 429 PSID=3 | 4108, 4109, 4110, 4111, | 8204, 8205, 8206, 8207, | ... 430 ... 431 PSID=1023| 8188, 8189, 8190, 8191, | 12284, 12285, 12286, 12287,| ... 433 Example 1: with offset = 4 (a = 4) 435 For example, for R = 64, a = 0 (PSID offset = 0 and PSID length = 6 436 bits): 438 Port-set 439 PSID=0 | [ 0 - 1023] 440 PSID=1 | [1024 - 2047] 441 PSID=2 | [2048 - 3071] 442 PSID=3 | [3072 - 4095] 443 ... 444 PSID=63 | [64512 - 65535] 445 Example 2: with offset = 0 (a = 0) 447 5.1.3. Port Algorithm Provisioning Considerations 449 The number of offset bits (a) and excluded ports are optionally 450 provisioned via the "Rule Port Mapping Parameters" in the Basic 451 Mapping Rule. 453 The defaults are: 455 o Excluded ports : 0-4095 457 o Offset bits (a) : 4 459 To simplify the GMA port mapping algorithm the defaults are chosen so 460 that the PSID field starts on a nibble boundary and the excluded port 461 range (0-1023) is extended to 0-4095. 463 5.2. Basic mapping rule (BMR) 465 | n bits | o bits | s bits | 128-n-o-s bits | 466 +--------------------+-----------+---------+------------+----------+ 467 | Rule IPv6 prefix | EA bits |subnet ID| interface ID | 468 +--------------------+-----------+---------+-----------------------+ 469 |<--- End-user IPv6 prefix --->| 471 Figure 3: IPv6 address format 473 The Embedded Address bits (EA bits) are unique per end user within a 474 Rule IPv6 prefix. The Rule IPv6 prefix is the part of the End-user 475 IPv6 prefix that is common among all CEs using the same Basic Mapping 476 Rule within the MAP domain. The EA bits encode the CE specific IPv4 477 address and port information. The EA bits can contain a full or part 478 of an IPv4 prefix or address, and in the shared IPv4 address case 479 contains a Port-Set Identifier (PSID). 481 The MAP IPv6 address is created by concatenating the End-user IPv6 482 prefix with the MAP subnet-id and the interface-id as specified in 483 Section 6. 485 The MAP subnet ID is defined to be the first subnet (all bits set to 486 zero). A MAP node MUST reserve the first IPv6 prefix in an End-user 487 IPv6 prefix for the purpose of MAP. 489 The MAP IPv6 is created by combining the End-User IPv6 prefix with 490 the all zeros subnet-id and the MAP IPv6 interface identifier. 492 Shared IPv4 address: 494 | r bits | p bits | | q bits | 495 +-------------+---------------------+ +------------+ 496 | Rule IPv4 | IPv4 Address suffix | |Port-Set ID | 497 +-------------+---------------------+ +------------+ 498 | 32 bits | 500 Figure 4: Shared IPv4 address 502 Complete IPv4 address: 504 | r bits | p bits | 505 +-------------+---------------------+ 506 | Rule IPv4 | IPv4 Address suffix | 507 +-------------+---------------------+ 508 | 32 bits | 510 Figure 5: Complete IPv4 address 512 IPv4 prefix: 514 | r bits | p bits | 515 +-------------+---------------------+ 516 | Rule IPv4 | IPv4 Address suffix | 517 +-------------+---------------------+ 518 | < 32 bits | 520 Figure 6: IPv4 prefix 522 The length of r MAY be zero, in which case the complete IPv4 address 523 or prefix is encoded in the EA bits. If only a part of the IPv4 524 address/prefix is encoded in the EA bits, the Rule IPv4 prefix is 525 provisioned to the CE by other means (e.g. a DHCPv6 option). To 526 create a complete IPv4 address (or prefix), the IPv4 address suffix 527 (p) from the EA bits, are concatenated with the Rule IPv4 prefix (r 528 bits). 530 The offset of the EA bits field in the IPv6 address is equal to the 531 BMR Rule IPv6 prefix length. The length of the EA bits field (o) is 532 given by the BMR Rule EA-bits length. The sum of the Rule IPv6 533 Prefix length and the Rule EA-bits length MUST be less or equal than 534 the End-user IPv6 prefix length. 536 If o + r < 32 (length of the IPv4 address in bits), then an IPv4 537 prefix is assigned. 539 If o + r is equal to 32, then a full IPv4 address is to be assigned. 540 The address is created by concatenating the Rule IPv4 prefix and the 541 EA-bits. 543 If o + r is > 32, then a shared IPv4 address is to be assigned. The 544 number of IPv4 address suffix bits (p) in the EA bits is given by 32 545 - r bits. The PSID bits are used to create a port-set. The length 546 of the PSID bit field within EA bits is: o - p. 548 The length of r MAY be 32, with no part of the IPv4 address embedded 549 in the EA bits. This results in a mapping with no dependence between 550 the IPv4 address and the IPv6 address. In addition the length of o 551 MAY be zero (no EA bits embedded in the End-User IPv6 prefix), 552 meaning that also the PSID is provisioned using e.g. the DHCP option. 554 In the following examples, only the suffix (last 8 bits) of the IPv4 555 address is embedded in the EA bits (r = 24), while the IPv4 prefix 556 (first 24 bits) is given in the BMR Rule IPv4 prefix. 558 Example: 560 Given: 561 End-user IPv6 prefix: 2001:db8:0012:3400::/56 562 Basic Mapping Rule: {2001:db8:0000::/40 (Rule IPv6 prefix), 563 192.0.2.0/24 (Rule IPv4 prefix), 564 16 (Rule EA-bits length)} 565 Sharing ratio: 256 (16 - (32 - 24) = 8 2^8 = 256) 566 PSID offset: 4 (default value as per section 5.1.3) 568 We get IPv4 address and port-set: 569 EA bits offset: 40 570 IPv4 suffix bits (p): Length of IPv4 address (32) - 571 IPv4 prefix length (24) = 8 572 IPv4 address: 192.0.2.18 (18: 0x12) 574 PSID start: 40 + p = 40 + 8 = 48 575 PSID length: o - p = 16 (56 - 40) - 8 = 8 576 PSID: 0x34 577 Port-set-1: 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935, 578 4936, 4937, 4938, 4939, 4940, 4941, 4942, 4943 579 Port-set-2: 9024, 9025, 9026, 9027, 9028, 9029, 9030, 9031, 580 9032, 9033, 9034, 9035, 9036, 9037, 9038, 9039 581 ... 582 Port-set-15: 62272, 62273, 62274, 62275, 583 62276, 62277, 62278, 62279, 584 62280, 62281, 62282, 62283, 585 62284, 62285, 62286, 62287, 587 5.3. Forwarding mapping rule (FMR) 589 On adding an FMR rule, an IPv4 route is installed in the Rules table 590 for the Rule IPv4 prefix. 592 On forwarding an IPv4 packet, a best matching prefix look up is done 593 in the Rules table and the correct FMR is chosen. 595 | 32 bits | | 16 bits | 596 +--------------------------+ +-------------------+ 597 | IPv4 destination address | | IPv4 dest port | 598 +--------------------------+ +-------------------+ 599 : : ___/ : 600 | p bits | / q bits : 601 +----------+ +------------+ 602 |IPv4 sufx| |Port-Set ID | 603 +----------+ +------------+ 604 \ / ____/ ________/ 605 \ : __/ _____/ 606 \ : / / 607 | n bits | o bits | s bits | 128-n-o-s bits | 608 +--------------------+-----------+---------+------------+----------+ 609 | Rule IPv6 prefix | EA bits |subnet ID| interface ID | 610 +--------------------+-----------+---------+-----------------------+ 611 |<--- End-user IPv6 prefix --->| 613 Figure 7: Deriving of MAP IPv6 address 615 Example: 617 Given: 618 IPv4 destination address: 192.0.2.18 619 IPv4 destination port: 9030 620 Forwarding Mapping Rule: {2001:db8:0000::/40 (Rule IPv6 prefix), 621 192.0.2.0/24 (Rule IPv4 prefix), 622 16 (Rule EA-bits length)} 623 PSID offset: 4 (default value as per section 5.1.3) 625 We get IPv6 address: 626 IPv4 suffix bits (p): 32 - 24 = 8 (18 (0x12)) 627 PSID length: 8 628 PSID: 0x34 (9030 (0x2346)) 629 EA bits: 0x1234 630 MAP IPv6 address: 2001:db8:0012:3400:00c0:0002:1200:3400 632 5.4. Default mapping rule (DMR) 634 The Default Mapping rule is used to reach IPv4 destinations outside 635 of the MAP domain. Traffic using this rule will be sent from a CE to 636 a BR. 638 The DMR consist of the IPv6 address of the BR. 640 6. The IPv6 Interface Identifier 642 The Interface identifier format of a MAP node is based on the format 643 specified in section 2.2 of [RFC6052], with the added PSID field if 644 present, as shown in figure Figure 8. 646 +--+---+---+---+---+---+---+---+---+ 647 |PL| 8 16 24 32 40 48 56 | 648 +--+---+---+---+---+---+---+---+---+ 649 |64| u | IPv4 address | PSID | 0 | 650 +--+---+---+---+---+---+---+---+---+ 652 Figure 8 654 In the case of an IPv4 prefix, the IPv4 address field is right-padded 655 with zeroes up to 32 bits. The PSID field is left-padded to create a 656 16 bit field. For an IPv4 prefix or a complete IPv4 address, the 657 PSID field is zero. 659 If the End-user IPv6 prefix length is larger than 64, the most 660 significant parts of the interface identifier is overwritten by the 661 prefix. 663 7. MAP Configuration 665 For a given MAP domain, the BR and CE MUST be configured with the 666 following MAP elements. The configured values for these elements are 667 identical for all CEs and BRs within a given MAP domain. 669 o The End-User IPv6 prefix (Part of the normal IPv6 provisioning). 671 o The Basic Mapping Rule and optionally the Forwarding Mapping 672 Rules, including the Rule IPv6 prefix, Rule IPv4 prefix, and 673 Length of EA bits 675 o The Default Mapping Rule with the BR IPv6 address 677 o Hub and spoke mode or Mesh mode. (If all traffic should be sent 678 to the BR, or if direct CE to CE traffic should be supported). 680 7.1. MAP CE 682 The MAP elements are set to values that are the same across all CEs 683 within a MAP domain. The values may be configured in a variety of 684 manners, including provisioning methods such as the Broadband Forum's 685 "TR-69" Residential Gateway management interface, an XML-based object 686 retrieved after IPv6 connectivity is established, or manual 687 configuration by an administrator. This document describes how to 688 configure the necessary parameters via a single DHCPv6 option. A CE 689 that allows IPv6 configuration by DHCP SHOULD implement this option. 690 Other configuration and management methods may use the format 691 described by this option for consistency and convenience of 692 implementation on CEs that support multiple configuration methods. 694 The only remaining provisioning information the CE requires in order 695 to calculate the MAP IPv4 address and enable IPv4 connectivity is the 696 IPv6 prefix for the CE. The End-user IPv6 prefix is configured as 697 part of obtaining IPv6 Internet access. 699 A single MAP CE MAY be connected to more than one MAP domain, just as 700 any router may have more than one IPv4-enabled service provider 701 facing interface and more than one set of associated addresses 702 assigned by DHCP. Each domain a given CE operates within would 703 require its own set of MAP configuration elements and would generate 704 its own IPv4 address. 706 The MAP DHCP option is specified in [I-D.ietf-softwire-map-dhcp]. 708 7.2. MAP BR 710 The MAP BR MUST be configured with the same MAP elements as the MAP 711 CEs operating within the same domain. 713 For increased reliability and load balancing, the BR IPv6 address MAY 714 be an anycast address shared across a given MAP domain. As MAP is 715 stateless, any BR may be used at any time. If the BR IPv6 address is 716 anycast the relay MUST use this anycast IPv6 address as the source 717 address in packets relayed to CEs. 719 Since MAP uses provider address space, no specific routes need to be 720 advertised externally for MAP to operate, neither in IPv6 nor IPv4 721 BGP. However, if anycast is used for the MAP IPv6 relays, the 722 anycast addresses must be advertised in the service provider's IGP. 724 7.3. Backwards compatibility 726 A MAP-E CE provisioned with only a Default Mapping Rule, and with no 727 IPv4 address and port range configured by other means, MUST disable 728 its NAT44 functionality. This characteristic makes a MAP CE 729 compatible with DS-Lite [RFC6333] AFTRs, whose addresses are 730 configured as the MAP BR. 732 8. Forwarding Considerations 734 Figure 1 depicts the overall MAP architecture with IPv4 users (N and 735 M) networks connected to a routed IPv6 network. 737 MAP supports Encapsulation mode as specified in [RFC2473]. 739 A MAP CE forwarding IPv4 packets from the LAN performs NAT44 740 functions first and create appropriate NAT44 bindings. The resulting 741 IPv4 packets MUST contain the source IPv4 address and source 742 transport number defined by MAP. The resulting IPv4 packet is 743 forwarded to the CE's MAP forwarding function. The IPv6 source and 744 destination addresses MUST then be derived as per Section 5 of this 745 draft. 747 A MAP CE receiving an IPv6 packet to its MAP IPv6 address sends this 748 packet to the CE's MAP function. All other IPv6 traffic is forwarded 749 as per the CE's IPv6 routing rules. The resulting IPv4 packet is 750 then forwarded to the CE's NAT44 function where the destination port 751 number MUST be checked against the stateful port mapping session 752 table and the destination port number MUST be mapped to its original 753 value. 755 8.1. Receiving rules 757 The CE SHOULD check that MAP received packets' transport-layer 758 destination port number is in the range configured by MAP for the CE 759 and the CE SHOULD drop any non conforming packet and respond with an 760 ICMPv6 "Address Unreachable" (Type 1, Code 3). 762 8.2. MAP BR 764 8.2.1. IPv6 to IPv4 766 A MAP BR receiving IPv6 packets selects a best matching MAP domain 767 rule based on a longest address match of the packets' source address 768 against the BR's configured MAP BMR prefix(es), as well as a match of 769 the packet destination address against the configured BR prefixes or 770 FMR prefix(es). The selected MAP rule allows the BR to determine the 771 EA-bits from the source IPv6 address. The BR MUST perform a 772 validation of the consistency of the source IPv6 address and source 773 port number for the packet using BMR. If the packets source port 774 number is found to be outside the range allowed for this CE and the 775 BMR, the BR MUST drop the packet and respond with an ICMPv6 776 "Destination Unreachable, Source address failed ingress/egress 777 policy" (Type 1, Code 5). 779 9. ICMP 781 ICMP message should be supported in MAP domain. Hence, the NAT44 in 782 MAP CE must implement the behavior for ICMP message conforming to the 783 best current practice documented in [RFC5508]. 785 If a MAP CE receives an ICMP message having ICMP identifier field in 786 ICMP header, NAT44 in the MAP CE must rewrite this field to a 787 specific value assigned from the port-set. BR and other CEs must 788 handle this field similar to the port number in the TCP/UDP header 789 upon receiving the ICMP message with ICMP identifier field. 791 If a MAP node receives an ICMP error message without the ICMP 792 identifier field for errors that is detected inside a IPv6 tunnel, a 793 node should relay the ICMP error message to the original source. 794 This behavior should be implemented conforming to the section 8 of 795 [RFC2473]. 797 10. Fragmentation and Path MTU Discovery 799 Due to the different sizes of the IPv4 and IPv6 header, handling the 800 maximum packet size is relevant for the operation of any system 801 connecting the two address families. There are three mechanisms to 802 handle this issue: Path MTU discovery (PMTUD), fragmentation, and 803 transport-layer negotiation such as the TCP Maximum Segment Size 804 (MSS) option [RFC0897]. MAP uses all three mechanisms to deal with 805 different cases. 807 10.1. Fragmentation in the MAP domain 809 Encapsulating an IPv4 packet to carry it across the MAP domain will 810 increase its size (40 bytes). It is strongly recommended that the 811 MTU in the MAP domain is well managed and that the IPv6 MTU on the CE 812 WAN side interface is set so that no fragmentation occurs within the 813 boundary of the MAP domain. 815 Fragmentation on MAP domain entry is described in section 7.2 of 816 [RFC2473] 818 The use of an anycast source address could lead to any ICMP error 819 message generated on the path being sent to a different BR. 820 Therefore, using dynamic tunnel MTU Section 6.7 of [RFC2473] is 821 subject to IPv6 Path MTU black-holes. 823 Multiple BRs using the same anycast source address could send 824 fragmented packets to the same CE at the same time. If the 825 fragmented packets from different BRs happen to use the same fragment 826 ID, incorrect reassembly might occur. 828 10.2. Receiving IPv4 Fragments on the MAP domain borders 830 Forwarding of an IPv4 packet received from the outside of the MAP 831 domain requires the IPv4 destination address and the transport 832 protocol destination port. The transport protocol information is 833 only available in the first fragment received. As described in 834 section 5.3.3 of [RFC6346] a MAP node receiving an IPv4 fragmented 835 packet from outside has to reassemble the packet before sending the 836 packet onto the MAP link. If the first packet received contains the 837 transport protocol information, it is possible to optimize this 838 behavior by using a cache and forwarding the fragments unchanged. A 839 description of this algorithm is outside the scope of this document. 841 10.3. Sending IPv4 fragments to the outside 843 If two IPv4 host behind two different MAP CE's with the same IPv4 844 address sends fragments to an IPv4 destination host outside the 845 domain. Those hosts may use the same IPv4 fragmentation identifier, 846 resulting in incorrect reassembly of the fragments at the destination 847 host. Given that the IPv4 fragmentation identifier is a 16 bit 848 field, it could be used similarly to port ranges. A MAP CE SHOULD 849 rewrite the IPv4 fragmentation identifier to be within its allocated 850 port set. 852 11. NAT44 Considerations 854 The NAT44 implemented in the MAP CE SHOULD conform with the behavior 855 and best current practice documented in [RFC4787], [RFC5508], 856 [RFC5382] and [RFC5383]. In MAP address sharing mode (determined by 857 the MAP domain/rule configuration parameters) the operation of the 858 NAT44 MUST be restricted to the available port numbers derived via 859 the basic mapping rule. 861 12. IANA Considerations 863 This specification does not require any IANA actions. 865 13. Security Considerations 867 Spoofing attacks: With consistency checks between IPv4 and IPv6 868 sources that are performed on IPv4/IPv6 packets received by MAP 869 nodes, MAP does not introduce any new opportunity for spoofing 870 attacks that would not already exist in IPv6. 872 Denial-of-service attacks: In MAP domains where IPv4 addresses are 873 shared, the fact that IPv4 datagram reassembly may be necessary 874 introduces an opportunity for DOS attacks. This is inherent to 875 address sharing, and is common with other address sharing 876 approaches such as DS-Lite and NAT64/DNS64. The best protection 877 against such attacks is to accelerate IPv6 enablement in both 878 clients and servers so that, where MAP is supported, it is less 879 and less used. 881 Routing-loop attacks: This attack may exist in some automatic 882 tunneling scenarios are documented in [RFC6324]. They cannot 883 exist with MAP because each BRs checks that the IPv6 source 884 address of a received IPv6 packet is a CE address based on 885 Forwarding Mapping Rule. 887 Attacks facilitated by restricted port set: From hosts that are not 888 subject to ingress filtering of [RFC2827], some attacks are 889 possible by an attacker injecting spoofed packets during ongoing 890 transport connections ([RFC4953], [RFC5961], [RFC6056]. The 891 attacks depend on guessing which ports are currently used by 892 target hosts, and using an unrestricted port set is preferable, 893 i.e. using native IPv6 connections that are not subject to MAP 894 port range restrictions. To minimize this type of attacks when 895 using a restricted port set, the MAP CE's NAT44 filtering behavior 896 SHOULD be "Address-Dependent Filtering". Furthermore, the MAP CEs 897 SHOULD use a DNS transport proxy function to handle DNS traffic, 898 and source such traffic from IPv6 interfaces not assigned to MAP. 899 Practicalities of these methods are discussed in Section 5.9 of 900 [I-D.dec-stateless-4v6]. 902 [RFC6269] outlines general issues with IPv4 address sharing. 904 14. Contributors 906 This document is the result of the IETF Softwire MAP design team 907 effort and numerous previous individual contributions in this area: 909 Chongfeng Xie (China Telecom) 910 Room 708, No.118, Xizhimennei Street Beijing 100035 CN 911 Phone: +86-10-58552116 912 Email: xiechf@ctbri.com.cn 914 Qiong Sun (China Telecom) 915 Room 708, No.118, Xizhimennei Street Beijing 100035 CN 916 Phone: +86-10-58552936 917 Email: sunqiong@ctbri.com.cn 919 Gang Chen (China Mobile) 920 53A,Xibianmennei Ave. Beijing 100053 P.R.China 921 Email: chengang@chinamobile.com 923 Yu Zhai 924 CERNET Center/Tsinghua University 925 Room 225, Main Building, Tsinghua University 926 Beijing 100084 927 CN 928 Email: jacky.zhai@gmail.com 930 Wentao Shang (CERNET Center/Tsinghua University) 931 Room 225, Main Building, Tsinghua University Beijing 100084 932 CN 933 Email: wentaoshang@gmail.com 935 Guoliang Han (CERNET Center/Tsinghua University) 936 Room 225, Main Building, Tsinghua University Beijing 100084 937 CN 938 Email: bupthgl@gmail.com 940 Rajiv Asati (Cisco Systems) 941 7025-6 Kit Creek Road Research Triangle Park NC 27709 USA 942 Email: rajiva@cisco.com 944 15. Acknowledgements 946 This document is based on the ideas of many, including Mohamed 947 Boucadair, Gang Chen, Maoke Chen, Wojciech Dec, Xiaohong Deng, Jouni 948 Korhonen, Tomasz Mrugalski, Jacni Qin, Chunfa Sun, Qiong Sun, and 949 Leaf Yeh. The authors want in particular to recognize Remi Despres, 950 who has tirelessly worked on generalized mechanisms for stateless 951 address mapping. 953 The authors would like to thank Guillaume Gottard, Dan Wing, Jan 954 Zorz, Necj Scoberne, Tina Tsou for their thorough review and 955 comments. 957 16. References 959 16.1. Normative References 961 [I-D.ietf-softwire-map-dhcp] 962 Mrugalski, T., Troan, O., Bao, C., Dec, W., and L. Yeh, 963 "DHCPv6 Options for Mapping of Address and Port", 964 draft-ietf-softwire-map-dhcp-01 (work in progress), 965 August 2012. 967 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 968 Requirement Levels", BCP 14, RFC 2119, March 1997. 970 [RFC2473] Conta, A. and S. Deering, "Generic Packet Tunneling in 971 IPv6 Specification", RFC 2473, December 1998. 973 [RFC6052] Bao, C., Huitema, C., Bagnulo, M., Boucadair, M., and X. 974 Li, "IPv6 Addressing of IPv4/IPv6 Translators", RFC 6052, 975 October 2010. 977 [RFC6346] Bush, R., "The Address plus Port (A+P) Approach to the 978 IPv4 Address Shortage", RFC 6346, August 2011. 980 16.2. Informative References 982 [I-D.dec-stateless-4v6] 983 Dec, W., Asati, R., and H. Deng, "Stateless 4Via6 Address 984 Sharing", draft-dec-stateless-4v6-04 (work in progress), 985 October 2011. 987 [I-D.ietf-softwire-stateless-4v6-motivation] 988 Boucadair, M., Matsushima, S., Lee, Y., Bonness, O., 989 Borges, I., and G. Chen, "Motivations for Carrier-side 990 Stateless IPv4 over IPv6 Migration Solutions", 991 draft-ietf-softwire-stateless-4v6-motivation-04 (work in 992 progress), August 2012. 994 [I-D.ietf-tsvwg-iana-ports] 995 Cotton, M., Eggert, L., Touch, J., Westerlund, M., and S. 996 Cheshire, "Internet Assigned Numbers Authority (IANA) 997 Procedures for the Management of the Service Name and 998 Transport Protocol Port Number Registry", 999 draft-ietf-tsvwg-iana-ports-10 (work in progress), 1000 February 2011. 1002 [RFC0897] Postel, J., "Domain name system implementation schedule", 1003 RFC 897, February 1984. 1005 [RFC1933] Gilligan, R. and E. Nordmark, "Transition Mechanisms for 1006 IPv6 Hosts and Routers", RFC 1933, April 1996. 1008 [RFC2529] Carpenter, B. and C. Jung, "Transmission of IPv6 over IPv4 1009 Domains without Explicit Tunnels", RFC 2529, March 1999. 1011 [RFC2663] Srisuresh, P. and M. Holdrege, "IP Network Address 1012 Translator (NAT) Terminology and Considerations", 1013 RFC 2663, August 1999. 1015 [RFC2827] Ferguson, P. and D. Senie, "Network Ingress Filtering: 1016 Defeating Denial of Service Attacks which employ IP Source 1017 Address Spoofing", BCP 38, RFC 2827, May 2000. 1019 [RFC3056] Carpenter, B. and K. Moore, "Connection of IPv6 Domains 1020 via IPv4 Clouds", RFC 3056, February 2001. 1022 [RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic 1023 Host Configuration Protocol (DHCP) version 6", RFC 3633, 1024 December 2003. 1026 [RFC4787] Audet, F. and C. Jennings, "Network Address Translation 1027 (NAT) Behavioral Requirements for Unicast UDP", BCP 127, 1028 RFC 4787, January 2007. 1030 [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", 1031 RFC 4953, July 2007. 1033 [RFC5214] Templin, F., Gleeson, T., and D. Thaler, "Intra-Site 1034 Automatic Tunnel Addressing Protocol (ISATAP)", RFC 5214, 1035 March 2008. 1037 [RFC5382] Guha, S., Biswas, K., Ford, B., Sivakumar, S., and P. 1038 Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, 1039 RFC 5382, October 2008. 1041 [RFC5383] Gellens, R., "Deployment Considerations for Lemonade- 1042 Compliant Mobile Email", BCP 143, RFC 5383, October 2008. 1044 [RFC5508] Srisuresh, P., Ford, B., Sivakumar, S., and S. Guha, "NAT 1045 Behavioral Requirements for ICMP", BCP 148, RFC 5508, 1046 April 2009. 1048 [RFC5961] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's 1049 Robustness to Blind In-Window Attacks", RFC 5961, 1050 August 2010. 1052 [RFC5969] Townsley, W. and O. Troan, "IPv6 Rapid Deployment on IPv4 1053 Infrastructures (6rd) -- Protocol Specification", 1054 RFC 5969, August 2010. 1056 [RFC6056] Larsen, M. and F. Gont, "Recommendations for Transport- 1057 Protocol Port Randomization", BCP 156, RFC 6056, 1058 January 2011. 1060 [RFC6250] Thaler, D., "Evolution of the IP Model", RFC 6250, 1061 May 2011. 1063 [RFC6269] Ford, M., Boucadair, M., Durand, A., Levis, P., and P. 1064 Roberts, "Issues with IP Address Sharing", RFC 6269, 1065 June 2011. 1067 [RFC6324] Nakibly, G. and F. Templin, "Routing Loop Attack Using 1068 IPv6 Automatic Tunnels: Problem Statement and Proposed 1069 Mitigations", RFC 6324, August 2011. 1071 [RFC6333] Durand, A., Droms, R., Woodyatt, J., and Y. Lee, "Dual- 1072 Stack Lite Broadband Deployments Following IPv4 1073 Exhaustion", RFC 6333, August 2011. 1075 Appendix A. Example of MAP 1076 Example 1: 1078 Given the MAP domain information and an IPv6 address of 1079 an endpoint: 1081 IPv6 prefix assigned to the end user: 2001:db8:0012:3400::/56 1082 Basic Mapping Rule: {2001:db8:0000::/40 (Rule IPv6 prefix), 1083 192.0.2.0/24 (Rule IPv4 prefix), 16 (Rule EA-bits length)} 1084 Sharing ratio: 256 (16 - (32 - 24) = 8. 2^8 = 256) 1085 PSID offset: 4 1087 A MAP node (CE or BR) can via the BMR determine the IPv4 address 1088 and port-set as shown below: 1090 EA bits offset: 40 1091 IPv4 suffix bits (p) Length of IPv4 address (32) - IPv4 prefix 1092 length (24) = 8 1093 IPv4 address 192.0.2.18 (0xc0000212) 1094 PSID start: 40 + p = 40 + 8 = 48 1095 PSID length: o - p = 16 (56 - 40) - 8 = 8 1096 PSID: 0x34 1098 Port-set-1: 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 1099 4937, 4938, 4939, 4940, 4941, 4942, 4943 1100 Port-set-2: 9024, 9025, 9026, 9027, 9028, 9029, 9030, 9031, 9032, 1101 9033, 9034, 9035, 9036, 9037, 9038, 9039 1102 ... ... 1103 Port-set-15 62272, 62273, 62274, 62275, 62276, 62277, 62278, 1104 62279, 62280, 62281, 62282, 62283, 62284, 62285, 62286, 62287 1106 The BMR information allows a MAP CE also to determine (complete) 1107 its IPv6 address within the indicated IPv6 prefix. 1109 IPv6 address of MAP CE: 2001:db8:0012:3400:00c0:0002:1200:3400 1111 Example 2: 1113 Another example can be made of a hypothetical MAP BR, 1114 configured with the following FMR when receiving a packet 1115 with the following characteristics: 1117 IPv4 source address: 1.2.3.4 (0x01020304) 1118 IPv4 source port: 80 1119 IPv4 destination address: 192.0.2.18 (0xc0000212) 1120 IPv4 destination port: 9030 1122 Configured Forwarding Mapping Rule: {2001:db8:0000::/40 1123 (Rule IPv6 prefix), 192.0.2.0/24 (Rule IPv4 prefix), 1124 16 (Rule EA-bits length)} 1126 MAP BR Prefix 2001:db8:ffff::/64 1128 The above information allows the BR to derive as follows 1129 the mapped destination IPv6 address for the corresponding 1130 MAP CE, and also the mapped source IPv6 address for 1131 the IPv4 source. 1133 IPv4 suffix bits (p) 32 - 24 = 8 (18 (0x12)) 1134 PSID length: 8 1135 PSID: 0x34 (9030 (0x2346)) 1137 The resulting IPv6 packet will have the following key fields: 1139 IPv6 source address 2001:db8:ffff:0:0001:0203:0400:: 1140 IPv6 destination address: 2001:db8:0012:3400:00c0:0002:1200:3400 1141 IPv6 source Port: 80 1142 IPv6 destination Port: 9030 1144 Example 3: 1146 An IPv4 host behind the MAP CE (addressed as per the previous 1147 examples) corresponding with IPv4 host 1.2.3.4 will have its 1148 packets converted into IPv6 using the DMR configured on the MAP 1149 CE as follows: 1151 Default Mapping Rule used by MAP CE: {2001:db8:ffff::/64 1152 (Rule IPv6 prefix), 0.0.0.0/0 (Rule IPv4 prefix), null (BR IPv4 1153 address)} 1155 IPv4 source address (post NAT44 if present) 192.0.2.18 1156 IPv4 destination address: 1.2.3.4 1157 IPv4 source port (post NAT44 if present): 9030 1158 IPv4 destination port: 80 1159 IPv6 source address of MAP CE: 1160 2001:db8:0012:3400:00c0:0002:1200:3400 1161 IPv6 destination address: 2001:db8:ffff:0:0001:0203:0400:: 1163 Authors' Addresses 1165 Ole Troan 1166 Cisco Systems 1167 Philip Pedersens vei 1 1168 Lysaker 1366 1169 Norway 1171 Email: ot@cisco.com 1173 Wojciech Dec 1174 Cisco Systems 1175 Haarlerbergpark Haarlerbergweg 13-19 1176 Amsterdam, NOORD-HOLLAND 1101 CH 1177 Netherlands 1179 Phone: 1180 Email: wdec@cisco.com 1181 Xing Li 1182 CERNET Center/Tsinghua University 1183 Room 225, Main Building, Tsinghua University 1184 Beijing 100084 1185 CN 1187 Email: xing@cernet.edu.cn 1189 Congxiao Bao 1190 CERNET Center/Tsinghua University 1191 Room 225, Main Building, Tsinghua University 1192 Beijing 100084 1193 CN 1195 Email: congxiao@cernet.edu.cn 1197 Satoru Matsushima 1198 SoftBank Telecom 1199 1-9-1 Higashi-Shinbashi, Munato-ku 1200 Tokyo 1201 Japan 1203 Email: satoru.matsushima@g.softbank.co.jp 1205 Tetsuya Murakami 1206 IP Infusion 1207 1188 East Arques Avenue 1208 Sunnyvale 1209 USA 1211 Email: tetsuya@ipinfusion.com