idnits 2.17.1 draft-ietf-behave-v6v4-xlate-20.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. -- 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 (May 18, 2010) is 5084 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-10) exists of draft-ietf-behave-address-format-08 == Outdated reference: A later version (-12) exists of draft-ietf-behave-v6v4-xlate-stateful-11 ** 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) == Outdated reference: A later version (-10) exists of draft-ietf-behave-v6v4-framework-08 -- 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 (~~), 6 warnings (==), 4 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: November 19, 2010 Cisco Systems 7 May 18, 2010 9 IP/ICMP Translation Algorithm 10 draft-ietf-behave-v6v4-xlate-20 12 Abstract 14 This document forms a replacement of the Stateless IP/ICMP 15 Translation Algorithm (SIIT) described in RFC 2765. The algorithm 16 translates between IPv4 and IPv6 packet headers (including ICMP 17 headers). 19 Status of this Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at http://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on November 19, 2010. 36 Copyright Notice 38 Copyright (c) 2010 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (http://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 This document may contain material from IETF Documents or IETF 52 Contributions published or made publicly available before November 53 10, 2008. The person(s) controlling the copyright in some of this 54 material may not have granted the IETF Trust the right to allow 55 modifications of such material outside the IETF Standards Process. 56 Without obtaining an adequate license from the person(s) controlling 57 the copyright in such materials, this document may not be modified 58 outside the IETF Standards Process, and derivative works of it may 59 not be created outside the IETF Standards Process, except to format 60 it for publication as an RFC or to translate it into languages other 61 than English. 63 Table of Contents 65 1. Introduction and Motivation . . . . . . . . . . . . . . . . . 4 66 1.1. IPv4-IPv6 Translation Model . . . . . . . . . . . . . . . 4 67 1.2. Applicability and Limitations . . . . . . . . . . . . . . 4 68 1.3. Stateless vs. Stateful Mode . . . . . . . . . . . . . . . 5 69 1.4. Path MTU Discovery and Fragmentation . . . . . . . . . . . 5 70 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 6 71 3. Translating from IPv4 to IPv6 . . . . . . . . . . . . . . . . 6 72 3.1. Translating IPv4 Headers into IPv6 Headers . . . . . . . . 8 73 3.2. Translating ICMPv4 Headers into ICMPv6 Headers . . . . . . 10 74 3.3. Translating ICMPv4 Error Messages into ICMPv6 . . . . . . 14 75 3.4. Generation of ICMPv4 Error Message . . . . . . . . . . . . 15 76 3.5. Transport-layer Header Translation . . . . . . . . . . . . 15 77 3.6. Knowing When to Translate . . . . . . . . . . . . . . . . 15 78 4. Translating from IPv6 to IPv4 . . . . . . . . . . . . . . . . 16 79 4.1. Translating IPv6 Headers into IPv4 Headers . . . . . . . . 17 80 4.1.1. IPv6 Fragment Processing . . . . . . . . . . . . . . . 19 81 4.2. Translating ICMPv6 Headers into ICMPv4 Headers . . . . . . 20 82 4.3. Translating ICMPv6 Error Messages into ICMPv4 . . . . . . 23 83 4.4. Generation of ICMPv6 Error Message . . . . . . . . . . . . 24 84 4.5. Transport-layer Header Translation . . . . . . . . . . . . 24 85 4.6. Knowing When to Translate . . . . . . . . . . . . . . . . 24 86 5. Supporting IPv6 Hosts that Ignore ICMPv6 Packet Too Big . . . 24 87 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 88 7. Security Considerations . . . . . . . . . . . . . . . . . . . 26 89 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 26 90 9. Appendix: Stateless translation workflow example . . . . . . . 27 91 9.1. H6 establishes communication with H4 . . . . . . . . . . . 28 92 9.2. H4 establishes communication with H6 . . . . . . . . . . . 29 93 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 30 94 10.1. Normative References . . . . . . . . . . . . . . . . . . . 30 95 10.2. Informative References . . . . . . . . . . . . . . . . . . 31 97 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 32 99 1. Introduction and Motivation 101 This document is a product of the 2008-2010 effort to define a 102 replacement for NAT-PT [RFC2766]. It is directly derivative from 103 Erik Nordmark's "Stateless IP/ICMP Translation Algorithm (SIIT)" 104 [RFC2765], which provides stateless translation between IPv4 105 [RFC0791] and IPv6 [RFC2460], and between ICMPv4 [RFC0792] and ICMPv6 106 [RFC4443]. 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: IPv6/IPv4 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 will not be translated by the IP/ICMP translator. 153 Fragmented ICMP/ICMPv6 packets will not be translated by the IP/ICMP 154 translator. 156 The IP/ICMP header translation specified in this document is 157 consistent with requirements of multicast IP/ICMP headers. However 158 IPv4 multicast addresses [RFC5771] cannot be mapped to IPv6 multicast 159 addresses [RFC3307] based on the unicast mapping rule 160 [I-D.ietf-behave-address-format]. 162 1.3. Stateless vs. Stateful Mode 164 An IP/ICMP translator has two possible modes of operation: stateless 165 and stateful [I-D.ietf-behave-v6v4-framework]. In both cases, we 166 assume that a system (a node or an application) that has an IPv4 167 address but not an IPv6 address is communicating with a system that 168 has an IPv6 address but no IPv4 address, or that the two systems do 169 not have contiguous routing connectivity and hence are forced to have 170 their communications translated. 172 In the stateless mode, a specific IPv6 address range will represent 173 IPv4 systems (IPv4-converted addresses), and the IPv6 systems have 174 addresses (IPv4-translatable addresses) that can be algorithmically 175 mapped to a subset of the service provider's IPv4 addresses. Note 176 that IPv4-translatable addresses is a subset of IPv4-converted 177 addresses. In general, there is no need to concern oneself with 178 translation tables, as the IPv4 and IPv6 counterparts are 179 algorithmically related. 181 In the stateful mode, a specific IPv6 address range will represent 182 IPv4 systems (IPv4-converted addresses), but the IPv6 systems may use 183 any IPv6 addresses [RFC4291] except in that range. In this case, a 184 translation table is required to bind the IPv6 systems' addresses to 185 the IPv4 addresses maintained in the translator. 187 The address translation mechanisms for the stateless and the stateful 188 translations are defined in [I-D.ietf-behave-address-format]. 190 1.4. Path MTU Discovery and Fragmentation 192 Due to the different sizes of the IPv4 and IPv6 header, which are 20+ 193 octets and 40 octets respectively, handling the maximum packet size 194 is critical for the operation of the IPv4/IPv6 translator. There are 195 three mechanisms to handle this issue: path MTU discovery (PMTUD), 196 fragmentation, and transport-layer negotiation such as the TCP MSS 197 option [RFC0879]. Note that the translator MUST behave as a router, 198 i.e. the translator MUST send a "Packet Too Big" error message or 199 fragment the packet when the packet size exceeds the MTU of the next 200 hop interface. 202 "Don't Fragment", ICMP "Packet Too Big", and packet fragmentation are 203 discussed in sections 3 and 4 of this document. The reassembling of 204 fragmented packets in the stateful translator is discussed in 205 [I-D.ietf-behave-v6v4-xlate-stateful], since it requires state 206 maintenance in the translator. 208 2. Conventions 210 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 211 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 212 document are to be interpreted as described in [RFC2119]. 214 3. Translating from IPv4 to IPv6 216 When an IP/ICMP translator receives an IPv4 datagram addressed to a 217 destination towards the IPv6 domain, it translates the IPv4 header of 218 that packet into an IPv6 header. The original IPv4 header on the 219 packet is removed and replaced by an IPv6 header and the transport 220 checksum updated as needed, if that transport is supported by the 221 translator. The data portion of the packet is left unchanged. The 222 IP/ICMP translator then forwards the packet based on the IPv6 223 destination address. 225 +-------------+ +-------------+ 226 | IPv4 | | IPv6 | 227 | Header | | Header | 228 +-------------+ +-------------+ 229 | Transport | | Fragment | 230 | Layer | ===> | Header | 231 | Header | | (if needed) | 232 +-------------+ +-------------+ 233 | | | Transport | 234 ~ Data ~ | Layer | 235 | | | Header | 236 +-------------+ +-------------+ 237 | | 238 ~ Data ~ 239 | | 240 +-------------+ 242 Figure 2: IPv4-to-IPv6 Translation 244 Path MTU discovery is mandatory in IPv6 but it is optional in IPv4. 245 IPv6 routers never fragment a packet - only the sender can do 246 fragmentation. 248 When an IPv4 node performs path MTU discovery (by setting the Don't 249 Fragment (DF) bit in the header), path MTU discovery can operate end- 250 to-end, i.e., across the translator. In this case either IPv4 or 251 IPv6 routers (including the translator) might send back ICMP "Packet 252 Too Big" messages to the sender. When the IPv6 routers send these 253 ICMPv6 errors they will pass through a translator that will translate 254 the ICMPv6 error to a form that the IPv4 sender can understand. As a 255 result, an IPv6 fragment header is only included if the IPv4 packet 256 is already fragmented. 258 However, when the IPv4 sender does not set the Don't Fragment (DF) 259 bit, the translator MUST ensure that the packet does not exceed the 260 path MTU on the IPv6 side. This is done by fragmenting the IPv4 261 packet so that it fits in 1280-byte IPv6 packets, since that is the 262 minimum IPv6 MTU. Also, when the IPv4 sender does not set the DF bit 263 the translator MUST always include an IPv6 fragment header to 264 indicate that the sender allows fragmentation. 266 The rules in section 3.1 ensure that when packets are fragmented, 267 either by the sender or by IPv4 routers, the low-order 16 bits of the 268 fragment identification are carried end-to-end, ensuring that packets 269 are correctly reassembled. In addition, the rules in section 3.1 use 270 the presence of an IPv6 fragment header to indicate that the sender 271 might not be using path MTU discovery (i.e., the packet should not 272 have the DF flag set should it later be translated back to IPv4). 274 Other than the special rules for handling fragments and path MTU 275 discovery, the actual translation of the packet header consists of a 276 simple translation as defined below. Note that ICMPv4 packets 277 require special handling in order to translate the content of ICMPv4 278 error messages and also to add the ICMPv6 pseudo-header checksum. 280 The translator SHOULD make sure that the packets belonging to the 281 same flow leave the translator in the same order in which they 282 arrived. 284 3.1. Translating IPv4 Headers into IPv6 Headers 286 If the DF flag is not set and the IPv4 packet will result in an IPv6 287 packet larger than 1280 bytes, the packet MUST be fragmented so the 288 resulting IPv6 packet (with Fragment header added to each fragment) 289 will be less than or equal to 1280 bytes. For example, if the packet 290 is fragmented prior to the translation, the IPv4 packets must be 291 fragmented so that their length, excluding the IPv4 header, is at 292 most 1232 bytes (1280 minus 40 for the IPv6 header and 8 for the 293 Fragment header). The resulting fragments are then translated 294 independently using the logic described below. 296 If the DF bit is set and the MTU of the next-hop interface is less 297 than the total length value of the IPv4 packet plus 20, the 298 translator MUST send an ICMPv4 "Fragmentation Needed" error message 299 to the IPv4 source address. 301 If the DF bit is set and the packet is not a fragment (i.e., the MF 302 flag is not set and the Fragment Offset is equal to zero) then the 303 translator SHOULD NOT add a Fragment header to the resulting packet. 304 The IPv6 header fields are set as follows: 306 Version: 6 308 Traffic Class: By default, copied from IP Type Of Service (TOS) 309 octet. According to [RFC2474] the semantics of the bits are 310 identical in IPv4 and IPv6. However, in some IPv4 environments 311 these fields might be used with the old semantics of "Type Of 312 Service and Precedence". An implementation of a translator SHOULD 313 support an administratively-configurable option to ignore the IPv4 314 TOS and always set the IPv6 traffic class (TC) to zero. In 315 addition, if the translator is at an administrative boundary, the 316 filtering and update considerations of [RFC2475] may be 317 applicable. 319 Flow Label: 0 (all zero bits) 321 Payload Length: Total length value from IPv4 header, minus the size 322 of the IPv4 header and IPv4 options, if present. 324 Next Header: For ICMPv4 (1) changed to ICMPv6 (58), otherwise 325 protocol field MUST be copied from IPv4 header. 327 Hop Limit: The hop limit is derived from the TTL value in the IPv4 328 header. Since the translator is a router, as part of forwarding 329 the packet it needs to decrement either the IPv4 TTL (before the 330 translation) or the IPv6 Hop Limit (after the translation). As 331 part of decrementing the TTL or Hop Limit the translator (as any 332 router) MUST check for zero and send the ICMPv4 "TTL Exceeded" or 333 ICMPv6 "Hop Limit Exceeded" error. 335 Source Address: The IPv4-converted address derived from the IPv4 336 source address per [I-D.ietf-behave-address-format] section 2.1. 338 If the translator gets an illegal source address (e.g. 0.0.0.0, 339 127.0.0.1, etc.), the translator SHOULD silently drop the packet 340 (as discussed in Section 5.3.7 of [RFC1812]). 342 Destination Address: In the stateless mode, which is to say that if 343 the IPv4 destination address is within a range of configured IPv4 344 stateless translation prefix, the IPv6 destination address is the 345 IPv4-translatable address derived from the IPv4 destination 346 address per [I-D.ietf-behave-address-format] section 2.1. A 347 workflow example of stateless translation is shown in the Appendix 348 of this document. 350 In the stateful mode, which is to say that if the IPv4 destination 351 address is not within the range of any configured IPv4 stateless 352 translation prefix, the IPv6 destination address and corresponding 353 transport-layer destination port are derived from the Binding 354 Information Bases (BIBs) reflecting current session state in the 355 translator as described in [I-D.ietf-behave-v6v4-xlate-stateful]. 357 If any IPv4 options are present in the IPv4 packet, the IPv4 options 358 MUST be ignored and the packet translated normally; there is no 359 attempt to translate the options. However, if an unexpired source 360 route option is present then the packet MUST instead be discarded, 361 and an ICMPv4 "Destination Unreachable/Source Route Failed" (Type 362 3/Code 5) error message SHOULD be returned to the sender. 364 If there is a need to add a Fragment header (the DF bit is not set or 365 the packet is a fragment) the header fields are set as above with the 366 following exceptions: 368 IPv6 fields: 370 Payload Length: Total length value from IPv4 header, plus 8 for 371 the fragment header, minus the size of the IPv4 header and IPv4 372 options, if present. 374 Next Header: Fragment header (44). 376 Fragment header fields: 378 Next Header: For ICMPv4 (1) changed to ICMPv6 (58), otherwise 379 protocol field MUST be copied from IPv4 header. 381 Fragment Offset: Fragment Offset copied from the IPv4 header. 383 M flag: More Fragments bit copied from the IPv4 header. 385 Identification: The low-order 16 bits copied from the 386 Identification field in the IPv4 header. The high-order 16 387 bits set to zero. 389 3.2. Translating ICMPv4 Headers into ICMPv6 Headers 391 All ICMPv4 messages that are to be translated require that the ICMPv6 392 checksum field be calculated as part of the translation since ICMPv6, 393 unlike ICMPv4, has a pseudo-header checksum just like UDP and TCP. 395 In addition, all ICMPv4 packets MUST have the Type value translated 396 and, for ICMPv4 error messages, the included IP header also MUST be 397 translated. 399 The actions needed to translate various ICMPv4 messages are as 400 follows: 402 ICMPv4 query messages: 404 Echo and Echo Reply (Type 8 and Type 0): Adjust the Type values 405 to 128 and 129, respectively, and adjust the ICMP checksum both 406 to take the type change into account and to include the ICMPv6 407 pseudo-header. 409 Information Request/Reply (Type 15 and Type 16): Obsoleted in 410 ICMPv6. Silently drop. 412 Timestamp and Timestamp Reply (Type 13 and Type 14): Obsoleted in 413 ICMPv6. Silently drop. 415 Address Mask Request/Reply (Type 17 and Type 18): Obsoleted in 416 ICMPv6. Silently drop. 418 ICMP Router Advertisement (Type 9): Single hop message. Silently 419 drop. 421 ICMP Router Solicitation (Type 10): Single hop message. Silently 422 drop. 424 Unknown ICMPv4 types: Silently drop. 426 IGMP messages: While the MLD messages [RFC2710][RFC3590][RFC3810] 427 are the logical IPv6 counterparts for the IPv4 IGMP messages 428 all the "normal" IGMP messages are single-hop messages and 429 SHOULD be silently dropped by the translator. Other IGMP 430 messages might be used by multicast routing protocols and, 431 since it would be a configuration error to try to have router 432 adjacencies across IP/ICMP translators those packets SHOULD 433 also be silently dropped. 435 ICMPv4 error messages: 437 Destination Unreachable (Type 3): Translate the Code field as 438 described below, set the Type field to 1, and adjust the 439 ICMP checksum both to take the type/code change into account 440 and to include the ICMPv6 pseudo-header. 442 Translate the Code field as follows: 444 Code 0, 1 (Net, host unreachable): Set Code value to 0 (no 445 route to destination). 447 Code 2 (Protocol unreachable): Translate to an ICMPv6 448 Parameter Problem (Type 4, Code value 1) and make the 449 Pointer point to the IPv6 Next Header field. 451 Code 3 (Port unreachable): Set Code value to 4 (port 452 unreachable). 454 Code 4 (Fragmentation needed and DF set): Translate to an 455 ICMPv6 Packet Too Big message (Type 2) with Code value 456 set to 0. The MTU field MUST be adjusted for the 457 difference between the IPv4 and IPv6 header sizes, i.e. 458 minimum(advertised MTU+20, MTU_of_IPv6_nexthop, 459 (MTU_of_IPv4_nexthop)+20). Note that if the IPv4 router 460 set the MTU field to zero, i.e., the router does not 461 implement [RFC1191], then the translator MUST use the 462 plateau values specified in [RFC1191] to determine a 463 likely path MTU and include that path MTU in the ICMPv6 464 packet. (Use the greatest plateau value that is less 465 than the returned Total Length field.) 467 See also the requirements in Section 5. 469 Code 5 (Source route failed): Set Code value to 0 (No route 470 to destination). Note that this error is unlikely since 471 source routes are not translated. 473 Code 6, 7, 8: Set Code value to 0 (No route to 474 destination). 476 Code 9, 10 (Communication with destination host 477 administratively prohibited): Set Code value to 1 478 (Communication with destination administratively 479 prohibited) 481 Code 11, 12: Set Code value to 0 (no route to destination). 483 Code 13 (Communication Administratively Prohibited): Set 484 Code value to 1 (Communication with destination 485 administratively prohibited). 487 Code 14 (Host Precedence Violation): Silently drop. 489 Code 15 (Precedence cutoff in effect): Set Code value to 1 490 (Communication with destination administratively 491 prohibited). 493 Other Code values: Silently drop. 495 Redirect (Type 5): Single hop message. Silently drop. 497 Alternative Host Address (Type 6): Silently drop. 499 Source Quench (Type 4): Obsoleted in ICMPv6. Silently drop. 501 Time Exceeded (Type 11): Set the Type field to 3, and adjust 502 the ICMP checksum both to take the type change into account 503 and to include the ICMPv6 pseudo-header. The Code field is 504 unchanged. 506 Parameter Problem (Type 12): Set the Type field to 4, and 507 adjust the ICMP checksum both to take the type/code change 508 into account and to include the ICMPv6 pseudo-header. 510 Translate the Code field as follows: 512 Code 0 (Pointer indicates the error): Set the Code value to 513 0 (Erroneous header field encountered) and update the 514 pointer as defined in Figure 3 (If the Original IPv4 515 Pointer Value is not listed or the Translated IPv6 516 Pointer Value is listed as "n/a", silently drop the 517 packet). 519 Code 1 (Missing a required option): Silently drop 521 Code 2 (Bad length): Set the Code value to 0 (Erroneous 522 header field encountered) and update the pointer as 523 defined in Figure 3 (If the Original IPv4 Pointer Value 524 is not listed or the Translated IPv6 Pointer Value is 525 listed as "n/a", silently drop the packet). 527 Other Code values: Silently drop 529 Unknown ICMPv4 types: Silently drop. 531 | Original IPv4 Pointer Value | Translated IPv6 Pointer Value | 532 +--------------------------------+--------------------------------+ 533 | 0 | Version/IHL | 0 | Version/Traffic Class | 534 | 1 | Type Of Service | 1 | Traffic Class/Flow Label | 535 | 2,3 | Total Length | 4 | Payload Length | 536 | 4,5 | Identification | n/a | | 537 | 6 | Flags/Fragment Offset | n/a | | 538 | 7 | Fragment Offset | n/a | | 539 | 8 | Time to Live | 7 | Hop Limit | 540 | 9 | Protocol | 6 | Next Header | 541 |10,11| Header Checksum | n/a | | 542 |12-15| Source Address | 8 | Source Address | 543 |16-19| Destination Address | 24 | Destination Address | 544 +--------------------------------+--------------------------------+ 546 Figure 3: Pointer value for translating from IPv4 to IPv6 548 ICMP Error Payload: If the received ICMPv4 packet contains an 549 ICMPv4 Extension [RFC4884], the translation of the ICMPv4 550 packet will cause the ICMPv6 packet to change length. When 551 this occurs, the ICMPv6 Extension length attribute MUST be 552 adjusted accordingly (e.g., longer due to the translation 553 from IPv4 to IPv6). If the ICMPv4 Extension exceeds the 554 maximum size of an ICMPv6 message on the outgoing interface, 555 the ICMPv4 extension SHOULD be simply truncated. For 556 extensions not defined in [RFC4884], the translator passes 557 the extensions as opaque bit strings and those containing 558 IPv4 address literals will not have those addresses 559 translated to IPv6 address literals; this may cause problems 560 with processing of those ICMP extensions. 562 3.3. Translating ICMPv4 Error Messages into ICMPv6 564 There are some differences between the ICMPv4 and the ICMPv6 error 565 message formats as detailed above. In addition, the ICMP error 566 messages contain the packet in error, which MUST be translated just 567 like a normal IP packet. If the translation of this "packet in 568 error" changes the length of the datagram, the Total Length field in 569 the outer IPv6 header MUST 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 4: IPv4-to-IPv6 ICMP Error Translation 589 The translation of the inner IP header can be done by invoking the 590 function that translated the outer IP headers. This process MUST 591 stop at the first embedded header and drop the packet if it contains 592 more. 594 3.4. Generation of ICMPv4 Error Message 596 If the IPv4 packet is discarded, then the translator SHOULD be able 597 to send back an ICMPv4 error message to the original sender of the 598 packet, unless the discarded packet is itself an ICMPv4 message. The 599 ICMPv4 message, if sent, has a Type value of 3 (Destination 600 Unreachable) and a Code value of 13 (Communication Administratively 601 Prohibited), unless otherwise specified in this document or in 602 [I-D.ietf-behave-v6v4-xlate-stateful]. The translator SHOULD allow 603 an administrator to configure whether the ICMPv4 error messages are 604 sent, rate-limited, or not sent. 606 3.5. Transport-layer Header Translation 608 If the address translation algorithm is not checksum neutral (Section 609 3 of [I-D.ietf-behave-address-format]), the recalculation and 610 updating of the transport-layer headers which contain pseudo headers 611 needs to be performed. Translators MUST do this for TCP, UDP, and 612 ICMP. Other transport protocols (e.g., DCCP) are OPTIONAL to 613 support. In order to ease debugging and troubleshooting, translators 614 MUST forward all transport protocols as described in the "Next 615 Header" step of Section 3.1. 617 When a translator receives an unfragmented UDP IPv4 packet and the 618 checksum field is zero, the translator SHOULD compute the missing UDP 619 checksum as part of translating the packet. Also, the translator 620 SHOULD maintain a counter of how many UDP checksums are generated in 621 this manner. 623 When a stateless translator receives the first fragment of a 624 fragmented UDP IPv4 packet and the checksum field is zero, the 625 translator SHOULD drop the packet and generate a system management 626 event specifying at least the IP addresses and port numbers in the 627 packet. 629 For stateful translator, the handling of fragmented UDP IPv4 packets 630 with a zero checksum is discussed in 631 [I-D.ietf-behave-v6v4-xlate-stateful] section 3.1. 633 3.6. Knowing When to Translate 635 If the IP/ICMP translator also provides normal forwarding function, 636 and the destination IPv4 address is reachable by a more specific 637 route without translation, the translator MUST forward it without 638 translating it. Otherwise, when an IP/ICMP translator receives an 639 IPv4 datagram addressed to an IPv4 destination representing a host in 640 the IPv6 domain, the packet MUST be translated to IPv6. 642 4. Translating from IPv6 to IPv4 644 When an IP/ICMP translator receives an IPv6 datagram addressed to a 645 destination towards the IPv4 domain, it translates the IPv6 header of 646 the received IPv6 packet into an IPv4 header. The original IPv6 647 header on the packet is removed and replaced by an IPv4 header. 648 Since the ICMPv6 [RFC4443], TCP [RFC0793], UDP [RFC0768] and DCCP 649 [RFC4340] headers contain checksums that cover the IP header, if the 650 address mapping algorithm is not checksum-neutral, the checksum MUST 651 be evaluated before translation and the ICMP and transport-layer 652 headers MUST be updated. The data portion of the packet is left 653 unchanged. The IP/ICMP translator then forwards the packet based on 654 the IPv4 destination address. 656 +-------------+ +-------------+ 657 | IPv6 | | IPv4 | 658 | Header | | Header | 659 +-------------+ +-------------+ 660 | Fragment | | Transport | 661 | Header | ===> | Layer | 662 |(if present) | | Header | 663 +-------------+ +-------------+ 664 | Transport | | | 665 | Layer | ~ Data ~ 666 | Header | | | 667 +-------------+ +-------------+ 668 | | 669 ~ Data ~ 670 | | 671 +-------------+ 673 Figure 5: IPv6-to-IPv4 Translation 675 There are some differences between IPv6 and IPv4 in the area of 676 fragmentation and the minimum link MTU that affect the translation. 677 An IPv6 link has to have an MTU of 1280 bytes or greater. The 678 corresponding limit for IPv4 is 68 bytes. Path MTU Discovery across 679 a translator relies on ICMP Packet Too Big messages being received 680 and processed by IPv6 hosts, including an ICMP Packet Too Big that 681 indicates the MTU is less than the IPv6 minimum MTU. This 682 requirement is described in Section 5 of [RFC2460] (for IPv6's 1280 683 octet minimum MTU) and Section 5 of [RFC1883] (for IPv6's previous 684 576 octet minimum MTU). 686 In an environment where an ICMPv4 Packet Too Big message is 687 translated to an ICMPv6 Packet Too Big messages, and the ICMPv6 688 Packet Too Big message is successfully delivered to and correctly 689 processed by the IPv6 hosts (e.g., a network owned/operated by the 690 same entity that owns/operates the translator), the translator can 691 rely on IPv6 hosts sending subsequent packets to the same IPv6 692 destination with IPv6 fragment headers. In such an environment, when 693 the translator receives an IPv6 packet with a fragmentation header, 694 the translator SHOULD generate the IPv4 packet with a cleared Don't 695 Fragment bit, and with its identification value from the IPv6 696 fragment header, for all of the IPv6 fragments (MF=0 or MF=1). 698 In an environment where an ICMPv4 Packet Too Big message are filtered 699 (by a network firewall or by the host itself) or not correctly 700 processed by the IPv6 hosts, the IPv6 host will never generate an 701 IPv6 packet with the IPv6 fragment header. In such an environment, 702 the translator SHOULD set the IPv4 Don't Fragment bit. While setting 703 the Don't Fragment bit may create PMTUD black holes [RFC2923] if 704 there are IPv4 links smaller than 1260 octets, this is considered 705 safer than causing IPv4 reassembly errors [RFC4963]. 707 Other than the special rules for handling fragments and path MTU 708 discovery, the actual translation of the packet header consists of a 709 simple translation as defined below. Note that ICMPv6 packets 710 require special handling in order to translate the contents of ICMPv6 711 error messages and also to remove the ICMPv6 pseudo-header checksum. 713 The translator SHOULD make sure that the packets belonging to the 714 same flow leave the translator in the same order in which they 715 arrived. 717 4.1. Translating IPv6 Headers into IPv4 Headers 719 If there is no IPv6 Fragment header, the IPv4 header fields are set 720 as follows: 722 Version: 4 724 Internet Header Length: 5 (no IPv4 options) 726 Type of Service (TOS) Octet: By default, copied from the IPv6 727 Traffic Class (all 8 bits). According to [RFC2474] the semantics 728 of the bits are identical in IPv4 and IPv6. However, in some IPv4 729 environments, these bits might be used with the old semantics of 730 "Type Of Service and Precedence". An implementation of a 731 translator SHOULD provide the ability to ignore the IPv6 traffic 732 class and always set the IPv4 TOS Octet to a specified value. In 733 addition, if the translator is at an administrative boundary, the 734 filtering and update considerations of [RFC2475] may be 735 applicable. 737 Total Length: Payload length value from IPv6 header, plus the size 738 of the IPv4 header. 740 Identification: All zero. In order to avoid back holes caused by 741 ICMPv4 filtering or non [RFC2460] compatible IPv6 hosts (a 742 workaround discussed in Section 4), the translator MAY provide a 743 function such as if the packet size is equal to or smaller than 744 1280 bytes and greater than 88 bytes, generate the identification 745 value. The translator SHOULD provide a method for operators to 746 enable or disable this function. 748 Flags: The More Fragments flag is set to zero. The Don't Fragments 749 flag is set to one. In order to avoid back holes caused by ICMPv4 750 filtering or non [RFC2460] compatible IPv6 hosts (a workaround 751 discussed in Section 5), the translator MAY provide a function 752 such as if the packet size is equal to or smaller than 1280 bytes 753 and greater than 88 bytes, the Don't Fragments (DF) flag is set to 754 zero, otherwise the Don't Fragments (DF) flag is set to one. The 755 translator SHOULD provide a method for operators to enable or 756 disable this function. 758 Fragment Offset: All zeros. 760 Time to Live: Time to Live is derived from Hop Limit value in IPv6 761 header. Since the translator is a router, as part of forwarding 762 the packet it needs to decrement either the IPv6 Hop Limit (before 763 the translation) or the IPv4 TTL (after the translation). As part 764 of decrementing the TTL or Hop Limit the translator (as any 765 router) MUST check for zero and send the ICMPv4 "TTL Exceeded" or 766 ICMPv6 "Hop Limit Exceeded" error. 768 Protocol: The IPv6-Frag (44) header is handled as discussed in 769 Section 4.1.1. ICMPv6 (58) is changed to ICMPv4 (1), and the 770 payload is translated as discussed in Section 4.2. The IPv6 771 headers HOPOPT (0), IPv6-Route (43), and IPv6-Opts (60) are 772 skipped over during processing as they have no meaning in IPv4. 773 For the first 'next header' that does not match one of the cases 774 above, its next header value (which contains the transport 775 protocol number) is copied to the protocol field in the IPv4 776 header. This means that all transport protocols are translated. 778 Note: Some translated protocols will fail at the receiver for 779 various reasons: some are known to fail when translated (e.g., 780 IPsec AH (51)), and others will fail checksum validation if the 781 address translation is not checksum neutral 782 [I-D.ietf-behave-address-format] and the translator does not 783 update the transport protocol's checksum (because the 784 translator doesn't support recalculating the checksum for that 785 transport protocol, see Section 4.5). 787 Header Checksum: Computed once the IPv4 header has been created. 789 Source Address: In the stateless mode, which is to say that if the 790 IPv6 source address is within the range of a configured IPv6 791 translation prefix, the IPv4 source address is derived from the 792 IPv6 source address per [I-D.ietf-behave-address-format] section 793 2.1. Note that the original IPv6 source address is an IPv4- 794 translatable address. A workflow example of stateless translation 795 is shown in Appendix of this document. If the translator only 796 supports stateless mode and if the IPv6 source address is not 797 within the range of configured IPv6 prefix(es), the translator 798 SHOULD drop the packet and respond with an ICMPv6 Type=1, Code=5 799 (Destination Unreachable, Source address failed ingress/egress 800 policy). 802 In the stateful mode, which is to say that if the IPv6 source 803 address is not within the range of any configured IPv6 stateless 804 translation prefix, the IPv4 source address and transport-layer 805 source port corresponding to the IPv4-related IPv6 source address 806 and source port are derived from the Binding Information Bases 807 (BIBs) as described in [I-D.ietf-behave-v6v4-xlate-stateful]. 809 In stateless and stateful modes, if the translator gets an illegal 810 source address (e.g. ::1, etc.), the translator SHOULD silently 811 drop the packet. 813 Destination Address: The IPv4 destination address is derived from 814 the IPv6 destination address of the datagram being translated per 815 [I-D.ietf-behave-address-format] section 2.1. Note that the 816 original IPv6 destination address is an IPv4-converted address. 818 If a Routing header with a non-zero Segments Left field is present 819 then the packet MUST NOT be translated, and an ICMPv6 "parameter 820 problem/erroneous header field encountered" (Type 4/Code 0) error 821 message, with the Pointer field indicating the first byte of the 822 Segments Left field, SHOULD be returned to the sender. 824 4.1.1. IPv6 Fragment Processing 826 If the IPv6 packet contains a Fragment header, the header fields are 827 set as above with the following exceptions: 829 Total Length: Payload length value from IPv6 header, minus 8 for the 830 Fragment header, plus the size of the IPv4 header. 832 Identification: Copied from the low-order 16-bits in the 833 Identification field in the Fragment header. 835 Flags: The IPv4 More Fragments (MF) flag is copied from the M flag 836 in the IPv6 Fragment header. The IPv4 Don't Fragments (DF) flag 837 is cleared (set to zero) allowing this packet to be further 838 fragmented by IPv4 routers. 840 Fragment Offset: Copied from the Fragment Offset field of the IPv6 841 Fragment header. 843 Protocol: For ICMPv6 (58) changed to ICMPv4 (1), otherwise skip 844 extension headers, Next Header field copied from the last IPv6 845 header. 847 If a translated packet with DF set to 1 will be larger than the MTU 848 of the next-hop interface, then the translator MUST drop the packet 849 and send the ICMPv6 "Packet Too Big" (Type 2/Code 0) error message to 850 the IPv6 host with an adjusted MTU in the ICMPv6 message. 852 4.2. Translating ICMPv6 Headers into ICMPv4 Headers 854 If a non-checksum neutral translation address is being used, ICMPv6 855 messages MUST have their ICMPv4 checksum field be updated as part of 856 the translation since ICMPv6 (unlike ICMPv4) includes a pseudo-header 857 in the checksum just like UDP and TCP. 859 In addition all ICMP packets MUST have the Type value translated and, 860 for ICMP error messages, the included IP header also MUST be 861 translated. Note that the IPv6 addresses in the IPv6 header may not 862 be IPv4-translatable addresses and there will be no corresponding 863 IPv4 addresses representing this IPv6 address. In this case, the 864 translator can do stateful translation. A mechanism by which the 865 translator can instead do stateless translation of this address is 866 left for future work. 868 The actions needed to translate various ICMPv6 messages are: 870 ICMPv6 informational messages: 872 Echo Request and Echo Reply (Type 128 and 129): Adjust the Type 873 values to 8 and 0, respectively, and adjust the ICMP checksum 874 both to take the type change into account and to exclude the 875 ICMPv6 pseudo-header. 877 MLD Multicast Listener Query/Report/Done (Type 130, 131, 132): 878 Single hop message. Silently drop. 880 Neighbor Discover messages (Type 133 through 137): Single hop 881 message. Silently drop. 883 Unknown informational messages: Silently drop. 885 ICMPv6 error messages: 887 Destination Unreachable (Type 1) Set the Type field to 3, and 888 adjust the ICMP checksum both to take the type/code change into 889 account and to exclude the ICMPv6 pseudo-header. 891 Translate the Code field as follows: 893 Code 0 (no route to destination): Set Code value to 1 (Host 894 unreachable). 896 Code 1 (Communication with destination administratively 897 prohibited): Set Code value to 10 (Communication with 898 destination host administratively prohibited). 900 Code 2 (Beyond scope of source address): Set Code value to 1 901 (Host unreachable). Note that this error is very unlikely 902 since an IPv4-translatable source address is typically 903 considered to have global scope. 905 Code 3 (Address unreachable): Set Code value to 1 (Host 906 unreachable). 908 Code 4 (Port unreachable): Set Code value to 3 (Port 909 unreachable). 911 Other Code values: Silently drop. 913 Packet Too Big (Type 2): Translate to an ICMPv4 Destination 914 Unreachable (Type 3) with Code value equal to 4, and adjust the 915 ICMPv4 checksum both to take the type change into account and 916 to exclude the ICMPv6 pseudo-header. The MTU field MUST be 917 adjusted for the difference between the IPv4 and IPv6 header 918 sizes taking into account whether or not the packet in error 919 includes a Fragment header, i.e. minimum(advertised MTU-20, 920 MTU_of_IPv4_nexthop, (MTU_of_IPv6_nexthop)-20). 922 See also the requirements in Section 5. 924 Time Exceeded (Type 3): Set the Type value to 11, and adjust the 925 ICMPv4 checksum both to take the type change into account and 926 to exclude the ICMPv6 pseudo-header. The Code field is 927 unchanged. 929 Parameter Problem (Type 4): Translate the Type and Code field as 930 follows, and adjust the ICMPv4 checksum both to take the type/ 931 code change into account and to exclude the ICMPv6 pseudo- 932 header. 934 Translate the Code field as follows: 936 Code 0 (Erroneous header field encountered): Set Type 12, Code 937 0 and update the pointer as defined in Figure 6 (If the 938 Original IPv6 Pointer Value is not listed or the Translated 939 IPv4 Pointer Value is listed as "n/a", silently drop the 940 packet). 942 Code 1 (Unrecognized Next Header type encountered): Translate 943 this to an ICMPv4 protocol unreachable (Type 3, Code 2). 945 Code 2 (Unrecognized IPv6 option encountered): Silently drop. 947 Unknown error messages: Silently drop. 949 | Original IPv6 Pointer Value | Translated IPv4 Pointer Value | 950 +--------------------------------+--------------------------------+ 951 | 0 | Version/Traffic Class | 0 | Version/IHL, Type Of Ser | 952 | 1 | Traffic Class/Flow Label | 1 | Type Of Service | 953 | 2,3 | Flow Label | n/a | | 954 | 4,5 | Payload Length | 2 | Total Length | 955 | 6 | Next Header | 9 | Protocol | 956 | 7 | Hop Limit | 8 | Time to Live | 957 | 8-23| Source Address | 12 | Source Address | 958 |24-39| Destination Address | 16 | Destination Address | 959 +--------------------------------+--------------------------------+ 961 Figure 6: Pointer Value for translating from IPv6 to IPv4 963 ICMP Error Payload: If the received ICMPv6 packet contains an 964 ICMPv6 Extension [RFC4884], the translation of the ICMPv6 965 packet will cause the ICMPv4 packet to change length. When 966 this occurs, the ICMPv6 Extension length attribute MUST be 967 adjusted accordingly (e.g., shorter due to the translation from 968 IPv6 to IPv4). For extensions not defined in [RFC4884], the 969 translator passes the extensions as opaque bit strings and 970 those containing IPv6 address literals will not have those 971 addresses translated to IPv4 address literals; this may cause 972 problems with processing of those ICMP extensions. 974 4.3. Translating ICMPv6 Error Messages into ICMPv4 976 There are some differences between the ICMPv4 and the ICMPv6 error 977 message formats as detailed above. In addition, the ICMP error 978 messages contain the packet in error, which MUST be translated just 979 like a normal IP packet. The translation of this "packet in error" 980 is likely to change the length of the datagram thus the Total Length 981 field in the outer IPv4 header MUST be updated. 983 +-------------+ +-------------+ 984 | IPv6 | | IPv4 | 985 | Header | | Header | 986 +-------------+ +-------------+ 987 | ICMPv6 | | ICMPv4 | 988 | Header | | Header | 989 +-------------+ +-------------+ 990 | IPv6 | ===> | IPv4 | 991 | Header | | Header | 992 +-------------+ +-------------+ 993 | Partial | | Partial | 994 | Transport | | Transport | 995 | Layer | | Layer | 996 | Header | | Header | 997 +-------------+ +-------------+ 999 Figure 7: IPv6-to-IPv4 ICMP Error Translation 1001 The translation of the inner IP header can be done by invoking the 1002 function that translated the outer IP headers. This process MUST 1003 stop at first embedded header and drop the packet if it contains 1004 more. Note that the IPv6 addresses in the IPv6 header may not be 1005 IPv4-translatable addresses and there will be no corresponding IPv4 1006 addresses. In this case, the translator can do stateful translation. 1007 A mechanism by which the translator can instead do stateless 1008 translation is left for future work. 1010 4.4. Generation of ICMPv6 Error Message 1012 If the IPv6 packet is discarded, then the translator SHOULD send back 1013 an ICMPv6 error message to the original sender of the packet, unless 1014 the discarded packet is itself an ICMPv6 message. 1016 If the ICMPv6 error message is being sent because the IPv6 source 1017 address is not an IPv4-translatable address and the translator is 1018 stateless, the ICMPv6 message, if sent, has a Type value 1 and Code 1019 value 5 (Source address failed ingress/egress policy). In other 1020 cases, the ICMPv6 message has a Type value of 1 (Destination 1021 Unreachable) and a Code value of 1 (Communication with destination 1022 administratively prohibited), unless otherwise specified in this 1023 document or [I-D.ietf-behave-v6v4-xlate-stateful]. The translator 1024 SHOULD allow an administrator to configure whether the ICMPv6 error 1025 messages are sent, rate-limited, or not sent. 1027 4.5. Transport-layer Header Translation 1029 If the address translation algorithm is not checksum neutral (Section 1030 3 of [I-D.ietf-behave-address-format]), the recalculation and 1031 updating of the transport-layer headers which contain pseudo headers 1032 need to be performed. Translators MUST do this for TCP, UDP, and 1033 ICMP. Other transport protocols (e.g., DCCP) are OPTIONAL to 1034 support. In order to ease debugging and troubleshooting, translators 1035 MUST forward all transport protocols as described in the "Protocol" 1036 step of Section 4.1. 1038 4.6. Knowing When to Translate 1040 If the IP/ICMP translator also provides a normal forwarding function, 1041 and the destination address is reachable by a more specific route 1042 without translation, the router MUST forward it without translating 1043 it. When an IP/ICMP translator receives an IPv6 datagram addressed 1044 to an IPv6 address representing a host in the IPv4 domain, the IPv6 1045 packet MUST be translated to IPv4. 1047 5. Supporting IPv6 Hosts that Ignore ICMPv6 Packet Too Big 1049 Two recent studies analyzed the behavior of IPv6-capable web servers 1050 on the Internet and found that approximately 95% responded as 1051 expected to an IPv6 Packet Too Big that indicated MTU=1280, but only 1052 43% responded as expected to an IPv6 Packet Too Big that indicated an 1053 MTU < 1280. It is believed firewalls violating Section 4.3.1 of 1054 [RFC4890] are at fault. These failures will both cause Path MTU 1055 Discovery (PMTUD) black holes [RFC2923]. Unfortunately the 1056 translator cannot improve the failure rate of the first case (MTU = 1057 1280), but the translator can improve the failure rate of the second 1058 case (MTU < 1280). There are two approaches to resolving the problem 1059 with sending ICMPv6 messages indicating an MTU < 1280. It SHOULD be 1060 possible to configure a translator for either of the two approaches. 1062 The first approach is to constrain the deployment of the IPv6/IPv4 1063 translator by observing that four of the scenarios intended for 1064 stateless IPv6/IPv4 translators do not have IPv6 hosts on the 1065 Internet (Scenarios 1, 2, 5 and 6 described in 1066 [I-D.ietf-behave-v6v4-framework], which refer to "An IPv6 network"). 1067 In these scenarios IPv6 hosts, IPv6 host-based firewalls, and IPv6 1068 network firewalls can be administered in compliance with Section 1069 4.3.1 of [RFC4890] and therefore avoid the problem witnessed with 1070 IPv6 hosts on the Internet. 1072 The second approach is necessary if the translator has IPv6 hosts, 1073 IPv6 host-based firewalls, or IPv6 network firewalls that do not (or 1074 cannot) comply with Section 5 of [RFC2460] -- such as IPv6 hosts on 1075 the Internet. This approach requires the translator to do the 1076 following: 1078 1. in the IPv4 to IPv6 direction: if the MTU value of ICMPv4 Packet 1079 Too Big messages is less than 1280, change it to 1280. This is 1080 intended to cause the IPv6 host and IPv6 firewall to process the 1081 ICMP PTB message and generate subsequent packets to this 1082 destination with an IPv6 fragmentation header. 1084 Note: Based on recent studies, this is effective for 95% of IPv6 1085 hosts on the Internet. 1087 2. in the IPv6 to IPv4 direction: 1089 A. if there is a Fragment header in the IPv6 packet, the last 16 1090 bits of its value MUST be used for the IPv4 identification 1091 value. 1093 B. if there is no Fragment header in the IPv6 packet: 1095 a. if the packet is less than or equal to 1280 bytes: 1097 - the translator SHOULD set DF to 0 and generate an IPv4 1098 identification value. 1100 - To avoid the problems described in [RFC4963], it is 1101 RECOMMENDED the translator maintain 3-tuple state for 1102 generating the IPv4 identification value. 1104 b. if the packet is greater than 1280 bytes, the translator 1105 SHOULD set the IPv4 DF bit to 1. 1107 6. IANA Considerations 1109 This memo adds no new IANA considerations. 1111 Note to RFC Editor: This section will have served its purpose if it 1112 correctly tells IANA that no new assignments or registries are 1113 required, or if those assignments or registries are created during 1114 the RFC publication process. From the author's perspective, it may 1115 therefore be removed upon publication as an RFC at the RFC Editor's 1116 discretion. 1118 7. Security Considerations 1120 The use of stateless IP/ICMP translators does not introduce any new 1121 security issues beyond the security issues that are already present 1122 in the IPv4 and IPv6 protocols and in the routing protocols that are 1123 used to make the packets reach the translator. 1125 There are potential issues that might arise by deriving an IPv4 1126 address from an IPv6 address - particularly addresses like broadcast 1127 or loopback addresses and the non IPv4-translatable IPv6 addresses, 1128 etc. The [I-D.ietf-behave-address-format] addresses these issues. 1130 As the Authentication Header [RFC4302] is specified to include the 1131 IPv4 Identification field and the translating function is not able to 1132 always preserve the Identification field, it is not possible for an 1133 IPv6 endpoint to verify the AH on received packets that have been 1134 translated from IPv4 packets. Thus AH does not work through a 1135 translator. 1137 Packets with ESP can be translated since ESP does not depend on 1138 header fields prior to the ESP header. Note that ESP transport mode 1139 is easier to handle than ESP tunnel mode; in order to use ESP tunnel 1140 mode, the IPv6 node MUST be able to generate an inner IPv4 header 1141 when transmitting packets and remove such an IPv4 header when 1142 receiving packets. 1144 8. Acknowledgements 1146 This is under development by a large group of people. Those who have 1147 posted to the list during the discussion include Andrew Sullivan, 1148 Andrew Yourtchenko, Brian Carpenter, Dan Wing, Dave Thaler, David 1149 Harrington, Ed Jankiewicz, Hiroshi Miyata, Iljitsch van Beijnum, Jari 1150 Arkko, Jerry Huang, John Schnizlein, Jouni Korhonen, Kentaro Ebisawa, 1151 Kevin Yin, Magnus Westerlund, Marcelo Bagnulo Braun, Margaret 1152 Wasserman, Masahito Endo, Phil Roberts, Philip Matthews, Reinaldo 1153 Penno, Remi Denis-Courmont, Remi Despres, Senthil Sivakumar, Simon 1154 Perreault and Zen Cao. 1156 9. Appendix: Stateless translation workflow example 1158 A stateless translation workflow example is depicted in the following 1159 figure. The documentation address blocks 2001:DB8::/32 [RFC3849], 1160 192.0.2.0/24 and 198.51.100.0/24 [RFC5737] are used in this example. 1162 +--------------+ +--------------+ 1163 | IPv4 network | | IPv6 network | 1164 | | +-------+ | | 1165 | +----+ |-----| XLAT |---- | +----+ | 1166 | | H4 |-----| +-------+ |--| H6 | | 1167 | +----+ | | +----+ | 1168 +--------------+ +--------------+ 1170 Figure 8 1172 A translator (XLAT) connects the IPv6 network to the IPv4 network. 1173 This XLAT uses the Network Specific Prefix (NSP) 2001:DB8:100::/40 1174 defined in [I-D.ietf-behave-address-format] to represent IPv4 1175 addresses in the IPv6 address space (IPv4-converted addresses) and to 1176 represent IPv6 addresses (IPv4-translatable addresses) in the IPv4 1177 address space. In this example, 192.0.2.0/24 is the IPv4 block of 1178 the corresponding IPv4-translatable addresses. 1180 Based on the address mapping rule, the IPv6 node H6 has an IPv4- 1181 translatable IPv6 address 2001:DB8:1C0:2:21:: (address mapping from 1182 192.0.2.33). The IPv4 node H4 has IPv4 address 198.51.100.2. 1184 The IPv6 routing is configured in such a way that the IPv6 packets 1185 addressed to a destination address in 2001:DB8:100::/40 are routed to 1186 the IPv6 interface of the XLAT. 1188 The IPv4 routing is configured in such a way that the IPv4 packets 1189 addressed to a destination address in 192.0.2.0/24 are routed to the 1190 IPv4 interface of the XLAT. 1192 9.1. H6 establishes communication with H4 1194 The steps by which H6 establishes communication with H4 are: 1196 1. H6 performs the destination address mapping, so the IPv4- 1197 converted address 2001:DB8:1C6:3364:200:: is formed from 1198 198.51.100.2 based on the address mapping algorithm 1199 [I-D.ietf-behave-address-format]. 1201 2. H6 sends a packet to H4. The packet is sent from a source 1202 address 2001:DB8:1C0:2:21:: to a destination address 1203 2001:DB8:1C6:3364:200::. 1205 3. The packet is routed to the IPv6 interface of the XLAT (since 1206 IPv6 routing is configured that way). 1208 4. The XLAT receives the packet and performs the following actions: 1210 * The XLAT translates the IPv6 header into an IPv4 header using 1211 the IP/ICMP Translation Algorithm defined in this document. 1213 * The XLAT includes 192.0.2.33 as source address in the packet 1214 and 198.51.100.2 as destination address in the packet. Note 1215 that 192.0.2.33 and 198.51.100.2 are extracted directly from 1216 the source IPv6 address 2001:DB8:1C0:2:21:: (IPv4-translatable 1217 address) and destination IPv6 address 2001:DB8:1C6:3364:200:: 1218 (IPv4-converted address) of the received IPv6 packet that is 1219 being translated. 1221 5. The XLAT sends the translated packet out its IPv4 interface and 1222 the packet arrives at H4. 1224 6. H4 node responds by sending a packet with destination address 1225 192.0.2.33 and source address 198.51.100.2. 1227 7. The packet is routed to the IPv4 interface of the XLAT (since 1228 IPv4 routing is configured that way). The XLAT performs the 1229 following operations: 1231 * The XLAT translates the IPv4 header into an IPv6 header using 1232 the IP/ICMP Translation Algorithm defined in this document. 1234 * The XLAT includes 2001:DB8:1C0:2:21:: as destination address 1235 in the packet and 2001:DB8:1C6:3364:200:: as source address in 1236 the packet. Note that 2001:DB8:1C0:2:21:: and 1237 2001:DB8:1C6:3364:200:: 1238 are formed directly from the destination IPv4 1239 address 192.0.2.33 and source IPv4 address 198.51.100.2 of the 1240 received IPv4 packet that is being translated. 1242 8. The translated packet is sent out the IPv6 interface to H6. 1244 The packet exchange between H6 and H4 continues until the session is 1245 finished. 1247 9.2. H4 establishes communication with H6 1249 The steps by which H4 establishes communication with H6 are: 1251 1. H4 performs the destination address mapping, so 192.0.2.33 is 1252 formed from IPv4-translatable address 2001:DB8:1C0:2:21:: based 1253 on the address mapping algorithm 1254 [I-D.ietf-behave-address-format]. 1256 2. H4 sends a packet to H6. The packet is sent from a source 1257 address 198.51.100.2 to a destination address 192.0.2.33. 1259 3. The packet is routed to the IPv4 interface of the XLAT (since 1260 IPv4 routing is configured that way). 1262 4. The XLAT receives the packet and performs the following actions: 1264 * The XLAT translates the IPv4 header into an IPv6 header using 1265 the IP/ICMP Translation Algorithm defined in this document. 1267 * The XLAT includes 2001:DB8:1C6:3364:200:: as source address in 1268 the packet and 2001:DB8:1C0:2:21:: as destination address in 1269 the packet. Note that 2001:DB8:1C6:3364:200:: (IPv4-converted 1270 address) and 2001:DB8:1C0:2:21:: (IPv4-translatable address) 1271 are obtained directly from the source IPv4 address 1272 198.51.100.2 and destination IPv4 address 192.0.2.33 of the 1273 received IPv4 packet that is being translated. 1275 5. The XLAT sends the translated packet out its IPv6 interface and 1276 the packet arrives at H6. 1278 6. H6 node responds by sending a packet with destination address 1279 2001:DB8:1C6:3364:200:: and source address 2001:DB8:1C0:2:21::. 1281 7. The packet is routed to the IPv6 interface of the XLAT (since 1282 IPv6 routing is configured that way). The XLAT performs the 1283 following operations: 1285 * The XLAT translates the IPv6 header into an IPv4 header using 1286 the IP/ICMP Translation Algorithm defined in this document. 1288 * The XLAT includes 198.51.100.2 as destination address in the 1289 packet and 192.0.2.33 as source address in the packet. Note 1290 that 198.51.100.2 and 192.0.2.33 are formed directly from the 1291 destination IPv6 address 2001:DB8:1C6:3364:200:: and source 1292 IPv6 address 2001:DB8:1C0:2:21:: of the received IPv6 packet 1293 that is being translated. 1295 8. The translated packet is sent out the IPv4 interface to H4. 1297 The packet exchange between H4 and H6 continues until the session 1298 finished. 1300 10. References 1302 10.1. Normative References 1304 [I-D.ietf-behave-address-format] 1305 Bao, C., Huitema, C., Bagnulo, M., Boucadair, M., and X. 1306 Li, "IPv6 Addressing of IPv4/IPv6 Translators", 1307 draft-ietf-behave-address-format-08 (work in progress), 1308 May 2010. 1310 [I-D.ietf-behave-v6v4-xlate-stateful] 1311 Bagnulo, M., Matthews, P., and I. Beijnum, "Stateful 1312 NAT64: Network Address and Protocol Translation from IPv6 1313 Clients to IPv4 Servers", 1314 draft-ietf-behave-v6v4-xlate-stateful-11 (work in 1315 progress), March 2010. 1317 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 1318 August 1980. 1320 [RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, 1321 September 1981. 1323 [RFC0792] Postel, J., "Internet Control Message Protocol", STD 5, 1324 RFC 792, September 1981. 1326 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 1327 RFC 793, September 1981. 1329 [RFC1812] Baker, F., "Requirements for IP Version 4 Routers", 1330 RFC 1812, June 1995. 1332 [RFC1883] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1333 (IPv6) Specification", RFC 1883, December 1995. 1335 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1336 Requirement Levels", BCP 14, RFC 2119, March 1997. 1338 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1339 (IPv6) Specification", RFC 2460, December 1998. 1341 [RFC2765] Nordmark, E., "Stateless IP/ICMP Translation Algorithm 1342 (SIIT)", RFC 2765, February 2000. 1344 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 1345 Architecture", RFC 4291, February 2006. 1347 [RFC4340] Kohler, E., Handley, M., and S. Floyd, "Datagram 1348 Congestion Control Protocol (DCCP)", RFC 4340, March 2006. 1350 [RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control 1351 Message Protocol (ICMPv6) for the Internet Protocol 1352 Version 6 (IPv6) Specification", RFC 4443, March 2006. 1354 [RFC4884] Bonica, R., Gan, D., Tappan, D., and C. Pignataro, 1355 "Extended ICMP to Support Multi-Part Messages", RFC 4884, 1356 April 2007. 1358 [RFC5382] Guha, S., Biswas, K., Ford, B., Sivakumar, S., and P. 1359 Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, 1360 RFC 5382, October 2008. 1362 [RFC5771] Cotton, M., Vegoda, L., and D. Meyer, "IANA Guidelines for 1363 IPv4 Multicast Address Assignments", BCP 51, RFC 5771, 1364 March 2010. 1366 10.2. Informative References 1368 [I-D.ietf-behave-v6v4-framework] 1369 Baker, F., Li, X., Bao, C., and K. Yin, "Framework for 1370 IPv4/IPv6 Translation", 1371 draft-ietf-behave-v6v4-framework-08 (work in progress), 1372 March 2010. 1374 [RFC0879] Postel, J., "TCP maximum segment size and related topics", 1375 RFC 879, November 1983. 1377 [RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, 1378 November 1990. 1380 [RFC2474] Nichols, K., Blake, S., Baker, F., and D. Black, 1381 "Definition of the Differentiated Services Field (DS 1382 Field) in the IPv4 and IPv6 Headers", RFC 2474, 1383 December 1998. 1385 [RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., 1386 and W. Weiss, "An Architecture for Differentiated 1387 Services", RFC 2475, December 1998. 1389 [RFC2710] Deering, S., Fenner, W., and B. Haberman, "Multicast 1390 Listener Discovery (MLD) for IPv6", RFC 2710, 1391 October 1999. 1393 [RFC2766] Tsirtsis, G. and P. Srisuresh, "Network Address 1394 Translation - Protocol Translation (NAT-PT)", RFC 2766, 1395 February 2000. 1397 [RFC2923] Lahey, K., "TCP Problems with Path MTU Discovery", 1398 RFC 2923, September 2000. 1400 [RFC3307] Haberman, B., "Allocation Guidelines for IPv6 Multicast 1401 Addresses", RFC 3307, August 2002. 1403 [RFC3590] Haberman, B., "Source Address Selection for the Multicast 1404 Listener Discovery (MLD) Protocol", RFC 3590, 1405 September 2003. 1407 [RFC3810] Vida, R. and L. Costa, "Multicast Listener Discovery 1408 Version 2 (MLDv2) for IPv6", RFC 3810, June 2004. 1410 [RFC3849] Huston, G., Lord, A., and P. Smith, "IPv6 Address Prefix 1411 Reserved for Documentation", RFC 3849, July 2004. 1413 [RFC4302] Kent, S., "IP Authentication Header", RFC 4302, 1414 December 2005. 1416 [RFC4890] Davies, E. and J. Mohacsi, "Recommendations for Filtering 1417 ICMPv6 Messages in Firewalls", RFC 4890, May 2007. 1419 [RFC4963] Heffner, J., Mathis, M., and B. Chandler, "IPv4 Reassembly 1420 Errors at High Data Rates", RFC 4963, July 2007. 1422 [RFC5737] Arkko, J., Cotton, M., and L. Vegoda, "IPv4 Address Blocks 1423 Reserved for Documentation", RFC 5737, January 2010. 1425 Authors' Addresses 1427 Xing Li 1428 CERNET Center/Tsinghua University 1429 Room 225, Main Building, Tsinghua University 1430 Beijing, 100084 1431 China 1433 Phone: +86 10-62785983 1434 Email: xing@cernet.edu.cn 1436 Congxiao Bao 1437 CERNET Center/Tsinghua University 1438 Room 225, Main Building, Tsinghua University 1439 Beijing, 100084 1440 China 1442 Phone: +86 10-62785983 1443 Email: congxiao@cernet.edu.cn 1445 Fred Baker 1446 Cisco Systems 1447 Santa Barbara, California 93117 1448 USA 1450 Phone: +1-408-526-4257 1451 Email: fred@cisco.com