Subject: Re: Recent ipv6 changes and gif breakage
To: None <tech-net@netbsd.org>
From: Martijn van Buul <pino@dohd.org>
List: tech-net
Date: 01/27/2006 00:27:54
It occurred to me that Rui Paulo wrote in gmane.os.netbsd.devel.network:
> Martijn van Buul <pino@dohd.org> writes:
>
>> It occurred to me that Rui Paulo wrote in gmane.os.netbsd.devel.network:
>>> Martijn van Buul <pino@dohd.org> writes:
>>>
>>>> I tried putting back the alias to rtk0, but that didn't help. And I'm not
>>>> convinced my slightly dodgy network setup is to blame - I see traffic coming
>>>> in and out of my tunnel - just neighbourhood discovery seems broken.
>>>
>>> Can you test your setup under FreeBSD ?
>>
>> I will. Any specific version you had in mind? 
>
>>= 6.0 will do.

I'll try. I just wanted to be sure - if you would've suggested "NetBSD", then
3.0 would have worked, for example. I'll try to figure out if the FreeBSD
installation CD would suffice for my tests, as I'd rather try to avoid
installing FreeBSD for only this purpose.

In the mean time, I've been doing more tests, and the results are
always the same, using various remote endpoints (FreeBSD 4, 5 and 7 ). I can
reproduce it on my local net (No strange NATing involved, so I *REALLY* don't
think it has anything to do with my particular setup):

On my laptop (192.168.64.251), running 3.0, I have:

gif0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
        tunnel inet 192.168.64.251 --> 192.168.64.1
        inet6 fe80::2d0:59ff:fecf:6cf8%gif0 ->  prefixlen 64 scopeid 0x4
ral0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
[..]
        inet6 2001:abcd::1 prefixlen 64

balthasar# route add -inet6 2001:610:1108:5220:: -prefixlen 64 fe80::2d0:59ff:fecf:6cf8%gif0

(Yes, I stole a range. Sue me)

On my desktop/router (192.168.64.1), running -current/amd64, I have:

gif3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
        tunnel inet 192.168.64.1 --> 192.168.64.251
	inet6 fe80::240:f4ff:fece:5b43%gif3 ->  prefixlen 64 scopeid 0x8
	
atlas# route add -inet6 2001:abcd:: -prefixlen 64 fe80::240:f4ff:fece:5b43%gif3        
When running a ping from the laptop to the desktop, and vice versa, both
sides of the tunnel get data, but none feels obliged to respond:

On the desktop:

atlas(8):/home/martijnb# tcpdump -i gif3
tcpdump: WARNING: gif3: no IPv4 address assigned
tstening on gif3, link-type NULL (BSD loopback), capture size 96 bytes
01:23:24.020036 2001:610:1108:5220:8000::1 > 2001:abcd::1: icmp6: echo request seq 219
01:23:24.038970 2001:abcd::1 > 2001:610:1108:5220:8000::1: icmp6: echo request seq 27
01:23:25.020034 2001:610:1108:5220:8000::1 > 2001:abcd::1: icmp6: echo request seq 220
01:23:25.039041 2001:abcd::1 > 2001:610:1108:5220:8000::1: icmp6: echo request seq 28

On the laptop:
balthasar# tcpdump -i gif0
tcpdump: WARNING: gif0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on gif0, link-type NULL (BSD loopback), capture size 96 bytes
01:23:37.579232 2001:610:1108:5220:8000::1 > 2001:abcd::1: icmp6: echo request seq 263
01:23:37.600929 2001:abcd::1 > 2001:610:1108:5220:8000::1: icmp6: echo request seq 71
01:23:38.579174 2001:610:1108:5220:8000::1 > 2001:abcd::1: icmp6: echo request seq 264
01:23:38.600946 2001:abcd::1 > 2001:610:1108:5220:8000::1: icmp6: echo request seq 72

I got *exactly* the same results with my other tunnels. Once I boot last
week's kernel, *poof* everything works.

-- 
    Martijn van Buul - pino@dohd.org - http://www.stack.nl/~martijnb/
	 Geek code: G--  - Visit OuterSpace: mud.stack.nl 3333
 The most exciting phrase to hear in science, the one that heralds new
discoveries, is not 'Eureka!' (I found it!) but 'That's funny ...' Isaac Asimov