Subject: Re: IPv6 routing with non-ppp interfaces
To: None <>
From: Miles Nordin <carton@Ivy.NET>
List: tech-net
Date: 09/28/2004 13:25:26
Content-Type: text/plain; charset=US-ASCII

>>>>> "rb" == Richard Braun <> writes:
>>>>> "kk" == Konstantin KABASSANOV <> writes:

    rb> /sbin/route -q add -inet6 2001:7a8:432d:1:: -prefixlen 64
    rb> fe80::%fxp1

on point-to-point interfaces, you can add an -iface -ifp <name> route
covering whatever destination prefixes you want.  with broadcast
interfaces, it's more complicated because they have the concept
``immediate next-hop''.  The kernel needs to find a destination MAC
address before it can transmit, so the kernel needs to know an IP or
IPv6 address to feed to arp or ndp.  (unless you use ipfilter's 'to'
or 'dup-to' clause <snigger>).  If the destination is outside the
broadcast interface's configured subnet, the address fed to arp or ndp
is the 'gateway' address on the route.  If it's inside the broadcast
interface's configured subnet, the destination itself is fed to

It looks like you're trying to add a route to destinations outside
fxp1's configured subnet without providing a gateway address.  How
will the kernel know to what MAC address it should transmit?

    rb> that's what I do with my tunnels and I thought it would also
    rb> work for an ethernet interface.

    kk> That is not really clean...

It is kosher.  Actually pppoe(4) documents the trick for assigning the
default route.  but it's only ok for point-to-point, not for Ethernet.

    rb> I would like to have 2001:7a8:432d:1::/64 allocated to the
    rb> fxp1 network, without assigning a global address of that block
    rb> on fxp1.

I don't understand why anyone would want to do that.  is your /64
getting crowded? :)

There may be some way to do it, for example with ipv4.  I think you
can assign the interface the same IPv4 address as another interface
and set the netmask to 0xffffffff, so it won't consume any IPv4
address on it's own.  Then either:

 * set the IP of one neighbor into the broadcast address, or

 * add -iface -cloning routes on every machine attached to the
   Ethernet, manually enumerating all the other machines attached to
   the ethernet, which need not be on the same subnet since you're
   adding the cloning routes by hand.  

   when you 'ifconfig up' an interface a cloning route of this kind is
   implicitly added, and you can see it in the routing table---the
   0xffffffff netmask avoids that.

I don't know if either trick will work, nor do I know, if the tricks
do work, how one would generalize the idea to IPv6.

Le fascisme est la dictature ouverte de la bourgeoisie.
		-- Georg Dimitrov

Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

Version: GnuPG v1.2.5 (NetBSD)