Subject: Re: nd6_lookup: failed to add route... noise with freenet6 tunnel
To: Jun-ichiro itojun Hagino <itojun@iijlab.net>
From: Robert Elz <kre@munnari.OZ.AU>
List: tech-net
Date: 08/15/2001 18:45:32
    Date:        Wed, 15 Aug 2001 14:50:04 +0900
    From:        Jun-ichiro itojun Hagino <itojun@iijlab.net>
    Message-ID:  <20010815055004.6DC387BA@starfruit.itojun.org>

  | >  | 	don't configure like above.
  | >That's the way the tspc template scripts set things up.
  | 
  | 	the script is broken then.

Yes, in lots of ways...

Still, I'm not sure that this needs to be a problem, in the BSD
net code, it was always the case that configuring the dest addr
field (ie: making a point to point link) would cause most of the
rest of the parameters to be ignored for forwarding - ie: it doesn't
matter what the subnet mask is, packets just get sent to the destination
selected.

But the subnet mask can be used for other purposes - eg: one way to
number a p2p link is to simply take an address from one end's LAN.
That is, using an IPv6 example, if I have (and I do)..

ex0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:01:03:40:8a:e5
        inet6 fe80::201:3ff:fe40:8ae5%ex0 prefixlen 64 scopeid 0x2
        inet6 3ffe:8001:2:181::2 prefixlen 64

(irrelevant lines deleted), then I want to make a p2p link
to somewhere else, I can configure it with dest addr of

	3ffe:8001:2:181::99

on my node, and have the local system do "proxy ND" for that
address (essentially define it as another of my node's addresses
for all but final packet delivery).

At the remote end, I would configure  P2P link, with the local
addr being 3ffe:8001:2:181::99, the remote addr being 3ffe:8001:2:181::2
and a prefix length of 64.

Then when I have a packet to send, the routing sees it is within the
3ffe:8001:2:181::/64 subnet, and sends it to that interface.  That is
the p2p interface, so the packet is simply sent to 3ffe:8001:2:181::2.
When it gets there, it gets forwarded to the local LAN.

Lots of IPv4 p2p links are set up like that.  With IPv6 we have lots more
address space, so there's less demand for doing it this way, rather than
burning a prefix just to use for p2p links - but then again, there's
even more free address space in the last 64 bits than in the first, so
doing p2p links this way has some advantages.

kre