draft-ietf-ngtrans-trans-mech-00.txt   draft-ietf-ngtrans-trans-mech-01.txt 
Internet Engineering Task Force Robert E. Gilligan Internet Engineering Task Force Robert E. Gilligan
INTERNET-DRAFT Erik Nordmark INTERNET-DRAFT Erik Nordmark
Sun Microsystems, Inc. Sun Microsystems, Inc.
March 17, 1995 May 15, 1995
Transition Mechanisms for IPv6 Hosts and Routers Transition Mechanisms for IPv6 Hosts and Routers
<draft-ietf-ngtrans-trans-mech-00.txt> <draft-ietf-ngtrans-trans-mech-01.txt>
Abstract Abstract
This document specifies IPv4 compatibility mechanisms that can be This document specifies IPv4 compatibility mechanisms that can be
implemented by IPv6 hosts and routers. These mechanisms include implemented by IPv6 hosts and routers. These mechanisms include
providing complete implementations of both versions of the Internet providing complete implementations of both versions of the Internet
Protocol (IPv4 and IPv6), and tunneling IPv6 packets over IPv4 routing Protocol (IPv4 and IPv6), and tunneling IPv6 packets over IPv4 routing
infrastructures. They are designed to allow IPv6 nodes to maintain infrastructures. They are designed to allow IPv6 nodes to maintain
complete compatibility with IPv4, which should greatly simplify the complete compatibility with IPv4, which should greatly simplify the
deployment of IPv6 in the Internet, and facilitate the eventual deployment of IPv6 in the Internet, and facilitate the eventual
skipping to change at page 1, line 40 skipping to change at page 1, line 40
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet- Drafts as reference material time. It is inappropriate to use Internet- Drafts as reference material
or to cite them other than as ``work in progress.'' or to cite them other than as ``work in progress.''
To learn the current status of any Internet-Draft, please check the To learn the current status of any Internet-Draft, please check the
``1id-abstracts.txt'' listing contained in the Internet- Drafts Shadow ``1id-abstracts.txt'' listing contained in the Internet- Drafts Shadow
Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe), Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe),
ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim). ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).
This Internet Draft expires on September 17, 1995. This Internet Draft expires on November 15, 1995.
1. Introduction 1. Introduction
This specification defines mechanisms that IPv6 hosts and routers may The key to a successful IPv6 transition is compatibility with the large
implement to be compatible with IPv4 hosts and routers. Maintaining installed base of IPv4 hosts and routers. Maintaining compatibility
compatibility with IPv4 while deploying IPv6 will streamline the task of with IPv4 while deploying IPv6 will streamline the task of transitioning
transitioning the Internet to IPv6. the Internet to IPv6. This specification defines a set of mechanisms
that IPv6 hosts and routers may implement in order 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 utilize
IPv4 routing infrastructures. We expect that complete compatibility IPv4 routing infrastructures. We expect that most nodes in the Internet
with IPv4 will be necessary in the Internet for a long time to come, and will need such compatibility for a long time to come, and perhaps even
perhaps even indefinitely. 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 in
such environments need not use or even implement these mechanisms. 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.
skipping to change at page 7, line 34 skipping to change at page 7, line 34
own IPv4 address own IPv4 address
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
Many IPv4 implementations treat the address 127.0.0.1 as a "loopback
address" -- an address to reach services located on the local machine.
Per the host requirements specification [11], section 3.2.1.3, IPv4
packets addressed from or to the loopback address are not to be sent
onto the network; they must remain entirely within the node. IPv6/IPv4
implementations may treat the IPv4-compatible IPv6 address ::127.0.0.1
as an IPv6 loopback address. Packets with this address should also
remain entirely within the node, and not be 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" has
been defined for IPv6 addresses [6]. Since IPv6/IPv4 nodes been defined for IPv6 addresses [6]. Since IPv6/IPv4 nodes must be able
must be able to interoperate directly with both IPv4 and IPv6 nodes, to interoperate directly with both IPv4 and IPv6 nodes, they must must
they must must provide resolver libraries capable of dealing with IPv4 provide resolver libraries capable of dealing with IPv4 "A" records as
"A" records as well as IPv6 "AAAA" records.
well as IPv6 "AAAA" records.
Some sites use local host tables instead of, or in addition to, the 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 DNS. Use of host tables may be particularly useful in the very early
stages of transition before the DNS infrastructure has been converted stages of transition before the DNS infrastructure has been converted
to support AAAA records. Therefore, implementations may provide a to support AAAA records. Therefore, implementations may provide a
host table mechanism in addition to their DNS resolver. host table mechanism in addition to their DNS resolver.
Note that the local host table mechanism does not scale very well, so 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 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 host table issue can be found in section 6.1.1 of "Requirements for
skipping to change at page 10, line 29 skipping to change at page 11, line 29
- 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 its path length in order to correctly generate of the tunnel in order to process IPv6 packets forwarded into
IPv6 ICMP error messages. Since the number of tunnels that any the tunnel. Since the number of tunnels that any one host or
one host or router may be using may grow to be quite large, this router may be using may grow to be quite large, this state
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 endpoint
address is determined for automatic and configured tunneling. 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:
+-------------+ +-------------+
skipping to change at page 11, line 23 skipping to change at page 12, line 23
| 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 to
handle some more complex issues: 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 account for the tunnel in the IPv6 Hop Limit field.
- 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 a
link layer with a very large MTU (65535-20 bytes to be exact; 20 bytes link layer with a very large MTU (65535-20 bytes to be exact; 20 bytes
"extra" are needed for the encapsulating IPv4 header). The "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 big"
errors back to the source for packets that exceed this MTU. However, errors back to the source for packets that exceed this MTU. However,
such a scheme would be inefficient for two reasons: 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. unit [13].
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 tunnel,
(using IPv4 Path MTU Discovery [8] and recording the resulting path MTU using the IPv4 Path MTU Discovery Protocol [8] and recording the
in the internet layer). The IPv6 layer in the encapsulating node can resulting path MTU. The IPv6 layer in the encapsulating node can then
then view a tunnel as a link layer with an MTU equal to the IPv4 path view a tunnel as a link layer with an MTU equal to the IPv4 path MTU,
MTU, minus the size of the encapsulating IPv4 header. 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 the
case when the IPv4 path MTU would result in an IPv6 MTU less than 576 case when the IPv4 path MTU would result in an IPv6 MTU less than 576
bytes. (Any link layer used by IPv6 has to have an MTU of at least 576 bytes. (Any link layer used by IPv6 has to have an MTU of at least 576
bytes [4].) In this case the IPv6 layer has to "see" a link layer bytes [4].) In this case the IPv6 layer has to "see" a link layer
with an MTU of 576 bytes and the encapsulating node has to use IPv4 with an MTU of 576 bytes and the encapsulating node has to use IPv4
fragmentation in order to forward the 576 byte IPv6 packets. 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 determine
when to forward an IPv6 packet using IPv4 fragmentation, and when to when to forward an IPv6 packet that is larger than the tunnel's path MTU
return an IPv6 ICMP "packet too big" message: using IPv4 fragmentation, and when to return an IPv6 ICMP "packet too
big" message:
if (IPv4 path MTU - 20) is less than 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.
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. the encapsulating node or by some router along
the IPv4 path.
endif endif
else else
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.
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 the
expense of additional fragmentation in the network, avoid using the IPv4 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 Path MTU algorithm across the tunnel and instead use the MTU of the link
skipping to change at page 12, line 50 skipping to change at page 14, line 4
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 the
expense of additional fragmentation in the network, avoid using the IPv4 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 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. 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 encapsulating
IPv4 header. IPv4 header.
4.1.2. Hop Limit 4.1.2. Hop Limit
The IPv4 hops of an IPv6-over-IPv4 tunnel can be accounted for in one of IPv6-over-IPv4 tunnels are modeled as "single-hop". That is, the IPv6
two ways: hop limit is decremented by 1 when an IPv6 packet traverses the tunnel.
The single-hop model serves to hide the existence of a tunnel. The
1) Each of the "hops" that an encapsulated IPv6 datagram takes tunnel is opaque to users of the network, and is not detectable by
through IPv4 routers can be reflected in the IPv6 hop limit network diagnostic tools such as traceroute.
field. For example, if the IPv4 path length of a tunnel is 5
hops, the IPv6 "hop limit" field is decremented by 5 when an
IPv6 packet travels through the tunnel. We use the term
"multi-hop" to describe tunnels that use this model.
2) The tunnel can be modeled as consuming only one IPv6 hop
independent of its IPv4 path length. That is, the IPv6 hop
limit is decremented only by 1 when an IPv6 packet traverses the
tunnel. We use the term "single-hop" to describe tunnels that
use this model.
These two models can be used to achieve different objectives. The
multi-hop model can be useful to enforce the scope limitations imposed
by the sender of the IPv6 datagram. It also makes the tunnel
"traceroute detectable": by sending IPv6 packets with hop limit values
that will cause them to "expire" within the tunnel, network management
programs like "traceroute" can locate tunnels and determine their path
length. Such programs can not determine the addresses of the IPv4
routers within the tunnel, however.
The single-hop model is useful if the administrator wishes to hide the
existence of a tunnel. Since a single-hop tunnel only "consumes" one
IPv6 hop, it is not detectable by programs like traceroute.
The multi-hop model can be implemented by having the encapsulating node
copy the IPv6 hop limit into the IPv4 TTL field when it composes the
encapsulating packet, and having the decapsulating node copy the IPv4
TTL field back into the IPv6 hop limit field.
The single-hop model is implemented by having the encapsulating node
select the IPv4 TTL independently of the IPv6 hop limit, and the
decapsulating node not copying the IPv4 TTL into the the hop limit
field.
Implementations may provide either model or both. Implementations that
provide both models may wish to give administrators the ability to
configure which model is used for each tunnel.
If implementations provide configurability, it is important that both
ends of the tunnel -- the encapsulating and decapsulating nodes -- are
configured to use the same model. If the tunnel endpoints are
configured differently, packets could end up with an incorrect IPv6 hop
limit.
No serious problems would result if the encapsulating node were
configured to use the multi-hop model, but the decapsulating node was
configured to use the single-hop model. The results would the same as
if both ends were configured to use the single-hop model. However, two
failure modes can occur if the encapsulating node is configured to use
the single-hop model and the decapsulating node is configured to use the
multi-hop model:
- The IPv6 packet exits the tunnel with a larger hop limit than it
had when entering the tunnel. This would occur if the amount of
IPv4 TTL remaining when the packet reached the decapsulating
node was larger than the IPv6 hop count. This failure can be
thought of as the IPv6 packet "gaining hop limit" when passing
through the tunnel.
- The number of IPv6 hops "consumed" in passing through the tunnel
is more than IPv4 path length of the tunnel. This would occur
if the difference between the IPv6 hop limit in the packet and
the remaining IPv4 TTL was greater than the IPv4 path length of
the tunnel. This failure can be thought of as the IPv6 packet
"loosing too much hop limit" when passing through the tunnel.
Note that in both of these cases, the original IPv6 hop limit is lost.
Its value after transiting the tunnel is related only to the IPv4 TTL
selected by the encapsulating node, which is not related to the hop
limit in the IPv6 packet.
Of the two potential failure modes above, the first is more serious
since it could cause a packet to "live forever". A routing loop which
sent IPv6 packets through such a tunnel could cause an infinite cycle of
packets, for example. The second failure mode would cause packets to
expire prematurely.
The decapsulating node can implement a simple algorithm to prevent the
"gaining hop count" problem. This algorithm does not prevent the second
problem. This algorithm is implemented as part of the process of
decapsulating the IPv6 packet:
- If the tunnel is configured to use the "single-hop" model, do
not modify the IPv6 hop limit field.
- If the tunnel is configured to use the "multi-hop" model, then:
- If the IPv4 TTL field is greater than or equal to the
IPv6 hop limit field, do not modify the IPv6 hop limit
field.
- Else, copy the IPv4 TTL field into the IPv6 hop limit
field.
It is an open issue whether the "loosing too much hop count" problem is
serious enough to require that a solution be developed.
Note that the decision about whether to copy the IPv4 TTL field into the The single-hop model is implemented by having the encapsulating and
hop limit field does not affect the requirement to decrement the hop decapsulating nodes process the IPv6 hop limit field as they would if
limit field; If the encapsulating or decapsulating node is an IPv6 they were forwarding a packet on to any other datalink. That is, they
router that forwards the packet, it must decrement the IPv6 hop count. decrement the hop limit by 1 when forwarding an IPv6 packet. (The
originating node and final destination do not decrement the hop limit.)
Note also that the hop limit problem affects only configured tunnels. The TTL of the encapsulating IPv4 header is selected in an
Automatic tunnels terminate at the end node, where the packet is implementation dependent manner. The current suggested value is
consumed, not forwarded, so the remaining hop limit is irrelevant. published in the "Assigned Numbers RFC. Implementations may provide 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
The encapsulating node has to be able to handle IPv4 ICMP errors that In response to encapsulated packets it has sent into the tunnel, the
are generated by routers interior to the tunnel. All such errors are encapsulating node may receive IPv4 ICMP error messages from IPv4
returned to the encapsulating node since the encapsulating node is the routers inside the tunnel. These packets are addressed to the
IPv4 source of the packets. encapsulating node because it is the IPv4 source of the encapsulated
packet.
Ideally the encapsulating node would want to convert these errors to
IPv6 ICMP errors and send them back to the source of the original IPv6
datagram. However, this in infeasible since the IPv4 ICMP errors may
not return enough of the "offending packet". Many IPv4 implementations
only return the IPv4 header plus 8 bytes of the IPv4 payload, which will
not even contain the complete IPv6 header, let alone enough higher level
headers for the originating node to determine which application
originated the packet that experienced the error.
For the purpose of this discussion there are two categories of errors:
1) ICMP errors that are needed to maintain connectivity. Only ICMP
"packet too big" falls in this category; a persistent loss of
ICMP "packet too big" message would result in a black hole for
large packets.
2) ICMP errors that are needed by network management tools like
traceroute. These errors include ICMP unreachable and ICMP TTL
expired.
The ICMP "packet too big" errors are handled according to IPv4 Path MTU
Discovery [8] 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
4.1.1.
The other errors can be handled as described in the remainder of this
section to make multi-hop tunnels be "traceroute detectable." Making a
tunnel traceroute detectable is implemented by having the encapsulating
node maintain "soft state" information about the tunnel. This state is
created based on the IPv4 ICMP errors that are received in response to
encapsulated packets. When the encapsulating node prepares to send an
IPv6 packet into a tunnel, it consults the tunnel state to determine if
the packet is likely to generate an ICMP error inside the tunnel. If
so, it generates an appropriate IPv6 ICMP error, which it sends back to
the source of the IPv6 packet. It also encapsulates the packet and
sends it into the tunnel. The latter is needed to quickly recover from
transient error conditions.
Note that, since the IPv6 ICMP error message originates at the
encapsulating node, not at the IPv4 router within the tunnel, the node
that sent the original IPv6 packet does not receive the address of the
IPv4 router. Thus a traceroute program may not determine the addresses
of the IPv4 routers within a tunnel, but it may detect their presence by
noting that a packets with a consecutive range of hop limits expire at
the same router (the encapsulating router).
Tunnel state information is associated with the IPv4 address of the
endpoint of the tunnel and can include:
- The MTU of the Tunnel. Its use is described in section 4.1.1.
- Reachability of the endpoint of the tunnel.
- If the endpoint of the tunnel is unreachable, the IPv4 address
of the router reporting unreachability.
- Path length of the tunnel (number of IPv4 hops to the endpoint).
- For each TTL 't' between 1 and the path length of the tunnel,
the IPv4 address of the router that was last known to be 't'
hops into the tunnel.
Maintaining the IPv4 addresses of the routers internal to the tunnel is
not strictly necessary for correct operation, but is useful for network
management.
The tunnel state does not have to be allocated until an ICMP error is
received. In the absence of tunnel state, the tunnel MTU can be assumed
to be the MTU of the outgoing interface, the path length one hop and the
endpoint being reachable.
When the encapsulating node receives an IPv4 ICMP error where the
"offending packet" is an IPv6-in-IPv4 packet (i.e. an IPv4 packet with
an IP protocol field of 41), the encapsulating node updates the tunnel
state associated with the IPv4 destination in the "offending packet".
The update depends on the type of ICMP error:
- Host or network unreachable: Mark the tunnel endpoint as
unreachable and record the source of the ICMP error as the
source of unreachability.
- Time exceeded in transit: The TTL "consumed" before reaching the
router that sent the time exceeded message is extracted from the
IPv6 hop limit field in the "offending packet" (the IPv6 hop
limit field is in the first 8 bytes of the IPv6 header thus it
will be returned in the ICMP packet). Compute the updated tunnel
path length as the maximum of the currently recorded path length
and the extracted IPv6 hop limit. Record the source of the ICMP
error as the router at 'IPv6 hop limit' hops into the tunnel.
- "Packet too big": Use the IPv4 Path MTU Discovery [8]
algorithm to update the tunnel MTU.
- For all other ICMP errors log a network management event.
When the encapsulating node prepares to forward an IPv6 packet into the
tunnel it performs the following checks against the tunnel state:
- If the tunnel endpoint is unreachable, it generates an IPv6 ICMP
"destination unreachable" message.
- If the hop limit is less than the recorded tunnel TTL, it The ICMP "packet too big" error messages are handled according to IPv4
generates an IPv6 ICMP "time exceeded" message. Path MTU Discovery [8] 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 4.1.1.
- If the packet would violate the tunnel MTU, generate an IPv6 The handling of other types of ICMP error messages depends on how much
ICMP "packet too big" message, as specified in section 4.1.1. information is included in the "packet in error" field, which holds the
encapsulated packet that caused the error.
The IPv6 ICMP error message is sent back to the source of the IPv6 Many older IPv4 routers return only 8 bytes of data beyond the IPv4
packet, and includes as much of the original IPv6 packet as will fit. header of the packet in error, which is not enough to include the
The source IPv6 address of the ICMP message is that of the encapsulating address fields of the IPv6 header. More modern IPv4 routers may return
node. That original IPv6 packet is also forwarded into the tunnel. enough data beyond the IPv4 header to include the entire IPv6 header and
possibly even the data beyond that.
The algorithm as described above quickly returns IPv6 ICMP errors as a If the offending packet includes enough data, the encapsulating node may
result of IPv4 ICMP errors from inside the tunnel. In order to determine
when the error condition is lifted, it relies on:
- A timeout. All tunnel state, except the tunnel MTU, should be extract the encapsulated IPv6 packet and use it to generating an IPv6
discarded after at most 30 seconds after it was created. If the ICMP message directed back to the originating IPv6 node, as shown below:
error condition still exists and packets continue to flow
through that tunnel, IPv4 ICMP errors will continue to arrive
and they will cause a refresh of the tunnel state.
The tunnel MTU is timed out as described in IPv4 Path MTU +--------------+
Discovery [8]. | 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.
| |
- - +--------------+ - -
- Data packets are always sent into the tunnel, even when the IPv4 ICMP Error Message Returned to Encapsulating Node
encapsulating node generates an IPv6 ICMP error message. This
means that packets will get through as soon as the error
condition within the tunnel is relieved, although error reports
may continue for a short period thereafter.
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 header
fields are set as follows: fields are set as follows:
Version: Version:
4 4
skipping to change at page 19, line 9 skipping to change at page 16, line 25
Set the Don't Fragment (DF) flag as specified in Set the Don't Fragment (DF) flag as specified in
section 4.1.1. Set the More Fragments (MF) bit as section 4.1.1. Set the More Fragments (MF) bit as
necessary if fragmenting. necessary if fragmenting.
Fragment offset: Fragment offset:
Set as necessary if fragmenting. Set as necessary if fragmenting.
Time to Live: Time to Live:
If tunnel is configured as multi-hop: Set in implementation-specific manner.
Copied from the IPv6 hop limit field.
If tunnel is configured as single-hop:
Set to pre-configured value.
Protocol: Protocol:
41 (Assigned payload type number for IPv6) 41 (Assigned payload type number for IPv6)
Header Checksum: Header Checksum:
Calculate the checksum of the IPv4 header. Calculate the checksum of the IPv4 header.
Source Address: Source Address:
skipping to change at page 20, line 23 skipping to change at page 17, line 25
| 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, only the hop limit field of When decapsulating the IPv6-in-IPv4 packet, the IPv6 header is not
the IPv6 header is modified: modified. If the packet is subsequently forwarded, its hop limit is
decremented by one.
If tunnel is configured as single-hop:
Do not modify the IPv6 hop limit field.
If tunnel is configured as multi-hop:
If the IPv4 TTL field is greater than or equal to the
IPv6 hop limit field, do not modify the IPv6 hop limit
field. Else, copy the IPv4 TTL field into the IPv6 hop
limit field.
Then the encapsulating IPv4 header is discarded. The encapsulating IPv4 header is discarded.
Note that the decapsulating node performs IPv4 reassembly before The decapsulating node performs IPv4 reassembly before decapsulating the
decapsulating the IPv6 packet. All IPv6 options are preserved even if IPv6 packet. All IPv6 options are preserved even if the encapsulating
the encapsulated IPv4 packet is fragmented. IPv4 packet is fragmented.
After the IPv6 packet is decapsulated, it is treated the same as any After the IPv6 packet is decapsulated, it is processed the same as any
received IPv6 packet. 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 from
configuration information in the encapsulating node. For each tunnel, configuration information in the encapsulating node. For each tunnel,
the encapsulating node must store the tunnel endpoint address. When an the encapsulating node must store the tunnel endpoint address. When an
IPv6 packet is transmitted over a tunnel, the tunnel endpoint address IPv6 packet is transmitted over a tunnel, the tunnel endpoint address
configured for that tunnel is used as the destination address for the configured for that tunnel is used as the destination address for the
encapsulating IPv4 header. 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 routing
information on the encapsulating node. This is usually done via a information on the encapsulating node. This is usually done via a
routing table, which directs packets based on their destination address routing table, which directs packets based on their destination address
using the prefix mask and match technique. 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 Nodes that are connected to IPv4 routing infrastructures may use a
skipping to change at page 21, line 18 skipping to change at page 18, line 9
information on the encapsulating node. This is usually done via a information on the encapsulating node. This is usually done via a
routing table, which directs packets based on their destination address routing table, which directs packets based on their destination address
using the prefix mask and match technique. 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 Nodes that are connected to IPv4 routing infrastructures may use a
configured tunnel to reach an IPv6 "backbone". If the IPv4 address of 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 an IPv6/IPv4 router bordering the backbone is known, a tunnel can be
configured to that router. This tunnel can be configured into the configured to that router. This tunnel can be configured into the
routing table as a "default route". That is, all destinations will routing table as a "default route". That is, all IPv6 destination
match the route and could potentially traverse the tunnel. Since the addresses will match the route and could potentially traverse the
"mask length" of such default route is zero, it will be used only if tunnel. Since the "mask length" of such default route is zero, it will
there are no other routes with a longer mask that match the destination. 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 The tunnel endpoint address of such a default tunnel could be the IPv4
address of one IPv6/IPv4 router at the border of the IPv6 backbone. address of one IPv6/IPv4 router at the border of the IPv6 backbone.
Alternatively, the tunnel endpoint could be an IPv4 "logical address". Alternatively, the tunnel endpoint could be an IPv4 "anycast address".
With this approach, multiple IPv6/IPv4 routers at the border advertise With this approach, multiple IPv6/IPv4 routers at the border advertise
IPv4 reachability to the same IPv4 logical address. All of these IPv4 reachability to the same IPv4 address. All of these routers accept
routers accept packets to this address as their own, and will packets to this address as their own, and will decapsulate IPv6 packets
decapsulate IPv6 packets tunneled to this address. This logical address tunneled to this address. When an IPv6/IPv4 node sends an encapsulated
operates something like an "anycast address": When an IPv6/IPv4 node packet to this address, it will be delivered to only one of the border
send an encapsulated packet to this address, it will be delivered to routers, but the sending node will not know which one. The IPv4 routing
only one of border routers, but the sending node will not know which system will generally carry the traffic to the closest router.
one. The IPv4 routing system will generally carry the traffic to the
closest router.
Using a default tunnel to a logical IPv4 address provides a high degree Using a default tunnel to an IPv4 "anycast address" provides a high
of robustness since multiple border router can be provided, and traffic degree of robustness since multiple border router can be provided, and,
will automatically switch to another router when one goes down. 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 from
the packet being tunneled. The destination IPv6 address in the packet the packet being tunneled. The destination IPv6 address in the packet
must be an IPv4-compatible address. If it is, the IPv4 address must be an IPv4-compatible address. If it is, the IPv4 address
component of that address -- the low-order 32-bits -- are extracted and component of that address -- the low-order 32-bits -- are extracted and
used as the tunnel endpoint address. IPv6 packets that are not used as the tunnel endpoint address. IPv6 packets that are not
addressed to an IPv4-compatible address can not be tunneled using addressed to an IPv4-compatible address can not be tunneled using
automatic tunneling. automatic tunneling.
The determination of which packets to automatically tunnel can be made IPv6/IPv4 nodes need to determine which IPv6 packets can be sent via
by routing table information. This can be configured in the routing automatic tunneling. One technique is to use the IPv6 routing table to
table as route to the prefix 0:0:0:0:0:0:0:0/96. That is, a route to direct automatic tunneling. An implementation can have a special static
routing table entry for the prefix 0:0:0:0:0:0/96. (That is, a route to
the all-zeros prefix with a 96-bit mask. Packets to all destinations the all-zeros prefix with a 96-bit mask.) Packets that match this
bearing the all-zeros 96-bit prefix can be sent via automatic tunneling. prefix are sent to a pseudo-interface driver which performs automatic
tunneling. Since all IPv4-compatible IPv6 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 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 IPv6/IPv4 nodes can use. The algorithm can be used to determine when to
send IPv4 packets, when to send IPv6 packets, and when to perform send IPv4 packets, when to send IPv6 packets, and when to perform
automatic and configured tunneling. It illustrates how the techniques automatic and configured tunneling. It illustrates how the techniques
of dual IP layer, configured tunneling, and automatic tunneling can be of dual IP layer, configured tunneling, and automatic tunneling can be
used together. The algorithm has the following properties: used together. The algorithm has the following properties:
skipping to change at page 25, line 52 skipping to change at page 22, line 52
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 determining whether a destination is located on an attached link or not.
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 document "Requirements for Internet Hosts -- host requirements specification [11]. IPv6 uses the neighbor discovery
Communications Layers" [11]. IPv6 uses the neighbor discovery
algorithm described in "IPv6 Neighbor Discovery -- Processing" [7]. algorithm described in "IPv6 Neighbor Discovery -- Processing" [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 extensive review of this IPng transition working group for their many contributions and extensive
document. review of this document. Special thanks to Jim Bound, Ross Callon, and
Bob Hinden for many helpful suggestions and to John Moy for suggesting
The IPv4 "logical address" default tunnel technique was originally the IPv4 "anycast address" default tunnel technique.
suggested by John Moy.
6. Authors' Address 6. Authors' Address
Robert E. Gilligan Robert E. Gilligan
Sun Microsystems, Inc. Sun Microsystems, Inc.
2550 Garcia Ave. 2550 Garcia Ave.
Mailstop UMTV 05-44 Mailstop UMTV 05-44
Mountain View, California 94043 Mountain View, California 94043
415-336-1012 (voice) 415-336-1012 (voice)
skipping to change at page 27, line 46 skipping to change at page 24, line 45
Erik.Nordmark@Eng.Sun.COM Erik.Nordmark@Eng.Sun.COM
7. References 7. References
[1] W. Croft, J. Gilmore. "Bootstrap Protocol". RFC 951. [1] W. Croft, J. Gilmore. "Bootstrap Protocol". RFC 951.
September 1985. September 1985.
[2] R. Droms. "Dynamic Host Configuration Protocol". RFC 1541. [2] R. Droms. "Dynamic Host Configuration Protocol". RFC 1541.
October 1993. October 1993.
[3] J. Bound, Y. Rekhter, Sue Thompson. "Dynamic Host [3] J. Bound, Y. Rekhter, Sue Thompson. "Dynamic Host Configuration
Configuration Protocol for IPv6". Internet Draft Protocol for IPv6". Internet Draft
<draft-ietf-dhc-dhcpv6-00.txt>. February 1995. <draft-ietf-dhc-dhcpv6-00.txt>. February 1995.
[4] R. Hinden. "Internet Protocol, Version 6 (IPv6) [4] S. Deering, R. Hinden. "Internet Protocol, Version 6 (IPv6)
Specification". Internet Draft Specification". Internet Draft
<draft-hinden-ipng-ipv6-spec-00.txt>. October 1994. <draft-ietf-ipngwg-ipv6-spec-01.txt>, March 1995.
[5] IPv6 Address Configuration. Internet Draft to be written. [5] S. Thompson, IPv6 Stateless Address Autoconfiguration, Internet
Draft <draft-ietf-addrconf-ipv6-auto-01.txt>, March 1995.
[6] S. Thompson, C. Huitema. "DNS Extensions to support IP version [6] S. Thompson, C. Huitema. "DNS Extensions to support IP version
6". Internet Draft <draft-thomson-ipng-dns-00.txt>. October 6". Internet Draft <draft-ietf-ipngwg-dns-00.txt>, March 1995.
1994.
[7] W. A. Simpson. "IPv6 Neighbor Discovery -- Processing". [7] W. A. Simpson. "IPv6 Neighbor Discovery -- Processing".
Internet Draft <draft-simpson-ipv6-discov-process-00.txt>. Internet Draft <draft-simpson-ipv6-discov-process-02.txt>.
October 1994. February 1995.
[8] J. Mogul, S. Deering. "Path MTU Discovery". RFC 1191. [8] J. Mogul, S. Deering. "Path MTU Discovery". RFC 1191. November
November 1990. 1990.
[9] R. Finlayson, T. Mann, J. Mogul, M. Theimer. "Reverse Address [9] R. Finlayson, T. Mann, J. Mogul, M. Theimer. "Reverse Address
Resolution Protocol". RFC 903. June 1984. Resolution Protocol". RFC 903. June 1984.
[10] R. Braden. "Requirements for Internet Hosts - Application And [10] R. Braden. "Requirements for Internet Hosts - Application And
Support". RFC 1123. October 1989. Support". RFC 1123. October 1989.
[11] R. Braden. "Requirements for Internet Hosts - Communication [11] R. Braden. "Requirements for Internet Hosts - Communication
Layers". RFC 1122. October 1989. Layers". RFC 1122. October 1989.
[12] A. Conta, S. Deering. "ICMP for the Internet Protocol Version 6 [12] A. Conta, S. Deering. "ICMP for the Internet Protocol Version 6
(IPv6)". Internet Draft <draft-ietf-ipngwg-icmp-01.txt>. (IPv6)". Internet Draft <draft-ietf-ipngwg-icmp-01.txt>.
February 1995. February 1995.
[13] C. Kent and J. Mogul. "Fragmentation Considered Harmful". In
Proc. SIGCOMM '87 Workshop on Frontiers in Computer
Communications Technology. August, 1987.
 End of changes. 

This html diff was produced by rfcdiff 1.25, available from http://www.levkowetz.com/ietf/tools/rfcdiff/