<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>

<?rfc rfcedstyle="yes" ?>
<?rfc subcompact="no" ?>
<?rfc tocdepth="3" ?>

<rfc number="4943" category="info">

<front>

<title abbrev="On-Link Assumption Harmful">
IPv6 Neighbor Discovery On-Link Assumption Considered Harmful
</title>
<author initials="S" surname="Roy" fullname="Sebastien Roy">
	<organization>Sun Microsystems, Inc.</organization>
	<address>
		<postal>
			<street>1 Network Drive</street>
			<street>UBUR02-212</street>
			<city>Burlington</city>
			<region>MA</region>
			<code>01803</code>
		</postal>
		<email>sebastien.roy@sun.com</email>
        </address>
</author>
<author initials="A" surname="Durand" fullname="Alain Durand">
	<organization>Comcast</organization>
	<address>
		<postal>
			<street>1500 Market Street</street>
			<city>Philadelphia</city>
			<region>PA</region>
			<code>19102</code>
		</postal>
                <email>alain_durand@cable.comcast.com</email>
        </address>
</author>
<author initials="J" surname="Paugh" fullname="James Paugh">
	<organization>Nominum, Inc.</organization>
	<address>
		<postal>
			<street>2385 Bay Road</street>
			<city>Redwood City</city>
			<region>CA</region>
			<code>94063</code>
		</postal>
        	<email>jim.paugh@nominum.com</email>
        </address>
</author>

<date month="September" year="2007"/>

<abstract>

<t>This document describes the historical and background information behind
the removal of the "on-link assumption" from the conceptual host sending
algorithm defined in Neighbor Discovery for IP Version 6 (IPv6).  According
to the algorithm as originally described, when a host's default router list
is empty, the host assumes that all destinations are on-link.  This is
particularly problematic with IPv6-capable nodes that do not have off-link
IPv6 connectivity (e.g., no default router).  This document describes how
making this assumption causes problems and how these problems
outweigh the benefits of this part of the conceptual sending algorithm.</t>

</abstract>

</front>

<middle>

<section title="Introduction">

<t>Neighbor Discovery for IPv6 <xref target="RFC4861"/>
defines a conceptual sending algorithm for hosts.  The version of the
algorithm described in <xref target="RFC2461"/> states that if a host's
default router list is empty, then the host assumes that all destinations
are on-link.  This memo documents the removal of this assumption in the
updated Neighbor Discovery specification <xref
target="RFC4861"/> and describes the reasons why this
assumption was removed.</t>

<t>This assumption is problematic with IPv6-capable nodes that do not have
off-link IPv6 connectivity.  This is typical when systems that have IPv6
enabled on their network interfaces (either on by default or
administratively configured that way) are attached to networks that have no
IPv6 services such as off-link routing.  Such systems will resolve DNS names
to AAAA and A records, and they may attempt to connect to unreachable IPv6
off-link nodes.</t>

<t>The on-link assumption creates problems for destination address selection
as defined in <xref target="RFC3484"/>, and it adds connection delays
associated with unnecessary address resolution and neighbor unreachability
detection.  The behavior associated with the assumption is undefined on
multi-interface nodes and has some subtle security implications.  All of
these issues are discussed in this document.</t>

</section>

<section anchor="background" title="Background on the On-link Assumption">

<t>This part of Neighbor Discovery's <xref target="RFC2461"/> conceptual
sending algorithm was created to facilitate communication on a single link
between systems configured with different global prefixes in the absence of
an IPv6 router.  For example, consider the case where two systems on
separate links are manually configured with global addresses and are then
plugged in back-to-back.  They can still communicate with each other via
their global addresses because they'll correctly assume that each is
on-link.</t>

<t>Without the on-link assumption, the above scenario wouldn't work, and the
systems would need to be configured to share a common prefix such as the
link-local prefix.  On the other hand, the on-link assumption introduces
several problems to various parts of the networking stack described in <xref
target="problems"/>.  As such, this document points out that the problems
introduced by the on-link assumption outweigh the benefit that the
assumption lends to this scenario.  It is more beneficial to the end user to
remove the on-link assumption from Neighbor Discovery and declare this
scenario illegitimate (or a misconfiguration).</t>

