On Wed, Sep 16, 2015 at 05:32:45PM +0200, Denis Fondras wrote:
> On Wed, Sep 16, 2015 at 03:38:22PM +0100, Stuart Henderson wrote:
> > On 2015/09/16 09:39, David Hill wrote:
> > > So I need to attach an IP somewhere.  Both the FreeBSD and NetBSD in the
> > > u6rd manpage say I need an IPv6 address on tun0.
> > > 
> > >    NetBSD 5.1
> > >      # ifconfig tun0 create
> > >      # ifconfig tun0 inet6 2001:db8:cb00:7101::1/32
> > 
> > This works if you put it into tap mode (ifconfig tun0 link0) but that
> > is probably not what your application needs.
> > 
> > Same if you remove the /32 prefix.
> > 
> > Interestingly doing the same on gif or gre does work.
> > 
> 
> Setting link0 sets IFF_MULTICAST.
> 
> The main difference between Free and OpenBSD is that tun(4) interfaces are
> created with IFF_MULTICAST with FBSD :
> 
> if_tun.c from FreeBSD (line 380) :
> ifp->if_flags = IFF_POINTOPOINT | IFF_MULTICAST;
> 
> IPv6 requires multicast :)
> 
> Denis
>

Nice catch. 

So I did

# ifconfig tun0 link0
# ifconfig tun0 2602:100:18f7:14a2::1/32
# ndp -i tun0 -- -nud                               
linkmtu=0, curhlim=64, basereachable=30s0ms, reachable=32s,
retrans=1s0ms
Flags: accept_rtadv 

# route add -inet6 2001:500::/32 2602:100::/32

# ping6 -S 2602:100:18f7:14a2::1 2001:500::1 
PING6(72=40+8+24 bytes) 2602:100:18f7:14a2::1 --> 2001:500::1


now u6rd shows all my outbound as non-IPv6 packets.  But I see outbound
:)

in  2602:100:18f7:14a2::1 2607:f790:ffff:ff12:fffe::118 68.114.165.1
n=58 s=72
tun: non-IPv6 packet (859045632)
in  2602:100:18f7:14a2::1 2607:f790:ffff:ff12:fffe::118 68.114.165.1
n=58 s=72
tun: non-IPv6 packet (859045632)
in  2602:100:18f7:14a2::1 2607:f790:ffff:ff12:fffe::118 68.114.165.1
n=58 s=72
tun: non-IPv6 packet (859045632)
in  2602:100:18f7:14a2::1 2607:f790:ffff:ff12:fffe::118 68.114.165.1
n=58 s=72
tun: non-IPv6 packet (859045632)
in  2602:100:18f7:14a2::1 2607:f790:ffff:ff12:fffe::118 68.114.165.1
n=58 s=72


Reply via email to