Re: gif problems in -STABLE

2006-12-30 Thread Henrik Brix Andersen
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...

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

This syntax works for my setup (and matches reality - gif0 is a tunnel
with two IPv4 endpoints). I have just tested it with RELENG_6 as of
today.

Regards,
Brix
-- 
Henrik Brix Andersen [EMAIL PROTECTED]


pgplDzlfW5rfe.pgp
Description: PGP signature


Re: gif problems in -STABLE

2006-12-30 Thread Dimitry Andric
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=ossetupos=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=8010POINTOPOINT,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#6UHLgif0
2001:7b8:2ff:146::2   link#6UHL 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#6UHL 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   UGRSlo0
::1   ::1   UHL lo0
:::0.0.0.0/96 ::1   UGRSlo0
2001:7b8:2ff:146::2   link#6UHL lo0 
=
2001:7b8:2ff:146::2/127   link#6UC 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@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gif problems in -STABLE

2006-12-30 Thread Sean C. Farley

On Sat, 30 Dec 2006, Dimitry Andric wrote:


Hi,

I just updated one of my machines from RELENG_6 as of 2006-11-03, to
RELENG_6 as of 2006-12-29.  This caused the IPv6 tunnel which this box
uses, which had been doing fine for months, to suddenly stop working.

Reverting to my 2006-11-03 kernel restored the tunnel again, so my ISP
could be ruled out. :)

The symptoms are that the IPv6 default gateway cannot be reached, and
you'll get ping6: sendmsg: No route to host when you try to ping it.

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:


I can confirm my setup with Hurricane Electric also started failing at
some point:
gif_interfaces=gif0
gifconfig_gif0=AA.BB.CC.DD 64.71.128.83
ipv6_defaultrouter=:::::1C
ipv6_ifconfig_gif0=:::::1D :::::1C prefixlen 
128

I needed to add the following to restore the old (working) behavior:
ipv6_static_routes=defroute
ipv6_route_defroute=:::::1C -interface gif0

Sean
--
[EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gif problems in -STABLE

2006-12-30 Thread Dimitry Andric
Sean C. Farley wrote:
 I just updated one of my machines from RELENG_6 as of 2006-11-03, to
 RELENG_6 as of 2006-12-29.  This caused the IPv6 tunnel which this box
 uses, which had been doing fine for months, to suddenly stop working.
...
 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:
 
 I can confirm my setup with Hurricane Electric also started failing at
 some point:
...
 I needed to add the following to restore the old (working) behavior:
 ipv6_static_routes=defroute
 ipv6_route_defroute=:::::1C -interface gif0

By doing some nice bisection debugging, I've narrowed the problem down
to this specific commit:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet6/nd6.c#rev1.48.2.16

If you revert this change, tunnel configuration will work as before
again.  I'm now investigating the diff itself, to see if I can find an
error in there anywhere... :)

Cheers,
Dimitry
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


gif problems in -STABLE

2006-12-29 Thread Dimitry Andric
Hi,

I just updated one of my machines from RELENG_6 as of 2006-11-03, to
RELENG_6 as of 2006-12-29.  This caused the IPv6 tunnel which this box
uses, which had been doing fine for months, to suddenly stop working.

Reverting to my 2006-11-03 kernel restored the tunnel again, so my ISP
could be ruled out. :)

The symptoms are that the IPv6 default gateway cannot be reached, and
you'll get ping6: sendmsg: No route to host when you try to ping it.

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

I get the following entries in the routing table:

Internet6:
Destination   Gateway   Flags  
Netif Expire
::/96 ::1   UGRSlo0 
=
default   2001:7b8:2ff:146::1   UGSgif0
::1   ::1   UHL lo0
:::0.0.0.0/96 ::1   UGRSlo0
2001:7b8:2ff:146::1   link#6UHLgif0
2001:7b8:2ff:146::2   link#6UHL lo0
...

If I use the 2006-12-29 kernel, the routing table after exactly the same
sequence of commands is:

Internet6:
Destination   Gateway   Flags  
Netif Expire
::/96 ::1   UGRSlo0 
=
default   2001:7b8:2ff:146::1   UGSgif0
::1   ::1   UHL lo0
:::0.0.0.0/96 ::1   UGRSlo0
2001:7b8:2ff:146::2   link#6UHL lo0
...

So, for some reason, the 2001:7b8:2ff:146::1 entry is not automatically
created anymore.  Of course, you could add this manually, but it's
rather strange that this behaviour has changed.

After some Googling, I found this thread about -current, which seems to
describe approximately the same problem:
http://lists.freebsd.org/pipermail/freebsd-current/2006-December/067830.html

However, the thread seems to have no real conclusion as to what the
cause or proper solution is.  There are two possible solutions
mentioned, though:

1) Using something like:
ipv6_defaultrouter=::1 -ifp gif0

This doesn't work for me, unless I set the prefixlen for the whole gif0
tunnel to 64; but in that case I don't need the ::1 -ifp stuff either.

2) Using something like:
ipv6_ifconfig_gif0=2001:7b8:2ff:146::2 prefixlen 126

This does work, though I find it strange that such functionality is
changed so shortly before a release. :)

Does anyone have a clue where this changed behaviour comes from, or
where in the source tree I should look to find the commit that caused
it?

Maybe it would be nicer to revert to the previous behaviour for
6.2-RELEASE, since it will cause many non-working tunnels when people
upgrade.  Or otherwise at least put a big notice in UPDATING or the
release notes. :)

Cheers,
Dimitry
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]