</section>

<section anchor="problems" title="Problems">

<t>The on-link assumption causes the following problems.</t>

<section anchor="firstrule" title="First Rule of Destination Address Selection">

<t>Default Address Selection for IPv6 <xref target="RFC3484"/> defines a
destination address selection algorithm that takes an unordered list of
destination addresses as input and produces a sorted list of destination
addresses as output.  The algorithm consists of destination address sorting
rules, the first of which is "Avoid unusable destinations".  The idea behind
this rule is to place unreachable destinations at the end of the sorted list
so that applications will be least likely to try to communicate with those
addresses first.</t>

<t>The on-link assumption could potentially cause false positives when
attempting unreachability determination for this rule.  On a network where
there is no IPv6 router (all off-link IPv6 destinations are unreachable),
the on-link assumption states that destinations are assumed to be on-link.
An implementation could interpret that as, if the default router list is
empty, then all destinations are reachable on-link.  This may cause the rule
to prefer an unreachable IPv6 destination over a reachable IPv4
destination.</t>

</section>

<section title="Delays Associated with Address Resolution">

<t>Users expect that applications quickly connect to a given destination
regardless of the number of IP addresses assigned to that destination.  If a
destination name resolves to multiple addresses and the application attempts
to communicate to each address until one succeeds, this process shouldn't
take an unreasonable amount of time.  It is therefore important that the
system quickly determine if IPv6 destinations are unreachable so that the
application can try other destinations when those IPv6 destinations are
unreachable.</t>

<t>For an IPv6-enabled host deployed on a network that has no IPv6 routers,
the result of the on-link assumption is that link-layer address resolution
must be performed on all IPv6 addresses to which the host sends packets.
The application will not receive acknowledgment of the unreachability of
destinations that are not on-link until at least address resolution has
failed, which is no less than 3 seconds (MAX_MULTICAST_SOLICIT *
RETRANS_TIMER).  This is greatly amplified by transport protocol delays.
For example, <xref target="RFC1122"/> Section 4.2.3.5 requires that TCP
retransmit for at least 3 minutes before aborting the connection
attempt.</t>

<?rfc needLines="5"?>
<t>When the application has a large list of off-link unreachable IPv6
addresses followed by at least one reachable IPv4 address, the delay
associated with Neighbor Unreachability Detection (NUD) of each IPv6
address before successful communication with the IPv4 address is
unacceptable.</t>

</section>

<section anchor="multi-interface" title="Multi-interface Ambiguity">

<t>There is no defined way to implement this aspect of the sending algorithm
on a node that is attached to multiple links.  Specifically, a problem
arises when a node is faced with sending a packet to an IPv6 destination
address to which it has no route, and the sending node is attached to
multiple links.  With the on-link assumption, this node assumes that the
destination is on-link, but on which link?  From an implementor's point of
view, there are three ways to handle sending an IPv6 packet to a destination
in the face of the on-link assumption on a multi-interface node:

<list style="numbers">
	<t>Attempt to send the packet on a single link (either
	administratively pre-defined or using some algorithm).</t>

	<t>Attempt to send the packet on every link.</t>

	<t>Drop the packet.</t>
</list>

If the destination is indeed on-link, the first option might not succeed
since the wrong link could be picked.  The second option might succeed in
reaching the destination but is more complex to implement and isn't
guaranteed to pick the correct destination.  For example, there could be
more than one node configured with the same address, each reachable through
a different link.  The address by itself does not disambiguate which
destination the sender actually wanted to reach, so attempting to send the
packet to every link is not guaranteed to reach the anticipated destination.

The third option, dropping the packet, is equivalent to not making the
on-link assumption at all.  In other words, if there is no route to the
destination, don't attempt to send the packet.  An implementation that
behaves this way would require an administrator to configure routes to the
destination in order to have reachability to the destination, thus
eliminating the ambiguity.</t>

