tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Correct method for IPv6 over IPv4 tunneling



Ignatios Souvatzis wrote:
On Wed, May 16, 2012 at 09:34:11PM +1000, Darren Reed wrote:
On 16/05/2012 9:15 PM, Hubert Feyrer wrote:
On Wed, 16 May 2012, Darren Reed wrote:
netbsd ~# ifconfig gif0 create
netbsd ~# ifconfig gif0 inet6 2001::1 2001::2 prefixlen 126
ifconfig: SIOCAIFADDR_IN6: Invalid argument
...
Is my NetBSD foo wrong or...?

Maybe you need something like

    ifconfig gif0 tunnel a.a.a.a. b.b.b.b

between those two lines? See here for a working example (no more in operation):

    http://www.feyrer.de/IPv6/netstart.local
The problem was I was missing "prefixlen 128".
I had tried other prefix lengths but to no avail.

Without that, it is not possible to configure an IPv6 over IPv4
gif tunnel.

Hm.  Let me check my @work tunnel startup scripts.

create
tunnel labIV-gw-outer labIV-gw-outer-remote
inet6 fe80::1/64 up
!/sbin/route add -inet6 2001:db8:0042:5040:: fe80::2%$int -prefixlen 60

Hm...

I think (but didn't look at the source) you'd need prefixlen 128 for point to point addresses, and get a network otherwise.

I suppose that's what confused me. Doing this:

# ifconfig gif0 inet6 10::1 10::2

didn't default to a prefixlen of 128 and it just fails with
a non-specific error message. I'd argue that ifconfig
should use a prefixlen of 128 in such situations automatically
and not require it on the command line, yes?

Darren



Home | Main Index | Thread Index | Old Index