Subject: Re: Peculiar ICMP6 redirect rejection
To: None <tech-net@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 08/19/2002 17:38:48
>> possibly excepting using a /128 on a broadcast interface;
> Might I suggest putting that /128 on the loopback interface and then
> advertise it as reachable through the LL address of your ethernet
> NIC?

I'm not sure how that differs from what I had (global-scope /128 on
Ethernet, advertised through the LL address).  I just now tried it.

First result noticed: route6d gets upset; at startup, it says

***** Gateway 2001:700:400:150::1:1 is not a link-local address.
*****     dest(2001:700:400:150::1:1) if (lo0) -- Not optimized.

which is disturbingly similar to what I got back when I was mixing
hand-installed routes and route6d.

Second problem: communication doesn't work.  I try to connect to
2001:700:400:150::1:1 and nothing happens.  "Bing", think I, "of
course, it's got forwarding turned off".  So I ssh to it through the LL
address - which works - and turn on net.inet6.ip6.forwarding.

Third problem: this is then even worse than before.  Now not only
connectivity doesn't work, but I get "ICMP6 redirect rejected"
complaints flooding the neighbour machine's console - not L's, this
time, but the neighbour's.

ICMP6 redirect rejected; not equal to gw-for-src=fe80:0001::02a0:24ff:fe66:fb23 (must be same): (src=fe80:0001::0210:5aff:fefc:5c1a dst=2001:0700:0400:0150::0001:0001 tgt=fe80:0001::02a0:24ff:fe66:fb23)

The address in the gw-for-src and tgt= fields is the LL address of the
"portable" machine.  The src= address is the LL address of the gateway
to the rest of the world and the dst= address is the address I'm trying
to make portable.  (1 is the correct scope ID on that machine.)

I've put it back.  I'm still not sure how it differs from what I had,
but it sure does. :-)  I'm now thoroughly baffled by what's going on
here.  Since itojun seems unwilling to think about it unless I'm using
his idea of a standard setup, I'm tempted to switch to a /64 prefixlen;
either it won't work, in which case itojun might finally be willing to
admit there's something wrong, or it will work, in which case there's a
much weirder bug, though I'll probably have to find it myself.
(However, that will have to wait until itojun explains what his idea of
the right way to move the mobile machine is.)

>> [...] without indicating what a "standard" netmask is,
> I believe itojun was referring to the standard practice of making a
> subnet /64. 

Oh, ugh.  So now that we have 128-bit addresses, someone wants me to
turn around and throw away half those bits for no good purpose?

...well, okay, I won't go quite that far, yet.  Instead, I'll just ask,
what's the point?  What is the "good purpose"?  Autoconfiguration?
Fine, so require a /64 (or shorter, not that there's any point in it)
if you're autoconfiguring.  But don't cripple people who care enough
about conserving address space that they don't waste it that way!

>> a /112 or /128 [...]??  What does it break, and what should I do
>> instead?
> It would certainly break the eui64 calculation, but you are assigning
> addresses manually so that shouldn't be a problem.

Right, all I use EUI64s for is link-local addresses, which of course
_are_ prefixlen 64.

> Standard subnet size is /64.  Wasteful of bits?  Maybe.

Very.  It means that at one stroke, whatever genius decided on that has
just negated much of the benefit of IPv6, converting it from 128-bit
addresses to, effectively, 64-plus-a-little (the "little" because most
subnets will have more than one host).

It also makes me ask "why bother _having_ a prefixlen if you're going
to say "see figure 1" whenever anyone sets it to anything but 64?".

> It does work though.

So did Classes A, B, and C, back in the bad old days of IPv4.
And, later, host/net divisions that always fell on octet boundaries.

> If you are trying to make sure your address is portable across
> subnets, the address doesn't belong on a physical subnet, IMO.  You
> want to use whatever is the local network on your ethernet, and then
> advertise reachability to an address that lives on the loopback
> interface -- the global, or portable one.

As I mentioned above, I tried that and it was much worse, though I
don't understand why.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B