Re: gif problems in -STABLE



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
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • gif problems in -STABLE
    ... This caused the IPv6 tunnel which this box ... Reverting to my 2006-11-03 kernel restored the tunnel again, ... ifconfig gif0 create ... I get the following entries in the routing table: ...
    (freebsd-stable)
  • question on tunnels (VPN)
    ... I have used the following scenario between two hosts (both ... ifconfig gif0 tunnel 192.168.0.1 192.168.0.2 ... local router to remote server, ...
    (freebsd-net)
  • gif tunnel problem.
    ... This is the first time I've looked at gif tunnels and I'm only trying to ... Basically HostA has is the ... I want to set up an unencrypted tunnel between the two subnets using ... ifconfig gif0 tunnel a.b.c.d w.x.y.z ...
    (freebsd-questions)
  • gif tunnel problem.
    ... This is the first time I've looked at gif tunnels and I'm only trying to ... Basically HostA has is the ... I want to set up an unencrypted tunnel between the two subnets using ... ifconfig gif0 tunnel a.b.c.d w.x.y.z ...
    (freebsd-questions)
  • Re: New user getting very discouraged with IPv6 problems, cannot get tunnel working completely :(
    ... I don't think the firewall is blocking ipv6 because ... Don't leave this open after you get the tunnel working. ... packets transmitted, 0 packets received, 100.0% packet loss ...
    (freebsd-questions)