idnits 2.17.1 draft-ietf-ngtrans-mech-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-04-23) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. ** The document is more than 15 pages and seems to lack a Table of Contents. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There are 3 instances of too long lines in the document, the longest one being 3 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (7 February 1999) is 9207 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: '3' is defined on line 936, but no explicit reference was found in the text == Unused Reference: '10' is defined on line 957, but no explicit reference was found in the text ** Obsolete normative reference: RFC 1541 (ref. '2') (Obsoleted by RFC 2131) -- Possible downref: Non-RFC (?) normative reference: ref. '3' ** Obsolete normative reference: RFC 1883 (ref. '4') (Obsoleted by RFC 2460) ** Obsolete normative reference: RFC 1971 (ref. '5') (Obsoleted by RFC 2462) ** Obsolete normative reference: RFC 1886 (ref. '6') (Obsoleted by RFC 3596) ** Obsolete normative reference: RFC 1970 (ref. '7') (Obsoleted by RFC 2461) -- Possible downref: Non-RFC (?) normative reference: ref. '11' ** Downref: Normative reference to an Informational RFC: RFC 2185 (ref. '12') ** Obsolete normative reference: RFC 2267 (ref. '13') (Obsoleted by RFC 2827) ** Obsolete normative reference: RFC 2373 (ref. '14') (Obsoleted by RFC 3513) Summary: 18 errors (**), 0 flaws (~~), 3 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 INTERNET-DRAFT R. E. Gilligan 3 7 August 1998 FreeGate Corp. 4 E. Nordmark 5 Sun Microsystems, Inc. 7 Transition Mechanisms for IPv6 Hosts and Routers 8 10 Status of this Memo 12 This document is an Internet-Draft. Internet-Drafts are working 13 documents of the Internet Engineering Task Force (IETF), its areas, 14 and its working groups. Note that other groups may also distribute 15 working documents as Internet-Drafts. 17 Internet-Drafts are draft documents valid for a maximum of six months 18 and may be updated, replaced, or obsoleted by other documents at any 19 time. It is inappropriate to use Internet- Drafts as reference 20 material or to cite them other than as "work in progress." 22 To view the entire list of current Internet-Drafts, please check the 23 "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow 24 Directories on ftp.is.co.za (Africa), ftp.nordu.net (Europe), 25 munnari.oz.au (Pacific Rim), ftp.ietf.org (US East Coast), or 26 ftp.isi.edu (US West Coast). 28 This draft expires on 7 February 1999 30 Abstract 32 This document specifies IPv4 compatibility mechanisms that can be 33 implemented by IPv6 hosts and routers. These mechanisms include pro- 34 viding complete implementations of both versions of the Internet Pro- 35 tocol (IPv4 and IPv6), and tunneling IPv6 packets over IPv4 routing 36 infrastructures. They are designed to allow IPv6 nodes to maintain 37 complete compatibility with IPv4, which should greatly simplify the 38 deployment of IPv6 in the Internet, and facilitate the eventual tran- 39 sition of the entire Internet to IPv6. 41 1. Introduction 43 The key to a successful IPv6 transition is compatibility with the 44 large installed base of IPv4 hosts and routers. Maintaining compa- 45 tibility with IPv4 while deploying IPv6 will streamline the task of 46 transitioning the Internet to IPv6. This specification defines a 47 set of mechanisms that IPv6 hosts and routers may implement in 48 order to be compatible with IPv4 hosts and routers. 50 The mechanisms in this document are designed to be employed by IPv6 51 hosts and routers that need to interoperate with IPv4 hosts and 52 utilize IPv4 routing infrastructures. We expect that most nodes in 53 the Internet will need such compatibility for a long time to come, 54 and perhaps even indefinitely. 56 However, IPv6 may be used in some environments where interoperabil- 57 ity with IPv4 is not required. IPv6 nodes that are designed to be 58 used in such environments need not use or even implement these 59 mechanisms. 61 The mechanisms specified here include: 63 - Dual IP layer (also known as Dual Stack): A technique for pro- 64 viding complete support for both Internet protocols -- IPv4 and 65 IPv6 -- in hosts and routers. 67 - Configured tunneling of IPv6 over IPv4: Unidirectional point- 68 to-point tunnels made by encapsulating IPv6 packets within IPv4 69 headers to carry them over IPv4 routing infrastructures. 71 - IPv4-compatible IPv6 addresses: An IPv6 address format that 72 employs embedded IPv4 addresses. 74 - Automatic tunneling of IPv6 over IPv4: A mechanism for using 75 IPv4-compatible addresses to automatically tunnel IPv6 packets 76 over IPv4 networks. 78 The mechanisms defined here are intended to be part of a "transition 79 toolbox" -- a growing collection of techniques which implementations 80 and users may employ to ease the transition. The tools may be used 81 as needed. Implementations and sites decide which techniques are 82 appropriate to their specific needs. This document defines the ini- 83 tial core set of transition mechanisms, but these are not expected to 84 be the only tools available. Additional transition and compatibility 85 mechanisms are expected to be developed in the future, with new docu- 86 ments being written to specify them. 88 1.1. Terminology 90 The following terms are used in this document: 92 Types of Nodes 94 IPv4-only node: 96 A host or router that implements only IPv4. An IPv4- 97 only node does not understand IPv6. The installed base 98 of IPv4 hosts and routers existing before the transition 99 begins are IPv4-only nodes. 101 IPv6/IPv4 node: 103 A host or router that implements both IPv4 and IPv6. 105 IPv6-only node: 107 A host or router that implements IPv6, and does not 108 implement IPv4. The operation of IPv6-only nodes is not 109 addressed here. 111 IPv6 node: 113 Any host or router that implements IPv6. IPv6/IPv4 and 114 IPv6-only nodes are both IPv6 nodes. 116 IPv4 node: 118 Any host or router that implements IPv4. IPv6/IPv4 and 119 IPv4-only nodes are both IPv4 nodes. 121 Types of IPv6 Addresses 123 IPv4-compatible IPv6 address: 125 An IPv6 address bearing the high-order 96-bit prefix 126 0:0:0:0:0:0, and an IPv4 address in the low-order 32- 127 bits. IPv4-compatible addresses are used by IPv6/IPv4 128 nodes which perform automatic tunneling, 130 IPv6-native address: 132 The remainder of the IPv6 address space. An IPv6 133 address that bears a prefix other than 0:0:0:0:0:0. 135 Techniques Used in the Transition 137 IPv6-over-IPv4 tunneling: 139 The technique of encapsulating IPv6 packets within IPv4 140 so that they can be carried across IPv4 routing infras- 141 tructures. 143 Configured tunneling: 145 IPv6-over-IPv4 tunneling where the IPv4 tunnel endpoint 146 address is determined by configuration information on 147 the encapsulating node. 149 Automatic tunneling: 151 IPv6-over-IPv4 tunneling where the IPv4 tunnel endpoint 152 address is determined from the IPv4 address embedded in 153 the IPv4-compatible destination address of the IPv6 154 packet being tunneled. 156 Modes of operation of IPv6/IPv4 nodes 158 IPv6-only operation: 160 An IPv6/IPv4 node with its IPv6 stack enabled and its 161 IPv4 stack disabled. 163 IPv4-only operation: 165 An IPv6/IPv4 node with its IPv4 stack enabled and its 166 IPv6 stack disabled. 168 IPv6/IPv4 operation: 170 An IPv6/IPv4 node with both stacks enabled. 172 1.2. Structure of this Document 174 The remainder of this document is organized as follows: 176 - Section 2 discusses the operation of nodes with a dual IP layer, 177 IPv6/IPv4 nodes. 179 - Section 3 discusses the common mechanisms used in both of the 180 IPv6-over-IPv4 tunneling techniques. 182 - Section 4 discusses configured tunneling. 184 - Section 5 discusses automatic tunneling and the IPv4-compatible 185 IPv6 address format. 187 2. Dual IP Layer Operation 189 The most straightforward way for IPv6 nodes to remain compatible with 190 IPv4-only nodes is by providing a complete IPv4 implementation. IPv6 191 nodes that provide a complete IPv4 and IPv6 implementations are 192 called "IPv6/IPv4 nodes." IPv6/IPv4 nodes have the ability to send 193 and receive both IPv4 and IPv6 packets. They can directly intero- 194 perate with IPv4 nodes using IPv4 packets, and also directly intero- 195 perate with IPv6 nodes using IPv6 packets. 197 Even though a node may be equipped to support both protocols, one or 198 the other stack may be disabled for operational reasons. Thus 199 IPv6/IPv4 nodes may be operated in one of three modes: 201 - With their IPv4 stack enabled and their IPv6 stack disabled. 203 - With their IPv6 stack enabled and their IPv4 stack disabled. 205 - With both stacks enabled. 207 IPv6/IPv4 nodes with their IPv6 stack disabled will operate like 208 IPv4-only nodes. Similarly, IPv6/IPv4 nodes with their IPv4 stacks 209 disabled will operate like IPv6-only nodes. IPv6/IPv4 nodes may pro- 210 vide a configuration switch to disable either their IPv4 or IPv6 211 stack. 213 The dual IP layer technique may or may not be used in conjunction 214 with the IPv6-over-IPv4 tunneling techniques, which are described in 215 sections 3, 4 and 5. An IPv6/IPv4 node that supports tunneling may 216 support only configured tunneling, or both configured and automatic 217 tunneling. Thus three modes of tunneling support are possible: 219 - IPv6/IPv4 node that does not perform tunneling. 221 - IPv6/IPv4 node that performs configured tunneling only. 223 - IPv6/IPv4 node that performs configured tunneling and automatic 224 tunneling. 226 2.1. Address Configuration 228 Because they support both protocols, IPv6/IPv4 nodes may be config- 229 ured with both IPv4 and IPv6 addresses. IPv6/IPv4 nodes use IPv4 230 mechanisms (e.g. DHCP) to acquire their IPv4 addresses, and IPv6 pro- 231 tocol mechanisms (e.g. stateless address autoconfiguration) to 232 acquire their IPv6-native addresses. Section 5.2 describes a mechan- 233 ism by which IPv6/IPv4 nodes that support automatic tunneling may use 234 IPv4 protocol mechanisms to acquire their IPv4-compatible IPv6 235 address. 237 2.2. DNS 239 The Domain Naming System (DNS) is used in both IPv4 and IPv6 to map 240 between hostnames and IP addresses. A new resource record type named 241 "AAAA" has been defined for IPv6 addresses [6]. Since IPv6/IPv4 242 nodes must be able to interoperate directly with both IPv4 and IPv6 243 nodes, they must provide resolver libraries capable of dealing with 244 IPv4 "A" records as well as IPv6 "AAAA" records. 246 DNS resolver libraries on IPv6/IPv4 nodes must be capable of handling 247 both AAAA and A records. However, when a query locates an AAAA 248 record holding an IPv6 address, and an A record holding an IPv4 249 address, the resolver library may filter or order the results 250 returned to the application in order to influence the version of IP 251 packets used to communicate with that node. In terms of filtering, 252 the resolver library has three alternatives: 254 - Return only the IPv6 address to the application. 256 - Return only the IPv4 address to the application. 258 - Return both addresses to the application. 260 If it returns only the IPv6 address, the application will communicate 261 with the node using IPv6. If it returns only the IPv4 address, the 262 application will communicate with the node using IPv4. If it returns 263 both addresses, the application will have the choice which address to 264 use, and thus which IP protocol to employ. 266 If it returns both, the resolver may elect to order the addresses -- 267 IPv6 first, or IPv4 first. Since most applications try the addresses 268 in the order they are returned by the resolver, this can affect the 269 IP version "preference" of applications. 271 The decision to filter or order DNS results is implementation 272 specific. IPv6/IPv4 nodes may provide policy configuration to con- 273 trol filtering or ordering of addresses returned by the resolver, or 274 leave the decision entirely up to the application. 276 3. Common Tunneling Mechanisms 278 In most deployment scenarios, the IPv6 routing infrastructure will 279 be built up over time. While the IPv6 infrastructure is being 280 deployed, the existing IPv4 routing infrastructure can remain func- 281 tional, and can be used to carry IPv6 traffic. Tunneling provides 282 a way to utilize an existing IPv4 routing infrastructure to carry 283 IPv6 traffic. 285 IPv6/IPv4 hosts and routers can tunnel IPv6 datagrams over regions 286 of IPv4 routing topology by encapsulating them within IPv4 packets. 287 Tunneling can be used in a variety of ways: 289 - Router-to-Router. IPv6/IPv4 routers interconnected by an IPv4 290 infrastructure can tunnel IPv6 packets between themselves. In 291 this case, the tunnel spans one segment of the end-to-end path 292 that the IPv6 packet takes. 294 - Host-to-Router. IPv6/IPv4 hosts can tunnel IPv6 packets to an 295 intermediary IPv6/IPv4 router that is reachable via an IPv4 296 infrastructure. This type of tunnel spans the first segment of 297 the packet's end-to-end path. 299 - Host-to-Host. IPv6/IPv4 hosts that are interconnected by an 300 IPv4 infrastructure can tunnel IPv6 packets between themselves. 301 In this case, the tunnel spans the entire end-to-end path that 302 the packet takes. 304 - Router-to-Host. IPv6/IPv4 routers can tunnel IPv6 packets to 305 their final destination IPv6/IPv4 host. This tunnel spans only 306 the last segment of the end-to-end path. 308 Tunneling techniques are usually classified according to the mechan- 309 ism by which the encapsulating node determines the address of the 310 node at the end of the tunnel. In the first two tunneling methods 311 listed above -- router-to-router and host-to-router -- the IPv6 312 packet is being tunneled to a router. The endpoint of this type of 313 tunnel is an intermediary router which must decapsulate the IPv6 314 packet and forward it on to its final destination. When tunneling to 315 a router, the endpoint of the tunnel is different from the destina- 316 tion of the packet being tunneled. So the addresses in the IPv6 317 packet being tunneled can not provide the IPv4 address of the tunnel 318 endpoint. Instead, the tunnel endpoint address must be determined 319 from configuration information on the node performing the tunneling. 320 We use the term "configured tunneling" to describe the type of tun- 321 neling where the endpoint is explicitly configured. 323 In the last two tunneling methods -- host-to-host and router-to-host 324 -- the IPv6 packet is tunneled all the way to its final destination. 325 In this case, the destination address of both the IPv6 packet and the 326 encapsulating IPv4 header identify the same node! This fact can be 327 exploited by encoding information in the IPv6 destination address 328 that will allow the encapsulating node to determine tunnel endpoint 329 IPv4 address automatically. Automatic tunneling employs this tech- 330 nique, using an special IPv6 address format with an embedded IPv4 331 address to allow tunneling nodes to automatically derive the tunnel 332 endpoint IPv4 address. This eliminates the need to explicitly 333 configure the tunnel endpoint address, greatly simplifying configura- 334 tion. 336 The two tunneling techniques -- automatic and configured -- differ 337 primarily in how they determine the tunnel endpoint address. Most of 338 the underlying mechanisms are the same: 340 - The entry node of the tunnel (the encapsulating node) creates an 341 encapsulating IPv4 header and transmits the encapsulated packet. 343 - The exit node of the tunnel (the decapsulating node) receives 344 the encapsulated packet, removes the IPv4 header, updates the 345 IPv6 header, and processes the received IPv6 packet. 347 - The encapsulating node may need to maintain soft state informa- 348 tion for each tunnel recording such parameters as the MTU of the 349 tunnel in order to process IPv6 packets forwarded into the tun- 350 nel. Since the number of tunnels that any one host or router 351 may be using may grow to be quite large, this state information 352 can be cached and discarded when not in use. 354 The remainder of this section discusses the common mechanisms that 355 apply to both types of tunneling. Subsequent sections discuss how 356 the tunnel endpoint address is determined for automatic and config- 357 ured tunneling. 359 3.1. Encapsulation 361 The encapsulation of an IPv6 datagram in IPv4 is shown below: 363 +-------------+ 364 | IPv4 | 365 | Header | 366 +-------------+ +-------------+ 367 | IPv6 | | IPv6 | 368 | Header | | Header | 369 +-------------+ +-------------+ 370 | Transport | | Transport | 371 | Layer | ===> | Layer | 372 | Header | | Header | 373 +-------------+ +-------------+ 374 | | | | 375 ~ Data ~ ~ Data ~ 376 | | | | 377 +-------------+ +-------------+ 379 Encapsulating IPv6 in IPv4 381 In addition to adding an IPv4 header, the encapsulating node also has 382 to handle some more complex issues: 384 - Determine when to fragment and when to report an ICMP "packet 385 too big" error back to the source. 387 - How to reflect IPv4 ICMP errors from routers along the tunnel 388 path back to the source as IPv6 ICMP errors. 390 Those issues are discussed in the following sections. 392 3.2. Tunnel MTU and Fragmentation 394 The encapsulating node could view encapsulation as IPv6 using IPv4 as 395 a link layer with a very large MTU (65535-20 bytes to be exact; 20 396 bytes "extra" are needed for the encapsulating IPv4 header). The 397 encapsulating node would need only to report IPv6 ICMP "packet too 398 big" errors back to the source for packets that exceed this MTU. 399 However, such a scheme would be inefficient for two reasons: 401 1) It would result in more fragmentation than needed. IPv4 layer 402 fragmentation should be avoided due to the performance problems 403 caused by the loss unit being smaller than the retransmission 404 unit [11]. 406 2) Any IPv4 fragmentation occurring inside the tunnel would have to 407 be reassembled at the tunnel endpoint. For tunnels that ter- 408 minate at a router, this would require additional memory to 409 reassemble the IPv4 fragments into a complete IPv6 packet before 410 that packet could be forwarded onward. 412 The fragmentation inside the tunnel can be reduced to a minimum by 413 having the encapsulating node track the IPv4 Path MTU across the tun- 414 nel, using the IPv4 Path MTU Discovery Protocol [8] and recording the 415 resulting path MTU. The IPv6 layer in the encapsulating node can 416 then view a tunnel as a link layer with an MTU equal to the IPv4 path 417 MTU, minus the size of the encapsulating IPv4 header. 419 Note that this does not completely eliminate IPv4 fragmentation in 420 the case when the IPv4 path MTU would result in an IPv6 MTU less than 421 1280 bytes. (Any link layer used by IPv6 has to have an MTU of at 422 least 1280 bytes [4].) In this case the IPv6 layer has to "see" a 423 link layer with an MTU of 1280 bytes and the encapsulating node has 424 to use IPv4 fragmentation in order to forward the 1280 byte IPv6 425 packets. 427 The encapsulating node can employ the following algorithm to deter- 428 mine when to forward an IPv6 packet that is larger than the tunnel's 429 path MTU using IPv4 fragmentation, and when to return an IPv6 ICMP 430 "packet too big" message: 432 if (IPv4 path MTU - 20) is less than or equal to 1280 433 if packet is larger than 1280 bytes 434 Send IPv6 ICMP "packet too big" with MTU = 1280. 435 Drop packet. 436 else 437 Encapsulate but do not set the Don't Fragment 438 flag in the IPv4 header. The resulting IPv4 439 packet might be fragmented by the IPv4 layer on 440 the encapsulating node or by some router along 441 the IPv4 path. 442 endif 443 else 444 if packet is larger than (IPv4 path MTU - 20) 445 Send IPv6 ICMP "packet too big" with 446 MTU = (IPv4 path MTU - 20). 447 Drop packet. 448 else 449 Encapsulate and set the Don't Fragment flag 450 in the IPv4 header. 451 endif 452 endif 454 Encapsulating nodes that have a large number of tunnels might not be 455 able to store the IPv4 Path MTU for all tunnels. Such nodes can, at 456 the expense of additional fragmentation in the network, avoid using 457 the IPv4 Path MTU algorithm across the tunnel and instead use the MTU 458 of the link layer (under IPv4) in the above algorithm instead of the 459 IPv4 path MTU. 461 In this case the Don't Fragment bit must not be set in the encapsu- 462 lating IPv4 header. 464 3.3. Hop Limit 466 IPv6-over-IPv4 tunnels are modeled as "single-hop". That is, the 467 IPv6 hop limit is decremented by 1 when an IPv6 packet traverses 468 the tunnel. The single-hop model serves to hide the existence of a 469 tunnel. The tunnel is opaque to users of the network, and is not 470 detectable by network diagnostic tools such as traceroute. 472 The single-hop model is implemented by having the encapsulating and 473 decapsulating nodes process the IPv6 hop limit field as they would 474 if they were forwarding a packet on to any other datalink. That 475 is, they decrement the hop limit by 1 when forwarding an IPv6 476 packet. (The originating node and final destination do not decre- 477 ment the hop limit.) 479 The TTL of the encapsulating IPv4 header is selected in an imple- 480 mentation dependent manner. The current suggested value is pub- 481 lished in the "Assigned Numbers RFC. Implementations may provide a 482 mechanism to allow the administrator to configure the IPv4 TTL. 484 3.4. Handling IPv4 ICMP errors 486 In response to encapsulated packets it has sent into the tunnel, 487 the encapsulating node may receive IPv4 ICMP error messages from 488 IPv4 routers inside the tunnel. These packets are addressed to the 489 encapsulating node because it is the IPv4 source of the encapsu- 490 lated packet. 492 The ICMP "packet too big" error messages are handled according to 493 IPv4 Path MTU Discovery [8] and the resulting path MTU is recorded 494 in the IPv4 layer. The recorded path MTU is used by IPv6 to deter- 495 mine if an IPv6 ICMP "packet too big" error has to be generated as 496 described in section 3.2. 498 The handling of other types of ICMP error messages depends on how 499 much information is included in the "packet in error" field, which 500 holds the encapsulated packet that caused the error. 502 Many older IPv4 routers return only 8 bytes of data beyond the IPv4 503 header of the packet in error, which is not enough to include the 504 address fields of the IPv6 header. More modern IPv4 routers may 505 return enough data beyond the IPv4 header to include the entire 506 IPv6 header and possibly even the data beyond that. 508 If the offending packet includes enough data, the encapsulating 509 node may extract the encapsulated IPv6 packet and use it to gen- 510 erate an IPv6 ICMP message directed back to the originating IPv6 511 node, as shown below: 513 +--------------+ 514 | IPv4 Header | 515 | dst = encaps | 516 | node | 517 +--------------+ 518 | ICMP | 519 | Header | 520 - - +--------------+ 521 | IPv4 Header | 522 | src = encaps | 523 IPv4 | node | 524 +--------------+ - - 525 Packet | IPv6 | 526 | Header | Original IPv6 527 in +--------------+ Packet - 528 | Transport | Can be used to 529 Error | Header | generate an 530 +--------------+ IPv6 ICMP 531 | | error message 532 ~ Data ~ back to the source. 533 | | 534 - - +--------------+ - - 536 IPv4 ICMP Error Message Returned to Encapsulating Node 538 3.5. IPv4 Header Construction 540 When encapsulating an IPv6 packet in an IPv4 datagram, the IPv4 541 header fields are set as follows: 543 Version: 545 4 547 IP Header Length in 32-bit words: 549 5 (There are no IPv4 options in the encapsulating 550 header.) 552 Type of Service: 554 0 556 Total Length: 558 Payload length from IPv6 header plus length of IPv6 and 559 IPv4 headers (i.e. a constant 60 bytes). 561 Identification: 563 Generated uniquely as for any IPv4 packet transmitted by 564 the system. 566 Flags: 568 Set the Don't Fragment (DF) flag as specified in section 569 3.2. Set the More Fragments (MF) bit as necessary if 570 fragmenting. 572 Fragment offset: 574 Set as necessary if fragmenting. 576 Time to Live: 578 Set in implementation-specific manner. 580 Protocol: 582 41 (Assigned payload type number for IPv6) 584 Header Checksum: 586 Calculate the checksum of the IPv4 header. 588 Source Address: 590 IPv4 address of outgoing interface of the encapsulating 591 node. 593 Destination Address: 595 IPv4 address of tunnel endpoint. 597 Any IPv6 options are preserved in the packet (after the IPv6 header). 599 3.6. Decapsulation 601 When an IPv6/IPv4 host or a router receives an IPv4 datagram that 602 is addressed to one of its own IPv4 address, and the value of the 603 protocol field is 41, it removes the IPv4 header and submits the 604 IPv6 datagram to its IPv6 layer code. 606 The decapsulation is shown below: 608 +-------------+ 609 | IPv4 | 610 | Header | 611 +-------------+ +-------------+ 612 | IPv6 | | IPv6 | 613 | Header | | Header | 614 +-------------+ +-------------+ 615 | Transport | | Transport | 616 | Layer | ===> | Layer | 617 | Header | | Header | 618 +-------------+ +-------------+ 619 | | | | 620 ~ Data ~ ~ Data ~ 621 | | | | 622 +-------------+ +-------------+ 624 Decapsulating IPv6 from IPv4 626 When decapsulating the packet, the IPv6 header is not modified. If 627 the packet is subsequently forwarded, its hop limit is decremented by 628 one. 630 The encapsulating IPv4 header is discarded. 632 The decapsulating node performs IPv4 reassembly before decapsulating 633 the IPv6 packet. All IPv6 options are preserved even if the encapsu- 634 lating IPv4 packet is fragmented. 636 After the IPv6 packet is decapsulated, it is processed almost the 637 same as any received IPv6 packet. The only difference being that a 638 decapsulated packet must not be forwarded unless the node has been 639 explicitly configured to forward such packets for the given IPv4 640 source address. This configuration can be implicit in e.g., having a 641 configured tunnel which matches the IPv4 source address. This res- 642 triction is needed to prevent tunneling to be used as a tool to 643 circumvent ingress filtering [13]. 645 3.7. Link-Local Addresses 647 Both the configured and automatic tunnels are IPv6 interfaces (over 648 the IPv4 "link layer") thus must have link-local addresses. The 649 link-local addresses are used by routing protocols operating over 650 the tunnels. 652 The Interface Identifier [14] of an IPv4 interface is the 32-bit 653 IPv4 address of that interface, with the bytes in the same order in 654 which they would appear in the header of an IPv4 packet, padded at 655 the left with zeros to a total of 64 bits. Note that the 656 "Universal/Local" bit is zero, indicating that the Interface Iden- 657 tifier is not globally unique. When the host has more than one 658 IPv4 address in use on the physical interface concerned, an admin- 659 istrative choice of one of these IPv4 addresses is made. 661 The IPv6 Link-local address [14] for an IPv4 virtual interface is 662 formed by appending the Interface Identifier, as defined above, to 663 the prefix FE80::/64. 665 +-------+-------+-------+-------+-------+-------+------+------+ 666 | FE 80 00 00 00 00 00 00 | 667 +-------+-------+-------+-------+-------+-------+------+------+ 668 | 00 00 | 00 | 00 | IPv4 Address | 669 +-------+-------+-------+-------+-------+-------+------+------+ 671 3.8. Neighbor Discovery over Tunnels 673 Since both configured and automatic tunnels are considered to be 674 unidirectional the only aspects of Neighbor Discovery [7] and 675 Stateless Address Autoconfiguration [5] that apply to these tunnels 676 is the formation of the link-local address. 678 If an implementation provides bidirectional point-to-point tunnels 679 by encapsulating IPv6 inside IPv4 packets it should at least accept 680 and respond to the probe packets used by Neighbor Unreachability 681 Detection [7]. Such implementations may send NUD probe packets. 683 4. Configured Tunneling 685 In configured tunneling, the tunnel endpoint address is determined 686 from configuration information in the encapsulating node. For each 687 tunnel, the encapsulating node must store the tunnel endpoint 688 address. When an IPv6 packet is transmitted over a tunnel, the 689 tunnel endpoint address configured for that tunnel is used as the 690 destination address for the encapsulating IPv4 header. 692 The determination of which packets to tunnel is usually made by 693 routing information on the encapsulating node. This is usually 694 done via a routing table, which directs packets based on their des- 695 tination address using the prefix mask and match technique. 697 4.1. Default Configured Tunnel 699 IPv6/IPv4 hosts that are connected datalinks with no IPv6 routers 700 may use a configured tunnel to reach an IPv6 router. This tunnel 701 allows the host to communicate with the rest of the IPv6 Internet 702 (i.e. nodes with IPv6-native addresses). If the IPv4 address of an 703 IPv6/IPv4 router boardering the IPv6 backbone is known, this can be 704 used as the tunnel endpoint address. This tunnel can be configured 705 into the routing table as an IPv6 "default route". That is, all 706 IPv6 destination addresses will match the route and could poten- 707 tially traverse the tunnel. Since the "mask length" of such a 708 default route is zero, it will be used only if there are no other 709 routes with a longer mask that match the destination. The default 710 configured tunnel can be used in conjunction with automatic tunnel- 711 ing, as described in section 5.4. 713 4.2. Default Configured Tunnel using IPv4 "Anycast Address" 715 The tunnel endpoint address of such a default tunnel could be the 716 IPv4 address of one IPv6/IPv4 router at the boarder of the IPv6 717 backbone. Alternatively, the tunnel endpoint could be an IPv4 718 "anycast address". With this approach, multiple IPv6/IPv4 routers 719 at the boarder advertise IPv4 reachability to the same IPv4 720 address. All of these routers accept packets to this address as 721 their own, and will decapsulate IPv6 packets tunneled to this 722 address. When an IPv6/IPv4 node sends an encapsulated packet to 723 this address, it will be delivered to only one of the boarder 724 routers, but the sending node will not know which one. The IPv4 725 routing system will generally carry the traffic to the closest 726 router. 728 Using a default tunnel to an IPv4 "anycast address" provides a high 729 degree of robustness since multiple boarder router can be provided, 730 and, using the normal fallback mechanisms of IPv4 routing, traffic 731 will automatically switch to another router when one goes down. 733 5. Automatic Tunneling 735 In automatic tunneling, the tunnel endpoint address is determined 736 by the IPv4-compatible destination address of the IPv6 packet being 737 tunneled. Automatic tunneling allows IPv6/IPv4 nodes to communi- 738 cate over IPv4 routing infrastructures without pre-configuring tun- 739 nels. 741 5.1. IPv4-Compatible Address Format 743 IPv6/IPv4 nodes that perform automatic tunneling are assigned IPv4- 744 compatible address. An IPv4-compatible address is identified by an 745 all-zeros 96-bit prefix, and holds an IPv4 address in the low-order 746 32-bits. IPv4-compatible addresses are structured as follows: 748 | 96-bits | 32-bits | 749 +--------------------------------------+--------------+ 750 | 0:0:0:0:0:0 | IPv4 Address | 751 +--------------------------------------+--------------+ 752 IPv4-Compatible IPv6 Address Format 754 IPv4-compatible addresses are assigned exclusively to nodes that sup- 755 port automatic tunneling. A node should be configured with an IPv4- 756 compatible address only if it is prepared to accept IPv6 packets des- 757 tined to that address encapsulated in IPv4 packets destined to the 758 embedded IPv4 address. 760 An IPv4-compatible address is globally unique as long as the IPv4 761 address is not from the private IPv4 space [15]. An implementation 762 should behave as if its IPv4-compatible address(es) are assigned to 763 the nodes automatic tunneling interfaces, even if the implementation 764 does not implement automatic tunneling using a concept of interfaces. 766 5.2. IPv4-Compatible Address Configuration 768 An IPv6/IPv4 node with an IPv4-compatible address uses that address 769 as one of its IPv6 addresses, while the IPv4 address embedded in the 770 low-order 32-bits serves as the IPv4 address for one of its inter- 771 faces. 773 An IPv6/IPv4 node may acquire its IPv4-compatible IPv6 addresses via 774 IPv4 address configuration protocols. It may use any IPv4 address 775 configuration mechanism to acquire its IPv4 address, then "map" that 776 address into an IPv4-compatible IPv6 address by pre-pending it with 777 the 96-bit prefix 0:0:0:0:0:0. This mode of configuration allows 778 IPv6/IPv4 nodes to "leverage" the installed base of IPv4 address con- 779 figuration servers. 781 The specific algorithm for acquiring an IPv4-compatible address using 782 IPv4-based address configuration protocols is as follows: 784 1) The IPv6/IPv4 node uses standard IPv4 mechanisms or protocols to 785 acquire the IPv4 address for one of its interfaces. These 786 include: 788 - The Dynamic Host Configuration Protocol (DHCP) [2] 790 - The Bootstrap Protocol (BOOTP) [1] 792 - The Reverse Address Resolution Protocol (RARP) [9] 794 - Manual configuration 796 - Any other mechanism which accurately yields the node's 797 own IPv4 address 799 2) The node uses this address as the IPv4 address for this inter- 800 face. 802 3) The node prepends the 96-bit prefix 0:0:0:0:0:0 to the 32-bit 803 IPv4 address that it acquired in step (1). The result is an 804 IPv4-compatible IPv6 address with one of the node's IPv4- 805 addresses embedded in the low-order 32-bits. The node uses this 806 address as one of its IPv6 address. 808 5.3. Automatic Tunneling Operation 810 In automatic tunneling, the tunnel endpoint address is determined 811 from the packet being tunneled. If the destination IPv6 address is 812 IPv4-compatible, then the packet can be sent via automatic tunneling. 813 If the destination is IPv6-native, the packet can not be sent via 814 automatic tunneling. 816 A routing table entry can be used to direct automatic tunneling. An 817 implementation can have a special static routing table entry for the 818 prefix 0:0:0:0:0:0/96. (That is, a route to the all-zeros prefix 819 with a 96-bit mask.) Packets that match this prefix are sent to a 820 pseudo-interface driver which performs automatic tunneling. Since 821 all IPv4-compatible IPv6 addresses will match this prefix, all pack- 822 ets to those destinations will be auto-tunneled. 824 Once it is delivered to the automatic tunneling module, the IPv6 825 packet is encapsulated within an IPv4 header according to the rules 826 described in section 3. The source and destination addresses of the 827 encapsulating IPv4 header are assigned as follows: 829 Destination IPv4 address: 831 Low-order 32-bits of IPv6 destination address 833 Source IPv4 address: 835 IPv4 address of interface the packet is sent via 837 The automatic tunneling module always sends packets in this encapsu- 838 lated form, even if the destination is on an attached datalink. 840 The automatic tunneling module must not send to IPv4 broadcast or 841 multicast destinations. It must drop all IPv6 packets destined to 842 IPv4-compatible destinations when the embedded IPv4 address is broad- 843 cast or multicast. 845 5.4. Use With Default Configured Tunnels 847 Automatic tunneling is often used in conjunction with the default 848 configured tunnel technique. "Isolated" IPv6/IPv4 hosts -- those 849 with no on-link IPv6 routers -- are configured to use automatic tun- 850 neling and IPv4-compatible IPv6 addresses, and have at least one 851 default configured tunnel to an IPv6 router. That IPv6 router is 852 configured to perform automatic tunneling as well. These isolated 853 hosts send packets to IPv4-compatible destinations via automatic tun- 854 neling and packets for IPv6-native destinations via the default con- 855 figured tunnel. IPv4-compatible destinations will match the 96-bit 856 all-zeros prefix route discussed in the previous section, while 857 IPv6-native destinations will match the default route via the config- 858 ured tunnel. Reply packets from IPv6-native destinations are routed 859 back to the an IPv6/IPv4 router which delivers them to the original 860 host via automatic tunneling. Further examples of the combination of 861 tunneling techniques are discussed in [12]. 863 5.5. Source Address Selection 865 When an IPv6/IPv4 node originates an IPv6 packet, it must select the 866 source IPv6 address to use. IPv6/IPv4 nodes that are configured to 867 perform automatic tunneling may be configured with global IPv6-native 868 addresses as well as IPv4-compatible addresses. The selection of 869 which source address to use will determine what form the return 870 traffic is sent via. If the IPv4-compatible address is used, the 871 return traffic will have to be delivered via automatic tunneling, but 872 if the IPv6-native address is used, the return traffic will not be 873 automatic-tunneled. In order to make traffic as symmetric as possi- 874 ble, the following source address selection preference is recom- 875 mended: 877 Destination is IPv4-compatible: 879 Use IPv4-compatible source address associated with IPv4 880 address of outgoing interface 882 Destination is IPv6-native: 884 Use IPv6-native address of outgoing interface 886 If an IPv6/IPv4 node has no global IPv6-native address, but is ori- 887 ginating a packet to an IPv6-native destination, it may use its 888 IPv4-compatible address as its source address. 890 6. Acknowledgments 892 We would like to thank the members of the IPng working group and 893 the Next Generation Transition (ngtrans) working group for their 894 many contributions and extensive review of this document. Special 895 thanks are due to Jim Bound, Ross Callon, and Bob Hinden for many 896 helpful suggestions and to John Moy for suggesting the IPv4 "any- 897 cast address" default tunnel technique. 899 7. Security Considerations 901 Tunneling is not known to introduce any security holes except for 902 the possibility to circumvent ingress filtering [13]. This is 903 prevented by requiring that decapsulating routers only forward 904 packets if they have been configured to accept encapsulated packets 905 from the IPv4 source address in the receive packet. 907 8. Authors' Addresses 908 Robert E. Gilligan 909 FreeGate Corp 910 1208 E. Arques Ave 911 Sunnyvale, CA 94086 912 USA 914 Phone: +1-408-617-1004 915 Fax: +1-408-617-1010 916 Email: gilligan@freegate.com 918 Erik Nordmark 919 Sun Microsystems, Inc. 920 901 San Antonio Rd. 921 Palo Alto, CA 94303 922 USA 924 Phone: +1-650-786-5166 925 Fax: +1-650-786-5896 926 Email: nordmark@eng.sun.com 928 9. References 930 [1] Croft, W., and J. Gilmore, "Bootstrap Protocol", RFC 951, Sep- 931 tember 1985. 933 [2] Droms, R., "Dynamic Host Configuration Protocol", RFC 1541. 934 October 1993. 936 [3] Bound, J., "Dynamic Host Configuration Protocol for IPv6 937 (DHCPv6)", Work in Progress, February 1997. 939 [4] Deering, S., and R. Hinden, "Internet Protocol, Version 6 (IPv6) 940 Specification", RFC 1883, December 1995. 942 [5] Thomson, S., and T. Narten, "IPv6 Stateless Address Autoconfi- 943 guration," RFC 1971, August 1996. 945 [6] Thomson, S., and C. Huitema. "DNS Extensions to support IP ver- 946 sion 6", RFC 1886, December 1995. 948 [7] Narten, T., Nordmark, E., and W. Simpson, "Neighbor Discovery 949 for IP Version 6 (IPv6)", RFC 1970, August 1996. 951 [8] Mogul, J., and S. Deering, "Path MTU Discovery", RFC 1191, 952 November 1990. 954 [9] Finlayson, R., Mann, T., Mogul, J., and M. Theimer, "Reverse 955 Address Resolution Protocol", RFC 903, June 1984. 957 [10] Braden, R., "Requirements for Internet Hosts - Communication 958 Layers", STD 3, RFC 1122, October 1989. 960 [11] Kent, C., and J. Mogul, "Fragmentation Considered Harmful". In 961 Proc. SIGCOMM '87 Workshop on Frontiers in Computer Communica- 962 tions Technology. August 1987. 964 [12] Callon, R. and Haskin, D., "Routing Aspects of IPv6 Transition", 965 RFC 2185. September 1997. 967 [13] Ferguson, P., and Senie, D., "Network Ingress Filtering: Defeat- 968 ing Denial of Service Attacks which employ IP Source Address 969 Spoofing", RFC 2267, January 1998. 971 [14] Hinden, R., and S. Deering, "IP Version 6 Addressing Architec- 972 ture", RFC 2373, July 1998. 974 [15] Rechter, Y., Moskowitz, B., Karrenberg, D., de Groot, G.J., and 975 Lear, E. Address Allocation for Private Internets. RFC 1918, 976 February 1996. 978 10. Changes from RFC 1933 980 - Deleted section 3.1.1 (IPv4 loopback address) in order to 981 prevent it from being mis-construed as requiring routers to 982 filter the address ::127.0.0.1, which would put another test in 983 the forwarding path for IPv6 routers. 985 - Deleted section 4.4 (Default Sending Algorithm). This section 986 allowed nodes to send packets in "raw form" to IPv4-compatible 987 destinations on the same datalink. Implementation experience 988 has shown that this adds complexity which is not justified by 989 the minimal savings in header overhead. 991 - Added definitions for operating modes for IPv6/IPv4 nodes. 993 - Revised DNS section to clarify resolver filtering and ordering 994 options. 996 - Re-wrote the discussion of IPv4-compatible addresses to clarify 997 that they are used exclusively in conjunction with the automatic 998 tunneling mechanism. Re-organized document to place definition 999 of IPv4-compatible address format with description of automatic 1000 tunneling. 1002 - Changed the term "IPv6-only address" to "IPv6-native address" 1003 per current usage. 1005 - Updated to algorithm for determining tunnel MTU to reflect the 1006 anticipated change in the IPv6 minimum MTU to 1280 bytes. 1008 - Deleted the definition for the term "IPv6-in-IPv4 encapsula- 1009 tion." It has not been widely used. 1011 - Revised IPv4-compatible address configuration section (5.2) to 1012 recognize multiple interfaces. 1014 - Added discussion of source address selection when using IPv4- 1015 compatible addresses. 1017 - Added section on the combination of the default configured tun- 1018 neling technique with hosts using automatic tunneling. 1020 - Added prohibition against automatic tunneling to IPv4 broadcast 1021 or multicast destinations. 1023 11. Changes from draft-ietf-ngtrans-mech-01.txt 1025 - Clarified that configured tunnels are unidirectional. 1027 - Clarified that IPv4-compatible addresses are assigned 1028 exclusively to nodes that support automatic tunnels i.e. can 1029 receive such packets. 1031 - Added text about formation of link-local addresses and (non) 1032 used of Neighbor Discovery. 1034 - Added restriction that decapsulated packets not be forwarded 1035 unless to source address is acceptable to the decapsulating 1036 router. 1038 12. Open Issues 1040 - Should we disallow the asymmetric use of default configured tun- 1041 neling in one direction and automatic tunneling in the reverse 1042 direction? 1044 - Should we require that configured tunnels be bidirectional? 1046 - Should we require nodes to respond to NUD probes on (bidirec- 1047 tional) configured tunnels? 1049 - Should we require nodes to send NUD probes on (bidirectional) 1050 configured tunnels? (Can be omitted for router-router links as 1051 specified in RFC 1970). 1053 - Should we specify a DHCPv4 option for configuring the tunnel 1054 destination for default configured tunnels?