Network Working Group R. Gilligan Request for Comments: 2893 FreeGate Corp. Obsoletes: 1933 E. Nordmark Category: Standards Track Sun Microsystems, Inc. August 2000 Transition Mechanisms for IPv6 Hosts and Routers Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. Copyright Notice Copyright (C) The Internet Society (2000). All Rights Reserved.
AbstractThis document specifies IPv4 compatibility mechanisms that can be implemented by IPv6 hosts and routers. These mechanisms include providing complete implementations of both versions of the Internet Protocol (IPv4 and IPv6), and tunneling IPv6 packets over IPv4 routing infrastructures. They are designed to allow IPv6 nodes to maintain complete compatibility with IPv4, which should greatly simplify the deployment of IPv6 in the Internet, and facilitate the eventual transition of the entire Internet to IPv6. This document obsoletes RFC 1933.
1. Introduction............................................. 2 1.1. Terminology......................................... 3 1.2. Structure of this Document.......................... 5 2. Dual IP Layer Operation.................................. 6 2.1. Address Configuration............................... 7 2.2. DNS................................................. 7 2.3. Advertising Addresses in the DNS.................... 8 3. Common Tunneling Mechanisms.............................. 9 3.1. Encapsulation....................................... 11 3.2. Tunnel MTU and Fragmentation........................ 11 3.3. Hop Limit........................................... 13 3.4. Handling IPv4 ICMP errors........................... 13 3.5. IPv4 Header Construction............................ 15 3.6. Decapsulation....................................... 16 3.7. Link-Local Addresses................................ 17 3.8. Neighbor Discovery over Tunnels..................... 18 4. Configured Tunneling..................................... 18 4.1. Default Configured Tunnel........................... 19 4.2. Default Configured Tunnel using IPv4 "Anycast Address" 19 4.3. Ingress Filtering................................... 20 5. Automatic Tunneling...................................... 20 5.1. IPv4-Compatible Address Format...................... 20 5.2. IPv4-Compatible Address Configuration............... 21 5.3. Automatic Tunneling Operation....................... 22 5.4. Use With Default Configured Tunnels................. 22 5.5. Source Address Selection............................ 23 5.6. Ingress Filtering................................... 23 6. Acknowledgments.......................................... 24 7. Security Considerations.................................. 24 8. Authors' Addresses....................................... 24 9. References............................................... 25 10. Changes from RFC 1933................................... 26 11. Full Copyright Statement................................ 29
the Internet will need such compatibility for a long time to come, and perhaps even indefinitely. However, IPv6 may be used in some environments where interoperability with IPv4 is not required. IPv6 nodes that are designed to be used in such environments need not use or even implement these mechanisms. The mechanisms specified here include: - Dual IP layer (also known as Dual Stack): A technique for providing complete support for both Internet protocols -- IPv4 and IPv6 -- in hosts and routers. - Configured tunneling of IPv6 over IPv4: Point-to-point tunnels made by encapsulating IPv6 packets within IPv4 headers to carry them over IPv4 routing infrastructures. - IPv4-compatible IPv6 addresses: An IPv6 address format that employs embedded IPv4 addresses. - Automatic tunneling of IPv6 over IPv4: A mechanism for using IPv4-compatible addresses to automatically tunnel IPv6 packets over IPv4 networks. The mechanisms defined here are intended to be part of a "transition toolbox" -- a growing collection of techniques which implementations and users may employ to ease the transition. The tools may be used as needed. Implementations and sites decide which techniques are appropriate to their specific needs. This document defines the initial core set of transition mechanisms, but these are not expected to be the only tools available. Additional transition and compatibility mechanisms are expected to be developed in the future, with new documents being written to specify them.
IPv6/IPv4 node: A host or router that implements both IPv4 and IPv6. IPv6-only node: A host or router that implements IPv6, and does not implement IPv4. The operation of IPv6-only nodes is not addressed here. IPv6 node: Any host or router that implements IPv6. IPv6/IPv4 and IPv6- only nodes are both IPv6 nodes. IPv4 node: Any host or router that implements IPv4. IPv6/IPv4 and IPv4- only nodes are both IPv4 nodes. Types of IPv6 Addresses IPv4-compatible IPv6 address: An IPv6 address bearing the high-order 96-bit prefix 0:0:0:0:0:0, and an IPv4 address in the low-order 32-bits. IPv4-compatible addresses are used by IPv6/IPv4 nodes which perform automatic tunneling, IPv6-native address: The remainder of the IPv6 address space. An IPv6 address that bears a prefix other than 0:0:0:0:0:0. Techniques Used in the Transition IPv6-over-IPv4 tunneling: The technique of encapsulating IPv6 packets within IPv4 so that they can be carried across IPv4 routing infrastructures. Configured tunneling: IPv6-over-IPv4 tunneling where the IPv4 tunnel endpoint address is determined by configuration information on the encapsulating node. The tunnels can be either unidirectional or bidirectional. Bidirectional configured tunnels behave as virtual point-to-point links.
Automatic tunneling: IPv6-over-IPv4 tunneling where the IPv4 tunnel endpoint address is determined from the IPv4 address embedded in the IPv4- compatible destination address of the IPv6 packet being tunneled. IPv4 multicast tunneling: IPv6-over-IPv4 tunneling where the IPv4 tunnel endpoint address is determined using Neighbor Discovery . Unlike configured tunneling this does not require any address configuration and unlike automatic tunneling it does not require the use of IPv4-compatible addresses. However, the mechanism assumes that the IPv4 infrastructure supports IPv4 multicast. Specified in  and not further discussed in this document. Other transition mechanisms, including other tunneling mechanisms, are outside the scope of this document. Modes of operation of IPv6/IPv4 nodes IPv6-only operation: An IPv6/IPv4 node with its IPv6 stack enabled and its IPv4 stack disabled. IPv4-only operation: An IPv6/IPv4 node with its IPv4 stack enabled and its IPv6 stack disabled. IPv6/IPv4 operation: An IPv6/IPv4 node with both stacks enabled. The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this document, are to be interpreted as described in .
- Section 3 discusses the common mechanisms used in both of the IPv6-over-IPv4 tunneling techniques. - Section 4 discusses configured tunneling. - Section 5 discusses automatic tunneling and the IPv4-compatible IPv6 address format.
6] with support for an earlier record named "AAAA". Since IPv6/IPv4 nodes must be able to interoperate directly with both IPv4 and IPv6 nodes, they must provide resolver libraries capable of dealing with IPv4 "A" records as well as IPv6 "A6" and "AAAA" records. DNS resolver libraries on IPv6/IPv4 nodes MUST be capable of handling both A6/AAAA and A records. However, when a query locates an A6/AAAA record holding an IPv6 address, and an A record holding an IPv4 address, the resolver library MAY filter or order the results returned to the application in order to influence the version of IP packets used to communicate with that node. In terms of filtering, the resolver library has three alternatives: - Return only the IPv6 address to the application. - Return only the IPv4 address to the application. - Return both addresses to the application. If it returns only the IPv6 address, the application will communicate with the node using IPv6. If it returns only the IPv4 address, the application will communicate with the node using IPv4. If it returns both addresses, the application will have the choice which address to use, and thus which IP protocol to employ. If it returns both, the resolver MAY elect to order the addresses -- IPv6 first, or IPv4 first. Since most applications try the addresses in the order they are returned by the resolver, this can affect the IP version "preference" of applications.
The decision to filter or order DNS results is implementation specific. IPv6/IPv4 nodes MAY provide policy configuration to control filtering or ordering of addresses returned by the resolver, or leave the decision entirely up to the application. An implementation MUST allow the application to control whether or not such filtering takes place.
A possible implication of the recommendations above is that, if one enables IPv6 on a node on a link without IPv6 infrastructure, and choose to add A6/AAAA records to the DNS for that node, then external IPv6 nodes that might see these A6/AAAA records will possibly try to reach that node using IPv6 and suffer delays or communication failure due to unreachability. (A delay is incurred if the application correctly falls back to using IPv4 if it can not establish communication using IPv6 addresses. If this fallback is not done the application would fail to communicate in this case.) Thus it is suggested that either the recommendations be followed, or care be taken to only do so with nodes that will not be impacted by external accessing delays and/or communication failure. In the future when a site or node removes the support for IPv4 the above recommendations apply to when the A records for the node(s) should be removed from the DNS.
Tunneling techniques are usually classified according to the mechanism by which the encapsulating node determines the address of the node at the end of the tunnel. In the first two tunneling methods listed above -- router-to-router and host-to-router -- the IPv6 packet is being tunneled to a router. The endpoint of this type of tunnel is an intermediary router which must decapsulate the IPv6 packet and forward it on to its final destination. When tunneling to a router, the endpoint of the tunnel is different from the destination of the packet being tunneled. So the addresses in the IPv6 packet being tunneled can not provide the IPv4 address of the tunnel endpoint. Instead, the tunnel endpoint address must be determined from configuration information on the node performing the tunneling. We use the term "configured tunneling" to describe the type of tunneling where the endpoint is explicitly configured. In the last two tunneling methods -- host-to-host and router-to-host -- the IPv6 packet is tunneled all the way to its final destination. In this case, the destination address of both the IPv6 packet and the encapsulating IPv4 header identify the same node! This fact can be exploited by encoding information in the IPv6 destination address that will allow the encapsulating node to determine tunnel endpoint IPv4 address automatically. Automatic tunneling employs this technique, using an special IPv6 address format with an embedded IPv4 address to allow tunneling nodes to automatically derive the tunnel endpoint IPv4 address. This eliminates the need to explicitly configure the tunnel endpoint address, greatly simplifying configuration. The two tunneling techniques -- automatic and configured -- differ primarily in how they determine the tunnel endpoint address. Most of the underlying mechanisms are the same: - The entry node of the tunnel (the encapsulating node) creates an encapsulating IPv4 header and transmits the encapsulated packet. - The exit node of the tunnel (the decapsulating node) receives the encapsulated packet, reassembles the packet if needed, removes the IPv4 header, updates the IPv6 header, and processes the received IPv6 packet. - The encapsulating node MAY need to maintain soft state information for each tunnel recording such parameters as the MTU of the tunnel in order to process IPv6 packets forwarded into the tunnel. Since the number of tunnels that any one host or router may be using may grow to be quite large, this state information can be cached and discarded when not in use.
The remainder of this section discusses the common mechanisms that apply to both types of tunneling. Subsequent sections discuss how the tunnel endpoint address is determined for automatic and configured tunneling.
1) It would result in more fragmentation than needed. IPv4 layer fragmentation SHOULD be avoided due to the performance problems caused by the loss unit being smaller than the retransmission unit . 2) Any IPv4 fragmentation occurring inside the tunnel would have to be reassembled at the tunnel endpoint. For tunnels that terminate at a router, this would require additional memory to reassemble the IPv4 fragments into a complete IPv6 packet before that packet could be forwarded onward. The fragmentation inside the tunnel can be reduced to a minimum by having the encapsulating node track the IPv4 Path MTU across the tunnel, using the IPv4 Path MTU Discovery Protocol  and recording the resulting path MTU. The IPv6 layer in the encapsulating node can then view a tunnel as a link layer with an MTU equal to the IPv4 path MTU, minus the size of the encapsulating IPv4 header. Note that this does not completely eliminate IPv4 fragmentation in the case when the IPv4 path MTU would result in an IPv6 MTU less than 1280 bytes. (Any link layer used by IPv6 has to have an MTU of at least 1280 bytes .) In this case the IPv6 layer has to "see" a link layer with an MTU of 1280 bytes and the encapsulating node has to use IPv4 fragmentation in order to forward the 1280 byte IPv6 packets. The encapsulating node can employ the following algorithm to determine when to forward an IPv6 packet that is larger than the tunnel's path MTU using IPv4 fragmentation, and when to return an IPv6 ICMP "packet too big" message: if (IPv4 path MTU - 20) is less than or equal to 1280 if packet is larger than 1280 bytes Send IPv6 ICMP "packet too big" with MTU = 1280. Drop packet. else Encapsulate but do not set the Don't Fragment flag in the IPv4 header. The resulting IPv4 packet might be fragmented by the IPv4 layer on the encapsulating node or by some router along the IPv4 path. endif else if packet is larger than (IPv4 path MTU - 20) Send IPv6 ICMP "packet too big" with MTU = (IPv4 path MTU - 20). Drop packet. else
Encapsulate and set the Don't Fragment flag in the IPv4 header. endif endif Encapsulating nodes that have a large number of tunnels might not be able to store the IPv4 Path MTU for all tunnels. Such nodes can, at the expense of additional fragmentation in the network, avoid using the IPv4 Path MTU algorithm across the tunnel and instead use the MTU of the link layer (under IPv4) in the above algorithm instead of the IPv4 path MTU. In this case the Don't Fragment bit MUST NOT be set in the encapsulating IPv4 header. 17].
The ICMP "packet too big" error messages are handled according to IPv4 Path MTU Discovery  and the resulting path MTU is recorded in the IPv4 layer. The recorded path MTU is used by IPv6 to determine if an IPv6 ICMP "packet too big" error has to be generated as described in section 3.2. The handling of other types of ICMP error messages depends on how much information is included in the "packet in error" field, which holds the encapsulated packet that caused the error. Many older IPv4 routers return only 8 bytes of data beyond the IPv4 header of the packet in error, which is not enough to include the address fields of the IPv6 header. More modern IPv4 routers are likely to return enough data beyond the IPv4 header to include the entire IPv6 header and possibly even the data beyond that. If the offending packet includes enough data, the encapsulating node MAY extract the encapsulated IPv6 packet and use it to generate an IPv6 ICMP message directed back to the originating IPv6 node, as shown below: +--------------+ | IPv4 Header | | dst = encaps | | node | +--------------+ | ICMP | | Header | - - +--------------+ | IPv4 Header | | src = encaps | IPv4 | node | +--------------+ - - Packet | IPv6 | | Header | Original IPv6 in +--------------+ Packet - | Transport | Can be used to Error | Header | generate an +--------------+ IPv6 ICMP | | error message ~ Data ~ back to the source. | | - - +--------------+ - - IPv4 ICMP Error Message Returned to Encapsulating Node
Header Checksum: Calculate the checksum of the IPv4 header. Source Address: IPv4 address of outgoing interface of the encapsulating node. Destination Address: IPv4 address of tunnel endpoint. Any IPv6 options are preserved in the packet (after the IPv6 header).
When decapsulating the packet, the IPv6 header is not modified. [Note that work underway in the IETF is redefining the Type of Service byte and as a result future RFCs might define a different behavior for the ToS byte when decapsulating a tunneled packet.] If the packet is subsequently forwarded, its hop limit is decremented by one. As part of the decapsulation the node SHOULD silently discard a packet with an invalid IPv4 source address such as a multicast address, a broadcast address, 0.0.0.0, and 127.0.0.1. In general it SHOULD apply the rules for martian filtering in  and ingress filtering  on the IPv4 source address. The encapsulating IPv4 header is discarded. After the decapsulation the node SHOULD silently discard a packet with an invalid IPv6 source address. This includes IPv6 multicast addresses, the unspecified address, and the loopback address but also IPv4-compatible IPv6 source addresses where the IPv4 part of the address is an (IPv4) multicast address, broadcast address, 0.0.0.0, or 127.0.0.1. In general it SHOULD apply the rules for martian filtering in  and ingress filtering  on the IPv4-compatible source address. The decapsulating node performs IPv4 reassembly before decapsulating the IPv6 packet. All IPv6 options are preserved even if the encapsulating IPv4 packet is fragmented. After the IPv6 packet is decapsulated, it is processed almost the same as any received IPv6 packet. The only difference being that a decapsulated packet MUST NOT be forwarded unless the node has been explicitly configured to forward such packets for the given IPv4 source address. This configuration can be implicit in e.g., having a configured tunnel which matches the IPv4 source address. This restriction is needed to prevent tunneling to be used as a tool to circumvent ingress filtering . 14] for such an Interface SHOULD be the 32-bit IPv4 address of that interface, with the bytes in the same order in which they would appear in the header of an IPv4 packet, padded at the left with zeros to a total of 64 bits. Note that the
"Universal/Local" bit is zero, indicating that the Interface Identifier is not globally unique. When the host has more than one IPv4 address in use on the physical interface concerned, an administrative choice of one of these IPv4 addresses is made. The IPv6 Link-local address  for an IPv4 virtual interface is formed by appending the Interface Identifier, as defined above, to the prefix FE80::/64. +-------+-------+-------+-------+-------+-------+------+------+ | FE 80 00 00 00 00 00 00 | +-------+-------+-------+-------+-------+-------+------+------+ | 00 00 | 00 | 00 | IPv4 Address | +-------+-------+-------+-------+-------+-------+------+------+ 7] and Stateless Address Autoconfiguration  that apply to these tunnels is the formation of the link-local address. If an implementation provides bidirectional configured tunnels it MUST at least accept and respond to the probe packets used by Neighbor Unreachability Detection . Such implementations SHOULD also send NUD probe packets to detect when the configured tunnel fails at which point the implementation can use an alternate path to reach the destination. Note that Neighbor Discovery allows that the sending of NUD probes be omitted for router to router links if the routing protocol tracks bidirectional reachability. For the purposes of Neighbor Discovery the automatic and configured tunnels specified in this document as assumed to NOT have a link- layer address, even though the link-layer (IPv4) does have address. This means that a sender of Neighbor Discovery packets - SHOULD NOT include Source Link Layer Address options or Target Link Layer Address options on the tunnel link. - MUST silently ignore any received SLLA or TLLA options on the tunnel link.
tunnel endpoint address configured for that tunnel is used as the destination address for the encapsulating IPv4 header. The determination of which packets to tunnel is usually made by routing information on the encapsulating node. This is usually done via a routing table, which directs packets based on their destination address using the prefix mask and match technique.
13]. Note that packets which are delivered to transport protocols on the decapsulating node SHOULD NOT be subject to these checks. For bidirectional configured tunnels this is done by verifying that the source address is the IPv4 address of the other end of the tunnel. For unidirectional configured tunnels the decapsulating node MUST be configured with a list of source IPv4 address prefixes that are acceptable. Such a list MUST default to not having any entries i.e. the node has to be explicitly configured to forward decapsulated packets received over unidirectional configured tunnels. 15]. An implementation SHOULD behave as if its IPv4-compatible address(es) are assigned to the node's automatic tunneling interface, even if the implementation does not implement automatic tunneling using a concept of interfaces. Thus the IPv4-compatible address SHOULD NOT be viewed as being attached to e.g. an Ethernet interface i.e. implications
should not use the Neighbor Discovery mechanisms like NUD  at the Ethernet. Any such interactions should be done using the encapsulated packets i.e. over the automatic tunneling (conceptual) interface. 2] - The Bootstrap Protocol (BOOTP)  - The Reverse Address Resolution Protocol (RARP)  - Manual configuration - Any other mechanism which accurately yields the node's own IPv4 address 2) The node uses this address as the IPv4 address for this interface. 3) The node prepends the 96-bit prefix 0:0:0:0:0:0 to the 32-bit IPv4 address that it acquired in step (1). The result is an IPv4- compatible IPv6 address with one of the node's IPv4-addresses embedded in the low-order 32-bits. The node uses this address as one of its IPv6 addresses.
configured to perform automatic tunneling as well. These isolated hosts send packets to IPv4-compatible destinations via automatic tunneling and packets for IPv6-native destinations via the default configured tunnel. IPv4-compatible destinations will match the 96- bit all-zeros prefix route discussed in the previous section, while IPv6-native destinations will match the default route via the configured tunnel. Reply packets from IPv6-native destinations are routed back to the an IPv6/IPv4 router which delivers them to the original host via automatic tunneling. Further examples of the combination of tunneling techniques are discussed in . 13]. Note that packets which are delivered to transport protocols on the decapsulating node SHOULD NOT be subject to these checks. Since automatic tunnels always encapsulate to the destination (i.e. the IPv4 destination will be the destination) any packet received over an automatic tunnel SHOULD NOT be forwarded.
13]. This is prevented by requiring that decapsulating routers only forward packets if they have been configured to accept encapsulated packets from the IPv4 source address in the receive packet. Additionally, in the case of automatic tunneling, nodes are required by not forwarding the decapsulated packets since automatic tunneling ends the tunnel and the destination.
 Croft, W. and J. Gilmore, "Bootstrap Protocol", RFC 951, September 1985.  Droms, R., "Dynamic Host Configuration Protocol", RFC 1541, October 1993.  Carpenter, B. and C. Jung, "Transmission of IPv6 over IPv4 Domains without Explicit Tunnels", RFC 2529, March 1999.  Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998.  Thomson, S. and T. Narten, "IPv6 Stateless Address Autoconfiguration," RFC 2462, December 1998.  Crawford, M., Thomson, S., and C. Huitema. "DNS Extensions to Support IPv6 Address Allocation and Renumbering", RFC 2874, July 2000.  Narten, T., Nordmark, E. and W. Simpson, "Neighbor Discovery for IP Version 6 (IPv6)", RFC 2461, December 1998.  Mogul, J. and S. Deering, "Path MTU Discovery", RFC 1191, November 1990.  Finlayson, R., Mann, T., Mogul, J. and M. Theimer, "Reverse Address Resolution Protocol", STD 38, RFC 903, June 1984.  Braden, R., "Requirements for Internet Hosts - Communication Layers", STD 3, RFC 1122, October 1989.  Kent, C. and J. Mogul, "Fragmentation Considered Harmful". In Proc. SIGCOMM '87 Workshop on Frontiers in Computer Communications Technology. August 1987.  Callon, R. and D. Haskin, "Routing Aspects of IPv6 Transition", RFC 2185, September 1997.  Ferguson, P. and D. Senie, "Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing", RFC 2267, January 1998.  Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 2373, July 1998.
 Rechter, Y., Moskowitz, B., Karrenberg, D., de Groot, G.J. and E. Lear, "Address Allocation for Private Internets", BCP 5, RFC 1918, February 1996.  Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.  Thaler, D., "IP Tunnel MIB", RFC 2667, August 1999.  Baker, F., "Requirements for IP Version 4 Routers", RFC 1812, June 1995. 4]. - Deleted the definition for the term "IPv6-in-IPv4 encapsulation." It has not been widely used. - Revised IPv4-compatible address configuration section (5.2) to recognize multiple interfaces.
