gif problems in -STABLE
Dimitry Andric
dimitry at andric.com
Sat Dec 30 09:13:11 PST 2006
Henrik Brix Andersen wrote:
> On Sat, Dec 30, 2006 at 02:56:35AM +0100, Dimitry Andric wrote:
>> For some reason, the ifconfig command now fails to create the proper
>> routing table entries. With the 2006-11-03 kernel, if I configure my
>> gif0 tunnel as follows:
>>
>> ifconfig gif0 create
>> ifconfig gif0 213.154.244.69 193.109.122.244
>> ifconfig gif0 inet6 2001:7b8:2ff:146::2 2001:7b8:2ff:146::1 prefixlen 128
>> route add -inet6 default 2001:7b8:2ff:146::1
>
> Apart from the two IPv4 endpoint addresses you also assign two IPv6
> addresses with prefixlen 128 to the gif0 interface? Looks weird to
> me...
This is the syntax my IPv6 ISP (sixxs.net) specifies, here:
http://www.sixxs.net/faq/connectivity/?faq=ossetup&os=freebsd
If you Google around for IPv6 gif tunnel setup information, you'll see
this particular syntax many times. It used to work for several years,
but if someone can point out an obvious error in it, please let me
know. :)
There's also a similar syntax in the FreeBSD handbook, though it doesn't
mention the prefixlen at all:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-ipv6.html#AEN39629
Moreover, the syntax mentioned in the handbook doesn't even work:
# ifconfig gif0 create
# ifconfig gif0
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
# ifconfig gif0 tunnel 213.154.244.69 193.109.122.244
# ifconfig gif0 inet6 alias 2001:7b8:2ff:146::2 2001:7b8:2ff:146::1
ifconfig: ioctl (SIOCAIFADDR): Invalid argument
The particular thing that I observe, is that when you configured the
gif tunnel with:
ifconfig gif0 inet6 2001:7b8:2ff:146::2 2001:7b8:2ff:146::1 prefixlen 128
the kernel *used* to automagically create two routing table entries:
2001:7b8:2ff:146::1 link#6 UHL gif0
2001:7b8:2ff:146::2 link#6 UHL lo0
but as of some date between 2006-11-03 and 2006-12-29, this behaviour
changed, and it now only creates *one* routing table entry:
2001:7b8:2ff:146::2 link#6 UHL lo0
And I'm only asking why this was changed.
> Try this configuration in /etc/rc.conf instead:
>
> ipv6_defaultrouter="2001:7b8:2ff:146::1"
> gif_interfaces="gif0"
> gifconfig_gif0="213.154.244.69 193.109.122.244"
> ipv6_ifconfig_gif0="2001:7b8:2ff:146::2 prefixlen 127"
Doesn't work for me; if I specify prefixlen 127 instead of 126, I get:
ping6: UDP connect: No route to host
when trying to ping the other endpoint of the tunnel, and the required
routing table entry is *not* present:
Internet6:
Destination Gateway Flags Netif Expire
::/96 ::1 UGRS lo0
::1 ::1 UHL lo0
::ffff:0.0.0.0/96 ::1 UGRS lo0
2001:7b8:2ff:146::2 link#6 UHL lo0 =>
2001:7b8:2ff:146::2/127 link#6 UC gif0
...
In my case, the 2001:7b8:2ff:146::2/127 route is also not enough to
reach 2001:7b8:2ff:146::1; you really have to use a prefixlen of 126 for
that.
Cheers,
Dimitry
More information about the freebsd-stable
mailing list