draft-ietf-ngtrans-trans-mech-01.txt   rfc1933.txt 
Internet Engineering Task Force Robert E. Gilligan Network Working Group R. Gilligan
INTERNET-DRAFT Erik Nordmark Request for Comments: 1933 E. Nordmark
Sun Microsystems, Inc. Category: Standards Track Sun Microsystems, Inc.
April 1996
May 15, 1995
Transition Mechanisms for IPv6 Hosts and Routers
<draft-ietf-ngtrans-trans-mech-01.txt>
Abstract
This document specifies IPv4 compatibility mechanisms that can be Transition Mechanisms for IPv6 Hosts and Routers
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.
Status of this Memo Status of this Memo
This document is an Internet-Draft. Internet-Drafts are working This document specifies an Internet standards track protocol for the
documents of the Internet Engineering Task Force (IETF), its areas, and Internet community, and requests discussion and suggestions for
its working groups. Note that other groups may also distribute working improvements. Please refer to the current edition of the "Internet
documents as Internet-Drafts. Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet- Drafts as reference material
or to cite them other than as ``work in progress.''
To learn the current status of any Internet-Draft, please check the Abstract
``1id-abstracts.txt'' listing contained in the Internet- Drafts Shadow
Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe),
ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).
This Internet Draft expires on November 15, 1995. This 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.
1. Introduction 1. Introduction
The key to a successful IPv6 transition is compatibility with the large The key to a successful IPv6 transition is compatibility with the
installed base of IPv4 hosts and routers. Maintaining compatibility large installed base of IPv4 hosts and routers. Maintaining
with IPv4 while deploying IPv6 will streamline the task of transitioning compatibility with IPv4 while deploying IPv6 will streamline the task
the Internet to IPv6. This specification defines a set of mechanisms of transitioning the Internet to IPv6. This specification defines a
that IPv6 hosts and routers may implement in order to be compatible with set of mechanisms that IPv6 hosts and routers may implement in order
IPv4 hosts and routers. to be compatible with IPv4 hosts and routers.
The mechanisms in this document are designed to be employed by IPv6 The mechanisms in this document are designed to be employed by IPv6
hosts and routers that need to interoperate with IPv4 hosts and utilize hosts and routers that need to interoperate with IPv4 hosts and
IPv4 routing infrastructures. We expect that most nodes in the Internet utilize IPv4 routing infrastructures. We expect that most nodes in
will need such compatibility for a long time to come, and perhaps even the Internet will need such compatibility for a long time to come,
indefinitely. and perhaps even indefinitely.
However, IPv6 may be used in some environments where interoperability However, IPv6 may be used in some environments where interoperability
with IPv4 is not required. IPv6 nodes that are designed to be used in with IPv4 is not required. IPv6 nodes that are designed to be used
such environments need not use or even implement these mechanisms. in such environments need not use or even implement these mechanisms.
The mechanisms specified here include: The mechanisms specified here include:
- Dual IP layer. Providing complete support for both IPv4 and - Dual IP layer. Providing complete support for both IPv4 and
IPv6 in hosts and routers. IPv6 in hosts and routers.
- IPv6 over IPv4 tunneling. Encapsulating IPv6 packets within - IPv6 over IPv4 tunneling. Encapsulating IPv6 packets within
IPv4 headers to carry them over IPv4 routing infrastructures. IPv4 headers to carry them over IPv4 routing infrastructures.
Two types of tunneling are employed: configured and automatic. Two types of tunneling are employed: configured and automatic.
Additional transition and compatibility mechanisms may be developed in Additional transition and compatibility mechanisms may be developed
the future. These will be specified in other documents. in the future. These will be specified in other documents.
1.2. Terminology 1.2. Terminology
The following terms are used in this document: The following terms are used in this document:
Types of Nodes Types of Nodes
IPv4-only node: IPv4-only node:
A host or router that implements only IPv4. An A host or router that implements only IPv4. An
IPv4-only node does not understand IPv6. The installed IPv4-only node does not understand IPv6. The installed
base of IPv4 hosts and routers existing before the base of IPv4 hosts and routers existing before the
transition begins are IPv4-only nodes. transition begins are IPv4-only nodes.
IPv6/IPv4 node: IPv6/IPv4 node:
skipping to change at page 3, line 21 skipping to change at page 3, line 5
IPv6 node: IPv6 node:
Any host or router that implements IPv6. IPv6/IPv4 and Any host or router that implements IPv6. IPv6/IPv4 and
IPv6-only nodes are both IPv6 nodes. IPv6-only nodes are both IPv6 nodes.
IPv4 node: IPv4 node:
Any host or router that implements IPv4. IPv6/IPv4 and Any host or router that implements IPv4. IPv6/IPv4 and
IPv4-only nodes are both IPv4 nodes. IPv4-only nodes are both IPv4 nodes.
Types of IPv6 Addresses Types of IPv6 Addresses
IPv4-compatible IPv6 address: IPv4-compatible IPv6 address:
An IPv6 address, assigned to an IPv6/IPv4 node, which An IPv6 address, assigned to an IPv6/IPv4 node, which
bears the high-order 96-bit prefix 0:0:0:0:0:0, and an bears the high-order 96-bit prefix 0:0:0:0:0:0, and an
IPv4 address in the low-order 32-bits. IPv4-compatible IPv4 address in the low-order 32-bits. IPv4-compatible
addresses are used by the automatic tunneling mechanism. addresses are used by the automatic tunneling mechanism.
IPv6-only address: IPv6-only address:
The remainder of the IPv6 address space. An IPv6 The remainder of the IPv6 address space. An IPv6
address that bears a prefix other than 0:0:0:0:0:0. address that bears a prefix other than 0:0:0:0:0:0.
Techniques Used in the Transition Techniques Used in the Transition
IPv6-over-IPv4 tunneling: IPv6-over-IPv4 tunneling:
The technique of encapsulating IPv6 packets within IPv4 The technique of encapsulating IPv6 packets within IPv4
so that they can be carried across IPv4 routing so that they can be carried across IPv4 routing
infrastructures. infrastructures.
IPv6-in-IPv4 encapsulation: IPv6-in-IPv4 encapsulation:
IPv6-over-IPv4 tunneling. IPv6-over-IPv4 tunneling.
skipping to change at page 4, line 14 skipping to change at page 3, line 46
Automatic tunneling: Automatic tunneling:
IPv6-over-IPv4 tunneling where the IPv4 tunnel endpoint IPv6-over-IPv4 tunneling where the IPv4 tunnel endpoint
address is determined from the IPv4 address embedded in address is determined from the IPv4 address embedded in
the IPv4-compatible destination address of the IPv6 the IPv4-compatible destination address of the IPv6
packet. packet.
1.3. Structure of this Document 1.3. Structure of this Document
The remainder of this document is organized into three sections: The remainder of this document is organized into three sections:
- Section 2 discusses the IPv4-compatible address format. - Section 2 discusses the IPv4-compatible address format.
- Section 3 discusses the operation of nodes with a dual IP - Section 3 discusses the operation of nodes with a dual IP
layer, IPv6/IPv4 nodes. layer, IPv6/IPv4 nodes.
- Section 4 discusses IPv6-over-IPv4 tunneling. - Section 4 discusses IPv6-over-IPv4 tunneling.
2. Addressing 2. Addressing
The automatic tunneling mechanism uses a special type of IPv6 address, The automatic tunneling mechanism uses a special type of IPv6
termed an "IPv4-compatible" address. An IPv4-compatible address is address, termed an "IPv4-compatible" address. An IPv4-compatible
identified by an all-zeros 96-bit prefix, and holds an IPv4 address in address is identified by an all-zeros 96-bit prefix, and holds an
the low-order 32-bits. IPv4-compatible addresses are structured as IPv4 address in the low-order 32-bits. IPv4-compatible addresses are
follows: structured as follows:
| 96-bits | 32-bits | | 96-bits | 32-bits |
+--------------------------------------+--------------+ +--------------------------------------+--------------+
| 0:0:0:0:0:0 | IPv4 Address | | 0:0:0:0:0:0 | IPv4 Address |
+--------------------------------------+--------------+ +--------------------------------------+--------------+
IPv4-Compatible IPv6 Address Format IPv4-Compatible IPv6 Address Format
IPv4-compatible addresses are assigned to IPv6/IPv4 nodes that support IPv4-compatible addresses are assigned to IPv6/IPv4 nodes that
automatic tunneling. Nodes that are configured with IPv4-compatible support automatic tunneling. Nodes that are configured with IPv4-
addresses may use the complete address as their IPv6 address, and use compatible addresses may use the complete address as their IPv6
the embedded IPv4 address as their IPv4 address. address, and use the embedded IPv4 address as their IPv4 address.
The remainder of the IPv6 address space (that is, all addresses with
96-bit prefixes other than 0:0:0:0:0:0) are termed "IPv6-only
Addresses."
The remainder of the IPv6 address space (that is, all addresses with
96-bit prefixes other than 0:0:0:0:0:0) are termed "IPv6-only
Addresses."
3. Dual IP Layer 3. Dual IP Layer
The most straightforward way for IPv6 nodes to remain compatible with The most straightforward way for IPv6 nodes to remain compatible with
IPv4-only nodes is by providing a complete IPv4 implementation. IPv6 IPv4-only nodes is by providing a complete IPv4 implementation. IPv6
nodes that provide a complete IPv4 implementation in addition to their nodes that provide a complete IPv4 implementation in addition to
IPv6 implementation are called "IPv6/IPv4 nodes." IPv6/IPv4 nodes have their IPv6 implementation are called "IPv6/IPv4 nodes." IPv6/IPv4
the ability to send and receive both IPv4 and IPv6 packets. They can nodes have the ability to send and receive both IPv4 and IPv6
directly interoperate with IPv4 nodes using IPv4 packets, and also packets. They can directly interoperate with IPv4 nodes using IPv4
directly interoperate with IPv6 nodes using IPv6 packets. packets, and also directly interoperate with IPv6 nodes using IPv6
packets.
The dual IP layer technique may or may not be used in conjunction with The dual IP layer technique may or may not be used in conjunction
the IPv6-over-IPv4 tunneling techniques, which are described in with the IPv6-over-IPv4 tunneling techniques, which are described in
section 4. An IPv6/IPv4 node that supports tunneling may support only section 4. An IPv6/IPv4 node that supports tunneling may support
configured tunneling, or both configured and automatic tunneling. only configured tunneling, or both configured and automatic
Thus three configurations are possible: tunneling. Thus three configurations are possible:
- IPv6/IPv4 node that does not perform tunneling. - IPv6/IPv4 node that does not perform tunneling.
- IPv6/IPv4 node that performs configured tunneling only. - IPv6/IPv4 node that performs configured tunneling only.
- IPv6/IPv4 node that performs configured tunneling and - IPv6/IPv4 node that performs configured tunneling and
automatic tunneling. automatic tunneling.
3.1. Address Configuration 3.1. Address Configuration
Because they support both protocols, IPv6/IPv4 nodes may be configured Because they support both protocols, IPv6/IPv4 nodes may be
with both IPv4 and IPv6 addresses. Although the two addresses may be configured with both IPv4 and IPv6 addresses. Although the two
related to each other, this is not required. IPv6/IPv4 nodes may be addresses may be related to each other, this is not required.
configured with IPv6 and IPv4 addresses that are unrelated to each IPv6/IPv4 nodes may be configured with IPv6 and IPv4 addresses that
other. are unrelated to each other.
Nodes that perform automatic tunneling are configured with Nodes that perform automatic tunneling are configured with IPv4-
IPv4-compatible IPv6 addresses. These may be viewed as single compatible IPv6 addresses. These may be viewed as single addresses
addresses that can serve both as IPv6 and IPv4 addresses. The entire that can serve both as IPv6 and IPv4 addresses. The entire 128-bit
128-bit IPv4-compatible IPv6 address is used as the node's IPv6 IPv4-compatible IPv6 address is used as the node's IPv6 address,
address, while the IPv4 address embedded in low-order 32-bits serves while the IPv4 address embedded in low-order 32-bits serves as the
as the node's IPv4 address. node's IPv4 address.
IPv6/IPv4 nodes may use the stateless IPv6 address configuration IPv6/IPv4 nodes may use the stateless IPv6 address configuration
mechanism [5] or DHCP for IPv6 [3] to acquire their IPv6 address. mechanism [5] or DHCP for IPv6 [3] to acquire their IPv6 address.
These mechanisms may provide either IPv4-compatible or IPv6-only IPv6 These mechanisms may provide either IPv4-compatible or IPv6-only IPv6
addresses. addresses.
IPv6/IPv4 nodes may use IPv4 mechanisms to acquire their IPv4 IPv6/IPv4 nodes may use IPv4 mechanisms to acquire their IPv4
addresses. addresses.
IPv6/IPv4 nodes that perform automatic tunneling may also acquire their IPv6/IPv4 nodes that perform automatic tunneling may also acquire
IPv4-compatible IPv6 addresses from another source: IPv4 address their IPv4-compatible IPv6 addresses from another source: IPv4
configuration protocols. A node may use any IPv4 address configuration address configuration protocols. A node may use any IPv4 address
mechanism to acquire its IPv4 address, then "map" that address into an configuration mechanism to acquire its IPv4 address, then "map" that
IPv4-compatible IPv6 address by pre-pending it with the 96-bit prefix address into an IPv4-compatible IPv6 address by pre-pending it with
0:0:0:0:0:0. This mode of configuration allows IPv6/IPv4 nodes to the 96-bit prefix 0:0:0:0:0:0. This mode of configuration allows
"leverage" the installed base of IPv4 address configuration servers. It IPv6/IPv4 nodes to "leverage" the installed base of IPv4 address
can be particularly useful in environments where IPv6 routers and configuration servers. It can be particularly useful in environments
address configuration servers have not yet been deployed. where IPv6 routers and address configuration servers have not yet
been deployed.
The specific algorithm for acquiring an IPv4-compatible address using The specific algorithm for acquiring an IPv4-compatible address using
IPv4-based address configuration protocols is as follows: IPv4-based address configuration protocols is as follows:
1) The IPv6/IPv4 node uses standard IPv4 mechanisms or protocols 1) The IPv6/IPv4 node uses standard IPv4 mechanisms or protocols
to acquire its own IPv4 address. These include: to acquire its own IPv4 address. These include:
- The Dynamic Host Configuration Protocol (DHCP) [2] - The Dynamic Host Configuration Protocol (DHCP) [2]
- The Bootstrap Protocol (BOOTP) [1] - The Bootstrap Protocol (BOOTP) [1]
- The Reverse Address Resolution Protocol (RARP) [9] - The Reverse Address Resolution Protocol (RARP) [9]
- Manual configuration - Manual configuration
- Any other mechanism which accurately yields the node's - Any other mechanism which accurately yields the node's
own IPv4 address own IPv4 address
skipping to change at page 7, line 35 skipping to change at page 6, line 15
2) The node uses this address as its IPv4 address. 2) The node uses this address as its IPv4 address.
3) The node prepends the 96-bit prefix 0:0:0:0:0:0 to the 32-bit 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 address that it acquired in step (1). The result is an
IPv4-compatible IPv6 address with the node's own IPv4-address IPv4-compatible IPv6 address with the node's own IPv4-address
embedded in the low-order 32-bits. The node uses this address embedded in the low-order 32-bits. The node uses this address
as its own IPv6 address. as its own IPv6 address.
3.1.1. IPv4 Loopback Address 3.1.1. IPv4 Loopback Address
Many IPv4 implementations treat the address 127.0.0.1 as a "loopback Many IPv4 implementations treat the address 127.0.0.1 as a "loopback
address" -- an address to reach services located on the local machine. address" -- an address to reach services located on the local
Per the host requirements specification [11], section 3.2.1.3, IPv4 machine. Per the host requirements specification [10], section
packets addressed from or to the loopback address are not to be sent 3.2.1.3, IPv4 packets addressed from or to the loopback address are
onto the network; they must remain entirely within the node. IPv6/IPv4 not to be sent onto the network; they must remain entirely within the
implementations may treat the IPv4-compatible IPv6 address ::127.0.0.1 node. IPv6/IPv4 implementations may treat the IPv4-compatible IPv6
as an IPv6 loopback address. Packets with this address should also address ::127.0.0.1 as an IPv6 loopback address. Packets with this
remain entirely within the node, and not be transmitted onto the address should also remain entirely within the node, and not be
network. transmitted onto the network.
3.2. DNS 3.2. DNS
The Domain Naming System (DNS) is used in both IPv4 and IPv6 to map The Domain Naming System (DNS) is used in both IPv4 and IPv6 to map
hostnames into addresses. A new resource record type named "AAAA" has hostnames into addresses. A new resource record type named "AAAA"
been defined for IPv6 addresses [6]. Since IPv6/IPv4 nodes must be able has been defined for IPv6 addresses [6]. Since IPv6/IPv4 nodes must
to interoperate directly with both IPv4 and IPv6 nodes, they must must be able to interoperate directly with both IPv4 and IPv6 nodes, they
provide resolver libraries capable of dealing with IPv4 "A" records as must provide resolver libraries capable of dealing with IPv4 "A"
well as IPv6 "AAAA" records. records as well as IPv6 "AAAA" records.
Some sites use local host tables instead of, or in addition to, the
DNS. Use of host tables may be particularly useful in the very early
stages of transition before the DNS infrastructure has been converted
to support AAAA records. Therefore, implementations may provide a
host table mechanism in addition to their DNS resolver.
Note that the local host table mechanism does not scale very well, so
its use is not recommended for large sites. Further discussion of the
host table issue can be found in section 6.1.1 of "Requirements for
Internet Hosts -- Application and Support" [10].
3.2.1. Handling Records for IPv4-Compatible Addresses 3.2.1. Handling Records for IPv4-Compatible Addresses
When an IPv4-compatible IPv6 addresses is assigned to an IPv6/IPv4 When an IPv4-compatible IPv6 addresses is assigned to an IPv6/IPv4
host that supports automatic tunneling, both A and AAAA records are host that supports automatic tunneling, both A and AAAA records are
listed in the DNS. The AAAA record holds the full IPv4-compatible listed in the DNS. The AAAA record holds the full IPv4-compatible
IPv6 address, while the A record holds the low-order 32-bits of that IPv6 address, while the A record holds the low-order 32-bits of that
address. The AAAA record is needed so that queries by IPv6 hosts can address. The AAAA record is needed so that queries by IPv6 hosts can
be satisfied. The A record is needed so that queries by IPv4-only be satisfied. The A record is needed so that queries by IPv4-only
hosts, whose resolver libraries only support the A record type, will hosts, whose resolver libraries only support the A record type, will
locate the host. locate the host.
DNS resolver libraries on IPv6/IPv4 nodes must be capable of handling DNS resolver libraries on IPv6/IPv4 nodes must be capable of handling
both AAAA and A records. However, when a query locates an AAAA record both AAAA and A records. However, when a query locates an AAAA
holding an IPv4-compatible IPv6 address, and an A record holding the record holding an IPv4-compatible IPv6 address, and an A record
corresponding IPv4 address, the resolver library need not necessarily holding the corresponding IPv4 address, the resolver library need not
return both addresses. It has three options: necessarily return both addresses. It has three options:
- Return only the IPv6 address to the application. - Return only the IPv6 address to the application.
- Return only the IPv4 address to the application. - Return only the IPv4 address to the application.
- Return both addresses to the application. - Return both addresses to the application.
The selection of which address type to return in this case, or, if The selection of which address type to return in this case, or, if
both addresses are returned, in which order they are listed, can both addresses are returned, in which order they are listed, can
affect what type of IP traffic is generated. If the IPv6 address is affect what type of IP traffic is generated. If the IPv6 address is
returned, the node will communicate with that destination using IPv6 returned, the node will communicate with that destination using IPv6
packets (in most cases encapsulated in IPv4); If the IPv4 address is packets (in most cases encapsulated in IPv4); If the IPv4 address is
returned, the communication will use IPv4 packets. returned, the communication will use IPv4 packets.
The way that DNS resolver implementations handle redundant records for The way that DNS resolver implementations handle redundant records
IPv4-compatible addresses may depend on whether that implementation for IPv4-compatible addresses may depend on whether that
supports automatic tunneling, or whether it is enabled. For example, an implementation supports automatic tunneling, or whether it is
implementation that does not support automatic tunneling would not enabled. For example, an implementation that does not support
return IPv4-compatible IPv6 addresses to applications because those automatic tunneling would not return IPv4-compatible IPv6 addresses
destinations are generally only reachable via tunneling. On the other to applications because those destinations are generally only
hand, those implementations in which automatic tunneling is supported reachable via tunneling. On the other hand, those implementations in
and enabled may elect to return only the IPv4-compatible IPv6 address which automatic tunneling is supported and enabled may elect to
and not the IPv4 address. return only the IPv4-compatible IPv6 address and not the IPv4
address.
4. IPv6-over-IPv4 Tunneling 4. IPv6-over-IPv4 Tunneling
In most deployment scenarios, the IPv6 routing infrastructure will be In most deployment scenarios, the IPv6 routing infrastructure will be
built up over time. While the IPv6 infrastructure is being deployed, built up over time. While the IPv6 infrastructure is being deployed,
the existing IPv4 routing infrastructure can remain functional, and the existing IPv4 routing infrastructure can remain functional, and
can be used to carry IPv6 traffic. Tunneling provides a way to can be used to carry IPv6 traffic. Tunneling provides a way to
utilize an existing IPv4 routing infrastructure to carry IPv6 traffic. utilize an existing IPv4 routing infrastructure to carry IPv6
traffic.
IPv6/IPv4 hosts and routers can tunnel IPv6 datagrams over regions of IPv6/IPv4 hosts and routers can tunnel IPv6 datagrams over regions of
IPv4 routing topology by encapsulating them within IPv4 packets. IPv4 routing topology by encapsulating them within IPv4 packets.
Tunneling can be used in a variety of ways: Tunneling can be used in a variety of ways:
- Router-to-Router. IPv6/IPv4 routers interconnected by an IPv4 - Router-to-Router. IPv6/IPv4 routers interconnected by an IPv4
infrastructure can tunnel IPv6 packets between themselves. In infrastructure can tunnel IPv6 packets between themselves. In
this case, the tunnel spans one segment of the end-to-end path this case, the tunnel spans one segment of the end-to-end path
that the IPv6 packet takes. that the IPv6 packet takes.
- Host-to-Router. IPv6/IPv4 hosts can tunnel IPv6 packets to an - Host-to-Router. IPv6/IPv4 hosts can tunnel IPv6 packets to an
intermediary IPv6/IPv4 router that is reachable via an IPv4 intermediary IPv6/IPv4 router that is reachable via an IPv4
infrastructure. This type of tunnel spans the first segment infrastructure. This type of tunnel spans the first segment
of the packet's end-to-end path. of the packet's end-to-end path.
- Host-to-Host. IPv6/IPv4 hosts that are interconnected by an - Host-to-Host. IPv6/IPv4 hosts that are interconnected by an
IPv4 infrastructure can tunnel IPv6 packets between IPv4 infrastructure can tunnel IPv6 packets between
themselves. In this case, the tunnel spans the entire themselves. In this case, the tunnel spans the entire
end-to-end path that the packet takes. end-to-end path that the packet takes.
- Router-to-Host. IPv6/IPv4 routers can tunnel IPv6 packets to - Router-to-Host. IPv6/IPv4 routers can tunnel IPv6 packets to
their final destination IPv6/IPv4 host. This tunnel spans their final destination IPv6/IPv4 host. This tunnel spans
only the last segment of the end-to-end path. only the last segment of the end-to-end path.
Tunneling techniques are usually classified according to the mechanism Tunneling techniques are usually classified according to the
by which the encapsulating node determines the address of the node at mechanism by which the encapsulating node determines the address of
the end of the tunnel. In the first two tunneling methods listed above the node at the end of the tunnel. In the first two tunneling
tunneled to a router. The endpoint of this type of tunnel is an methods listed above -- router-to-router and host-to-router -- the
intermediary router which must decapsulate the IPv6 packet and forward IPv6 packet is being tunneled to a router. The endpoint of this type
it on to its final destination. When tunneling to a router, the of tunnel is an intermediary router which must decapsulate the IPv6
endpoint of the tunnel is different from the destination of the packet packet and forward it on to its final destination. When tunneling to
being tunneled. So the addresses in the IPv6 packet being tunneled do a router, the endpoint of the tunnel is different from the
not provide the IPv4 address of the tunnel endpoint. Instead, the destination of the packet being tunneled. So the addresses in the
tunnel endpoint address must be determined from configuration IPv6 packet being tunneled do not provide the IPv4 address of the
information on the node performing the tunneling. We use the term tunnel endpoint. Instead, the tunnel endpoint address must be
"configured tunneling" to describe the type of tunneling where the determined from configuration information on the node performing the
endpoint is explicitly configured. 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 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.
The tunnel endpoint is the node to which the IPv6 packet is addressed. The tunnel endpoint is the node to which the IPv6 packet is
Since the endpoint of the tunnel is the destination of the IPv6 addressed. Since the endpoint of the tunnel is the destination of
packet, the tunnel endpoint can be determined from the destination the IPv6 packet, the tunnel endpoint can be determined from the
IPv6 address of that packet: If that address is an IPv4-compatible destination IPv6 address of that packet: If that address is an IPv4-
address, then the low-order 32-bits hold the IPv4 address of the compatible address, then the low-order 32-bits hold the IPv4 address
destination node, and that can be used as the tunnel endpoint address. of the destination node, and that can be used as the tunnel endpoint
This technique avoids the need to explicitly configure the tunnel address. This technique avoids the need to explicitly configure the
endpoint address. Deriving the tunnel endpoint address from the tunnel endpoint address. Deriving the tunnel endpoint address from
embedded IPv4 address of the packet's IPv6 address is termed the embedded IPv4 address of the packet's IPv6 address is termed
"automatic tunneling". "automatic tunneling".
The two tunneling techniques -- automatic and configured -- differ The two tunneling techniques -- automatic and configured -- differ
primarily in how they determine the tunnel endpoint address. Most of primarily in how they determine the tunnel endpoint address. Most of
the underlying mechanisms are the same: the underlying mechanisms are the same:
- The entry node of the tunnel (the encapsulating node) creates an - The entry node of the tunnel (the encapsulating node) creates an
encapsulating IPv4 header and transmits the encapsulated packet. encapsulating IPv4 header and transmits the encapsulated packet.
- The exit node of the tunnel (the decapsulating node) receives - The exit node of the tunnel (the decapsulating node) receives
the encapsulated packet, removes the IPv4 header, updates the the encapsulated packet, removes the IPv4 header, updates the
IPv6 header, and processes the received IPv6 packet. IPv6 header, and processes the received IPv6 packet.
- The encapsulating node may need to maintain soft state - The encapsulating node may need to maintain soft state
information for each tunnel recording such parameters as the MTU information for each tunnel recording such parameters as the MTU
of the tunnel in order to process IPv6 packets forwarded into of the tunnel in order to process IPv6 packets forwarded into
the tunnel. Since the number of tunnels that any one host or the tunnel. Since the number of tunnels that any one host or
router may be using may grow to be quite large, this state router may be using may grow to be quite large, this state
information can be cached and discarded when not in use. information can be cached and discarded when not in use.
The next section discusses the common mechanisms that apply to both The next section discusses the common mechanisms that apply to both
types of tunneling. Subsequent sections discuss how the tunnel endpoint types of tunneling. Subsequent sections discuss how the tunnel
address is determined for automatic and configured tunneling. endpoint address is determined for automatic and configured
tunneling.
4.1. Common Tunneling Mechanisms 4.1. Common Tunneling Mechanisms
The encapsulation of an IPv6 datagram in IPv4 is shown below: The encapsulation of an IPv6 datagram in IPv4 is shown below:
+-------------+ +-------------+
| IPv4 | | IPv4 |
| Header | | Header |
+-------------+ +-------------+ +-------------+ +-------------+
| IPv6 | | IPv6 | | IPv6 | | IPv6 |
| Header | | Header | | Header | | Header |
+-------------+ +-------------+ +-------------+ +-------------+
| Transport | | Transport | | Transport | | Transport |
| Layer | ===> | Layer | | Layer | ===> | Layer |
| Header | | Header | | Header | | Header |
+-------------+ +-------------+ +-------------+ +-------------+
| | | | | | | |
~ Data ~ ~ Data ~ ~ Data ~ ~ Data ~
| | | | | | | |
+-------------+ +-------------+ +-------------+ +-------------+
Encapsulating IPv6 in IPv4 Encapsulating IPv6 in IPv4
In addition to adding an IPv4 header, the encapsulating node also has to In addition to adding an IPv4 header, the encapsulating node also has
handle some more complex issues: to handle some more complex issues:
- Determine when to fragment and when to report an ICMP "packet - Determine when to fragment and when to report an ICMP "packet
too big" error back to the source. too big" error back to the source.
- How to reflect IPv4 ICMP errors from routers along the tunnel - How to reflect IPv4 ICMP errors from routers along the tunnel
path back to the source as IPv6 ICMP errors. path back to the source as IPv6 ICMP errors.
Those issues are discussed in the following sections. Those issues are discussed in the following sections.
4.1.1. Tunnel MTU and Fragmentation 4.1.1. Tunnel MTU and Fragmentation
The encapsulating node could view encapsulation as IPv6 using IPv4 as a The encapsulating node could view encapsulation as IPv6 using IPv4 as
link layer with a very large MTU (65535-20 bytes to be exact; 20 bytes a link layer with a very large MTU (65535-20 bytes to be exact; 20
"extra" are needed for the encapsulating IPv4 header). The bytes "extra" are needed for the encapsulating IPv4 header). The
encapsulating node would need only to report IPv6 ICMP "packet too big" encapsulating node would need only to report IPv6 ICMP "packet too
errors back to the source for packets that exceed this MTU. However, big" errors back to the source for packets that exceed this MTU.
such a scheme would be inefficient for two reasons: However, such a scheme would be inefficient for two reasons:
1) It would result in more fragmentation than needed. IPv4 layer 1) It would result in more fragmentation than needed. IPv4 layer
fragmentation should be avoided due to the performance problems fragmentation should be avoided due to the performance problems
caused by the loss unit being smaller than the retransmission caused by the loss unit being smaller than the retransmission
unit [13]. unit [11].
2) Any IPv4 fragmentation occurring inside the tunnel would have to 2) Any IPv4 fragmentation occurring inside the tunnel would have to
be reassembled at the tunnel endpoint. For tunnels that be reassembled at the tunnel endpoint. For tunnels that
terminate at a router, this would require additional memory to terminate at a router, this would require additional memory to
reassemble the IPv4 fragments into a complete IPv6 packet before reassemble the IPv4 fragments into a complete IPv6 packet before
that packet could be forwarded onward. that packet could be forwarded onward.
The fragmentation inside the tunnel can be reduced to a minimum by The fragmentation inside the tunnel can be reduced to a minimum by
having the encapsulating node track the IPv4 Path MTU across the tunnel, having the encapsulating node track the IPv4 Path MTU across the
using the IPv4 Path MTU Discovery Protocol [8] and recording the tunnel, using the IPv4 Path MTU Discovery Protocol [8] and recording
resulting path MTU. The IPv6 layer in the encapsulating node can then the resulting path MTU. The IPv6 layer in the encapsulating node can
view a tunnel as a link layer with an MTU equal to the IPv4 path MTU, then view a tunnel as a link layer with an MTU equal to the IPv4 path
minus the size of the encapsulating IPv4 header. MTU, minus the size of the encapsulating IPv4 header.
Note that this does not completely eliminate IPv4 fragmentation in the Note that this does not completely eliminate IPv4 fragmentation in
case when the IPv4 path MTU would result in an IPv6 MTU less than 576 the case when the IPv4 path MTU would result in an IPv6 MTU less than
bytes. (Any link layer used by IPv6 has to have an MTU of at least 576 576 bytes. (Any link layer used by IPv6 has to have an MTU of at
bytes [4].) In this case the IPv6 layer has to "see" a link layer least 576 bytes [4].) In this case the IPv6 layer has to "see" a link
with an MTU of 576 bytes and the encapsulating node has to use IPv4 layer with an MTU of 576 bytes and the encapsulating node has to use
fragmentation in order to forward the 576 byte IPv6 packets. IPv4 fragmentation in order to forward the 576 byte IPv6 packets.
The encapsulating node can employ the following algorithm to determine The encapsulating node can employ the following algorithm to
when to forward an IPv6 packet that is larger than the tunnel's path MTU determine when to forward an IPv6 packet that is larger than the
using IPv4 fragmentation, and when to return an IPv6 ICMP "packet too tunnel's path MTU using IPv4 fragmentation, and when to return an
big" message: IPv6 ICMP "packet too big" message:
if (IPv4 path MTU - 20) is less than or equal to 576 if (IPv4 path MTU - 20) is less than or equal to 576
if packet is larger than 576 bytes if packet is larger than 576 bytes
Send IPv6 ICMP "packet too big" with MTU = 576. Send IPv6 ICMP "packet too big" with MTU = 576.
Drop packet. Drop packet.
else else
Encapsulate but do not set the Don't Fragment Encapsulate but do not set the Don't Fragment
flag in the IPv4 header. The resulting IPv4 flag in the IPv4 header. The resulting IPv4
packet might be fragmented by the IPv4 layer on packet might be fragmented by the IPv4 layer on
the encapsulating node or by some router along the encapsulating node or by some router along
skipping to change at page 13, line 47 skipping to change at page 11, line 17
if packet is larger than (IPv4 path MTU - 20) if packet is larger than (IPv4 path MTU - 20)
Send IPv6 ICMP "packet too big" with Send IPv6 ICMP "packet too big" with
MTU = (IPv4 path MTU - 20). MTU = (IPv4 path MTU - 20).
Drop packet. Drop packet.
else else
Encapsulate and set the Don't Fragment flag Encapsulate and set the Don't Fragment flag
in the IPv4 header. in the IPv4 header.
endif endif
endif endif
Encapsulating nodes that have a large number of tunnels might not be 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 able to store the IPv4 Path MTU for all tunnels. Such nodes can, at
expense of additional fragmentation in the network, avoid using the IPv4 the expense of additional fragmentation in the network, avoid using
Path MTU algorithm across the tunnel and instead use the MTU of the link the IPv4 Path MTU algorithm across the tunnel and instead use the MTU
layer (under IPv4) in the above algorithm instead of the IPv4 path 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 In this case the Don't Fragment bit must not be set in the
IPv4 header. encapsulating IPv4 header.
4.1.2. Hop Limit 4.1.2. Hop Limit
IPv6-over-IPv4 tunnels are modeled as "single-hop". That is, the IPv6 IPv6-over-IPv4 tunnels are modeled as "single-hop". That is, the
hop limit is decremented by 1 when an IPv6 packet traverses the tunnel. IPv6 hop limit is decremented by 1 when an IPv6 packet traverses the
The single-hop model serves to hide the existence of a tunnel. The tunnel. The single-hop model serves to hide the existence of a
tunnel is opaque to users of the network, and is not detectable by tunnel. The tunnel is opaque to users of the network, and is not
network diagnostic tools such as traceroute. detectable by network diagnostic tools such as traceroute.
The single-hop model is implemented by having the encapsulating and The single-hop model is implemented by having the encapsulating and
decapsulating nodes process the IPv6 hop limit field as they would if decapsulating nodes process the IPv6 hop limit field as they would if
they were forwarding a packet on to any other datalink. That is, they they were forwarding a packet on to any other datalink. That is,
decrement the hop limit by 1 when forwarding an IPv6 packet. (The they decrement the hop limit by 1 when forwarding an IPv6 packet.
originating node and final destination do not decrement the hop limit.) (The originating node and final destination do not decrement the hop
limit.)
The TTL of the encapsulating IPv4 header is selected in an The TTL of the encapsulating IPv4 header is selected in an
implementation dependent manner. The current suggested value is implementation dependent manner. The current suggested value is
published in the "Assigned Numbers RFC. Implementations may provide a published in the "Assigned Numbers RFC. Implementations may provide
mechanism to allow the administrator to configure the IPv4 TTL. a mechanism to allow the administrator to configure the IPv4 TTL.
4.1.3. Handling IPv4 ICMP errors 4.1.3. Handling IPv4 ICMP errors
In response to encapsulated packets it has sent into the tunnel, the In response to encapsulated packets it has sent into the tunnel, the
encapsulating node may receive IPv4 ICMP error messages from IPv4 encapsulating node may receive IPv4 ICMP error messages from IPv4
routers inside the tunnel. These packets are addressed to the routers inside the tunnel. These packets are addressed to the
encapsulating node because it is the IPv4 source of the encapsulated encapsulating node because it is the IPv4 source of the encapsulated
packet. packet.
The ICMP "packet too big" error messages are handled according to IPv4 The ICMP "packet too big" error messages are handled according to
Path MTU Discovery [8] and the resulting path MTU is recorded in the IPv4 Path MTU Discovery [8] and the resulting path MTU is recorded in
IPv4 layer. The recorded path MTU is used by IPv6 to determine if an the IPv4 layer. The recorded path MTU is used by IPv6 to determine
IPv6 ICMP "packet too big" error has to be generated as described in if an IPv6 ICMP "packet too big" error has to be generated as
section 4.1.1. described in section 4.1.1.
The handling of other types of ICMP error messages depends on how much The handling of other types of ICMP error messages depends on how
information is included in the "packet in error" field, which holds the much information is included in the "packet in error" field, which
encapsulated packet that caused the error. holds the encapsulated packet that caused the error.
Many older IPv4 routers return only 8 bytes of data beyond the IPv4 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 header of the packet in error, which is not enough to include the
address fields of the IPv6 header. More modern IPv4 routers may return address fields of the IPv6 header. More modern IPv4 routers may
enough data beyond the IPv4 header to include the entire IPv6 header and return enough data beyond the IPv4 header to include the entire IPv6
possibly even the data beyond that. header and possibly even the data beyond that.
If the offending packet includes enough data, the encapsulating node may If the offending packet includes enough data, the encapsulating node
extract the encapsulated IPv6 packet and use it to generating an IPv6 may extract the encapsulated IPv6 packet and use it to generating an
ICMP message directed back to the originating IPv6 node, as shown below: IPv6 ICMP message directed back to the originating IPv6 node, as
shown below:
+--------------+ +--------------+
| IPv4 Header | | IPv4 Header |
| dst = encaps | | dst = encaps |
| node | | node |
+--------------+ +--------------+
| ICMP | | ICMP |
| Header | | Header |
- - +--------------+ - - +--------------+
| IPv4 Header | | IPv4 Header |
skipping to change at page 15, line 34 skipping to change at page 13, line 7
+--------------+ IPv6 ICMP +--------------+ IPv6 ICMP
| | error message | | error message
~ Data ~ back to the source. ~ Data ~ back to the source.
| | | |
- - +--------------+ - - - - +--------------+ - -
IPv4 ICMP Error Message Returned to Encapsulating Node IPv4 ICMP Error Message Returned to Encapsulating Node
4.1.4. IPv4 Header Construction 4.1.4. IPv4 Header Construction
When encapsulating an IPv6 packet in an IPv4 datagram, the IPv4 header When encapsulating an IPv6 packet in an IPv4 datagram, the IPv4
fields are set as follows: header fields are set as follows:
Version: Version:
4 4
IP Header Length in 32-bit words: IP Header Length in 32-bit words:
5 (There are no IPv4 options in the encapsulating 5 (There are no IPv4 options in the encapsulating
header.) header.)
skipping to change at page 16, line 42 skipping to change at page 14, line 16
Calculate the checksum of the IPv4 header. Calculate the checksum of the IPv4 header.
Source Address: Source Address:
IPv4 address of outgoing interface of the IPv4 address of outgoing interface of the
encapsulating node. encapsulating node.
Destination Address: Destination Address:
IPv4 address of of tunnel endpoint. IPv4 address of tunnel endpoint.
Any IPv6 options are preserved in the packet (after the IPv6 header). Any IPv6 options are preserved in the packet (after the IPv6 header).
4.1.5. Decapsulating IPv6-in-IPv4 Packets 4.1.5. Decapsulating IPv6-in-IPv4 Packets
When an IPv6/IPv4 host or a router receives an IPv4 datagram that is When an IPv6/IPv4 host or a router receives an IPv4 datagram that is
addressed to one of its own IPv4 address, and the value of the protocol addressed to one of its own IPv4 address, and the value of the
field is 41, it removes the IPv4 header and submits the IPv6 datagram to protocol field is 41, it removes the IPv4 header and submits the IPv6
its IPv6 layer code. datagram to its IPv6 layer code.
The decapsulation is shown below: The decapsulation is shown below:
+-------------+ +-------------+
| IPv4 | | IPv4 |
| Header | | Header |
+-------------+ +-------------+ +-------------+ +-------------+
| IPv6 | | IPv6 | | IPv6 | | IPv6 |
| Header | | Header | | Header | | Header |
+-------------+ +-------------+ +-------------+ +-------------+
| Transport | | Transport | | Transport | | Transport |
| Layer | ===> | Layer | | Layer | ===> | Layer |
| Header | | Header | | Header | | Header |
+-------------+ +-------------+ +-------------+ +-------------+
| | | | | | | |
~ Data ~ ~ Data ~ ~ Data ~ ~ Data ~
| | | | | | | |
+-------------+ +-------------+ +-------------+ +-------------+
Decapsulating IPv6 from IPv4 Decapsulating IPv6 from IPv4
When decapsulating the IPv6-in-IPv4 packet, the IPv6 header is not When decapsulating the IPv6-in-IPv4 packet, the IPv6 header is not
modified. If the packet is subsequently forwarded, its hop limit is modified. If the packet is subsequently forwarded, its hop limit is
decremented by one. decremented by one.
The encapsulating IPv4 header is discarded. The encapsulating IPv4 header is discarded.
The decapsulating node performs IPv4 reassembly before decapsulating the The decapsulating node performs IPv4 reassembly before decapsulating
IPv6 packet. All IPv6 options are preserved even if the encapsulating the IPv6 packet. All IPv6 options are preserved even if the
IPv4 packet is fragmented. encapsulating IPv4 packet is fragmented.
After the IPv6 packet is decapsulated, it is processed the same as any After the IPv6 packet is decapsulated, it is processed the same as
received IPv6 packet. any received IPv6 packet.
4.2. Configured Tunneling 4.2. Configured Tunneling
In configured tunneling, the tunnel endpoint address is determined from In configured tunneling, the tunnel endpoint address is determined
configuration information in the encapsulating node. For each tunnel, from configuration information in the encapsulating node. For each
the encapsulating node must store the tunnel endpoint address. When an tunnel, the encapsulating node must store the tunnel endpoint
IPv6 packet is transmitted over a tunnel, the tunnel endpoint address address. When an IPv6 packet is transmitted over a tunnel, the
configured for that tunnel is used as the destination address for the tunnel endpoint address configured for that tunnel is used as the
encapsulating IPv4 header. destination address for the encapsulating IPv4 header.
The determination of which packets to tunnel is usually made by routing The determination of which packets to tunnel is usually made by
information on the encapsulating node. This is usually done via a routing information on the encapsulating node. This is usually done
routing table, which directs packets based on their destination address via a routing table, which directs packets based on their destination
using the prefix mask and match technique. address using the prefix mask and match technique.
4.2.1. Default Configured Tunnel 4.2.1. Default Configured Tunnel
Nodes that are connected to IPv4 routing infrastructures may use a
configured tunnel to reach an IPv6 "backbone". If the IPv4 address of
an IPv6/IPv4 router bordering the backbone is known, a tunnel can be
configured to that router. This tunnel can be configured into the
routing table as a "default route". That is, all IPv6 destination
addresses will match the route and could potentially traverse the
tunnel. Since the "mask length" of such default route is zero, it will
be used only if there are no other routes with a longer mask that match
the destination.
The tunnel endpoint address of such a default tunnel could be the IPv4 Nodes that are connected to IPv4 routing infrastructures may use a
address of one IPv6/IPv4 router at the border of the IPv6 backbone. configured tunnel to reach an IPv6 "backbone". If the IPv4 address
Alternatively, the tunnel endpoint could be an IPv4 "anycast address". of an IPv6/IPv4 router bordering the backbone is known, a tunnel can
With this approach, multiple IPv6/IPv4 routers at the border advertise be configured to that router. This tunnel can be configured into the
IPv4 reachability to the same IPv4 address. All of these routers accept routing table as a "default route". That is, all IPv6 destination
packets to this address as their own, and will decapsulate IPv6 packets addresses will match the route and could potentially traverse the
tunneled to this address. When an IPv6/IPv4 node sends an encapsulated tunnel. Since the "mask length" of such default route is zero, it
packet to this address, it will be delivered to only one of the border will be used only if there are no other routes with a longer mask
routers, but the sending node will not know which one. The IPv4 routing that match the destination.
system will generally carry the traffic to the closest router.
Using a default tunnel to an IPv4 "anycast address" provides a high The tunnel endpoint address of such a default tunnel could be the
degree of robustness since multiple border router can be provided, and, IPv4 address of one IPv6/IPv4 router at the border of the IPv6
using the normal fallback mechanisms of IPv4 routing, traffic will backbone. Alternatively, the tunnel endpoint could be an IPv4
automatically switch to another router when one goes down. "anycast address". With this approach, multiple IPv6/IPv4 routers at
the border advertise IPv4 reachability to the same IPv4 address. All
of these routers accept packets to this address as their own, and
will decapsulate IPv6 packets tunneled to this address. When an
IPv6/IPv4 node sends an encapsulated packet to this address, it will
be delivered to only one of the border routers, but the sending node
will not know which one. The IPv4 routing system will generally
carry the traffic to the closest router.
Using a default tunnel to an IPv4 "anycast address" provides a high
degree of robustness since multiple border router can be provided,
and, using the normal fallback mechanisms of IPv4 routing, traffic
will automatically switch to another router when one goes down.
4.3. Automatic Tunneling 4.3. Automatic Tunneling
In automatic tunneling, the tunnel endpoint address is determined from In automatic tunneling, the tunnel endpoint address is determined
the packet being tunneled. The destination IPv6 address in the packet from the packet being tunneled. The destination IPv6 address in the
must be an IPv4-compatible address. If it is, the IPv4 address packet must be an IPv4-compatible address. If it is, the IPv4
component of that address -- the low-order 32-bits -- are extracted and address component of that address -- the low-order 32-bits -- are
used as the tunnel endpoint address. IPv6 packets that are not extracted and used as the tunnel endpoint address. IPv6 packets that
addressed to an IPv4-compatible address can not be tunneled using are not addressed to an IPv4-compatible address can not be tunneled
automatic tunneling. using automatic tunneling.
IPv6/IPv4 nodes need to determine which IPv6 packets can be sent via IPv6/IPv4 nodes need to determine which IPv6 packets can be sent via
automatic tunneling. One technique is to use the IPv6 routing table to automatic tunneling. One technique is to use the IPv6 routing table
direct automatic tunneling. An implementation can have a special static to direct automatic tunneling. An implementation can have a special
routing table entry for the prefix 0:0:0:0:0:0/96. (That is, a route to static routing table entry for the prefix 0:0:0:0:0:0/96. (That is,
the all-zeros prefix with a 96-bit mask.) Packets that match this a route to the all-zeros prefix with a 96-bit mask.) Packets that
prefix are sent to a pseudo-interface driver which performs automatic match this prefix are sent to a pseudo-interface driver which
tunneling. Since all IPv4-compatible IPv6 addresses will match this performs automatic tunneling. Since all IPv4-compatible IPv6
prefix, all packets to those destinations will be auto-tunneled. addresses will match this prefix, all packets to those destinations
will be auto-tunneled.
4.4. Default Sending Algorithm 4.4. Default Sending Algorithm
This section presents a combined IPv4 and IPv6 sending algorithm that
IPv6/IPv4 nodes can use. The algorithm can be used to determine when to This section presents a combined IPv4 and IPv6 sending algorithm that
send IPv4 packets, when to send IPv6 packets, and when to perform IPv6/IPv4 nodes can use. The algorithm can be used to determine when
automatic and configured tunneling. It illustrates how the techniques to send IPv4 packets, when to send IPv6 packets, and when to perform
of dual IP layer, configured tunneling, and automatic tunneling can be automatic and configured tunneling. It illustrates how the
used together. The algorithm has the following properties: techniques of dual IP layer, configured tunneling, and automatic
tunneling can be used together. Note that is just an example to show
how the techniques can be combined; IPv6/IPv6 implementations may
provide different algorithms. This algorithm has the following
properties:
- Sends IPv4 packets to all IPv4 destinations. - Sends IPv4 packets to all IPv4 destinations.
- Sends IPv6 packets to all IPv6 destinations on the same link. - Sends IPv6 packets to all IPv6 destinations on the same link.
- Using automatic tunneling, sends IPv6 packets encapsulated in - Using automatic tunneling, sends IPv6 packets encapsulated in
IPv4 to IPv6 destinations with IPv4-compatible addresses that IPv4 to IPv6 destinations with IPv4-compatible addresses that
are located off-link. are located off-link.
- Sends IPv6 packets to IPv6 destinations located off-link when - Sends IPv6 packets to IPv6 destinations located off-link when
IPv6 routers are present. IPv6 routers are present.
- Using the default IPv6 tunnel, sends IPv6 packets encapsulated - Using the default IPv6 tunnel, sends IPv6 packets encapsulated
in IPv4 to IPv6 destinations with IPv6-only addresses when no in IPv4 to IPv6 destinations with IPv6-only addresses when no
IPv6 routers are present. IPv6 routers are present.
The algorithm is as follows: The algorithm is as follows:
1) If the address of the end node is an IPv4 address then: 1) If the address of the end node is an IPv4 address then:
1.1) If the destination is located on the attached link, then 1.1) If the destination is located on an attached link, then
send an IPv4 packet addressed to the end node. send an IPv4 packet addressed to the end node.
1.2) If the destination is located off-link, then; 1.2) If the destination is located off-link, then;
1.2.1) If there is an IPv4 router on link, then send an 1.2.1) If there is an IPv4 router on link, then send an
IPv4 format packet. The IPv4 destination IPv4 format packet. The IPv4 destination
address is the IPv4 address of the end node. address is the IPv4 address of the end node.
The datalink address is the datalink address of The datalink address is the datalink address of
the IPv4 router. the IPv4 router.
1.2.2) Else, the destination is treated as 1.2.2) Else, the destination is treated as
"unreachable" because it is located off link and "unreachable" because it is located off link and
there are no on-link routers. there are no on-link routers.
2) If the address of the end node is an IPv4-compatible IPv6 2) If the address of the end node is an IPv4-compatible IPv6
address (i.e. bears the prefix 0:0:0:0:0:0), then: address (i.e. bears the prefix 0:0:0:0:0:0), then:
2.1) If the destination is located on the attached link, then 2.1) If the destination is located on an attached link, then
send an IPv6 format packet (not encapsulated). The IPv6 send an IPv6 format packet (not encapsulated). The IPv6
destination address is the IPv6 address of the end node. destination address is the IPv6 address of the end node.
The datalink address is the datalink address of the end The datalink address is the datalink address of the end
node. node.
2.2) If the destination is located off-link, then: 2.2) If the destination is located off-link, then:
2.2.1) If there is an IPv4 router on the attached link, 2.2.1) If there is an IPv4 router on an attached link,
then send an IPv6 packet encapsulated in IPv4. then send an IPv6 packet encapsulated in IPv4.
The IPv6 destination address is the address of The IPv6 destination address is the address of
the end node. The IPv4 destination address is the end node. The IPv4 destination address is
the low-order 32-bits of the end node's address. the low-order 32-bits of the end node's address.
The datalink address is the datalink address of The datalink address is the datalink address of
the IPv4 router. the IPv4 router.
2.2.2) Else, if there is an IPv6 router on the attached 2.2.2) Else, if there is an IPv6 router on an attached
link, then send an IPv6 format packet. The IPv6 link, then send an IPv6 format packet. The IPv6
destination address is the IPv6 address of the destination address is the IPv6 address of the
end node. The datalink address is the datalink end node. The datalink address is the datalink
address of the IPv6 router. address of the IPv6 router.
2.2.3) Else, the destination is treated as 2.2.3) Else, the destination is treated as
"unreachable" because it is located off-link and "unreachable" because it is located off-link and
there are no on-link routers. there are no on-link routers.
3) If the address of the end node is an IPv6-only address, then: 3) If the address of the end node is an IPv6-only address, then:
3.1) If the destination is located on the attached link, then 3.1) If the destination is located on an attached link, then
send an IPv6 format packet. The IPv6 destination send an IPv6 format packet. The IPv6 destination
address is the IPv6 address of the end node. The address is the IPv6 address of the end node. The
datalink address is the datalink address of the end datalink address is the datalink address of the end
node. node.
3.2) If the destination is located off-link, then: 3.2) If the destination is located off-link, then:
2.2.1) If there is an IPv6 router on the attached link, 3.2.1) If there is an IPv6 router on an attached link,
then send an IPv6 format packet. The IPv6 then send an IPv6 format packet. The IPv6
destination address is the IPv6 address of the destination address is the IPv6 address of the
end node. The datalink address is the datalink end node. The datalink address is the datalink
address of the IPv6 router. address of the IPv6 router.
2.2.2) Else, if the destination is reachable via a 3.2.2) Else, if the destination is reachable via a
configured tunnel, and there is an IPv4 router configured tunnel, and there is an IPv4 router
on the attached link link, then send an IPv6 on an attached link, then send an IPv6
packet encapsulated in IPv4. The IPv6 packet encapsulated in IPv4. The IPv6
destination address is the address of the end destination address is the address of the end
node. The IPv4 destination address is the node. The IPv4 destination address is the
configured IPv4 address of the tunnel endpoint. configured IPv4 address of the tunnel endpoint.
The datalink address is the datalink address of The datalink address is the datalink address of
the IPv4 router. the IPv4 router.
2.2.3) Else, the destination is treated as 3.2.3) Else, the destination is treated as
"unreachable" because it is located off-link and "unreachable" because it is located off-link and
there are no on-link IPv6 routers. there are no on-link IPv6 routers.
A summary of these sending rules are given in the table below: A summary of these sending rules are given in the table below:
End | End | IPv4 | IPv6 | Packet | | | End | End | IPv4 | IPv6 | Packet | | |
Node | Node | Router | Router | Format | IPv6 | IPv4 | DLink Node | Node | Router | Router | Format | IPv6 | IPv4 | DLink
Address | On | On | On | To | Dest | Dest | Dest Address | On | On | On | To | Dest | Dest | Dest
Type | Link? | Link? | Link? | Send | Addr | Addr | Addr Type | Link? | Link? | Link? | Send | Addr | Addr | Addr
------------+---------+---------+---------+--------+------+------+------ ------------+---------+---------+---------+--------+------+------+------
skipping to change at page 22, line 51 skipping to change at page 20, line 7
R6: IPv6 address of router. R6: IPv6 address of router.
R4: IPv4 address of router. R4: IPv4 address of router.
RL: Datalink address of router. RL: Datalink address of router.
IPv4: IPv4 packet format. IPv4: IPv4 packet format.
IPv6: IPv6 packet format. IPv6: IPv6 packet format.
IPv6/4: IPv6 encapsulated in IPv4 packet format. IPv6/4: IPv6 encapsulated in IPv4 packet format.
UNRCH: Destination is unreachable. Don't send a packet. UNRCH: Destination is unreachable. Don't send a packet.
4.4.1 On/Off Link Determination 4.4.1 On/Off Link Determination
Part of the process of determining what packet format to use includes Part of the process of determining what packet format to use includes
determining whether a destination is located on an attached link or not. determining whether a destination is located on an attached link or
not. IPv4 and IPv6 employ different mechanisms. IPv4 uses an
IPv4 and IPv6 employ different mechanisms. IPv4 uses an algorithm in algorithm in which the destination address and the interface address
which the destination address and the interface address are both are both logically ANDed with the netmask of the interface and then
logically ANDed with the netmask of the interface and then compared. If compared. If the resulting two values match, then the destination is
the resulting two values match, then the destination is located on-link. located on-link. This algorithm is discussed in more detail in
This algorithm is discussed in more detail in Section 3.3.1.1 of the Section 3.3.1.1 of the host requirements specification [10]. IPv6
host requirements specification [11]. IPv6 uses the neighbor discovery uses the neighbor discovery algorithm described in "Neighbor
algorithm described in "IPv6 Neighbor Discovery -- Processing" [7]. Discovery for IP Version 6" [7].
IPv6/IPv4 nodes need to use both methods: IPv6/IPv4 nodes need to use both methods:
- If a destination is an IPv4 address, then the on/off link - If a destination is an IPv4 address, then the on/off link
determination is made by comparison with the netmask, as determination is made by comparison with the netmask, as
described in RFC 1122 section 3.3.1.1. described in RFC 1122 section 3.3.1.1.
- If a destination is represented by an IPv4-compatible IPv6 - If a destination is represented by an IPv4-compatible IPv6
address (prefix 0:0:0:0:0:0), the decision is made using the address (prefix 0:0:0:0:0:0), the decision is made using the
IPv4 netmask comparison algorithm using the low-order 32-bits IPv4 netmask comparison algorithm using the low-order 32-bits
(IPv4 address part) of the destination address. (IPv4 address part) of the destination address.
- If the destination is represented by an IPv6-only address - If the destination is represented by an IPv6-only address
(prefix other than 0:0:0:0:0:0), the on/off link determination (prefix other than 0:0:0:0:0:0), the on/off link determination
is made using the IPv6 neighbor discovery mechanism. is made using the IPv6 neighbor discovery mechanism.
5. Acknowledgements 5. Acknowledgements
We would like to thank the members of the IPng working group and the We would like to thank the members of the IPng working group and the
IPng transition working group for their many contributions and extensive IPng transition working group for their many contributions and
review of this document. Special thanks to Jim Bound, Ross Callon, and extensive review of this document. Special thanks to Jim Bound, Ross
Bob Hinden for many helpful suggestions and to John Moy for suggesting Callon, and Bob Hinden for many helpful suggestions and to John Moy
the IPv4 "anycast address" default tunnel technique. for suggesting the IPv4 "anycast address" default tunnel technique.
6. Authors' Address 6. Security Considerations
Robert E. Gilligan Security issues are not discussed in this memo.
Sun Microsystems, Inc.
2550 Garcia Ave.
Mailstop UMTV 05-44
Mountain View, California 94043
415-336-1012 (voice) 7. Authors' Addresses
415-336-6015 (fax)
Bob.Gilligan@Eng.Sun.COM Robert E. Gilligan
Sun Microsystems, Inc.
2550 Garcia Ave.
Mailstop UMTV 05-44
Mountain View, California 94043
Erik Nordmark Phone: 415-336-1012
Sun Microsystems, Inc. Fax: 415-336-6015
2550 Garcia Ave. EMail: Bob.Gilligan@Eng.Sun.COM
Mailstop UMTV 05-44
Mountain View, California 94043
415-336-2788 (voice) Erik Nordmark
415-336-6015 (fax) Sun Microsystems, Inc.
2550 Garcia Ave.
Mailstop UMTV 05-44
Mountain View, California 94043
Erik.Nordmark@Eng.Sun.COM Phone: 415-336-2788
Fax: 415-336-6015
EMail: Erik.Nordmark@Eng.Sun.COM
7. References 7. References
[1] W. Croft, J. Gilmore. "Bootstrap Protocol". RFC 951. [1] Croft, W., and J. Gilmore, "Bootstrap Protocol", RFC 951,
September 1985. September 1985.
[2] R. Droms. "Dynamic Host Configuration Protocol". RFC 1541.
October 1993.
[3] J. Bound, Y. Rekhter, Sue Thompson. "Dynamic Host Configuration
Protocol for IPv6". Internet Draft
<draft-ietf-dhc-dhcpv6-00.txt>. February 1995.
[4] S. Deering, R. Hinden. "Internet Protocol, Version 6 (IPv6) [2] Droms, R., "Dynamic Host Configuration Protocol", RFC 1541.
Specification". Internet Draft October 1993.
<draft-ietf-ipngwg-ipv6-spec-01.txt>, March 1995.
[5] S. Thompson, IPv6 Stateless Address Autoconfiguration, Internet [3] Bound, J., "Dynamic Host Configuration Protocol for IPv6 for IPv6
Draft <draft-ietf-addrconf-ipv6-auto-01.txt>, March 1995. (DHCPv6)", Work in Progress, November 1995.
[6] S. Thompson, C. Huitema. "DNS Extensions to support IP version [4] Deering, S., and R. Hinden, "Internet Protocol, Version 6 (IPv6)
6". Internet Draft <draft-ietf-ipngwg-dns-00.txt>, March 1995. Specification", RFC 1883, December 1995.
[7] W. A. Simpson. "IPv6 Neighbor Discovery -- Processing". [5] Thomson, S., and T. Nartan, "IPv6 Stateless Address
Internet Draft <draft-simpson-ipv6-discov-process-02.txt>. Autoconfiguration, Work in Progress, December 1995.
February 1995.
[8] J. Mogul, S. Deering. "Path MTU Discovery". RFC 1191. November [6] Thomson, S., and C. Huitema. "DNS Extensions to support IP
1990. version 6", RFC 1886, December 1995.
[9] R. Finlayson, T. Mann, J. Mogul, M. Theimer. "Reverse Address [7] Nartan, T., Nordmark, E., and W. Simpson, "Neighbor Discovery for
Resolution Protocol". RFC 903. June 1984. IP Version 6 (IPv6)", Work in Progress, November 1995.
[10] R. Braden. "Requirements for Internet Hosts - Application And [8] Mogul, J., and S. Deering, "Path MTU Discovery", RFC 1191,
Support". RFC 1123. October 1989. November 1990.
[11] R. Braden. "Requirements for Internet Hosts - Communication [9] Finlayson, R., Mann, T., Mogul, J., and M. Theimer, "Reverse
Layers". RFC 1122. October 1989. Address Resolution Protocol", RFC 903, June 1984.
[12] A. Conta, S. Deering. "ICMP for the Internet Protocol Version 6 [10] Braden, R., "Requirements for Internet Hosts - Communication
(IPv6)". Internet Draft <draft-ietf-ipngwg-icmp-01.txt>. Layers", STD 3, RFC 1122, October 1989.
February 1995.
[13] C. Kent and J. Mogul. "Fragmentation Considered Harmful". In [11] Kent, C., and J. Mogul, "Fragmentation Considered Harmful". In
Proc. SIGCOMM '87 Workshop on Frontiers in Computer Proc. SIGCOMM '87 Workshop on Frontiers in Computer
Communications Technology. August, 1987. Communications Technology. August 1987.
 End of changes. 104 change blocks. 
411 lines changed or deleted 397 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/