- Added discussion of source address selection when using IPv4- compatible addresses. - Added section on the combination of the default configured tunneling technique with hosts using automatic tunneling. - Added prohibition against automatic tunneling to IPv4 broadcast or multicast destinations. - Clarified that configured tunnels can be unidirectional or bidirectional. - Added description of bidirectional virtual links as another type of tunnels. Nodes MUST respond to NUD probes on such links and SHOULD send NUD probes. - Added reference to  specification as an alternative for tunneling over a multicast capable IPv4 cloud. - Clarified that IPv4-compatible addresses are assigned exclusively to nodes that support automatic tunnels i.e. nodes that can receive such packets. - Added text about formation of link-local addresses and use of Neighbor Discovery on tunnels. - Added restriction that decapsulated packets not be forwarded unless the source address is acceptable to the decapsulating router. - Clarified that decapsulating nodes MUST be capable of reassembling an IPv4 packet that is 1300 bytes (1280 bytes plus IPv4 header). - Clarified that when using a default tunnel to an IPv4 "anycast address" the network must either have an IPv4 MTU of least 1300 bytes (to avoid fragmentation of minimum size IPv6 packets) or be configured to avoid frequent changes to IPv4 routing to the "anycast address" (to avoid different IPv4 fragments arriving at different tunnel endpoints). - Using A6/AAAA instead of AAAA to reference IPv6 address records in the DNS. - Specified when to put IPv6 addresses in the DNS. - Added reference to the tunnel mib for TTL specification for the tunnels.
- Added a table of contents. - Added recommendations for use of source and target link layer address options for the tunnel links. - Added checks in the decapsulation checking both an IPv4-compatible IPv6 source address and the outer IPv4 source addresses for multicast, broadcast, all-zeros etc.
Acknowledgement Funding for the RFC Editor function is currently provided by the Internet Society.