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