idnits 2.17.1 draft-ietf-behave-v6v4-xlate-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.i or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. 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 : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([I-D.ietf-behave-v6v4-framework], [RFC0791], [RFC0792], [I-D.ietf-behave-address-format], [RFC2460], [RFC2765], [RFC4443]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. -- The draft header indicates that this document obsoletes RFC2765, but the abstract doesn't seem to directly say this. It does mention RFC2765 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (September 9, 2009) is 5343 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) == Unused Reference: 'I-D.xli-behave-v4v6-prefix' is defined on line 948, but no explicit reference was found in the text == Unused Reference: 'RFC2119' is defined on line 965, but no explicit reference was found in the text == Unused Reference: 'RFC4301' is defined on line 1050, but no explicit reference was found in the text == Unused Reference: 'RFC4303' is defined on line 1056, but no explicit reference was found in the text ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 2460 (Obsoleted by RFC 8200) ** Obsolete normative reference: RFC 2765 (Obsoleted by RFC 6145) == Outdated reference: A later version (-10) exists of draft-ietf-behave-address-format-00 == Outdated reference: A later version (-10) exists of draft-ietf-behave-v6v4-framework-01 == Outdated reference: A later version (-12) exists of draft-ietf-behave-v6v4-xlate-stateful-01 == Outdated reference: A later version (-03) exists of draft-venaas-behave-v4v6mc-framework-00 -- Obsolete informational reference (is this intentional?): RFC 3171 (Obsoleted by RFC 5771) Summary: 5 errors (**), 0 flaws (~~), 10 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 behave X. Li 3 Internet-Draft C. Bao 4 Obsoletes: 2765 (if approved) CERNET Center/Tsinghua University 5 Intended status: Standards Track F. Baker 6 Expires: March 13, 2010 Cisco Systems 7 September 9, 2009 9 IP/ICMP Translation Algorithm 10 draft-ietf-behave-v6v4-xlate-01 12 Status of this Memo 14 This Internet-Draft is submitted to IETF in full conformance with the 15 provisions of BCP 78 and BCP 79. This document may contain material 16 from IETF Documents or IETF Contributions published or made publicly 17 available before November 10, 2008. The person(s) controlling the 18 copyright in some of this material may not have granted the IETF 19 Trust the right to allow modifications of such material outside the 20 IETF Standards Process. Without obtaining an adequate license from 21 the person(s) controlling the copyright in such materials, this 22 document may not be modified outside the IETF Standards Process, and 23 derivative works of it may not be created outside the IETF Standards 24 Process, except to format it for publication as an RFC or to 25 translate it into languages other than English. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF), its areas, and its working groups. Note that 29 other groups may also distribute working documents as Internet- 30 Drafts. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 The list of current Internet-Drafts can be accessed at 38 http://www.ietf.org/ietf/1id-abstracts.txt. 40 The list of Internet-Draft Shadow Directories can be accessed at 41 http://www.ietf.org/shadow.html. 43 This Internet-Draft will expire on March 13, 2010. 45 Copyright Notice 47 Copyright (c) 2009 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents in effect on the date of 52 publication of this document (http://trustee.ietf.org/license-info). 53 Please review these documents carefully, as they describe your rights 54 and restrictions with respect to this document. 56 Abstract 58 This document specifies an update to the Stateless IP/ICMP 59 Translation Algorithm (SIIT) described in RFC 2765. The algorithm 60 translates between IPv4 and IPv6 packet headers (including ICMP 61 headers). 63 This specification addresses both a stateless and a stateful mode. 64 In the stateless mode, translation information is carried in the 65 address itself, permitting both IPv4->IPv6 and IPv6->IPv4 session 66 establishment without maintaining state in the IP/ICMP translator. 67 In the stateful mode, translation state is maintained between IPv4 68 address/transport port tuples and IPv6 address/transport port tuples, 69 enabling IPv6 systems to open sessions with IPv4 systems. The choice 70 of operational mode is made by the operator deploying the network and 71 is critical to the operation of the applications using it. 73 Significant issues exist in the stateless and stateful modes that are 74 not addressed in this document, related to the address assignment and 75 the maintenance of the translation tables, respectively. This 76 document confines itself to the actual translation. 78 Acknowledgement of previous work 80 This document is a product of the 2008-2009 effort to define a 81 replacement for NAT-PT. It is an update to and directly derivative 82 from Erik Nordmark's [RFC2765], which similarly provides both 83 stateless and stateful translation between IPv4 [RFC0791] and IPv6 84 [RFC2460], and between ICMPv4 [RFC0792] and ICMPv6 [RFC4443]. The 85 original document was a product of the NGTRANS working group. 87 The changes in this document reflect five components: 89 1. Redescribing the network model to map to present and projected 90 usage [I-D.ietf-behave-v6v4-framework]. 92 2. Moving the address format to the address format document 93 [I-D.ietf-behave-address-format], to coordinate with other drafts 94 on the topic. 96 3. Describing both stateful and stateless operation. 98 4. Some changes in ICMP. 100 5. Updating references. 102 Requirements 104 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 105 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 106 document are to be interpreted as described in RFC 2119. 108 Table of Contents 110 1. Introduction and Motivation . . . . . . . . . . . . . . . . . 4 111 1.1. Translation Model . . . . . . . . . . . . . . . . . . . . 4 112 1.2. Applicability and Limitations . . . . . . . . . . . . . . 5 113 1.3. Stateless vs. Stateful Mode . . . . . . . . . . . . . . . 6 114 2. Translating from IPv4 to IPv6 . . . . . . . . . . . . . . . . 6 115 2.1. Translating IPv4 Headers into IPv6 Headers . . . . . . . . 8 116 2.2. Translating UDP over IPv4 . . . . . . . . . . . . . . . . 10 117 2.3. Translating ICMPv4 Headers into ICMPv6 Headers . . . . . . 10 118 2.4. Translating ICMPv4 Error Messages into ICMPv6 . . . . . . 13 119 2.5. Translator sending ICMP error message . . . . . . . . . . 13 120 2.6. Transport-layer Header Translation . . . . . . . . . . . . 13 121 2.7. Knowing when to Translate . . . . . . . . . . . . . . . . 14 122 3. Translating from IPv6 to IPv4 . . . . . . . . . . . . . . . . 14 123 3.1. Translating IPv6 Headers into IPv4 Headers . . . . . . . . 15 124 3.2. Translating ICMPv6 Headers into ICMPv4 Headers . . . . . . 17 125 3.3. Translating ICMPv6 Error Messages into ICMPv4 . . . . . . 19 126 3.4. Translator sending ICMPv6 error message . . . . . . . . . 19 127 3.5. Transport-layer Header Translation . . . . . . . . . . . . 19 128 3.6. Knowing when to Translate . . . . . . . . . . . . . . . . 20 129 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 130 5. Security Considerations . . . . . . . . . . . . . . . . . . . 20 131 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 20 132 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21 133 7.1. Normative References . . . . . . . . . . . . . . . . . . . 21 134 7.2. Informative References . . . . . . . . . . . . . . . . . . 22 135 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 23 137 1. Introduction and Motivation 139 An understanding of the framework presented in 140 [I-D.ietf-behave-v6v4-framework] is presumed in this document. 142 The transition mechanisms specified in [RFC4213] handle the case of 143 dual IPv4/IPv6 hosts interoperating with both dual IPv4/IPv6 hosts 144 and IPv4-only hosts, which is needed early in the transition to IPv6. 145 The dual IPv4/IPv6 hosts are assigned both an IPv4 and one or more 146 IPv6 addresses. The number of available globally unique IPv4 147 addresses is becoming smaller and smaller as the Internet grows; we 148 expect that there will be a desire to take advantage of the large 149 IPv6 address space and not require that every new Internet node have 150 a permanently assigned IPv4 address. 152 SIIT [RFC2765] is designed for the case of small networks (e.g., a 153 single subnet) and for a site that has IPv6-only hosts in a dual 154 IPv4/IPv6 network. This use assumes a mechanism for IPv6 nodes to 155 acquire a temporary address from the pool of IPv4 addresses. 156 However, SIIT is not useful in the case when the IPv6 nodes need to 157 acquire temporary IPv4 addresses from a "distant" SIIT box operated 158 by a different administration, or require that the IPv6 Internet 159 contain routes for IPv6-mapped addresses (The latter is known to be a 160 very bad idea due to the size of the IPv4 routing table that would 161 potentially be injected into IPv6 routing in the form of IPv4-mapped 162 addresses.) 164 In addition, due to the IPv4 address deletion problem, it is 165 desirable that a single IPv4 address needs to be shared via transport 166 port multiplexing for different IPv6 nodes when they communicate with 167 other IPv4 hosts. 169 Furthermore, in SIIT [RFC2765], an IPv6-only node that works through 170 SIIT translators needs some modifications beyond a normal IPv6-only 171 node. These modifications are not strictly implied in this document, 172 since normal IPv6 addresses can be used in the IPv6 end nodes. 174 A detailed discussion of translation scenarios is presented in 175 [I-D.ietf-behave-v6v4-framework], while the technical specification 176 of the translation algorithm itself is covered in this document. 178 1.1. Translation Model 180 This document specifies the translation algorithm that is one of the 181 components described in [I-D.ietf-behave-v6v4-framework] needed to 182 make IPv6-only nodes interoperate with IPv4-only nodes as shown in 183 Figure 1. 185 -------- -------- 186 // IPv4 \\ // IPv6 \\ 187 / Domain \ / Domain \ 188 / +----+ +--+ \ 189 | |XLAT| |S2| | Sn: Servers 190 | +--+ +----+ +--+ | Hn: Clients 191 | |S1| +----+ | 192 | +--+ |DNS | +--+ | XLAT: V4/V6 Translator 193 \ +--+ +----+ |H2| / DNS: DNS Server 194 \ |H1| / \ +--+ / 195 \\ +--+ // \\ // 196 -------- -------- 198 Figure 1: Translation Model 200 The translation model consists of two or more network domains 201 connected by one or more IP/ICMP translators. One of those networks 202 either routes IPv4 but not IPv6, or contains some hosts that only 203 implement IPv4 or have IPv4 only applications (even if the host and 204 the network support IPv6). The other network either routes IPv6 but 205 not IPv4, or contains some hosts that only implement IPv6 or has IPv6 206 only applications. Both networks contain clients, servers, and 207 peers. 209 1.2. Applicability and Limitations 211 The use of this translation algorithm assumes that the IPv6 network 212 is somehow well-connected i.e., when an IPv6 node wants to 213 communicate with another IPv6 node there is an IPv6 path between 214 them. Various tunneling schemes exist that can provide such a path, 215 but those mechanisms and their use is outside the scope of this 216 document and [RFC2765]. 218 The translation algorithm can be used not only in a subnet, but can 219 also be used in service provider's backbone network. 221 The translating function specified in this document does not 222 translate any IPv4 options and it does not translate IPv6 routing 223 headers, hop-by-hop extension headers, destination options headers or 224 source routing headers [RFC2765]. 226 The issues and algorithms in the translation of datagram containing 227 TCP segments are described in [RFC5382]. The considerations of that 228 document are applicable in this case as well. 230 Fragmented IPv4 UDP packets that do not contain a UDP checksum (i.e. 231 the UDP checksum field is zero) are not of significant use over wide- 232 areas in the Internet and will not be translated by the IP/ICMP 233 translator [Miller]. 235 IPv4 multicast addresses [RFC3171] cannot be mapped to IPv6 multicast 236 addresses [RFC3307] based on the unicast mapping rule. However, a 237 special rule for address translation can be created for the multicast 238 packet translation algorithm; if that is done, the IP/ICMP header 239 translation aspect of this memo works. 241 1.3. Stateless vs. Stateful Mode 243 The IP/ICMP translator has two possible modes of operation: stateless 244 and stateful. In both cases, we assume that a system that has an 245 IPv4 address but not an IPv6 address is communicating with a system 246 that has an IPv6 address but no IPv4 address, or that the two systems 247 do not have contiguous routing connectivity and hence are forced to 248 have their communications translated. 250 In the stateless mode, a specific IPv6 address range will represent 251 IPv4 systems, and the IPv6 systems have addresses that can be 252 algorithmatically mapped to a subset of the service provider's IPv4 253 addresses. In this mode, there is no need to concern oneself with 254 port translation or translation tables, as the IPv4 and IPv6 255 counterparts are algorithmically related. 257 In the stateful mode, a specific IPv6 address range will represent 258 IPv4 systems, but the IPv6 systems may use any [RFC4291] addresses 259 except in that range. In this case, a translation table is required 260 to bind the IPv6 systems' addresses to the IPv4 addresses maintained 261 in the translator. 263 The address translation mechanisms for the stateless and the stateful 264 translations are defined in [I-D.ietf-behave-address-format]. 266 2. Translating from IPv4 to IPv6 268 When an IP/ICMP translator receives an IPv4 datagram addressed to a 269 destination towards the IPv6 domain, it translates the IPv4 header of 270 that packet into an IPv6 header. Since the ICMP [RFC0792][RFC4443], 271 TCP [RFC0793] and UDP [RFC0768] headers contain checksums that cover 272 IP header information, if the address mapping algorithm is not 273 checksum-neutral, the ICMP and transport-layer headers MUST be 274 updated. The data portion of the packet is left unchanged. The IP/ 275 ICMP translator then forwards the packet based on the IPv6 276 destination address. The original IPv4 header on the packet is 277 removed and replaced by an IPv6 header. 279 +-------------+ +-------------+ 280 | IPv4 | | IPv6 | 281 | Header | | Header | 282 +-------------+ +-------------+ 283 | Transport | | Fragment | 284 | Layer | ===> | Header | 285 | Header | |(not always) | 286 +-------------+ +-------------+ 287 | | | Transport | 288 ~ Data ~ | Layer | 289 | | | Header | 290 +-------------+ +-------------+ 291 | | 292 ~ Data ~ 293 | | 294 +-------------+ 296 Figure 2: IPv4-to-IPv6 Translation 298 One of the differences between IPv4 and IPv6, is that in IPv6 path 299 MTU discovery is mandatory but it is optional in IPv4. This implies 300 that IPv6 routers will never fragment a packet - only the sender can 301 do fragmentation. 303 When the IPv4 node performs path MTU discovery (by setting the DF bit 304 in the header) the path MTU discovery can operate end-to-end, i.e., 305 across the translator. In this case either IPv4 or IPv6 routers 306 might send back ICMP "packet too big" messages to the sender. When 307 the IPv6 routers send these ICMP errors they will pass through a 308 translator that will translate the ICMP error to a form that the IPv4 309 sender can understand. In this case, an IPv6 fragment header is only 310 included if the IPv4 packet is already fragmented. 312 However, when the IPv4 sender does not set the DF bit, the translator 313 has to ensure that the packet does not exceed the path MTU on the 314 IPv6 side. This is done by fragmenting the IPv4 packet so that it 315 fits in 1280 byte IPv6 packets, since that is the minimum IPv6 packet 316 size. Also, when the IPv4 sender does not set the DF bit the 317 translator MUST always include an IPv6 fragment header to indicate 318 that the sender allows fragmentation. That is needed should the 319 packet pass through an IP/ICMP translator. 321 The above rules ensure that when packets are fragmented, either by 322 the sender or by IPv4 routers, the low-order 16 bits of the fragment 323 identification are carried end-to-end, ensuring that packets are 324 correctly reassembled. In addition, the rules use the presence of an 325 IPv6 fragment header to indicate that the sender might not be using 326 path MTU discovery, i.e., the packet should not have the DF flag set 327 should it later be translated back to IPv4. 329 Other than the special rules for handling fragments and path MTU 330 discovery, the actual translation of the packet header consists of a 331 simple mapping as defined below. Note that ICMP packets require 332 special handling in order to translate the content of ICMP error 333 message and also to add the ICMP pseudo-header checksum. 335 2.1. Translating IPv4 Headers into IPv6 Headers 337 If the DF flag is not set and the IPv4 packet will result in an IPv6 338 packet larger than 1280 bytes the IPv4 packet MUST be fragmented 339 prior to translating it. Since IPv4 packets with DF not set will 340 always result in a fragment header being added to the packet the IPv4 341 packets must be fragmented so that their length, excluding the IPv4 342 header, is at most 1232 bytes (1280 minus 40 for the IPv6 header and 343 8 for the Fragment header). The resulting fragments are then 344 translated independently using the logic described below. 346 If the DF bit is set and the packet is not a fragment (i.e., the MF 347 flag is not set and the Fragment Offset is zero) then the translator 348 SHOULD NOT add a fragment header to the packet. The IPv6 header 349 fields are set as follows: 351 Version: 6 353 Traffic Class: By default, copied from IP Type Of Service octet. 354 According to [RFC2474] the semantics of the bits are identical in 355 IPv4 and IPv6. However, in some IPv4 environments these fields 356 might be used with the old semantics of "Type Of Service and 357 Precedence". An implementation of a translator SHOULD provide the 358 ability to ignore the IPv4 "TOS" and always set the IPv6 traffic 359 class to zero. In addition, if the translator is at an 360 administrative boundary, the filtering and update considerations 361 of [RFC2475] may be applicable. 363 Flow Label: 0 (all zero bits) 365 Payload Length: Total length value from IPv4 header, minus the size 366 of the IPv4 header and IPv4 options, if present. 368 Next Header: Protocol field copied from IPv4 header 370 Hop Limit: TTL value copied from IPv4 header. Since the translator 371 is a router, as part of forwarding the packet it needs to 372 decrement either the IPv4 TTL (before the translation) or the IPv6 373 Hop Limit (after the translation). As part of decrementing the 374 TTL or Hop Limit the translator (as any router) needs to check for 375 zero and send the ICMPv4 "ttl exceeded" or ICMPv6 "hop limit 376 exceeded" error. 378 Source Address: The IPv6 source address is derived from the IPv4 379 source address. 381 Destination Address: In stateless mode, which is to say that if the 382 IPv4 destination address is within the range of the IPv4 stateless 383 translation prefix, the IPv6 destination address is derived from 384 the IPv4 destination address. 386 In stateful mode, which is to say that if the IPv4 destination 387 address is not within the range of the IPv4 stateless translation 388 prefix, the IPv4-related IPv6 address and corresponding transport- 389 layer destination port are derived from the database reflecting 390 current session state in the translator. Database maintenance is 391 as described in [I-D.ietf-behave-v6v4-xlate-stateful]. 393 If the IPv4 destination address is in the multicast range, the 394 multicast address mapping method should be applied 395 [I-D.ietf-behave-address-format]. 397 If IPv4 options are present in the IPv4 packet, they are ignored 398 i.e., there is no attempt to translate them. However, if an 399 unexpired source route option is present then the packet MUST instead 400 be discarded, and an ICMPv4 "destination unreachable/source route 401 failed" (Type 3/Code 5) error message SHOULD be returned to the 402 sender. 404 If there is a need to add a fragment header (the DF bit is not set or 405 the packet is a fragment) the header fields are set as above with the 406 following exceptions: 408 IPv6 fields: 410 Payload Length: Total length value from IPv4 header, plus 8 for 411 the fragment header, minus the size of the IPv4 header and IPv4 412 options, if present. 414 Next Header: Fragment Header (44). 416 Fragment header fields: 418 Next Header: Protocol field copied from IPv4 header. 420 Fragment Offset: Fragment Offset copied from the IPv4 header. 422 M flag More Fragments bit copied from the IPv4 header. 424 Identification The low-order 16 bits copied from the 425 Identification field in the IPv4 header. The high-order 16 426 bits set to zero. 428 2.2. Translating UDP over IPv4 430 When a translator receives an unfragmented UDP IPv4 packet and the 431 checksum field is zero, the translator SHOULD compute the missing UDP 432 checksum as part of translating the packet. Also, the translator 433 SHOULD maintain a counter of how many UDP checksums are generated in 434 this manner. 436 When a stateless translator receives the first fragment of a 437 fragmented UDP IPv4 packet and the checksum field is zero, the 438 translator SHOULD drop the packet and generate a system management 439 event specifying at least the IP addresses and port numbers in the 440 packet. When it receives fragments other than the first it SHOULD 441 silently drop the packet, since there is no port information to log. 443 When a stateful translator receives fragmented UDP IPv4 packets and 444 the checksum field is zero, if the translator has enough resource to 445 reassemble the packets, the stateful translator SHOULD reassemble the 446 packets and SHOULD calculate the checksum. Otherwise, the stateful 447 translator MAY drop the packets. 449 2.3. Translating ICMPv4 Headers into ICMPv6 Headers 451 All ICMP messages that are to be translated require that the ICMP 452 checksum field be updated as part of the translation since ICMPv6, 453 unlike ICMPv4, has a pseudo-header checksum just like UDP and TCP. 455 In addition, all ICMP packets need to have the Type value translated 456 and, for ICMP error messages, the included IP header also needs 457 translation. 459 The actions needed to translate various ICMPv4 messages are: 461 ICMPv4 query messages: 463 Echo and Echo Reply (Type 8 and Type 0) Adjust the type to 128 464 and 129, respectively, and adjust the ICMP checksum both to 465 take the type change into account and to include the ICMPv6 466 pseudo-header. 468 Information Request/Reply (Type 15 and Type 16) Obsoleted in 469 ICMPv6. Silently drop. 471 Timestamp and Timestamp Reply (Type 13 and Type 14) Obsoleted in 472 ICMPv6. Silently drop. 474 Address Mask Request/Reply (Type 17 and Type 18) Obsoleted in 475 ICMPv6. Silently drop. 477 ICMP Router Advertisement (Type 9) Single hop message. Silently 478 drop. 480 ICMP Router Solicitation (Type 10) Single hop message. Silently 481 drop. 483 Unknown ICMPv4 types Silently drop. 485 IGMP messages: While the MLD messages [RFC2710][RFC3590][RFC3810] 486 are the logical IPv6 counterparts for the IPv4 IGMP messages 487 all the "normal" IGMP messages are single-hop messages and 488 should be silently dropped by the translator 489 [I-D.venaas-behave-v4v6mc-framework]. Other IGMP messages 490 might be used by multicast routing protocols and, since it 491 would be a configuration error to try to have router 492 adjacencies across IP/ICMP translators those packets should 493 also be silently dropped. 495 ICMPv4 error messages: 497 Destination Unreachable (Type 3) For all codes that are not 498 explicitly listed below, set the Type to 1. 500 Translate the code field as follows: 502 Code 0, 1 (net, host unreachable): Set Code to 0 (no route 503 to destination). 505 Code 2 (protocol unreachable): Translate to an ICMPv6 506 Parameter Problem (Type 4, Code 1) and make the Pointer 507 point to the IPv6 Next Header field. 509 Code 3 (port unreachable): Set Code to 4 (port 510 unreachable). 512 Code 4 (fragmentation needed and DF set): Translate to an 513 ICMPv6 Packet Too Big message (Type 2) with code 0. The 514 MTU field needs to be adjusted for the difference between 515 the IPv4 and IPv6 header sizes. Note that if the IPv4 516 router did not set the MTU field, i.e., the router does 517 not implement [RFC1191], then the translator must use the 518 plateau values specified in [RFC1191] to determine a 519 likely path MTU and include that path MTU in the ICMPv6 520 packet. (Use the greatest plateau value that is less 521 than the returned Total Length field.) 523 Code 5 (source route failed): Set Code to 0 (no route to 524 destination). Note that this error is unlikely since 525 source routes are not translated. 527 Code 6,7: Set Code to 0 (no route to destination). 529 Code 8: Set Code to 0 (no route to destination). 531 Code 9, 10 (communication with destination host 532 administratively prohibited): Set Code to 1 (communication 533 with destination administratively prohibited) 535 Code 11, 12: Set Code to 0 (no route to destination). 537 Redirect (Type 5) Single hop message. Silently drop. 539 Source Quench (Type 4) Obsoleted in ICMPv6. Silently drop. 541 Time Exceeded (Type 11) Set the Type field to 3. The Code 542 field is unchanged. 544 Parameter Problem (Type 12) Set the Type field to 4. The 545 Pointer needs to be updated to point to the corresponding 546 field in the translated include IP header. 548 ICMP Error Payload The [RFC4884] length field should be 549 updated to reflect the changed length of the datagram. 550 There are two cases for the length field modifications. 551 That the translated packet is created from scratch and the 552 length field never is filled in. Then an ICMP extension 553 will result in that it will be treated as part of the 554 original datagram field. If the IP payload is copied and 555 then modified then the length field will be unmodified while 556 the original datagram field will become longer by the 557 address translation from v4->v6. Thus cutting off the end 558 of the original datagram field for ICMP extension aware 559 receivers. information. 561 2.4. Translating ICMPv4 Error Messages into ICMPv6 563 There are some differences between the IPv4 and the IPv6 ICMP error 564 message formats as detailed above. In addition, the ICMP error 565 messages contain the IP header for the packet in error, which needs 566 to be translated just like a normal IP header. The translation of 567 this "packet in error" is likely to change the length of the 568 datagram. Thus the Payload Length field in the outer IPv6 header 569 might need to be updated. 571 +-------------+ +-------------+ 572 | IPv4 | | IPv6 | 573 | Header | | Header | 574 +-------------+ +-------------+ 575 | ICMPv4 | | ICMPv6 | 576 | Header | | Header | 577 +-------------+ +-------------+ 578 | IPv4 | ===> | IPv6 | 579 | Header | | Header | 580 +-------------+ +-------------+ 581 | Partial | | Partial | 582 | Transport | | Transport | 583 | Layer | | Layer | 584 | Header | | Header | 585 +-------------+ +-------------+ 587 Figure 3: IPv4-to-IPv6 ICMP Error Translation 589 The translation of the inner IP header can be done by recursively 590 invoking the function that translated the outer IP headers. 592 2.5. Translator sending ICMP error message 594 If the packet is discarded, then the translator SHOULD be able to 595 send back an ICMP message to the original sender of the packet, 596 unless the discarded packet is itself an ICMP message. The ICMP 597 message, if sent, has a type of 3 (Destination Unreachable) and a 598 code of 13 (Communication Administratively Prohibited). The 599 translator device MUST allow to configure whether the ICMP error 600 messages are sent, rate-limited or not sent. 602 2.6. Transport-layer Header Translation 604 If the address translation algorithm is not checksum neutral, the 605 recalculation and updating of the transport-layer headers MUST be 606 performed. UDP/IPv4 datagrams with a checksum of zero MAY be dropped 607 and MAY have their checksum calculated for injection into the IPv6 608 domain. This choice SHOULD be under configuration control. 610 2.7. Knowing when to Translate 612 If the IP/ICMP translator is implemented in a router providing both 613 translation and normal forwarding, and the address is reachable by a 614 more specific route without translation, the router MUST forward it 615 without translating it. Otherwise, when an IP/ICMP translator 616 receives an IPv4 datagram addressed to a destination towards the IPv6 617 domain, the packet will be translated to IPv6. 619 3. Translating from IPv6 to IPv4 621 When an IP/ICMP translator receives an IPv6 datagram addressed to a 622 destination towards the IPv4 domain, it translates the IPv6 header of 623 that packet into an IPv4 header. Since the ICMP [RFC0792][RFC4443], 624 TCP [RFC0793] and UDP [RFC0768] headers contain checksums that cover 625 the IP header, if the address mapping algorithm is not checksum- 626 neutral, the ICMP and transport-layer headers MUST be updated. The 627 data portion of the packet is left unchanged. The IP/ICMP translator 628 then forwards the packet based on the IPv4 destination address. The 629 original IPv6 header on the packet is removed and replaced by an IPv4 630 header. 632 +-------------+ +-------------+ 633 | IPv6 | | IPv4 | 634 | Header | | Header | 635 +-------------+ +-------------+ 636 | Fragment | | Transport | 637 | Header | ===> | Layer | 638 |(if present) | | Header | 639 +-------------+ +-------------+ 640 | Transport | | | 641 | Layer | ~ Data ~ 642 | Header | | | 643 +-------------+ +-------------+ 644 | | 645 ~ Data ~ 646 | | 647 +-------------+ 649 Figure 4: IPv6-to-IPv4 Translation 651 There are some differences between IPv6 and IPv4 in the area of 652 fragmentation and the minimum link MTU that affect the translation. 653 An IPv6 link has to have an MTU of 1280 bytes or greater. The 654 corresponding limit for IPv4 is 68 bytes. Thus, unless there were 655 special measures, it would not be possible to do end-to-end path MTU 656 discovery when the path includes a translator since the IPv6 node 657 might receive ICMP "packet too big" messages originated by an IPv4 658 router that report an MTU less than 1280. However, [RFC2460] section 659 5 requires that IPv6 nodes handle such an ICMP "packet too big" 660 message by reducing the path MTU to 1280 and including an IPv6 661 fragment header with each packet. This allows end-to-end path MTU 662 discovery across the translator as long as the path MTU is 1280 bytes 663 or greater. When the path MTU drops below the 1280 limit the IPv6 664 sender will originate 1280-byte packets that will be fragmented by 665 IPv4 routers along the path after being translated to IPv4. 667 The only drawback with this scheme is that it is not possible to use 668 PMTU to do optimal UDP fragmentation (as opposed to completely 669 avoiding fragmentation) at the sender, since the presence of an IPv6 670 fragment header is interpreted that it is okay to fragment the packet 671 on the IPv4 side. Thus if a UDP application wants to send large 672 packets independent of the PMTU, the sender will only be able to 673 determine the path MTU on the IPv6 side of the translator. If the 674 path MTU on the IPv4 side of the translator is smaller, then the IPv6 675 sender will not receive any ICMP "too big" errors and cannot adjust 676 the size fragments it is sending. 678 Other than the special rules for handling fragments and path MTU 679 discovery the actual translation of the packet header consists of a 680 simple mapping as defined below. Note that ICMP packets require 681 special handling in order to translate the contents of ICMP error 682 message and also to add the ICMP pseudo-header checksum. 684 3.1. Translating IPv6 Headers into IPv4 Headers 686 If there is no IPv6 Fragment header, the IPv4 header fields are set 687 as follows: 689 Version: 4 691 Internet Header Length: 5 (no IPv4 options) 693 Type of Service (TOS) Octet: By default, copied from the IPv6 694 Traffic Class (all 8 bits). According to [RFC2474] the semantics 695 of the bits are identical in IPv4 and IPv6. However, in some IPv4 696 environments, these bits might be used with the old semantics of 697 "Type Of Service and Precedence". An implementation of a 698 translator SHOULD provide the ability to ignore the IPv6 traffic 699 class and always set the IPv4 TOS Octet to a specified value. In 700 addition, if the translator is at an administrative boundary, the 701 filtering and update considerations of [RFC2475] may be 702 applicable. 704 Total Length: Payload length value from IPv6 header, plus the size 705 of the IPv4 header. 707 Identification: All zero. 709 Flags: The More Fragments flag is set to zero. The Don't Fragments 710 flag is set to one. 712 Fragment Offset: All zero. 714 Time to Live: Hop Limit value copied from IPv6 header. Since the 715 translator is a router, as part of forwarding the packet it needs 716 to decrement either the IPv6 Hop Limit (before the translation) or 717 the IPv4 TTL (after the translation). As part of decrementing the 718 TTL or Hop Limit the translator (as any router) needs to check for 719 zero and send the ICMPv4 "ttl exceeded" or ICMPv6 "hop limit 720 exceeded" error. 722 Protocol: Next Header field copied from IPv6 header. 724 Header Checksum: Computed once the IPv4 header has been created. 726 Source Address: In stateless mode, which is to say that if the IPv6 727 source address is within the range of the IPv6 stateless 728 translation prefix, the IPv4 source address is derived from the 729 IPv6 address. 731 In stateful mode, which is to say that if the IPv6 source address 732 is not within the range of the IPv6 stateless translation prefix, 733 the IPv4 source address and transport layer source port 734 corresponding to the IPv4-related IPv6 source address and source 735 port are derived from the database reflecting current session 736 state in the translator. Database maintenance is described in 737 [I-D.ietf-behave-v6v4-xlate-stateful]. 739 Destination Address: The IPv4 destination address is derived from 740 the IPv6 destination address of the datagram being translated. 742 If the IPv6 destination address is in the multicast range, the 743 multicast address mapping method should be applied 744 [I-D.ietf-behave-address-format]. 746 If any of an IPv6 hop-by-hop options header, destination options 747 header, or routing header with the Segments Left field equal to zero 748 are present in the IPv6 packet, they are ignored i.e., there is no 749 attempt to translate them. However, the Total Length field and the 750 Protocol field is adjusted to "skip" these extension headers. 752 If a routing header with a non-zero Segments Left field is present 753 then the packet MUST NOT be translated, and an ICMPv6 "parameter 754 problem/erroneous header field encountered" (Type 4/Code 0) error 755 message, with the Pointer field indicating the first byte of the 756 Segments Left field, SHOULD be returned to the sender. 758 If the IPv6 packet contains a Fragment header the header fields are 759 set as above with the following exceptions: 761 Total Length: Payload length value from IPv6 header, minus 8 for the 762 Fragment header, plus the size of the IPv4 header. 764 Identification: Copied from the low-order 16-bits in the 765 Identification field in the Fragment header. 767 Flags: The More Fragments flag is copied from the M flag in the 768 Fragment header. The Don't Fragments flag is set to zero allowing 769 this packet to be fragmented by IPv4 routers. 771 Fragment Offset: Copied from the Fragment Offset field in the 772 Fragment header. 774 Protocol: Next Header value copied from Fragment header. 776 3.2. Translating ICMPv6 Headers into ICMPv4 Headers 778 All ICMP messages that are to be translated require that the ICMP 779 checksum field be updated as part of the translation since ICMPv6 780 (unlike ICMPv4) includes a pseudo-header in the checksum just like 781 UDP and TCP. 783 In addition all ICMP packets need to have the Type value translated 784 and, for ICMP error messages, the included IP header also needs 785 translation. 787 The actions needed to translate various ICMPv6 messages are: 789 ICMPv6 informational messages: 791 Echo Request and Echo Reply (Type 128 and 129) Adjust the type to 792 0 and 8, respectively, and adjust the ICMP checksum both to 793 take the type change into account and to exclude the ICMPv6 794 pseudo-header. 796 MLD Multicast Listener Query/Report/Done (Type 130, 131, 132) 797 Single hop message. Silently drop. 799 Neighbor Discover messages (Type 133 through 137) Single hop 800 message. Silently drop. 802 Unknown informational messages Silently drop. 804 ICMPv6 error messages: 806 Destination Unreachable (Type 1) Set the Type field to 3. 807 Translate the code field as follows: 809 Code 0 (no route to destination): Set Code to 1 (host 810 unreachable). 812 Code 1 (communication with destination administratively 813 prohibited): Set Code to 10 (communication with destination 814 host administratively prohibited). 816 Code 2 (beyond scope of source address): Set Code to 1 (host 817 unreachable). Note that this error is very unlikely since 818 the IPv4-translatable source address is considered to have 819 global scope. 821 Code 3 (address unreachable): Set Code to 1 (host 822 unreachable). 824 Code 4 (port unreachable): Set Code to 3 (port unreachable). 826 Packet Too Big (Type 2) Translate to an ICMPv4 Destination 827 Unreachable with code 4. The MTU field needs to be adjusted 828 for the difference between the IPv4 and IPv6 header sizes 829 taking into account whether or not the packet in error includes 830 a Fragment header. 832 Time Exceeded (Type 3) Set the Type to 11. The Code field is 833 unchanged. 835 Parameter Problem (Type 4) If the Code is 1, translate this to an 836 ICMPv4 protocol unreachable (Type 3, Code 2). Otherwise set 837 the Type to 12 and the Code to zero. The Pointer needs to be 838 updated to point to the corresponding field in the translated 839 inner IP header. 841 Unknown error messages Silently drop. 843 ICMP Error Payload The [RFC4884] length field should be updated 844 to reflect the changed length of the datagram. 846 3.3. Translating ICMPv6 Error Messages into ICMPv4 848 There are some differences between the IPv4 and the IPv6 ICMP error 849 message formats as detailed above. In addition, the ICMP error 850 messages contain the IP header for the packet in error, which needs 851 to be translated just like a normal IP header. The translation of 852 this "packet in error" is likely to change the length of the datagram 853 thus the Total Length field in the outer IPv4 header might need to be 854 updated. 856 +-------------+ +-------------+ 857 | IPv6 | | IPv4 | 858 | Header | | Header | 859 +-------------+ +-------------+ 860 | ICMPv6 | | ICMPv4 | 861 | Header | | Header | 862 +-------------+ +-------------+ 863 | IPv6 | ===> | IPv4 | 864 | Header | | Header | 865 +-------------+ +-------------+ 866 | Partial | | Partial | 867 | Transport | | Transport | 868 | Layer | | Layer | 869 | Header | | Header | 870 +-------------+ +-------------+ 872 Figure 5: IPv6-to-IPv4 ICMP Error Translation 874 The translation of the inner IP header can be done by recursively 875 invoking the function that translated the outer IP headers. 877 3.4. Translator sending ICMPv6 error message 879 If the packet is discarded, then the translator SHOULD be able to 880 send back an ICMPv6 message to the original sender of the packet, 881 unless the discarded packet is itself an ICMPv6 message. The ICMPv6 882 message, if sent, has a type of 1 (Destination Unreachable) and a 883 code of 1 (Communication with destination administratively 884 prohibited). The translator device MUST allow configuring whether 885 the ICMPv6 error messages are sent, rate-limited or not sent. 887 3.5. Transport-layer Header Translation 889 If the address translation algorithm is not checksum neutral, the 890 recalculation and updating of the transport-layer headers MUST be 891 performed. 893 3.6. Knowing when to Translate 895 If the IP/ICMP translator is implemented in a router providing both 896 translation and normal forwarding, and the address is reachable by a 897 more specific route without translation, the router MUST forward it 898 without translating it. When an IP/ICMP translator receives an IPv6 899 datagram addressed to a destination towards the IPv4 domain, the 900 packet will be translated to IPv4. 902 4. IANA Considerations 904 This memo adds no new IANA considerations. 906 Note to RFC Editor: This section will have served its purpose if it 907 correctly tells IANA that no new assignments or registries are 908 required, or if those assignments or registries are created during 909 the RFC publication process. From the author's perspective, it may 910 therefore be removed upon publication as an RFC at the RFC Editor's 911 discretion. 913 5. Security Considerations 915 The use of stateless IP/ICMP translators does not introduce any new 916 security issues beyond the security issues that are already present 917 in the IPv4 and IPv6 protocols and in the routing protocols that are 918 used to make the packets reach the translator. 920 As the Authentication Header [RFC4302] is specified to include the 921 IPv4 Identification field and the translating function is not able to 922 always preserve the Identification field, it is not possible for an 923 IPv6 endpoint to verify the AH on received packets that have been 924 translated from IPv4 packets. Thus AH does not work through a 925 translator. 927 Packets with ESP can be translated since ESP does not depend on 928 header fields prior to the ESP header. Note that ESP transport mode 929 is easier to handle than ESP tunnel mode; in order to use ESP tunnel 930 mode, the IPv6 node needs to be able to generate an inner IPv4 header 931 when transmitting packets and remove such an IPv4 header when 932 receiving packets. 934 6. Acknowledgements 936 This is under development by a large group of people. Those who have 937 posted to the list during the discussion include Andrew Sullivan, 938 Andrew Yourtchenko, Brian Carpenter, Dan Wing, Dave Thaler, Ed 939 Jankiewicz, Fred Baker, Hiroshi Miyata, Iljitsch van Beijnum, John 940 Schnizlein, Kevin Yin, Magnus Westerlund, Marcelo Bagnulo Braun, 941 Margaret Wasserman, Masahito Endo, Phil Roberts, Philip Matthews, 942 Remi Denis-Courmont, Remi Despres, and Xing Li. 944 7. References 946 7.1. Normative References 948 [I-D.xli-behave-v4v6-prefix] 949 Bao, C., Baker, F., and X. Li, "IPv4/IPv6 Translation 950 Prefix Recommendation", draft-xli-behave-v4v6-prefix-00 951 (work in progress), April 2009. 953 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 954 August 1980. 956 [RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, 957 September 1981. 959 [RFC0792] Postel, J., "Internet Control Message Protocol", STD 5, 960 RFC 792, September 1981. 962 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 963 RFC 793, September 1981. 965 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 966 Requirement Levels", BCP 14, RFC 2119, March 1997. 968 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 969 (IPv6) Specification", RFC 2460, December 1998. 971 [RFC2765] Nordmark, E., "Stateless IP/ICMP Translation Algorithm 972 (SIIT)", RFC 2765, February 2000. 974 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 975 Architecture", RFC 4291, February 2006. 977 [RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control 978 Message Protocol (ICMPv6) for the Internet Protocol 979 Version 6 (IPv6) Specification", RFC 4443, March 2006. 981 [RFC4884] Bonica, R., Gan, D., Tappan, D., and C. Pignataro, 982 "Extended ICMP to Support Multi-Part Messages", RFC 4884, 983 April 2007. 985 [RFC5382] Guha, S., Biswas, K., Ford, B., Sivakumar, S., and P. 986 Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, 987 RFC 5382, October 2008. 989 7.2. Informative References 991 [I-D.ietf-behave-address-format] 992 Huitema, C., Bao, C., Bagnulo, M., Boucadair, M., and X. 993 Li, "IPv6 Addressing of IPv4/IPv6 Translators", 994 draft-ietf-behave-address-format-00 (work in progress), 995 August 2009. 997 [I-D.ietf-behave-v6v4-framework] 998 Baker, F., Li, X., Bao, C., and K. Yin, "Framework for 999 IPv4/IPv6 Translation", 1000 draft-ietf-behave-v6v4-framework-01 (work in progress), 1001 September 2009. 1003 [I-D.ietf-behave-v6v4-xlate-stateful] 1004 Bagnulo, M., Matthews, P., and I. Beijnum, "NAT64: Network 1005 Address and Protocol Translation from IPv6 Clients to IPv4 1006 Servers", draft-ietf-behave-v6v4-xlate-stateful-01 (work 1007 in progress), July 2009. 1009 [I-D.venaas-behave-v4v6mc-framework] 1010 Venaas, S., "Framework for IPv4/IPv6 Multicast 1011 Translation", draft-venaas-behave-v4v6mc-framework-00 1012 (work in progress), July 2009. 1014 [Miller] Miller, G., "Email to the ngtrans mailing list", 1015 March 1999. 1017 [RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, 1018 November 1990. 1020 [RFC2474] Nichols, K., Blake, S., Baker, F., and D. Black, 1021 "Definition of the Differentiated Services Field (DS 1022 Field) in the IPv4 and IPv6 Headers", RFC 2474, 1023 December 1998. 1025 [RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., 1026 and W. Weiss, "An Architecture for Differentiated 1027 Services", RFC 2475, December 1998. 1029 [RFC2710] Deering, S., Fenner, W., and B. Haberman, "Multicast 1030 Listener Discovery (MLD) for IPv6", RFC 2710, 1031 October 1999. 1033 [RFC3171] Albanna, Z., Almeroth, K., Meyer, D., and M. Schipper, 1034 "IANA Guidelines for IPv4 Multicast Address Assignments", 1035 BCP 51, RFC 3171, August 2001. 1037 [RFC3307] Haberman, B., "Allocation Guidelines for IPv6 Multicast 1038 Addresses", RFC 3307, August 2002. 1040 [RFC3590] Haberman, B., "Source Address Selection for the Multicast 1041 Listener Discovery (MLD) Protocol", RFC 3590, 1042 September 2003. 1044 [RFC3810] Vida, R. and L. Costa, "Multicast Listener Discovery 1045 Version 2 (MLDv2) for IPv6", RFC 3810, June 2004. 1047 [RFC4213] Nordmark, E. and R. Gilligan, "Basic Transition Mechanisms 1048 for IPv6 Hosts and Routers", RFC 4213, October 2005. 1050 [RFC4301] Kent, S. and K. Seo, "Security Architecture for the 1051 Internet Protocol", RFC 4301, December 2005. 1053 [RFC4302] Kent, S., "IP Authentication Header", RFC 4302, 1054 December 2005. 1056 [RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", 1057 RFC 4303, December 2005. 1059 Authors' Addresses 1061 Xing Li 1062 CERNET Center/Tsinghua University 1063 Room 225, Main Building, Tsinghua University 1064 Beijing, 100084 1065 China 1067 Phone: +86 10-62785983 1068 Email: xing@cernet.edu.cn 1070 Congxiao Bao 1071 CERNET Center/Tsinghua University 1072 Room 225, Main Building, Tsinghua University 1073 Beijing, 100084 1074 China 1076 Phone: +86 10-62785983 1077 Email: congxiao@cernet.edu.cn 1078 Fred Baker 1079 Cisco Systems 1080 Santa Barbara, California 93117 1081 USA 1083 Phone: +1-408-526-4257 1084 Email: fred@cisco.com