idnits 2.17.1 draft-ietf-behave-address-format-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Sep 2009 rather than the newer Notice from 28 Dec 2009. (See https://trustee.ietf.org/license-info/) 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-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. -- The draft header indicates that this document obsoletes RFC2765, but the abstract doesn't seem to mention this, which it should. -- The draft header indicates that this document updates RFC4291, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC4291, updated by this document, for RFC5378 checks: 2003-10-10) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (March 27, 2010) is 5143 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 (-11) exists of draft-ietf-behave-dns64-04 == Outdated reference: A later version (-10) exists of draft-ietf-behave-v6v4-framework-03 -- Obsolete informational reference (is this intentional?): RFC 3484 (Obsoleted by RFC 6724) -- Obsolete informational reference (is this intentional?): RFC 5735 (Obsoleted by RFC 6890) Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group C. Bao 3 Internet-Draft CERNET Center/Tsinghua University 4 Obsoletes: 2765 (if approved) C. Huitema 5 Updates: 4291 (if approved) Microsoft Corporation 6 Intended status: Standards Track M. Bagnulo 7 Expires: September 28, 2010 UC3M 8 M. Boucadair 9 France Telecom 10 X. Li 11 CERNET Center/Tsinghua University 12 March 27, 2010 14 IPv6 Addressing of IPv4/IPv6 Translators 15 draft-ietf-behave-address-format-06.txt 17 Abstract 19 This document discusses the algorithmic translation of an IPv6 20 address to a corresponding IPv4 address, and vice versa, using only 21 statically configured information. It defines a well-known prefix 22 for use in algorithmic translations, while allowing organizations to 23 also use network-specific prefixes when appropriate. Algorithmic 24 translation is used in IPv4/IPv6 translators, as well as other types 25 of proxies and gateways (e.g., for DNS) used in IPv4/IPv6 scenarios. 27 Status of this Memo 29 This Internet-Draft is submitted to IETF in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF), its areas, and its working groups. Note that 34 other groups may also distribute working documents as Internet- 35 Drafts. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 The list of current Internet-Drafts can be accessed at 43 http://www.ietf.org/ietf/1id-abstracts.txt. 45 The list of Internet-Draft Shadow Directories can be accessed at 46 http://www.ietf.org/shadow.html. 48 This Internet-Draft will expire on September 28, 2010. 50 Copyright Notice 52 Copyright (c) 2010 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents 57 (http://trustee.ietf.org/license-info) in effect on the date of 58 publication of this document. Please review these documents 59 carefully, as they describe your rights and restrictions with respect 60 to this document. Code Components extracted from this document must 61 include Simplified BSD License text as described in Section 4.e of 62 the Trust Legal Provisions and are provided without warranty as 63 described in the BSD License. 65 Table of Contents 67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 68 1.1. Applicability Scope . . . . . . . . . . . . . . . . . . . 3 69 1.2. Conventions . . . . . . . . . . . . . . . . . . . . . . . 3 70 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 71 2. IPv4-Embedded IPv6 Address Prefix and Format . . . . . . . . . 4 72 2.1. Well Known Prefix . . . . . . . . . . . . . . . . . . . . 4 73 2.2. IPv4-Embedded IPv6 Address Format . . . . . . . . . . . . 4 74 2.3. Address Translation Algorithms . . . . . . . . . . . . . . 6 75 2.4. Text Representation . . . . . . . . . . . . . . . . . . . 6 76 3. Deployment Guidelines and Choices . . . . . . . . . . . . . . 7 77 3.1. Restrictions on the use of the Well-Known Prefix . . . . . 7 78 3.2. Impact on Inter-Domain Routing . . . . . . . . . . . . . . 8 79 3.3. Choice of Prefix for Stateless Translation Deployments . . 8 80 3.4. Choice of Prefix for Stateful Translation Deployments . . 11 81 3.5. Choice of Suffix . . . . . . . . . . . . . . . . . . . . . 11 82 3.6. Choice of the Well-Known Prefix . . . . . . . . . . . . . 12 83 4. Security Considerations . . . . . . . . . . . . . . . . . . . 13 84 4.1. Protection Against Spoofing . . . . . . . . . . . . . . . 13 85 4.2. Secure Configuration . . . . . . . . . . . . . . . . . . . 14 86 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 87 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 14 88 7. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 14 89 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 16 90 8.1. Normative References . . . . . . . . . . . . . . . . . . . 16 91 8.2. Informative References . . . . . . . . . . . . . . . . . . 16 92 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 16 94 1. Introduction 96 This document is part of a series of IPv4/IPv6 translation documents. 97 A framework for IPv4/IPv6 translation is discussed in 98 [I-D.ietf-behave-v6v4-framework], including a taxonomy of scenarios 99 that will be used in this document. Other documents specify the 100 behavior of various types of translators and gateways, including 101 mechanisms for translating between IP headers and other types of 102 messages that include IP addresses. This document specifies how an 103 individual IPv6 address is translated to a corresponding IPv4 104 address, and vice versa, in cases where an algorithmic mapping is 105 used. While specific types of devices are used herein as examples, 106 it is the responsibility of the specification of such devices to 107 reference this document for algorithmic mapping of the addresses 108 themselves. 110 Section 2 describes the prefixes and the format of "IPv4-Embedded 111 IPv6 addresses", i.e., IPv6 addresses in which 32 bits contain an 112 IPv4 address. This format is common to both "IPv4-Converted" and 113 "IPv4-Translatable" IPv6 addresses. This section also defines the 114 algorithms for translating addresses, and the text representation of 115 IPv4-Embedded IPv6 addresses. 117 Section 3 discusses the choice of prefixes, the conditions in which 118 they can be used, and the use of IPv4-Embedded IPv6 addresses with 119 stateless and stateful translation. 121 Section 4 discusses security concerns. 123 In some scenarios, a dual-stack host will unnecessarily send its 124 traffic through an IPv6/IPv4 translator. This can be caused by 125 host's default address selection algorithm [RFC3484], referrals, or 126 other reasons. Optimizing these scenarios for dual-stack hosts is 127 for future study. 129 1.1. Applicability Scope 131 This document is part of a series defining address translation 132 services. We understand that the address format could also be used 133 by other interconnection methods between IPv6 and IPv4, e.g., methods 134 based on encapsulation. If encapsulation methods are developed by 135 the IETF, we expect that their descriptions will document their 136 specific use of IPv4-Embedded IPv6 addresses. 138 1.2. Conventions 140 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 141 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 142 document are to be interpreted as described in RFC 2119 [RFC2119]. 144 1.3. Terminology 146 This document makes use of the following terms: 148 IPv4/IPv6 translator: an entity that translates IPv4 packets to IPv6 149 packets, and vice versa. It may do "stateless" translation, 150 meaning that there is no per-flow state required, or "stateful" 151 translation where per-flow state is created when the first packet 152 in a flow is received. 153 Address translator: any entity that has to derive an IPv4 address 154 from an IPv6 address or vice versa. This applies not only to 155 devices that do IPv4/IPv6 packet translation, but also to other 156 entities that manipulate addresses, such as name resolution 157 proxies (e.g. DNS64 [I-D.ietf-behave-dns64]) and possibly other 158 types of Application Layer Gateways (ALGs). 159 Well-Known Prefix: the IPv6 prefix defined in this document for use 160 in an algorithmic mapping. 161 Network-Specific Prefix: an IPv6 prefix assigned by an organization 162 for use in algorithmic mapping. Options for the Network Specific 163 Prefix are discussed in Section 3.3 and Section 3.4. 164 IPv4-Embedded IPv6 addresses: IPv6 addresses in which 32 bits 165 contain an IPv4 address. Their format is described in 166 Section 2.2. 167 IPv4-Converted IPv6 addresses: IPv6 addresses used to represent IPv4 168 nodes in an IPv6 network. They are a variant of IPv4-Embedded 169 IPv6 addresses, and follow the format described in Section 2.2. 170 IPv4-Translatable IPv6 addresses: IPv6 addresses assigned to IPv6 171 nodes for use with stateless translation. They are a variant of 172 IPv4-Embedded IPv6 addresses, and follow the format described in 173 Section 2.2. 175 2. IPv4-Embedded IPv6 Address Prefix and Format 177 2.1. Well Known Prefix 179 This document reserves a "Well-Known Prefix" for use in an 180 algorithmic mapping. The value of this IPv6 prefix is: 182 64:FF9B::/96 184 2.2. IPv4-Embedded IPv6 Address Format 186 IPv4-Converted IPv6 addresses and IPv4-Translatable IPv6 addresses 187 follow the same format, described here as the IPv4-Embedded IPv6 188 address Format. IPv4-Embedded IPv6 addresses are composed of a 189 variable length prefix, the embedded IPv4 address, and a variable 190 length suffix, as presented in the following diagram, in which PL 191 designates the prefix length: 193 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 194 |PL| 0-------------32--40--48--56--64--72--80--88--96--104-112-120-| 195 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 196 |32| prefix |v4(32) | u | suffix | 197 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 198 |40| prefix |v4(24) | u |(8)| suffix | 199 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 200 |48| prefix |v4(16) | u | (16) | suffix | 201 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 202 |56| prefix |(8)| u | v4(24) | suffix | 203 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 204 |64| prefix | u | v4(32) | suffix | 205 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 206 |96| prefix | v4(32) | 207 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 209 Figure 1 211 In these addresses, the prefix shall be either the "Well-Known 212 Prefix", or a "Network-Specific Prefix" unique to the organization 213 deploying the address translators. The prefixes can only have one of 214 the following lengths: 32, 40, 48, 56, 64 or 96. (The Well-Known 215 prefic is 96 bits long, and can only be used in the last form of the 216 table.) 218 Various deployments justify different prefix lengths with Network- 219 Specific prefixes. The tradeoff between different prefix lengths are 220 discussed in Section 3.3 and Section 3.4. 222 Bits 64 to 71 of the address are reserved for compatibility with the 223 host identifier format defined in the IPv6 addressing architecture 224 [RFC4291]. These bits MUST be set to zero. When using a /96 225 Network-Specific Prefix, the administrators MUST ensure that the bits 226 64 to 71 are set to zero. A simple way to achieve that is to 227 construct the /96 Network-Specific Prefix by picking a /64 prefix, 228 and then adding four octets set to zero. 230 The IPv4 address is encoded following the prefix, most significant 231 bits first. Depending of the prefix length, the 4 octets of the 232 address may be separated by the reserved octet "u", whose 8 bits MUST 233 be set to zero. In particular: 235 o When the prefix is 32 bits long, the IPv4 address is encoded in 236 positions 32 to 63. 237 o When the prefix is 40 bits long, 24 bits of the IPv4 address are 238 encoded in positions 40 to 63, with the remaining 8 bits in 239 position 72 to 79. 240 o When the prefix is 48 bits long, 16 bits of the IPv4 address are 241 encoded in positions 48 to 63, with the remaining 16 bits in 242 position 72 to 87. 243 o When the prefix is 56 bits long, 8 bits of the IPv4 address are 244 encoded in positions 56 to 63, with the remaining 24 bits in 245 position 72 to 95. 246 o When the prefix is 64 bits long, the IPv4 address is encoded in 247 positions 72 to 103. 248 o When the prefix is 96 bits long, the IPv4 address is encoded in 249 positions 96 to 127. 251 There are no remaining bits, and thus no suffix, if the prefix is 96 252 bits long. In the other cases, the remaining bits of the address 253 constitute the suffix. These bits are reserved for future 254 extensions, and SHOULD be set to zero. 256 2.3. Address Translation Algorithms 258 IPv4-Embedded IPv6 addresses are composed according to the following 259 algorithm: 260 o Concatenate the prefix, the 32 bits of the IPv4 address and the 261 null suffix if needed to obtain a 128 bit address. 262 o If the prefix length is less than 96 bits, insert the null octet 263 "u" at the appropriate position, thus causing the least 264 significant octet to be excluded, as documented in Figure 1. 266 The IPv4 addresses are extracted from the IPv4-Embedded IPv6 267 addresses according to the following algorithm: 268 o If the prefix is 96 bit long, extract the last 32 bits of the IPv6 269 address; 270 o for the other prefix lengths, extract the "u" octet to obtain a 271 120 bit sequence, then extract the 32 bits following the prefix. 273 2.4. Text Representation 275 IPv4-Embedded IPv6 addresses will be represented in text in 276 conformity with section 2.2 of [RFC4291]. IPv4-Embedded IPv6 277 addresses constructed using the Well-Known Prefix or a /96 Network- 278 Specific Prefix may be represented using the alternative form 279 presented in section 2.2 of [RFC4291], with the embedded IPv4 address 280 represented in dotted decimal notation. Examples of such 281 representations are presented in Table 1 and Table 2. 283 +-----------------------+------------+------------------------------+ 284 | Network-Specific | IPv4 | IPv4-Embedded IPv6 address | 285 | Prefix | address | | 286 +-----------------------+------------+------------------------------+ 287 | 2001:DB8::/32 | 192.0.2.33 | 2001:DB8:C000:221:: | 288 | 2001:DB8:100::/40 | 192.0.2.33 | 2001:DB8:1C0:2:21:: | 289 | 2001:DB8:122::/48 | 192.0.2.33 | 2001:DB8:122:C000:2:2100:: | 290 | 2001:DB8:122:300::/56 | 192.0.2.33 | 2001:DB8:122:3C0:0:221:: | 291 | 2001:DB8:122:344::/64 | 192.0.2.33 | 2001:DB8:122:344:C0:2:2100:: | 292 | 2001:DB8:122:344::/96 | 192.0.2.33 | 2001:DB8:122:344::192.0.2.33 | 293 +-----------------------+------------+------------------------------+ 295 Table 1: Text representation of IPv4-Embedded IPv6 addresses using 296 Network-Specific Prefixes 298 +-------------------+--------------+----------------------------+ 299 | Well Known Prefix | IPv4 address | IPv4-Embedded IPv6 address | 300 +-------------------+--------------+----------------------------+ 301 | 64:FF9B::/96 | 192.0.2.33 | 64:FF9B::192.0.2.33 | 302 +-------------------+--------------+----------------------------+ 304 Table 2: Text representation of IPv4-Embedded IPv6 addresses using 305 the Well-Known Prefix 307 The Network-Specific Prefix examples in Table 1 are derived from the 308 IPv6 prefix reserved for documentation in [RFC3849]. The IPv4 309 address 192.0.2.33 is part of the subnet 192.0.2.0/24 reserved for 310 documentation in [RFC5735]. 312 3. Deployment Guidelines and Choices 314 3.1. Restrictions on the use of the Well-Known Prefix 316 The Well-Known Prefix MAY be used by organizations deploying 317 translation services, as explained in Section 3.4. 319 The Well-Known Prefix SHOULD NOT be used to construct IPv4- 320 Translatable addresses. The nodes served by IPv4-Translatable IPv6 321 addresses should be able to receive global IPv6 traffic bound to 322 their IPv4-Translatable IPv6 address without incurring intermediate 323 protocol translation. This is only possible if the specific prefix 324 used to build the IPv4-Translatable IPv6 addresses is advertized in 325 inter-domain routing, but the advertisement of more specific prefixes 326 derived from the Well-Known Prefix is not supported, as explained in 327 Section 3.2. Network-Specific Prefixes SHOULD be used in these 328 scenarios, as explained in Section 3.3. 330 The Well-Known Prefix MUST NOT be used to represent non global IPv4 331 addresses, such as those defined in [RFC1918]. 333 3.2. Impact on Inter-Domain Routing 335 The Well-Known Prefix MAY appear in inter-domain routing tables, if 336 service providers decide to provide IPv6-IPv4 interconnection 337 services to peers. Advertisement of the Well-Known Prefix SHOULD be 338 controlled either by upstream and/or downstream service providers 339 owing to inter-domain routing policies, e.g., through configuration 340 of BGP [RFC4271]. Organizations that advertize the Well-Known Prefix 341 in inter-domain routing MUST be able to provide IPv4/IPv6 translation 342 service. 344 When the IPv4/IPv6 translation relies on the Well-Known Prefix, 345 embedded IPv6 prefixes longer than the Well-Known Prefix MUST NOT be 346 advertised in BGP (especially e-BGP) [RFC4271] because this leads to 347 importing the IPv4 routing table into the IPv6 one and therefore 348 induces scalability issues to the global IPv6 routing table. 349 Administrators of BGP nodes SHOULD configure filters that discard 350 advertisements of embedded IPv6 prefixes longer than the Well-Known 351 Prefix. 353 When the IPv4/IPv6 translation service relies on Network-Specific 354 Prefixes, the IPv4-Translatable IPv6 prefixes used in stateless 355 translation MUST be advertised with proper aggregation to the IPv6 356 Internet. Similarly, if translators are configured with multiple 357 Network-Specific Prefixes,these prefixes MUST be advertised to the 358 IPv6 Internet with proper aggregation. 360 3.3. Choice of Prefix for Stateless Translation Deployments 362 Organizations may deploy translation services using stateless 363 translation. In these deployments, internal IPv6 nodes are addressed 364 using IPv4-Translatable IPv6 addresses, which enable them to be 365 accessed by IPv4 nodes. The addresses of these external IPv4 nodes 366 are then represented in IPv4-Converted IPv6 addresses. 368 Organizations deploying stateless IPv4/IPv6 translation SHOULD assign 369 a Network-Specific Prefix to their IPv4/IPv6 translation service. 370 IPv4-Translatable and IPv4-Converted IPv6 addresses MUST be 371 constructed as specified in Section 2.2. IPv4-Translatable IPv6 372 addresses MUST use the selected Network-Specific Prefix. Both IPv4- 373 Translatable IPv6 addresses and IPv4-Converted IPv6 addresses SHOULD 374 use the same prefix. 376 Using the same prefix ensures that IPv6 nodes internal to the 377 organization will use the most efficient paths to reach the nodes 378 served by IPv4-Translatable IPv6 addresses. Specifically, if a node 379 learns the IPv4 address of a target internal node without knowing 380 that this target is in fact located behind the same translator that 381 the node also uses, translation rules will ensure that the IPv6 382 address constructed with the Network-Specific prefix is the same as 383 the IPv4-Translatable IPv6 address assigned to the target. Standard 384 routing preference (more specific wins) will then ensure that the 385 IPv6 packets are delivered directly, without requiring "hair-pinning" 386 at the translator. 388 The intra-domain routing protocol must be able to deliver packets to 389 the nodes served by IPv4-Translatable IPv6 addresses. This may 390 require routing on some or all of the embedded IPv4 address bits. 391 Security considerations detailed in Section 4 require that routers 392 check the validity of the IPv4-Translatable IPv6 source addresses, 393 using some form of reverse path check. 395 The management of stateless address translation can be illustrated 396 with a small example. We will consider an IPv6 network with the 397 prefix 2001:DB8:122::/48. The network administrator has selected the 398 Network-Specific prefix 2001:DB8:122:344::/64 for managing stateless 399 IPv4/IPv6 translation. The IPv4-Translatable address block is 2001: 400 DB8:122:344:C0:2::/96 and this block is visible in IPv4 as the subnet 401 192.0.2.0/24. In this network, the host A is assigned the IPv4- 402 Translatable IPv6 address 2001:DB8:122:344:C0:2:2100::, which 403 corresponds to the IPv4 address 192.0.2.33. Host A's address is 404 configured either manually or through DHCPv6. 406 In this example, host A is not directly connected to the translator, 407 but instead to a link managed by a router R. The router R is 408 configured to forward to A the packets bound to 2001:DB8:122:344:C0: 409 2:2100::. To receive these packets, R will advertise reachability of 410 the prefix 2001:DB8:122:344:C0:2:2100::/104 in the intra-domain 411 routing protocol -- or perhaps a shorter prefix if many hosts on link 412 have IPv4-Translatable IPv6 addresses derived from the same IPv4 413 subnet. If a packet bound to 192.0.2.33 reaches the translator, the 414 destination address will be translated to 2001:DB8:122:344:C0:2: 415 2100::, and the packet will be routed towards R and then to A. 417 Let's suppose now that a host B of the same domain learns the IPv4 418 address of A, maybe through an application-specific referral. If B 419 has translation-aware software, B can compose a destination address 420 by combining the Network-Specific Prefix 2001:DB8:122:344::/64 and 421 the IPv4 address 192.0.2.33, resulting in the address 2001:DB8:122: 422 344:C0:2:2100::. The packet sent by B will be forwarded towards R, 423 and then to A, avoiding protocol translation. 425 Forwarding, and reverse path checks, should be performed on the 426 combination of the prefix and the IPv4 address. In theory, routers 427 should be able to route on prefixes of any length. However, routing 428 on prefixes larger than 64 bits may be slower on some routers. But 429 routing efficiency is not the only consideration in the choice of a 430 prefix length. Organizations also need to consider the availability 431 of prefixes, and the potential impact of all-zeroes identifiers. 433 If a /32 prefix is used, all the routing bits are contained in the 434 top 64 bits of the IPv6 address, leading to excellent routing 435 properties. These prefixes may however be hard to obtain, and 436 allocation of a /32 to a small set of IPv4-Translatable IPv6 437 addresses may be seen as wasteful. In addition, the /32 prefix and a 438 zero suffix leads to an all-zeroes interface identifier, an issue 439 that we discuss in Section 3.5. 441 Intermediate prefix lengths such as /40, /48 or /56 appear as 442 compromises. Only some of the IPv4 bits are part of the /64 443 prefixes. Reverse path checks, in particular, may have a limited 444 efficiency. Reverse path checks limited to the most significant bits 445 of the IPv4 address will reduce the possibility of spoofing external 446 IPv4 addresses, but would allow IPv6 nodes to spoof internal IPv4- 447 Translatable IPv6 addresses. 449 We propose here a compromise, based on using no more than 1/256th of 450 an organization's allocation of IPv6 addresses for the IPv4/IPv6 451 translation service. For example, if the organization is an Internet 452 Service Provider with an allocated IPv6 prefix /32 or shorter, the 453 ISP could dedicate a /40 prefix to the translation service. An end 454 site with a /48 allocation could dedicate a /56 prefix to the 455 translation service, or possibly a /96 prefix if all IPv4- 456 Translatable IPv6 addresses are located on the same link. 458 The recommended prefix length is also a function of the deployment 459 scenario. The stateless translation can be used for Scenario 1, 460 Scenario 2, Scenario 5, and Scenario 6 defined in 461 [I-D.ietf-behave-v6v4-framework]. For different scenarios, the 462 prefix length recommendations are: 463 o For scenario 1 (an IPv6 network to the IPv4 Internet) and scenario 464 2 (the IPv4 Internet to an IPv6 network), we recommend using a /40 465 prefix for an ISP holding a /32 allocation, and a /56 prefix for a 466 site holding a /48 allocation. 467 o For scenario 5 (an IPv6 network to an IPv4 network) and scenario 6 468 (an IPv4 network to an IPv6 network), we recommend using a /64 or 469 a /96 prefix. 471 IPv4-Translatable IPv6 addresses SHOULD follow the IPv6 address 472 architecture and SHOULD be compatible with the IPv4 address 473 architecture. The first IPv4-translatable address is the subnet- 474 router anycast address in IPv6 and network identifier in IPv4, the 475 last IPv4-translatable address is the subnet broadcast addresses in 476 IPv4. Both of them SHOULD NOT be used for IPv6 nodes. In addition, 477 the minimum IPv4 subnet can be used for hosts is /30 (the router 478 interface needs a valid address for the same subnet) and this rule 479 SHOULD also be applied to the corresponding subnet of the IPv4- 480 translatable addresses. 482 3.4. Choice of Prefix for Stateful Translation Deployments 484 Organizations may deploy translation services based on stateful 485 translation technology. An organization may decide to use either a 486 Network-Specific Prefix or the Well-Known Prefix for its stateful 487 IPv4/IPv6 translation service. 489 When these services are used, IPv6 nodes are addressed through 490 standard IPv6 addresses, while IPv4 nodes are represented by IPv4- 491 Converted IPv6 addresses, as specified in Section 2.2. 493 The stateful nature of the translation creates a potential stability 494 issue when the organization deploys multiple translators. If several 495 translators use the same prefix, there is a risk that packets 496 belonging to the same connection may be routed to different 497 translators as the internal routing state changes. This issue can be 498 avoided either by assigning different prefixes to different 499 translators, or by ensuring that all translators using same prefix 500 coordinate their state. 502 Stateful translation can be used in scenarios defined in 503 [I-D.ietf-behave-v6v4-framework]. The Well Known Prefix SHOULD be 504 used in these scenarios, with two exceptions: 505 o In all scenarios, the translation MAY use a Network-Specific 506 Prefix, if deemed appropriate for management reasons. 507 o The Well-Known Prefix MUST NOT be used for scenario 3 (the IPv6 508 Internet to an IPv4 network), as this would lead to using the 509 Well-Known Prefix with non-global IPv4 addresses. That means a 510 Network-Specific Prefix MUST be used in that scenario, for example 511 a /96 prefix compatible with the Well-Known prefix format. 513 3.5. Choice of Suffix 515 The address format described in Section 2.2 recommends a zero suffix. 516 Before making this recommendation, we considered different options: 517 checksum neutrality; the encoding of a port range; and a value 518 different than 0. 520 In the case of stateless translation, there would be no need for the 521 translator to recompute a one's complement checksum if both the IPv4- 522 Translatable and the IPv4-Converted IPv6 addresses were constructed 523 in a "checksum-neutral" manner, that is if the IPv6 addresses would 524 have the same one's complement checksum as the embedded IPv4 address. 525 In the case of stateful translation, checksum neutrality does not 526 eliminate checksum computation during translation, as only one of the 527 two addresses would be checksum neutral. We considered reserving 16 528 bits in the suffix to guarantee checksum neutrality, but declined 529 because it would not help with stateful translation, and because 530 checksum neutrality can also be achieved by an appropriate choice of 531 the Network-Specific Prefix, as was done for example with the Well- 532 Known Prefix. 534 There have been proposals to complement stateless translation with a 535 port-range feature. Instead of mapping an IPv4 address to exactly 536 one IPv6 prefix, the options would allow several IPv6 nodes to share 537 an IPv4 address, with each node managing a different range of ports. 538 If a port range extension is needed, it could be defined later, using 539 bits currently reserved as null in the suffix. 541 When a /32 prefix is used, an all-zero suffix results in an all-zero 542 interface identifier. We understand the conflict with Section 2.6.1 543 of RFC4291, which specifies that all zeroes are used for the subnet- 544 router anycast address. However, in our specification, there would 545 be only one node with an IPv4-Translatable IPv6 address in the /64 546 subnet, and the anycast semantic would not create confusion. We thus 547 decided to keep the null suffix for now. This issue does not exist 548 for prefixes larger than 32 bits, such as the /40, /56, /64 and /96 549 prefixes that we recommend in Section 3.3. 551 3.6. Choice of the Well-Known Prefix 553 Before making our recommendation of the Well-Known Prefix, we were 554 faced with three choices: 555 o reuse the IPv4-mapped prefix, ::FFFF:0:0/96, as specified in RFC 556 2765 Section 2.1; 557 o request IANA to allocate a /32 prefix, 558 o or request allocation of a new /96 prefix. 560 We weighted the pros and cons of these choices before settling on the 561 recommended /96 Well-Known Prefix. 563 The main advantage of the existing IPv4-mapped prefix is that it is 564 already defined. Reusing that prefix would require minimal 565 standardization efforts. However, being already defined is not just 566 an advantage, as there may be side effects of current 567 implementations. When presented with the IPv4-mapped prefix, current 568 versions of Windows and MacOS generate IPv4 packets, but will not 569 send IPv6 packets. If we used the IPv4-mapped prefix, these nodes 570 would not be able to support translation without modification. This 571 will defeat the main purpose of the translation techniques. We thus 572 eliminated the first choice, and decided to not reuse the IPv4-mapped 573 prefix, ::FFFF:0:0/96. 575 A /32 prefix would have allowed the embedded IPv4 address to fit 576 within the top 64 bits of the IPv6 address. This would have 577 facilitated routing and load balancing when an organization deploys 578 several translators. However, such destination-address based load 579 balancing may not be desirable. It is not compatible with STUN in 580 the deployments involving multiple stateful translators, each one 581 having a different pool of IPv4 addresses. STUN compatibility would 582 only be achieved if the translators managed the same pool of IPv4 583 addresses and were able to coordinate their translation state, in 584 which case there is no big advantage to using a /32 prefix rather 585 than a /96 prefix. 587 According to Section 2.2 of [RFC4291], in the legal textual 588 representations of IPv6 addresses, dotted decimal can only appear at 589 the end. The /96 prefix is compatible with that requirement. It 590 enables the dotted decimal notation without requiring an update to 591 [RFC4291]. This representation makes the address format easier to 592 use, and log files easier to read. 594 The prefix that we recommend has the particularity of being "checksum 595 neutral". The sum of the hexadecimal numbers "0064" and "FF9B" is 596 "FFFF", i.e. a value equal to zero in one's complement arithmetic. 597 An IPv4-Embedded IPv6 address constructed with this prefix will have 598 the same one's complement checksum as the embedded IPv4 address. 600 4. Security Considerations 602 4.1. Protection Against Spoofing 604 By and large, IPv4/IPv6 translators can be modeled as special 605 routers, are subject to the same risks, and can implement the same 606 mitigations. There is however a particular risk that directly 607 derives from the practice of embedding IPv4 addresses in IPv6: 608 address spoofing. 610 An attacker could use an IPv4-Embedded IPv6 address as the source 611 address of malicious packets. After translation, the packets will 612 appear as IPv4 packets from the specified source, and the attacker 613 may be hard to track. If left without mitigation, the attack would 614 allow malicious IPv6 nodes to spoof arbitrary IPv4 addresses. 616 The mitigation is to implement reverse path checks, and to verify 617 throughout the network that packets are coming from an authorized 618 location. 620 4.2. Secure Configuration 622 The prefixes and formats need to be the configured consistently among 623 multiple devices in the same network (e.g., nodes that need to prefer 624 native over translated addresses, DNS gateways, and IPv4/IPv6 625 translators). As such, the means by which they are learned/ 626 configured MUST be secure. Specifying a default prefix and/or format 627 in implementations provides one way to configure them securely. Any 628 alternative means of configuration is responsible for specifying how 629 to do so securely. 631 5. IANA Considerations 633 The IANA is requested to add a note to the documentation of the 634 0000::/8 address block in 635 http://www.iana.org/assignments/ipv6-address-space to document the 636 assignment by the IETF of the Well Known Prefix. For example: 638 The "Well Known Prefix" 64:FF9B::/96 used in an algorithmic 639 mapping between IPv4 to IPv6 addresses is defined out of the 640 0000::/8 address block, per (this document). 642 6. Acknowledgements 644 Many people in the Behave WG have contributed to the discussion that 645 led to this document, including Andrew Sullivan, Andrew Yourtchenko, 646 Brian Carpenter, Dan Wing, Ed Jankiewicz, Fred Baker, Hiroshi Miyata, 647 Iljitsch van Beijnum, John Schnizlein, Keith Moore, Kevin Yin, Magnus 648 Westerlund, Margaret Wasserman, Masahito Endo, Phil Roberts, Philip 649 Matthews, Remi Denis-Courmont, Remi Despres and William Waites. 651 Marcelo Bagnulo is partly funded by Trilogy, a research project 652 supported by the European Commission under its Seventh Framework 653 Program. 655 7. Contributors 657 The following individuals co-authored drafts from which text has been 658 incorporated, and are listed in alphabetical order. 660 Congxiao Bao 661 CERNET Center/Tsinghua University 662 Room 225, Main Building, Tsinghua University 663 Beijing, 100084 664 China 665 Phone: +86 62785983 666 Email: congxiao@cernet.edu.cn 668 Dave Thaler 669 Microsoft Corporation 670 One Microsoft Way 671 Redmond, WA 98052 672 USA 673 Phone: +1 425 703 8835 674 Email: dthaler@microsoft.com 676 Fred Baker 677 Cisco Systems 678 Santa Barbara, California 93117 679 USA 680 Phone: +1-408-526-4257 681 Fax: +1-413-473-2403 682 Email: fred@cisco.com 684 Hiroshi Miyata 685 Yokogawa Electric Corporation 686 2-9-32 Nakacho 687 Musashino-shi, Tokyo 180-8750 688 JAPAN 689 Email: h.miyata@jp.yokogawa.com 691 Marcelo Bagnulo 692 Universidad Carlos III de Madrid 693 Av. Universidad 30 694 Leganes, Madrid 28911 695 ESPANA 696 Email: marcelo@it.uc3m.es 698 Xing Li 699 CERNET Center/Tsinghua University 700 Room 225, Main Building, Tsinghua University 701 Beijing, 100084 702 China 703 Phone: +86 62785983 704 Email: xing@cernet.edu.cn 706 8. References 708 8.1. Normative References 710 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 711 Requirement Levels", BCP 14, RFC 2119, March 1997. 713 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 714 Architecture", RFC 4291, February 2006. 716 8.2. Informative References 718 [I-D.ietf-behave-dns64] 719 Bagnulo, M., Sullivan, A., Matthews, P., and I. Beijnum, 720 "DNS64: DNS extensions for Network Address Translation 721 from IPv6 Clients to IPv4 Servers", 722 draft-ietf-behave-dns64-04 (work in progress), 723 December 2009. 725 [I-D.ietf-behave-v6v4-framework] 726 Baker, F., Li, X., Bao, C., and K. Yin, "Framework for 727 IPv4/IPv6 Translation", 728 draft-ietf-behave-v6v4-framework-03 (work in progress), 729 October 2009. 731 [RFC1918] Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and 732 E. Lear, "Address Allocation for Private Internets", 733 BCP 5, RFC 1918, February 1996. 735 [RFC3484] Draves, R., "Default Address Selection for Internet 736 Protocol version 6 (IPv6)", RFC 3484, February 2003. 738 [RFC3849] Huston, G., Lord, A., and P. Smith, "IPv6 Address Prefix 739 Reserved for Documentation", RFC 3849, July 2004. 741 [RFC4271] Rekhter, Y., Li, T., and S. Hares, "A Border Gateway 742 Protocol 4 (BGP-4)", RFC 4271, January 2006. 744 [RFC5735] Cotton, M. and L. Vegoda, "Special Use IPv4 Addresses", 745 BCP 153, RFC 5735, January 2010. 747 Authors' Addresses 749 Congxiao Bao 750 CERNET Center/Tsinghua University 751 Room 225, Main Building, Tsinghua University 752 Beijing, 100084 753 China 755 Phone: +86 10-62785983 756 Email: congxiao@cernet.edu.cn 758 Christian Huitema 759 Microsoft Corporation 760 One Microsoft Way 761 Redmond, WA 98052-6399 762 U.S.A. 764 Email: huitema@microsoft.com 766 Marcelo Bagnulo 767 UC3M 768 Av. Universidad 30 769 Leganes, Madrid 28911 770 Spain 772 Phone: +34-91-6249500 773 Fax: 774 Email: marcelo@it.uc3m.es 775 URI: http://www.it.uc3m.es/marcelo 777 Mohamed Boucadair 778 France Telecom 779 3, Av Francois Chateaux 780 Rennes 350000 781 France 783 Email: mohamed.boucadair@orange-ftgroup.com 784 Xing Li 785 CERNET Center/Tsinghua University 786 Room 225, Main Building, Tsinghua University 787 Beijing, 100084 788 China 790 Phone: +86 10-62785983 791 Email: xing@cernet.edu.cn