idnits 2.17.1 draft-ietf-behave-v6v4-xlate-22.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == 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 (August 21, 2010) is 4996 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) ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 1883 (Obsoleted by RFC 2460) ** Obsolete normative reference: RFC 2460 (Obsoleted by RFC 8200) ** Obsolete normative reference: RFC 2765 (Obsoleted by RFC 6145) -- Obsolete informational reference (is this intentional?): RFC 879 (Obsoleted by RFC 7805, RFC 9293) -- Obsolete informational reference (is this intentional?): RFC 2766 (Obsoleted by RFC 4966) Summary: 4 errors (**), 0 flaws (~~), 3 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: February 22, 2011 Cisco Systems 7 August 21, 2010 9 IP/ICMP Translation Algorithm 10 draft-ietf-behave-v6v4-xlate-22 12 Abstract 14 This document describes the Stateless IP/ICMP Translation Algorithm 15 (SIIT), which translates between IPv4 and IPv6 packet headers 16 (including ICMP headers). This document obsoletes RFC2765. 18 Status of this Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on February 22, 2011. 35 Copyright Notice 37 Copyright (c) 2010 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 This document may contain material from IETF Documents or IETF 51 Contributions published or made publicly available before November 52 10, 2008. The person(s) controlling the copyright in some of this 53 material may not have granted the IETF Trust the right to allow 54 modifications of such material outside the IETF Standards Process. 55 Without obtaining an adequate license from the person(s) controlling 56 the copyright in such materials, this document may not be modified 57 outside the IETF Standards Process, and derivative works of it may 58 not be created outside the IETF Standards Process, except to format 59 it for publication as an RFC or to translate it into languages other 60 than English. 62 Table of Contents 64 1. Introduction and Motivation . . . . . . . . . . . . . . . . . 3 65 1.1. IPv4-IPv6 Translation Model . . . . . . . . . . . . . . . 3 66 1.2. Applicability and Limitations . . . . . . . . . . . . . . 3 67 1.3. Stateless vs. Stateful Mode . . . . . . . . . . . . . . . 4 68 1.4. Path MTU Discovery and Fragmentation . . . . . . . . . . . 5 69 2. Changes from RFC2765 . . . . . . . . . . . . . . . . . . . . . 5 70 3. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 6 71 4. Translating from IPv4 to IPv6 . . . . . . . . . . . . . . . . 6 72 4.1. Translating IPv4 Headers into IPv6 Headers . . . . . . . . 7 73 4.2. Translating ICMPv4 Headers into ICMPv6 Headers . . . . . . 10 74 4.3. Translating ICMPv4 Error Messages into ICMPv6 . . . . . . 13 75 4.4. Generation of ICMPv4 Error Message . . . . . . . . . . . . 14 76 4.5. Transport-layer Header Translation . . . . . . . . . . . . 14 77 4.6. Knowing When to Translate . . . . . . . . . . . . . . . . 15 78 5. Translating from IPv6 to IPv4 . . . . . . . . . . . . . . . . 15 79 5.1. Translating IPv6 Headers into IPv4 Headers . . . . . . . . 17 80 5.1.1. IPv6 Fragment Processing . . . . . . . . . . . . . . . 19 81 5.2. Translating ICMPv6 Headers into ICMPv4 Headers . . . . . . 20 82 5.3. Translating ICMPv6 Error Messages into ICMPv4 . . . . . . 22 83 5.4. Generation of ICMPv6 Error Message . . . . . . . . . . . . 23 84 5.5. Transport-layer Header Translation . . . . . . . . . . . . 24 85 5.6. Knowing When to Translate . . . . . . . . . . . . . . . . 24 86 6. Special Considerations for ICMPv6 Packet Too Big . . . . . . . 24 87 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25 88 8. Security Considerations . . . . . . . . . . . . . . . . . . . 26 89 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 26 90 10. Appendix: Stateless translation workflow example . . . . . . . 26 91 10.1. H6 establishes communication with H4 . . . . . . . . . . . 27 92 10.2. H4 establishes communication with H6 . . . . . . . . . . . 28 93 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 30 94 11.1. Normative References . . . . . . . . . . . . . . . . . . . 30 95 11.2. Informative References . . . . . . . . . . . . . . . . . . 31 96 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 32 98 1. Introduction and Motivation 100 This document is a product of the 2008-2010 effort to define a 101 replacement for NAT-PT [RFC2766]. It is directly derivative from 102 Erik Nordmark's "Stateless IP/ICMP Translation Algorithm (SIIT)" 103 [RFC2765], which provides stateless translation between IPv4 104 [RFC0791] and IPv6 [RFC2460], and between ICMPv4 [RFC0792] and ICMPv6 105 [RFC4443]. This document obsoletes RFC2765 [RFC2765]. The changes 106 from RFC2765 [RFC2765] are listed in Section 2. 108 Readers of this document are expected to have read and understood the 109 framework described in [I-D.ietf-behave-v6v4-framework]. 110 Implementations of this IPv4/IPv6 translation specification MUST also 111 support the address translation algorithms in 112 [I-D.ietf-behave-address-format]. Implementations MAY also support 113 stateful translation [I-D.ietf-behave-v6v4-xlate-stateful]. 115 1.1. IPv4-IPv6 Translation Model 117 The translation model consists of two or more network domains 118 connected by one or more IP/ICMP translators (XLATs) as shown in 119 Figure 1. 121 --------- --------- 122 // \\ // \\ 123 / +----+ \ 124 | |XLAT| | XLAT: IP/ICMP 125 | IPv4 +----+ IPv6 | Translator 126 | Domain | | Domain | 127 | | | | 128 \ | | / 129 \\ // \\ // 130 -------- --------- 132 Figure 1: IPv4-IPv6 Translation Model 134 The scenarios of the translation model are discussed in 135 [I-D.ietf-behave-v6v4-framework]. 137 1.2. Applicability and Limitations 139 This document specifies the translation algorithms between IPv4 140 packets and IPv6 packets. 142 As with [RFC2765], the translating function specified in this 143 document does not translate any IPv4 options and it does not 144 translate IPv6 extension headers except fragmentation header. 146 The issues and algorithms in the translation of datagrams containing 147 TCP segments are described in [RFC5382]. 149 Fragmented IPv4 UDP packets that do not contain a UDP checksum (i.e., 150 the UDP checksum field is zero) are not of significant use in the 151 Internet and in general will not be translated by the IP/ICMP 152 translator. However, when the translator is configured to forward 153 the packet without a UDP checksum, the fragmented IPv4 UDP packets 154 will be translated. 156 Fragmented ICMP/ICMPv6 packets will not be translated by the IP/ICMP 157 translator. 159 The IP/ICMP header translation specified in this document is 160 consistent with requirements of multicast IP/ICMP headers. However 161 IPv4 multicast addresses [RFC5771] cannot be mapped to IPv6 multicast 162 addresses [RFC3307] based on the unicast mapping rule 163 [I-D.ietf-behave-address-format]. 165 1.3. Stateless vs. Stateful Mode 167 An IP/ICMP translator has two possible modes of operation: stateless 168 and stateful [I-D.ietf-behave-v6v4-framework]. In both cases, we 169 assume that a system (a node or an application) that has an IPv4 170 address but not an IPv6 address is communicating with a system that 171 has an IPv6 address but no IPv4 address, or that the two systems do 172 not have contiguous routing connectivity and hence are forced to have 173 their communications translated. 175 In the stateless mode, a specific IPv6 address range will represent 176 IPv4 systems (IPv4-converted addresses), and the IPv6 systems have 177 addresses (IPv4-translatable addresses) that can be algorithmically 178 mapped to a subset of the service provider's IPv4 addresses. Note 179 that IPv4-translatable addresses is a subset of IPv4-converted 180 addresses. In general, there is no need to concern oneself with 181 translation tables, as the IPv4 and IPv6 counterparts are 182 algorithmically related. 184 In the stateful mode, a specific IPv6 address range will represent 185 IPv4 systems (IPv4-converted addresses), but the IPv6 systems may use 186 any IPv6 addresses [RFC4291] except in that range. In this case, a 187 translation table is required to bind the IPv6 systems' addresses to 188 the IPv4 addresses maintained in the translator. 190 The address translation mechanisms for the stateless and the stateful 191 translations are defined in [I-D.ietf-behave-address-format]. 193 1.4. Path MTU Discovery and Fragmentation 195 Due to the different sizes of the IPv4 and IPv6 header, which are 20+ 196 octets and 40 octets respectively, handling the maximum packet size 197 is critical for the operation of the IPv4/IPv6 translator. There are 198 three mechanisms to handle this issue: path MTU discovery (PMTUD), 199 fragmentation, and transport-layer negotiation such as the TCP MSS 200 option [RFC0879]. Note that the translator MUST behave as a router, 201 i.e. the translator MUST send a "Packet Too Big" error message or 202 fragment the packet when the packet size exceeds the MTU of the next 203 hop interface. 205 "Don't Fragment", ICMP "Packet Too Big", and packet fragmentation are 206 discussed in sections 3 and 4 of this document. The reassembling of 207 fragmented packets in the stateful translator is discussed in 208 [I-D.ietf-behave-v6v4-xlate-stateful], since it requires state 209 maintenance in the translator. 211 2. Changes from RFC2765 213 The changes from RFC2765 are the following: 215 1. Redescribing the network model to map to present and projected 216 usage. The scenarios, applicability and limitations originally 217 presented in RFC2765 [RFC2765] are moved to framework document 218 [I-D.ietf-behave-v6v4-framework]. 220 2. Moving the address format to the address format document 221 [I-D.ietf-behave-address-format], to coordinate with other 222 documents on the topic. 224 3. Describing the header translation for the stateless and stateful 225 operations. The details of the session database and mapping 226 table handling of the stateful translation is in stateful 227 translation document [I-D.ietf-behave-v6v4-xlate-stateful]. 229 4. Having refined the header translation, fragmentation handling, 230 ICMP translation and ICMP error translation in IPv4 to IPv6 231 direction, as well as in IPv6 to IPv4 direction. 233 5. Adding more discussion on transport-layer header translation. 235 6. Adding a section for "IPv6 Fragment Processing". 237 7. Adding a section for "Special Considerations for ICMPv6 Packet 238 Too Big". 240 8. Having updated the section for "Security Considerations". 242 9. Adding appendix "Stateless translation workflow example". 244 3. Conventions 246 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 247 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 248 document are to be interpreted as described in [RFC2119]. 250 4. Translating from IPv4 to IPv6 252 When an IP/ICMP translator receives an IPv4 datagram addressed to a 253 destination towards the IPv6 domain, it translates the IPv4 header of 254 that packet into an IPv6 header. The original IPv4 header on the 255 packet is removed and replaced by an IPv6 header and the transport 256 checksum updated as needed, if that transport is supported by the 257 translator. The data portion of the packet is left unchanged. The 258 IP/ICMP translator then forwards the packet based on the IPv6 259 destination address. 261 +-------------+ +-------------+ 262 | IPv4 | | IPv6 | 263 | Header | | Header | 264 +-------------+ +-------------+ 265 | Transport | | Fragment | 266 | Layer | ===> | Header | 267 | Header | | (if needed) | 268 +-------------+ +-------------+ 269 | | | Transport | 270 ~ Data ~ | Layer | 271 | | | Header | 272 +-------------+ +-------------+ 273 | | 274 ~ Data ~ 275 | | 276 +-------------+ 278 Figure 2: IPv4-to-IPv6 Translation 280 Path MTU discovery is mandatory in IPv6 but it is optional in IPv4. 281 IPv6 routers never fragment a packet - only the sender can do 282 fragmentation. 284 When an IPv4 node performs path MTU discovery (by setting the Don't 285 Fragment (DF) bit in the header), path MTU discovery can operate end- 286 to-end, i.e., across the translator. In this case either IPv4 or 287 IPv6 routers (including the translator) might send back ICMP "Packet 288 Too Big" messages to the sender. When the IPv6 routers send these 289 ICMPv6 errors they will pass through a translator that will translate 290 the ICMPv6 error to a form that the IPv4 sender can understand. As a 291 result, an IPv6 fragment header is only included if the IPv4 packet 292 is already fragmented. 294 However, when the IPv4 sender does not set the Don't Fragment (DF) 295 bit, the translator MUST ensure that the packet does not exceed the 296 path MTU on the IPv6 side. This is done by fragmenting the IPv4 297 packet so that it fits in 1280-byte IPv6 packets, since that is the 298 minimum IPv6 MTU. Also, when the IPv4 sender does not set the DF bit 299 the translator MUST always include an IPv6 fragment header to 300 indicate that the sender allows fragmentation. 302 The rules in section 3.1 ensure that when packets are fragmented, 303 either by the sender or by IPv4 routers, the low-order 16 bits of the 304 fragment identification are carried end-to-end, ensuring that packets 305 are correctly reassembled. In addition, the rules in section 3.1 use 306 the presence of an IPv6 fragment header to indicate that the sender 307 might not be using path MTU discovery (i.e., the packet should not 308 have the DF flag set should it later be translated back to IPv4). 310 Other than the special rules for handling fragments and path MTU 311 discovery, the actual translation of the packet header consists of a 312 simple translation as defined below. Note that ICMPv4 packets 313 require special handling in order to translate the content of ICMPv4 314 error messages and also to add the ICMPv6 pseudo-header checksum. 316 The translator SHOULD make sure that the packets belonging to the 317 same flow leave the translator in the same order in which they 318 arrived. 320 4.1. Translating IPv4 Headers into IPv6 Headers 322 If the DF flag is not set and the IPv4 packet will result in an IPv6 323 packet larger than 1280 bytes, the packet MUST be fragmented so the 324 resulting IPv6 packet (with Fragment header added to each fragment) 325 will be less than or equal to 1280 bytes. For example, if the packet 326 is fragmented prior to the translation, the IPv4 packets must be 327 fragmented so that their length, excluding the IPv4 header, is at 328 most 1232 bytes (1280 minus 40 for the IPv6 header and 8 for the 329 Fragment header). The resulting fragments are then translated 330 independently using the logic described below. 332 If the DF bit is set and the MTU of the next-hop interface is less 333 than the total length value of the IPv4 packet plus 20, the 334 translator MUST send an ICMPv4 "Fragmentation Needed" error message 335 to the IPv4 source address. 337 If the DF bit is set and the packet is not a fragment (i.e., the MF 338 flag is not set and the Fragment Offset is equal to zero) then the 339 translator SHOULD NOT add a Fragment header to the resulting packet. 340 The IPv6 header fields are set as follows: 342 Version: 6 344 Traffic Class: By default, copied from IP Type Of Service (TOS) 345 octet. According to [RFC2474] the semantics of the bits are 346 identical in IPv4 and IPv6. However, in some IPv4 environments 347 these fields might be used with the old semantics of "Type Of 348 Service and Precedence". An implementation of a translator SHOULD 349 support an administratively-configurable option to ignore the IPv4 350 TOS and always set the IPv6 traffic class (TC) to zero. In 351 addition, if the translator is at an administrative boundary, the 352 filtering and update considerations of [RFC2475] may be 353 applicable. 355 Flow Label: 0 (all zero bits) 357 Payload Length: Total length value from IPv4 header, minus the size 358 of the IPv4 header and IPv4 options, if present. 360 Next Header: For ICMPv4 (1) changed to ICMPv6 (58), otherwise 361 protocol field MUST be copied from IPv4 header. 363 Hop Limit: The hop limit is derived from the TTL value in the IPv4 364 header. Since the translator is a router, as part of forwarding 365 the packet it needs to decrement either the IPv4 TTL (before the 366 translation) or the IPv6 Hop Limit (after the translation). As 367 part of decrementing the TTL or Hop Limit the translator (as any 368 router) MUST check for zero and send the ICMPv4 "TTL Exceeded" or 369 ICMPv6 "Hop Limit Exceeded" error. 371 Source Address: The IPv4-converted address derived from the IPv4 372 source address per [I-D.ietf-behave-address-format] section 2.1. 374 If the translator gets an illegal source address (e.g. 0.0.0.0, 375 127.0.0.1, etc.), the translator SHOULD silently drop the packet 376 (as discussed in Section 5.3.7 of [RFC1812]). 378 Destination Address: In the stateless mode, which is to say that if 379 the IPv4 destination address is within a range of configured IPv4 380 stateless translation prefix, the IPv6 destination address is the 381 IPv4-translatable address derived from the IPv4 destination 382 address per [I-D.ietf-behave-address-format] section 2.1. A 383 workflow example of stateless translation is shown in the Appendix 384 of this document. 386 In the stateful mode, which is to say that if the IPv4 destination 387 address is not within the range of any configured IPv4 stateless 388 translation prefix, the IPv6 destination address and corresponding 389 transport-layer destination port are derived from the Binding 390 Information Bases (BIBs) reflecting current session state in the 391 translator as described in [I-D.ietf-behave-v6v4-xlate-stateful]. 393 If any IPv4 options are present in the IPv4 packet, the IPv4 options 394 MUST be ignored and the packet translated normally; there is no 395 attempt to translate the options. However, if an unexpired source 396 route option is present then the packet MUST instead be discarded, 397 and an ICMPv4 "Destination Unreachable/Source Route Failed" (Type 398 3/Code 5) error message SHOULD be returned to the sender. 400 If there is a need to add a Fragment header (the DF bit is not set or 401 the packet is a fragment) the header fields are set as above with the 402 following exceptions: 404 IPv6 fields: 406 Payload Length: Total length value from IPv4 header, plus 8 for 407 the fragment header, minus the size of the IPv4 header and IPv4 408 options, if present. 410 Next Header: Fragment header (44). 412 Fragment header fields: 414 Next Header: For ICMPv4 (1) changed to ICMPv6 (58), otherwise 415 protocol field MUST be copied from IPv4 header. 417 Fragment Offset: Fragment Offset copied from the IPv4 header. 419 M flag: More Fragments bit copied from the IPv4 header. 421 Identification: The low-order 16 bits copied from the 422 Identification field in the IPv4 header. The high-order 16 423 bits set to zero. 425 4.2. Translating ICMPv4 Headers into ICMPv6 Headers 427 All ICMPv4 messages that are to be translated require that the ICMPv6 428 checksum field be calculated as part of the translation since ICMPv6, 429 unlike ICMPv4, has a pseudo-header checksum just like UDP and TCP. 431 In addition, all ICMPv4 packets MUST have the Type value translated 432 and, for ICMPv4 error messages, the included IP header also MUST be 433 translated. 435 The actions needed to translate various ICMPv4 messages are as 436 follows: 438 ICMPv4 query messages: 440 Echo and Echo Reply (Type 8 and Type 0): Adjust the Type values 441 to 128 and 129, respectively, and adjust the ICMP checksum both 442 to take the type change into account and to include the ICMPv6 443 pseudo-header. 445 Information Request/Reply (Type 15 and Type 16): Obsoleted in 446 ICMPv6. Silently drop. 448 Timestamp and Timestamp Reply (Type 13 and Type 14): Obsoleted in 449 ICMPv6. Silently drop. 451 Address Mask Request/Reply (Type 17 and Type 18): Obsoleted in 452 ICMPv6. Silently drop. 454 ICMP Router Advertisement (Type 9): Single hop message. Silently 455 drop. 457 ICMP Router Solicitation (Type 10): Single hop message. Silently 458 drop. 460 Unknown ICMPv4 types: Silently drop. 462 IGMP messages: While the MLD messages [RFC2710][RFC3590][RFC3810] 463 are the logical IPv6 counterparts for the IPv4 IGMP messages 464 all the "normal" IGMP messages are single-hop messages and 465 SHOULD be silently dropped by the translator. Other IGMP 466 messages might be used by multicast routing protocols and, 467 since it would be a configuration error to try to have router 468 adjacencies across IP/ICMP translators those packets SHOULD 469 also be silently dropped. 471 ICMPv4 error messages: 473 Destination Unreachable (Type 3): Translate the Code field as 474 described below, set the Type field to 1, and adjust the 475 ICMP checksum both to take the type/code change into account 476 and to include the ICMPv6 pseudo-header. 478 Translate the Code field as follows: 480 Code 0, 1 (Net, host unreachable): Set Code value to 0 (no 481 route to destination). 483 Code 2 (Protocol unreachable): Translate to an ICMPv6 484 Parameter Problem (Type 4, Code value 1) and make the 485 Pointer point to the IPv6 Next Header field. 487 Code 3 (Port unreachable): Set Code value to 4 (port 488 unreachable). 490 Code 4 (Fragmentation needed and DF set): Translate to an 491 ICMPv6 Packet Too Big message (Type 2) with Code value 492 set to 0. The MTU field MUST be adjusted for the 493 difference between the IPv4 and IPv6 header sizes, i.e. 494 minimum(advertised MTU+20, MTU_of_IPv6_nexthop, 495 (MTU_of_IPv4_nexthop)+20). Note that if the IPv4 router 496 set the MTU field to zero, i.e., the router does not 497 implement [RFC1191], then the translator MUST use the 498 plateau values specified in [RFC1191] to determine a 499 likely path MTU and include that path MTU in the ICMPv6 500 packet. (Use the greatest plateau value that is less 501 than the returned Total Length field.) 503 See also the requirements in Section 5. 505 Code 5 (Source route failed): Set Code value to 0 (No route 506 to destination). Note that this error is unlikely since 507 source routes are not translated. 509 Code 6, 7, 8: Set Code value to 0 (No route to 510 destination). 512 Code 9, 10 (Communication with destination host 513 administratively prohibited): Set Code value to 1 514 (Communication with destination administratively 515 prohibited) 517 Code 11, 12: Set Code value to 0 (no route to destination). 519 Code 13 (Communication Administratively Prohibited): Set 520 Code value to 1 (Communication with destination 521 administratively prohibited). 523 Code 14 (Host Precedence Violation): Silently drop. 525 Code 15 (Precedence cutoff in effect): Set Code value to 1 526 (Communication with destination administratively 527 prohibited). 529 Other Code values: Silently drop. 531 Redirect (Type 5): Single hop message. Silently drop. 533 Alternative Host Address (Type 6): Silently drop. 535 Source Quench (Type 4): Obsoleted in ICMPv6. Silently drop. 537 Time Exceeded (Type 11): Set the Type field to 3, and adjust 538 the ICMP checksum both to take the type change into account 539 and to include the ICMPv6 pseudo-header. The Code field is 540 unchanged. 542 Parameter Problem (Type 12): Set the Type field to 4, and 543 adjust the ICMP checksum both to take the type/code change 544 into account and to include the ICMPv6 pseudo-header. 546 Translate the Code field as follows: 548 Code 0 (Pointer indicates the error): Set the Code value to 549 0 (Erroneous header field encountered) and update the 550 pointer as defined in Figure 3 (If the Original IPv4 551 Pointer Value is not listed or the Translated IPv6 552 Pointer Value is listed as "n/a", silently drop the 553 packet). 555 Code 1 (Missing a required option): Silently drop 557 Code 2 (Bad length): Set the Code value to 0 (Erroneous 558 header field encountered) and update the pointer as 559 defined in Figure 3 (If the Original IPv4 Pointer Value 560 is not listed or the Translated IPv6 Pointer Value is 561 listed as "n/a", silently drop the packet). 563 Other Code values: Silently drop 565 Unknown ICMPv4 types: Silently drop. 567 | Original IPv4 Pointer Value | Translated IPv6 Pointer Value | 568 +--------------------------------+--------------------------------+ 569 | 0 | Version/IHL | 0 | Version/Traffic Class | 570 | 1 | Type Of Service | 1 | Traffic Class/Flow Label | 571 | 2,3 | Total Length | 4 | Payload Length | 572 | 4,5 | Identification | n/a | | 573 | 6 | Flags/Fragment Offset | n/a | | 574 | 7 | Fragment Offset | n/a | | 575 | 8 | Time to Live | 7 | Hop Limit | 576 | 9 | Protocol | 6 | Next Header | 577 |10,11| Header Checksum | n/a | | 578 |12-15| Source Address | 8 | Source Address | 579 |16-19| Destination Address | 24 | Destination Address | 580 +--------------------------------+--------------------------------+ 582 Figure 3: Pointer value for translating from IPv4 to IPv6 584 ICMP Error Payload: If the received ICMPv4 packet contains an 585 ICMPv4 Extension [RFC4884], the translation of the ICMPv4 586 packet will cause the ICMPv6 packet to change length. When 587 this occurs, the ICMPv6 Extension length attribute MUST be 588 adjusted accordingly (e.g., longer due to the translation 589 from IPv4 to IPv6). If the ICMPv4 Extension exceeds the 590 maximum size of an ICMPv6 message on the outgoing interface, 591 the ICMPv4 extension SHOULD be simply truncated. For 592 extensions not defined in [RFC4884], the translator passes 593 the extensions as opaque bit strings and those containing 594 IPv4 address literals will not have those addresses 595 translated to IPv6 address literals; this may cause problems 596 with processing of those ICMP extensions. 598 4.3. Translating ICMPv4 Error Messages into ICMPv6 600 There are some differences between the ICMPv4 and the ICMPv6 error 601 message formats as detailed above. The ICMP error messages 602 containing the packet in error MUST be translated just like a normal 603 IP packet. If the translation of this "packet in error" changes the 604 length of the datagram, the Total Length field in the outer IPv6 605 header MUST be updated. 607 +-------------+ +-------------+ 608 | IPv4 | | IPv6 | 609 | Header | | Header | 610 +-------------+ +-------------+ 611 | ICMPv4 | | ICMPv6 | 612 | Header | | Header | 613 +-------------+ +-------------+ 614 | IPv4 | ===> | IPv6 | 615 | Header | | Header | 616 +-------------+ +-------------+ 617 | Partial | | Partial | 618 | Transport | | Transport | 619 | Layer | | Layer | 620 | Header | | Header | 621 +-------------+ +-------------+ 623 Figure 4: IPv4-to-IPv6 ICMP Error Translation 625 The translation of the inner IP header can be done by invoking the 626 function that translated the outer IP headers. This process MUST 627 stop at the first embedded header and drop the packet if it contains 628 more. 630 4.4. Generation of ICMPv4 Error Message 632 If the IPv4 packet is discarded, then the translator SHOULD be able 633 to send back an ICMPv4 error message to the original sender of the 634 packet, unless the discarded packet is itself an ICMPv4 message. The 635 ICMPv4 message, if sent, has a Type value of 3 (Destination 636 Unreachable) and a Code value of 13 (Communication Administratively 637 Prohibited), unless otherwise specified in this document or in 638 [I-D.ietf-behave-v6v4-xlate-stateful]. The translator SHOULD allow 639 an administrator to configure whether the ICMPv4 error messages are 640 sent, rate-limited, or not sent. 642 4.5. Transport-layer Header Translation 644 If the address translation algorithm is not checksum neutral (Section 645 3 of [I-D.ietf-behave-address-format]), the recalculation and 646 updating of the transport-layer headers which contain pseudo headers 647 needs to be performed. Translators MUST do this for TCP and ICMP 648 packets and for UDP packets that contain a UDP checksum (i.e. the UDP 649 checksum field is not zero). 651 For UDP packets that do not contain a UDP checksum (i.e. the UDP 652 checksum field is zero), the translator SHOULD provide a 653 configuration function to allow: 655 1. Dropping the packet and generating a system management event 656 specifying at least the IP addresses and port numbers of the 657 packet. 659 2. Calculating an IPv6 checksum and forward the packet (which has 660 performance implications). 662 A stateless translator cannot compute the UDP checksum of 663 fragmented packets, so when a stateless translator receives the 664 first fragment of a fragmented UDP IPv4 packet and the checksum 665 field is zero, the translator SHOULD drop the packet and generate 666 a system management event specifying at least the IP addresses 667 and port numbers in the packet. 669 For stateful translator, the handling of fragmented UDP IPv4 670 packets with a zero checksum is discussed in 671 [I-D.ietf-behave-v6v4-xlate-stateful]), section 3.1. 673 3. Forwarding the packet without a UDP checksum. 675 A stateless translator can translate fragmented UDP IPv4 packet 676 under this condition. 678 Other transport protocols (e.g., DCCP) are OPTIONAL to support. In 679 order to ease debugging and troubleshooting, translators MUST forward 680 all transport protocols as described in the "Next Header" step of 681 Section 3.1. 683 4.6. Knowing When to Translate 685 If the IP/ICMP translator also provides normal forwarding function, 686 and the destination IPv4 address is reachable by a more specific 687 route without translation, the translator MUST forward it without 688 translating it. Otherwise, when an IP/ICMP translator receives an 689 IPv4 datagram addressed to an IPv4 destination representing a host in 690 the IPv6 domain, the packet MUST be translated to IPv6. 692 5. Translating from IPv6 to IPv4 694 When an IP/ICMP translator receives an IPv6 datagram addressed to a 695 destination towards the IPv4 domain, it translates the IPv6 header of 696 the received IPv6 packet into an IPv4 header. The original IPv6 697 header on the packet is removed and replaced by an IPv4 header. 698 Since the ICMPv6 [RFC4443], TCP [RFC0793], UDP [RFC0768] and DCCP 699 [RFC4340] headers contain checksums that cover the IP header, if the 700 address mapping algorithm is not checksum-neutral, the checksum MUST 701 be evaluated before translation and the ICMP and transport-layer 702 headers MUST be updated. The data portion of the packet is left 703 unchanged. The IP/ICMP translator then forwards the packet based on 704 the IPv4 destination address. 706 +-------------+ +-------------+ 707 | IPv6 | | IPv4 | 708 | Header | | Header | 709 +-------------+ +-------------+ 710 | Fragment | | Transport | 711 | Header | ===> | Layer | 712 |(if present) | | Header | 713 +-------------+ +-------------+ 714 | Transport | | | 715 | Layer | ~ Data ~ 716 | Header | | | 717 +-------------+ +-------------+ 718 | | 719 ~ Data ~ 720 | | 721 +-------------+ 723 Figure 5: IPv6-to-IPv4 Translation 725 There are some differences between IPv6 and IPv4 in the area of 726 fragmentation and the minimum link MTU that affect the translation. 727 An IPv6 link has to have an MTU of 1280 bytes or greater. The 728 corresponding limit for IPv4 is 68 bytes. Path MTU Discovery across 729 a translator relies on ICMP Packet Too Big messages being received 730 and processed by IPv6 hosts, including an ICMP Packet Too Big that 731 indicates the MTU is less than the IPv6 minimum MTU. This 732 requirement is described in Section 5 of [RFC2460] (for IPv6's 1280 733 octet minimum MTU) and Section 5 of [RFC1883] (for IPv6's previous 734 576 octet minimum MTU). 736 In an environment where an ICMPv4 Packet Too Big message is 737 translated to an ICMPv6 Packet Too Big messages, and the ICMPv6 738 Packet Too Big message is successfully delivered to and correctly 739 processed by the IPv6 hosts (e.g., a network owned/operated by the 740 same entity that owns/operates the translator), the translator can 741 rely on IPv6 hosts sending subsequent packets to the same IPv6 742 destination with IPv6 fragment headers. In such an environment, when 743 the translator receives an IPv6 packet with a fragmentation header, 744 the translator SHOULD generate the IPv4 packet with a cleared Don't 745 Fragment bit, and with its identification value from the IPv6 746 fragment header, for all of the IPv6 fragments (MF=0 or MF=1). 748 In an environment where an ICMPv4 Packet Too Big message are filtered 749 (by a network firewall or by the host itself) or not correctly 750 processed by the IPv6 hosts, the IPv6 host will never generate an 751 IPv6 packet with the IPv6 fragment header. In such an environment, 752 the translator SHOULD set the IPv4 Don't Fragment bit. While setting 753 the Don't Fragment bit may create PMTUD black holes [RFC2923] if 754 there are IPv4 links smaller than 1260 octets, this is considered 755 safer than causing IPv4 reassembly errors [RFC4963]. 757 Other than the special rules for handling fragments and path MTU 758 discovery, the actual translation of the packet header consists of a 759 simple translation as defined below. Note that ICMPv6 packets 760 require special handling in order to translate the contents of ICMPv6 761 error messages and also to remove the ICMPv6 pseudo-header checksum. 763 The translator SHOULD make sure that the packets belonging to the 764 same flow leave the translator in the same order in which they 765 arrived. 767 5.1. Translating IPv6 Headers into IPv4 Headers 769 If there is no IPv6 Fragment header, the IPv4 header fields are set 770 as follows: 772 Version: 4 774 Internet Header Length: 5 (no IPv4 options) 776 Type of Service (TOS) Octet: By default, copied from the IPv6 777 Traffic Class (all 8 bits). According to [RFC2474] the semantics 778 of the bits are identical in IPv4 and IPv6. However, in some IPv4 779 environments, these bits might be used with the old semantics of 780 "Type Of Service and Precedence". An implementation of a 781 translator SHOULD provide the ability to ignore the IPv6 traffic 782 class and always set the IPv4 TOS Octet to a specified value. In 783 addition, if the translator is at an administrative boundary, the 784 filtering and update considerations of [RFC2475] may be 785 applicable. 787 Total Length: Payload length value from IPv6 header, plus the size 788 of the IPv4 header. 790 Identification: All zero. In order to avoid black holes caused by 791 ICMPv4 filtering or non [RFC2460] compatible IPv6 hosts (a 792 workaround discussed in Section 4), the translator MAY provide a 793 function such as if the packet size is equal to or smaller than 794 1280 bytes and greater than 88 bytes, generate the identification 795 value. The translator SHOULD provide a method for operators to 796 enable or disable this function. 798 Flags: The More Fragments flag is set to zero. The Don't Fragments 799 flag is set to one. In order to avoid black holes caused by 800 ICMPv4 filtering or non [RFC2460] compatible IPv6 hosts (a 801 workaround discussed in Section 5), the translator MAY provide a 802 function such as if the packet size is equal to or smaller than 803 1280 bytes and greater than 88 bytes, the Don't Fragments (DF) 804 flag is set to zero, otherwise the Don't Fragments (DF) flag is 805 set to one. The translator SHOULD provide a method for operators 806 to enable or disable this function. 808 Fragment Offset: All zeros. 810 Time to Live: Time to Live is derived from Hop Limit value in IPv6 811 header. Since the translator is a router, as part of forwarding 812 the packet it needs to decrement either the IPv6 Hop Limit (before 813 the translation) or the IPv4 TTL (after the translation). As part 814 of decrementing the TTL or Hop Limit the translator (as any 815 router) MUST check for zero and send the ICMPv4 "TTL Exceeded" or 816 ICMPv6 "Hop Limit Exceeded" error. 818 Protocol: The IPv6-Frag (44) header is handled as discussed in 819 Section 4.1.1. ICMPv6 (58) is changed to ICMPv4 (1), and the 820 payload is translated as discussed in Section 4.2. The IPv6 821 headers HOPOPT (0), IPv6-Route (43), and IPv6-Opts (60) are 822 skipped over during processing as they have no meaning in IPv4. 823 For the first 'next header' that does not match one of the cases 824 above, its next header value (which contains the transport 825 protocol number) is copied to the protocol field in the IPv4 826 header. This means that all transport protocols are translated. 828 Note: Some translated protocols will fail at the receiver for 829 various reasons: some are known to fail when translated (e.g., 830 IPsec AH (51)), and others will fail checksum validation if the 831 address translation is not checksum neutral 832 [I-D.ietf-behave-address-format] and the translator does not 833 update the transport protocol's checksum (because the 834 translator doesn't support recalculating the checksum for that 835 transport protocol, see Section 4.5). 837 Header Checksum: Computed once the IPv4 header has been created. 839 Source Address: In the stateless mode, which is to say that if the 840 IPv6 source address is within the range of a configured IPv6 841 translation prefix, the IPv4 source address is derived from the 842 IPv6 source address per [I-D.ietf-behave-address-format] section 843 2.1. Note that the original IPv6 source address is an IPv4- 844 translatable address. A workflow example of stateless translation 845 is shown in Appendix of this document. If the translator only 846 supports stateless mode and if the IPv6 source address is not 847 within the range of configured IPv6 prefix(es), the translator 848 SHOULD drop the packet and respond with an ICMPv6 Type=1, Code=5 849 (Destination Unreachable, Source address failed ingress/egress 850 policy). 852 In the stateful mode, which is to say that if the IPv6 source 853 address is not within the range of any configured IPv6 stateless 854 translation prefix, the IPv4 source address and transport-layer 855 source port corresponding to the IPv4-related IPv6 source address 856 and source port are derived from the Binding Information Bases 857 (BIBs) as described in [I-D.ietf-behave-v6v4-xlate-stateful]. 859 In stateless and stateful modes, if the translator gets an illegal 860 source address (e.g. ::1, etc.), the translator SHOULD silently 861 drop the packet. 863 Destination Address: The IPv4 destination address is derived from 864 the IPv6 destination address of the datagram being translated per 865 [I-D.ietf-behave-address-format] section 2.1. Note that the 866 original IPv6 destination address is an IPv4-converted address. 868 If a Routing header with a non-zero Segments Left field is present 869 then the packet MUST NOT be translated, and an ICMPv6 "parameter 870 problem/erroneous header field encountered" (Type 4/Code 0) error 871 message, with the Pointer field indicating the first byte of the 872 Segments Left field, SHOULD be returned to the sender. 874 5.1.1. IPv6 Fragment Processing 876 If the IPv6 packet contains a Fragment header, the header fields are 877 set as above with the following exceptions: 879 Total Length: Payload length value from IPv6 header, minus 8 for the 880 Fragment header, plus the size of the IPv4 header. 882 Identification: Copied from the low-order 16-bits in the 883 Identification field in the Fragment header. 885 Flags: The IPv4 More Fragments (MF) flag is copied from the M flag 886 in the IPv6 Fragment header. The IPv4 Don't Fragments (DF) flag 887 is cleared (set to zero) allowing this packet to be further 888 fragmented by IPv4 routers. 890 Fragment Offset: Copied from the Fragment Offset field of the IPv6 891 Fragment header. 893 Protocol: For ICMPv6 (58) changed to ICMPv4 (1), otherwise skip 894 extension headers, Next Header field copied from the last IPv6 895 header. 897 If a translated packet with DF set to 1 will be larger than the MTU 898 of the next-hop interface, then the translator MUST drop the packet 899 and send the ICMPv6 "Packet Too Big" (Type 2/Code 0) error message to 900 the IPv6 host with an adjusted MTU in the ICMPv6 message. 902 5.2. Translating ICMPv6 Headers into ICMPv4 Headers 904 If a non-checksum neutral translation address is being used, ICMPv6 905 messages MUST have their ICMPv4 checksum field be updated as part of 906 the translation since ICMPv6 (unlike ICMPv4) includes a pseudo-header 907 in the checksum just like UDP and TCP. 909 In addition all ICMP packets MUST have the Type value translated and, 910 for ICMP error messages, the included IP header also MUST be 911 translated. Note that the IPv6 addresses in the IPv6 header may not 912 be IPv4-translatable addresses and there will be no corresponding 913 IPv4 addresses representing this IPv6 address. In this case, the 914 translator can do stateful translation. A mechanism by which the 915 translator can instead do stateless translation of this address is 916 left for future work. 918 The actions needed to translate various ICMPv6 messages are: 920 ICMPv6 informational messages: 922 Echo Request and Echo Reply (Type 128 and 129): Adjust the Type 923 values to 8 and 0, respectively, and adjust the ICMP checksum 924 both to take the type change into account and to exclude the 925 ICMPv6 pseudo-header. 927 MLD Multicast Listener Query/Report/Done (Type 130, 131, 132): 928 Single hop message. Silently drop. 930 Neighbor Discover messages (Type 133 through 137): Single hop 931 message. Silently drop. 933 Unknown informational messages: Silently drop. 935 ICMPv6 error messages: 937 Destination Unreachable (Type 1) Set the Type field to 3, and 938 adjust the ICMP checksum both to take the type/code change into 939 account and to exclude the ICMPv6 pseudo-header. 941 Translate the Code field as follows: 943 Code 0 (no route to destination): Set Code value to 1 (Host 944 unreachable). 946 Code 1 (Communication with destination administratively 947 prohibited): Set Code value to 10 (Communication with 948 destination host administratively prohibited). 950 Code 2 (Beyond scope of source address): Set Code value to 1 951 (Host unreachable). Note that this error is very unlikely 952 since an IPv4-translatable source address is typically 953 considered to have global scope. 955 Code 3 (Address unreachable): Set Code value to 1 (Host 956 unreachable). 958 Code 4 (Port unreachable): Set Code value to 3 (Port 959 unreachable). 961 Other Code values: Silently drop. 963 Packet Too Big (Type 2): Translate to an ICMPv4 Destination 964 Unreachable (Type 3) with Code value equal to 4, and adjust the 965 ICMPv4 checksum both to take the type change into account and 966 to exclude the ICMPv6 pseudo-header. The MTU field MUST be 967 adjusted for the difference between the IPv4 and IPv6 header 968 sizes taking into account whether or not the packet in error 969 includes a Fragment header, i.e. minimum(advertised MTU-20, 970 MTU_of_IPv4_nexthop, (MTU_of_IPv6_nexthop)-20). 972 See also the requirements in Section 5. 974 Time Exceeded (Type 3): Set the Type value to 11, and adjust the 975 ICMPv4 checksum both to take the type change into account and 976 to exclude the ICMPv6 pseudo-header. The Code field is 977 unchanged. 979 Parameter Problem (Type 4): Translate the Type and Code field as 980 follows, and adjust the ICMPv4 checksum both to take the type/ 981 code change into account and to exclude the ICMPv6 pseudo- 982 header. 984 Translate the Code field as follows: 986 Code 0 (Erroneous header field encountered): Set Type 12, Code 987 0 and update the pointer as defined in Figure 6 (If the 988 Original IPv6 Pointer Value is not listed or the Translated 989 IPv4 Pointer Value is listed as "n/a", silently drop the 990 packet). 992 Code 1 (Unrecognized Next Header type encountered): Translate 993 this to an ICMPv4 protocol unreachable (Type 3, Code 2). 995 Code 2 (Unrecognized IPv6 option encountered): Silently drop. 997 Unknown error messages: Silently drop. 999 | Original IPv6 Pointer Value | Translated IPv4 Pointer Value | 1000 +--------------------------------+--------------------------------+ 1001 | 0 | Version/Traffic Class | 0 | Version/IHL, Type Of Ser | 1002 | 1 | Traffic Class/Flow Label | 1 | Type Of Service | 1003 | 2,3 | Flow Label | n/a | | 1004 | 4,5 | Payload Length | 2 | Total Length | 1005 | 6 | Next Header | 9 | Protocol | 1006 | 7 | Hop Limit | 8 | Time to Live | 1007 | 8-23| Source Address | 12 | Source Address | 1008 |24-39| Destination Address | 16 | Destination Address | 1009 +--------------------------------+--------------------------------+ 1011 Figure 6: Pointer Value for translating from IPv6 to IPv4 1013 ICMP Error Payload: If the received ICMPv6 packet contains an 1014 ICMPv6 Extension [RFC4884], the translation of the ICMPv6 1015 packet will cause the ICMPv4 packet to change length. When 1016 this occurs, the ICMPv6 Extension length attribute MUST be 1017 adjusted accordingly (e.g., shorter due to the translation from 1018 IPv6 to IPv4). For extensions not defined in [RFC4884], the 1019 translator passes the extensions as opaque bit strings and 1020 those containing IPv6 address literals will not have those 1021 addresses translated to IPv4 address literals; this may cause 1022 problems with processing of those ICMP extensions. 1024 5.3. Translating ICMPv6 Error Messages into ICMPv4 1026 There are some differences between the ICMPv4 and the ICMPv6 error 1027 message formats as detailed above. The ICMP error messages 1028 containing the packet in error MUST be translated just like a normal 1029 IP packet. The translation of this "packet in error" is likely to 1030 change the length of the datagram thus the Total Length field in the 1031 outer IPv4 header MUST be updated. 1033 +-------------+ +-------------+ 1034 | IPv6 | | IPv4 | 1035 | Header | | Header | 1036 +-------------+ +-------------+ 1037 | ICMPv6 | | ICMPv4 | 1038 | Header | | Header | 1039 +-------------+ +-------------+ 1040 | IPv6 | ===> | IPv4 | 1041 | Header | | Header | 1042 +-------------+ +-------------+ 1043 | Partial | | Partial | 1044 | Transport | | Transport | 1045 | Layer | | Layer | 1046 | Header | | Header | 1047 +-------------+ +-------------+ 1049 Figure 7: IPv6-to-IPv4 ICMP Error Translation 1051 The translation of the inner IP header can be done by invoking the 1052 function that translated the outer IP headers. This process MUST 1053 stop at first embedded header and drop the packet if it contains 1054 more. Note that the IPv6 addresses in the IPv6 header may not be 1055 IPv4-translatable addresses and there will be no corresponding IPv4 1056 addresses. In this case, the translator can do stateful translation. 1057 A mechanism by which the translator can instead do stateless 1058 translation is left for future work. 1060 5.4. Generation of ICMPv6 Error Message 1062 If the IPv6 packet is discarded, then the translator SHOULD send back 1063 an ICMPv6 error message to the original sender of the packet, unless 1064 the discarded packet is itself an ICMPv6 message. 1066 If the ICMPv6 error message is being sent because the IPv6 source 1067 address is not an IPv4-translatable address and the translator is 1068 stateless, the ICMPv6 message, if sent, MUST have a Type value of 1 1069 and Code value of 5 (Source address failed ingress/egress policy). 1070 In other cases, the ICMPv6 message MUST have a Type value of 1 1071 (Destination Unreachable) and a Code value of 1 (Communication with 1072 destination administratively prohibited), unless otherwise specified 1073 in this document or [I-D.ietf-behave-v6v4-xlate-stateful]. The 1074 translator SHOULD allow an administrator to configure whether the 1075 ICMPv6 error messages are sent, rate-limited, or not sent. 1077 5.5. Transport-layer Header Translation 1079 If the address translation algorithm is not checksum neutral (Section 1080 3 of [I-D.ietf-behave-address-format]), the recalculation and 1081 updating of the transport-layer headers which contain pseudo headers 1082 need to be performed. Translators MUST do this for TCP and ICMP. 1084 For UDP, if an IPv6 UDP packet arrives with a 0 checksum, a UDP 1085 checksum SHOULD NOT be generated for that IPv4 packet. Otherwise, 1086 the translator SHOULD recalculate and update the transport-layer 1087 checksum. The translator MAY have a configuration option permitting 1088 it to zero the UDP checksum in some or all traffic. 1090 Other transport protocols (e.g., DCCP) are OPTIONAL to support. In 1091 order to ease debugging and troubleshooting, translators MUST forward 1092 all transport protocols as described in the "Protocol" step of 1093 Section 4.1. 1095 5.6. Knowing When to Translate 1097 If the IP/ICMP translator also provides a normal forwarding function, 1098 and the destination address is reachable by a more specific route 1099 without translation, the router MUST forward it without translating 1100 it. When an IP/ICMP translator receives an IPv6 datagram addressed 1101 to an IPv6 address representing a host in the IPv4 domain, the IPv6 1102 packet MUST be translated to IPv4. 1104 6. Special Considerations for ICMPv6 Packet Too Big 1106 Two recent studies analyzed the behavior of IPv6-capable web servers 1107 on the Internet and found that approximately 95% responded as 1108 expected to an IPv6 Packet Too Big that indicated MTU=1280, but only 1109 43% responded as expected to an IPv6 Packet Too Big that indicated an 1110 MTU < 1280. It is believed firewalls violating Section 4.3.1 of 1111 [RFC4890] are at fault. These failures will both cause Path MTU 1112 Discovery (PMTUD) black holes [RFC2923]. Unfortunately the 1113 translator cannot improve the failure rate of the first case (MTU = 1114 1280), but the translator can improve the failure rate of the second 1115 case (MTU < 1280). There are two approaches to resolving the problem 1116 with sending ICMPv6 messages indicating an MTU < 1280. It SHOULD be 1117 possible to configure a translator for either of the two approaches. 1119 The first approach is to constrain the deployment of the IPv6/IPv4 1120 translator by observing that four of the scenarios intended for 1121 stateless IPv6/IPv4 translators do not have IPv6 hosts on the 1122 Internet (Scenarios 1, 2, 5 and 6 described in 1123 [I-D.ietf-behave-v6v4-framework], which refer to "An IPv6 network"). 1125 In these scenarios IPv6 hosts, IPv6 host-based firewalls, and IPv6 1126 network firewalls can be administered in compliance with Section 1127 4.3.1 of [RFC4890] and therefore avoid the problem witnessed with 1128 IPv6 hosts on the Internet. 1130 The second approach is necessary if the translator has IPv6 hosts, 1131 IPv6 host-based firewalls, or IPv6 network firewalls that do not (or 1132 cannot) comply with Section 5 of [RFC2460] -- such as IPv6 hosts on 1133 the Internet. This approach requires the translator to do the 1134 following: 1136 1. in the IPv4 to IPv6 direction: if the MTU value of ICMPv4 Packet 1137 Too Big messages is less than 1280, change it to 1280. This is 1138 intended to cause the IPv6 host and IPv6 firewall to process the 1139 ICMP PTB message and generate subsequent packets to this 1140 destination with an IPv6 fragmentation header. 1142 Note: Based on recent studies, this is effective for 95% of IPv6 1143 hosts on the Internet. 1145 2. in the IPv6 to IPv4 direction: 1147 A. if there is a Fragment header in the IPv6 packet, the last 16 1148 bits of its value MUST be used for the IPv4 identification 1149 value. 1151 B. if there is no Fragment header in the IPv6 packet: 1153 a. if the packet is less than or equal to 1280 bytes: 1155 - the translator SHOULD set DF to 0 and generate an IPv4 1156 identification value. 1158 - To avoid the problems described in [RFC4963], it is 1159 RECOMMENDED the translator maintain 3-tuple state for 1160 generating the IPv4 identification value. 1162 b. if the packet is greater than 1280 bytes, the translator 1163 SHOULD set the IPv4 DF bit to 1. 1165 7. IANA Considerations 1167 This memo adds no new IANA considerations. 1169 Note to RFC Editor: This section will have served its purpose if it 1170 correctly tells IANA that no new assignments or registries are 1171 required, or if those assignments or registries are created during 1172 the RFC publication process. From the author's perspective, it may 1173 therefore be removed upon publication as an RFC at the RFC Editor's 1174 discretion. 1176 8. Security Considerations 1178 The use of stateless IP/ICMP translators does not introduce any new 1179 security issues beyond the security issues that are already present 1180 in the IPv4 and IPv6 protocols and in the routing protocols that are 1181 used to make the packets reach the translator. 1183 There are potential issues that might arise by deriving an IPv4 1184 address from an IPv6 address - particularly addresses like broadcast 1185 or loopback addresses and the non IPv4-translatable IPv6 addresses, 1186 etc. The [I-D.ietf-behave-address-format] addresses these issues. 1188 As with network address translation of IPv4 to IPv4, the IPsec 1189 Authentication Header [RFC4302] cannot be used across an IPv6 to IPv4 1190 translator. 1192 As with network address translation of IPv4 to IPv4, packets with 1193 tunnel mode ESP can be translated since tunnel mode ESP does not 1194 depend on header fields prior to the ESP header. Similarly, 1195 transport mode ESP will fail with IPv6 to IPv4 translation unless 1196 checksum neutral addresses are used. In both cases, the IPsec ESP 1197 endpoints will normally detect the presence of the translator and 1198 encapsulate ESP in UDP packets [RFC3948]. 1200 9. Acknowledgements 1202 This is under development by a large group of people. Those who have 1203 posted to the list during the discussion include Alexey Melnikov, 1204 Andrew Sullivan, Andrew Yourtchenko, Brian Carpenter, Dan Wing, Dave 1205 Thaler, David Harrington, Ed Jankiewicz, Hiroshi Miyata, Iljitsch van 1206 Beijnum, Jari Arkko, Jerry Huang, John Schnizlein, Jouni Korhonen, 1207 Kentaro Ebisawa, Kevin Yin, Magnus Westerlund, Marcelo Bagnulo Braun, 1208 Margaret Wasserman, Masahito Endo, Phil Roberts, Philip Matthews, 1209 Reinaldo Penno, Remi Denis-Courmont, Remi Despres, Sean Turner, 1210 Senthil Sivakumar, Simon Perreault, Stewart Bryant, Tim Polk, Tero 1211 Kivinen and Zen Cao. 1213 10. Appendix: Stateless translation workflow example 1215 A stateless translation workflow example is depicted in the following 1216 figure. The documentation address blocks 2001:db8::/32 [RFC3849], 1217 192.0.2.0/24 and 198.51.100.0/24 [RFC5737] are used in this example. 1219 +--------------+ +--------------+ 1220 | IPv4 network | | IPv6 network | 1221 | | +-------+ | | 1222 | +----+ |-----| XLAT |---- | +----+ | 1223 | | H4 |-----| +-------+ |--| H6 | | 1224 | +----+ | | +----+ | 1225 +--------------+ +--------------+ 1227 Figure 8 1229 A translator (XLAT) connects the IPv6 network to the IPv4 network. 1230 This XLAT uses the Network Specific Prefix (NSP) 2001:db8:100::/40 1231 defined in [I-D.ietf-behave-address-format] to represent IPv4 1232 addresses in the IPv6 address space (IPv4-converted addresses) and to 1233 represent IPv6 addresses (IPv4-translatable addresses) in the IPv4 1234 address space. In this example, 192.0.2.0/24 is the IPv4 block of 1235 the corresponding IPv4-translatable addresses. 1237 Based on the address mapping rule, the IPv6 node H6 has an IPv4- 1238 translatable IPv6 address 2001:db8:1c0:2:21:: (address mapping from 1239 192.0.2.33). The IPv4 node H4 has IPv4 address 198.51.100.2. 1241 The IPv6 routing is configured in such a way that the IPv6 packets 1242 addressed to a destination address in 2001:db8:100::/40 are routed to 1243 the IPv6 interface of the XLAT. 1245 The IPv4 routing is configured in such a way that the IPv4 packets 1246 addressed to a destination address in 192.0.2.0/24 are routed to the 1247 IPv4 interface of the XLAT. 1249 10.1. H6 establishes communication with H4 1251 The steps by which H6 establishes communication with H4 are: 1253 1. H6 performs the destination address mapping, so the IPv4- 1254 converted address 2001:db8:1c6:3364:200:: is formed from 1255 198.51.100.2 based on the address mapping algorithm 1256 [I-D.ietf-behave-address-format]. 1258 2. H6 sends a packet to H4. The packet is sent from a source 1259 address 2001:db8:1c0:2:21:: to a destination address 1260 2001:db8:1c6:3364:200::. 1262 3. The packet is routed to the IPv6 interface of the XLAT (since 1263 IPv6 routing is configured that way). 1265 4. The XLAT receives the packet and performs the following actions: 1267 * The XLAT translates the IPv6 header into an IPv4 header using 1268 the IP/ICMP Translation Algorithm defined in this document. 1270 * The XLAT includes 192.0.2.33 as source address in the packet 1271 and 198.51.100.2 as destination address in the packet. Note 1272 that 192.0.2.33 and 198.51.100.2 are extracted directly from 1273 the source IPv6 address 2001:db8:1c0:2:21:: (IPv4-translatable 1274 address) and destination IPv6 address 2001:db8:1c6:3364:200:: 1275 (IPv4-converted address) of the received IPv6 packet that is 1276 being translated. 1278 5. The XLAT sends the translated packet out its IPv4 interface and 1279 the packet arrives at H4. 1281 6. H4 node responds by sending a packet with destination address 1282 192.0.2.33 and source address 198.51.100.2. 1284 7. The packet is routed to the IPv4 interface of the XLAT (since 1285 IPv4 routing is configured that way). The XLAT performs the 1286 following operations: 1288 * The XLAT translates the IPv4 header into an IPv6 header using 1289 the IP/ICMP Translation Algorithm defined in this document. 1291 * The XLAT includes 2001:db8:1c0:2:21:: as destination address 1292 in the packet and 2001:db8:1c6:3364:200:: as source address in 1293 the packet. Note that 2001:db8:1c0:2:21:: and 1294 2001:db8:1c6:3364:200:: 1295 are formed directly from the destination IPv4 1296 address 192.0.2.33 and source IPv4 address 198.51.100.2 of the 1297 received IPv4 packet that is being translated. 1299 8. The translated packet is sent out the IPv6 interface to H6. 1301 The packet exchange between H6 and H4 continues until the session is 1302 finished. 1304 10.2. H4 establishes communication with H6 1306 The steps by which H4 establishes communication with H6 are: 1308 1. H4 performs the destination address mapping, so 192.0.2.33 is 1309 formed from IPv4-translatable address 2001:db8:1c0:2:21:: based 1310 on the address mapping algorithm 1312 [I-D.ietf-behave-address-format]. 1314 2. H4 sends a packet to H6. The packet is sent from a source 1315 address 198.51.100.2 to a destination address 192.0.2.33. 1317 3. The packet is routed to the IPv4 interface of the XLAT (since 1318 IPv4 routing is configured that way). 1320 4. The XLAT receives the packet and performs the following actions: 1322 * The XLAT translates the IPv4 header into an IPv6 header using 1323 the IP/ICMP Translation Algorithm defined in this document. 1325 * The XLAT includes 2001:db8:1c6:3364:200:: as source address in 1326 the packet and 2001:db8:1c0:2:21:: as destination address in 1327 the packet. Note that 2001:db8:1c6:3364:200:: (IPv4-converted 1328 address) and 2001:db8:1c0:2:21:: (IPv4-translatable address) 1329 are obtained directly from the source IPv4 address 1330 198.51.100.2 and destination IPv4 address 192.0.2.33 of the 1331 received IPv4 packet that is being translated. 1333 5. The XLAT sends the translated packet out its IPv6 interface and 1334 the packet arrives at H6. 1336 6. H6 node responds by sending a packet with destination address 1337 2001:db8:1c6:3364:200:: and source address 2001:db8:1c0:2:21::. 1339 7. The packet is routed to the IPv6 interface of the XLAT (since 1340 IPv6 routing is configured that way). The XLAT performs the 1341 following operations: 1343 * The XLAT translates the IPv6 header into an IPv4 header using 1344 the IP/ICMP Translation Algorithm defined in this document. 1346 * The XLAT includes 198.51.100.2 as destination address in the 1347 packet and 192.0.2.33 as source address in the packet. Note 1348 that 198.51.100.2 and 192.0.2.33 are formed directly from the 1349 destination IPv6 address 2001:db8:1c6:3364:200:: and source 1350 IPv6 address 2001:db8:1c0:2:21:: of the received IPv6 packet 1351 that is being translated. 1353 8. The translated packet is sent out the IPv4 interface to H4. 1355 The packet exchange between H4 and H6 continues until the session 1356 finished. 1358 11. References 1359 11.1. Normative References 1361 [I-D.ietf-behave-address-format] 1362 Bao, C., Huitema, C., Bagnulo, M., Boucadair, M., and X. 1363 Li, "IPv6 Addressing of IPv4/IPv6 Translators", 1364 draft-ietf-behave-address-format-10 (work in progress), 1365 August 2010. 1367 [I-D.ietf-behave-v6v4-xlate-stateful] 1368 Bagnulo, M., Matthews, P., and I. Beijnum, "Stateful 1369 NAT64: Network Address and Protocol Translation from IPv6 1370 Clients to IPv4 Servers", 1371 draft-ietf-behave-v6v4-xlate-stateful-12 (work in 1372 progress), July 2010. 1374 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 1375 August 1980. 1377 [RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, 1378 September 1981. 1380 [RFC0792] Postel, J., "Internet Control Message Protocol", STD 5, 1381 RFC 792, September 1981. 1383 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 1384 RFC 793, September 1981. 1386 [RFC1812] Baker, F., "Requirements for IP Version 4 Routers", 1387 RFC 1812, June 1995. 1389 [RFC1883] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1390 (IPv6) Specification", RFC 1883, December 1995. 1392 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1393 Requirement Levels", BCP 14, RFC 2119, March 1997. 1395 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1396 (IPv6) Specification", RFC 2460, December 1998. 1398 [RFC2765] Nordmark, E., "Stateless IP/ICMP Translation Algorithm 1399 (SIIT)", RFC 2765, February 2000. 1401 [RFC3948] Huttunen, A., Swander, B., Volpe, V., DiBurro, L., and M. 1402 Stenberg, "UDP Encapsulation of IPsec ESP Packets", 1403 RFC 3948, January 2005. 1405 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 1406 Architecture", RFC 4291, February 2006. 1408 [RFC4340] Kohler, E., Handley, M., and S. Floyd, "Datagram 1409 Congestion Control Protocol (DCCP)", RFC 4340, March 2006. 1411 [RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control 1412 Message Protocol (ICMPv6) for the Internet Protocol 1413 Version 6 (IPv6) Specification", RFC 4443, March 2006. 1415 [RFC4884] Bonica, R., Gan, D., Tappan, D., and C. Pignataro, 1416 "Extended ICMP to Support Multi-Part Messages", RFC 4884, 1417 April 2007. 1419 [RFC5382] Guha, S., Biswas, K., Ford, B., Sivakumar, S., and P. 1420 Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, 1421 RFC 5382, October 2008. 1423 [RFC5771] Cotton, M., Vegoda, L., and D. Meyer, "IANA Guidelines for 1424 IPv4 Multicast Address Assignments", BCP 51, RFC 5771, 1425 March 2010. 1427 11.2. Informative References 1429 [I-D.ietf-behave-v6v4-framework] 1430 Baker, F., Li, X., Bao, C., and K. Yin, "Framework for 1431 IPv4/IPv6 Translation", 1432 draft-ietf-behave-v6v4-framework-10 (work in progress), 1433 August 2010. 1435 [RFC0879] Postel, J., "TCP maximum segment size and related topics", 1436 RFC 879, November 1983. 1438 [RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, 1439 November 1990. 1441 [RFC2474] Nichols, K., Blake, S., Baker, F., and D. Black, 1442 "Definition of the Differentiated Services Field (DS 1443 Field) in the IPv4 and IPv6 Headers", RFC 2474, 1444 December 1998. 1446 [RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., 1447 and W. Weiss, "An Architecture for Differentiated 1448 Services", RFC 2475, December 1998. 1450 [RFC2710] Deering, S., Fenner, W., and B. Haberman, "Multicast 1451 Listener Discovery (MLD) for IPv6", RFC 2710, 1452 October 1999. 1454 [RFC2766] Tsirtsis, G. and P. Srisuresh, "Network Address 1455 Translation - Protocol Translation (NAT-PT)", RFC 2766, 1456 February 2000. 1458 [RFC2923] Lahey, K., "TCP Problems with Path MTU Discovery", 1459 RFC 2923, September 2000. 1461 [RFC3307] Haberman, B., "Allocation Guidelines for IPv6 Multicast 1462 Addresses", RFC 3307, August 2002. 1464 [RFC3590] Haberman, B., "Source Address Selection for the Multicast 1465 Listener Discovery (MLD) Protocol", RFC 3590, 1466 September 2003. 1468 [RFC3810] Vida, R. and L. Costa, "Multicast Listener Discovery 1469 Version 2 (MLDv2) for IPv6", RFC 3810, June 2004. 1471 [RFC3849] Huston, G., Lord, A., and P. Smith, "IPv6 Address Prefix 1472 Reserved for Documentation", RFC 3849, July 2004. 1474 [RFC4302] Kent, S., "IP Authentication Header", RFC 4302, 1475 December 2005. 1477 [RFC4890] Davies, E. and J. Mohacsi, "Recommendations for Filtering 1478 ICMPv6 Messages in Firewalls", RFC 4890, May 2007. 1480 [RFC4963] Heffner, J., Mathis, M., and B. Chandler, "IPv4 Reassembly 1481 Errors at High Data Rates", RFC 4963, July 2007. 1483 [RFC5737] Arkko, J., Cotton, M., and L. Vegoda, "IPv4 Address Blocks 1484 Reserved for Documentation", RFC 5737, January 2010. 1486 Authors' Addresses 1488 Xing Li 1489 CERNET Center/Tsinghua University 1490 Room 225, Main Building, Tsinghua University 1491 Beijing, 100084 1492 China 1494 Phone: +86 10-62785983 1495 Email: xing@cernet.edu.cn 1496 Congxiao Bao 1497 CERNET Center/Tsinghua University 1498 Room 225, Main Building, Tsinghua University 1499 Beijing, 100084 1500 China 1502 Phone: +86 10-62785983 1503 Email: congxiao@cernet.edu.cn 1505 Fred Baker 1506 Cisco Systems 1507 Santa Barbara, California 93117 1508 USA 1510 Phone: +1-408-526-4257 1511 Email: fred@cisco.com