Subject: Re: Link-local addresses "inheritance" by gif(4)
To: Martijn van Buul <martijnb@atlas.ipv6.stack.nl>
From: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
List: tech-net
Date: 05/08/2006 14:51:18
Hello,
On Mon, May 08, 2006 at 09:26:31AM +0000, Martijn van Buul wrote:
> Hey;
>
> Consider the following setup (Slightly summarized for brevity)
>
> ral0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> address: 00:0c:f6:18:7f:0e
> inet6 fe80::20c:f6ff:fe18:7f0e%ral0 prefixlen 64 scopeid 0x1
> re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> address: 00:40:f4:ce:5b:43
> inet6 fe80::240:f4ff:fece:5b43%re0 prefixlen 64 scopeid 0x2
> nfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> address: 00:15:f2:4d:39:d8
> inet6 fe80::215:f2ff:fe4d:39d8%nfe0 prefixlen 64 scopeid 0x3
> lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33648
> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
> gif0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
> tunnel inet 85.145.84.197 --> 131.155.141.2
> inet6 2001:610:1108:5001::3f -> prefixlen 64
> inet6 fe80::20c:f6ff:fe18:7f0e%gif0 -> prefixlen 64 scopeid 0x5
> gif1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
> tunnel inet 85.145.84.197 --> 83.160.166.71
> inet6 fe80::20c:f6ff:fe18:7f0e%gif1 -> prefixlen 64 scopeid 0x6
> gif2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
> tunnel inet 85.145.84.197 --> 85.145.80.155
> inet 192.168.64.1 -> 192.168.21.1 netmask 0xffffff00
> inet6 fe80::20c:f6ff:fe18:7f0e%gif2 -> prefixlen 64 scopeid 0x7
> gif3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
> tunnel inet 85.145.84.197 --> 85.145.85.61
> inet 192.168.64.1 -> 192.168.3.1 netmask 0xffffff00
> inet6 fe80::20c:f6ff:fe18:7f0e%gif3 -> prefixlen 64 scopeid 0x8
>
> Note how all gif-devices seem to inherit their link-local address from ral0.
> I understand that, lacking a unique interface identifier on their own they
> have to fallback on something else, but why ral0? What's the logic behind
> the choice?
>
> I stumbled over this today, because gif 1 through 3 had died for IPv6. While
> gif0 has an address of its own, gif1 throuh 3 don't, so I abuse the link-local
> addresses for that, like this (from /etc/ifconfig.gif1):
>
> create
> tunnel 85.145.84.197 83.160.166.71
> up
> !route add -inet6 2001:610:1108:5810:: -prefixlen 60 fe80::240:f4ff:fece:5b43%gif1
I won't answer the original question, but do you need to have _any_ IPv6
address as the route target? Wouldn't be sufficient to do something like
route add -inet6 2001:610:1108:5810:: -prefixlen 60 ::1
route change -inet6 2001:610:1108:5810:: -prefixlen 60 -ifp gif0
?
(The method do achieve this is a bit awkward, yes.)
Pavel