</section>

<section anchor="secissues" title="Security-Related Issues">

<t>The on-link assumption discussed here introduces a security vulnerability
to the Neighbor Discovery protocol described in Section 4.2.2 of IPv6
Neighbor Discovery Trust Models and Threats <xref target="RFC3756"/> titled
"Default router is 'killed'".  There is a threat that a host's router can be
maliciously killed in order to cause the host to start sending all packets
on-link.  The attacker can then spoof off-link nodes by sending packets on
the same link as the host.  The vulnerability is discussed in detail in
<xref target="RFC3756"/>.</t>

<t>Another security-related side-effect of the on-link assumption has to do
with virtual private networks (VPNs).  It has been observed that some
commercially available VPN software solutions that don't support IPv6 send
IPv6 packets to the local media in the clear (their security policy doesn't
simply drop IPv6 packets).  Consider a scenario where a system has a single
Ethernet interface with VPN software that encrypts and encapsulates certain
packets.  The system attempts to send a packet to an IPv6 destination that
it obtained by doing a DNS lookup, and the packet ends up going in the clear
to the local media.  A malicious third party could then spoof the
destination on-link.</t>

</section>

</section>

<section title="Changes to RFC 2461">

<t>The following changes have been made to the Neighbor Discovery
specification between <xref target="RFC2461"/> and <xref
target="RFC4861"/>:

<list style="hanging">
	<t>The last sentence of the second paragraph of Section 5.2
	("Conceptual Sending Algorithm") was removed.  This sentence was,
	"If the Default Router List is empty, the sender assumes that the
	destination is on-link."</t>

	<t>Bullet item 3) in Section 6.3.6 ("Default Router Selection") was
	removed.  The item read, "If the Default Router List is empty,
	assume that all destinations are on-link as specified in Section
	5.2."</t>

	<t>APPENDIX A was modified to remove on-link assumption related text
	in bullet item 1) under the discussion on what happens when a
	multihomed host fails to receive Router Advertisements.</t>
</list>

The result of these changes is that destinations are considered
unreachable when there is no routing information for that destination
(through a default router or otherwise).  Instead of attempting
link-layer address resolution when sending to such a destination, a
node should send an ICMPv6 Destination Unreachable message (code 0 -
no route to destination) message up the stack.</t>

</section>

<section title="Security Considerations">

<t>The removal of the on-link assumption from Neighbor Discovery
addresses all of the security-related vulnerabilities of the protocol as
described in <xref target="secissues"/>.</t>

</section>

</middle>

<back>

<references title="Normative References">

	<?rfc include="reference.RFC.1122" ?>
	<?rfc include="reference.RFC.2461" ?>
	<?rfc include="reference.RFC.3484" ?>
	<?rfc include="reference.RFC.3756" ?>

<!--	<?rfc include="reference.I-D.ietf-ipv6-2461bis" ?> -->
<reference anchor='RFC4861'>
<front>
<title>Neighbor Discovery for IP version 6 (IPv6)</title>

<author initials='T' surname='Narten' fullname='Thomas Narten'>
    <organization />
</author>

<author initials='E' surname='Nordmark' >
    <organization />
</author>

<author initials='W' surname='Simpson' >
    <organization />
</author>

<author initials='H' surname='Soliman' >
    <organization />
</author>

<date month='September' year='2007' />

<abstract><t>This document specifies the Neighbor Discovery protocol for IP Version 6. IPv6 nodes on the same link use Neighbor Discovery to discover each other's presence, to determine each other's link-layer addresses, to find routers and to maintain reachability information about the paths to active neighbors.</t></abstract>

</front>

<seriesInfo name='RFC' value='4861' />

</reference>
</references>

<section title="Acknowledgments">

<t>The authors gratefully acknowledge the contributions of Jim Bound,
Spencer Dawkins, Tony Hain, Mika Liljeberg, Erik Nordmark, Pekka Savola, and
Ronald van der Pol.</t>

</section>

</back>

</rfc>

