configurationIPv6路由

我有SIXXS的IPv6地址。 我的主机通过AICCU隧道(“sixxs”接口)连接到SIXXSnetworking。 我的主机地址是2001 :: 2,最后的主机地址是2001 :: 1。 在我的主机上,IPv6是完全可访问的。 我在虚拟机上configurationIPv6networking有问题。 我使用VirtualBox,VM(Ubuntu)使用tap1(在由br0桥接的主机上)

#!/bin/sh PATH=/sbin:/usr/bin:/bin:/usr/bin:/usr/sbin # create a tap tunctl -t tap1 ip link set up dev tap1 # create the bridge brctl addbr br0 brctl addif br0 tap1 # set the IP address and routing ip link set up dev br0 ip -6 route del 2001:6a0:200:172::/64 dev sixxs ip -6 route add 2001:6a0:200:172::1 dev sixxs ip -6 addr add 2001:6a0:200:172::2/64 dev br0 ip -6 route add 2001:6a0:200:172::2/64 dev br0 

主机路由表:

 2001:6a0:200:172::1 dev sixxs metric 1024 2001:6a0:200:172::/64 dev br0 proto kernel metric 256 2001:6a0:200:172::/64 dev br0 metric 1024 2000::/3 dev sixxs metric 1024 fe80::/64 dev eth0 proto kernel metric 256 fe80::/64 dev sixxs proto kernel metric 256 fe80::/64 dev br0 proto kernel metric 256 fe80::/64 dev tap1 proto kernel metric 256 default via 2001:6a0:200:172::1 dev sixxs metric 1024 

Guest:interface eth1(与tap1连接):

 auto eth1 iface eth1 inet6 static address 2001:6a0:200:172::3 netmask 64 gateway 2001:6a0:200:172::2 

客人:路由表

 2001:6a0:200:172::/64 dev eth1 proto kernel metric 256 fe80::/64 dev eth0 proto kernel metric 256 fe80::/64 dev eth1 proto kernel metric 256 default via 2001:6a0:200:172::2 dev eth1 metric 1024 

客人ping到主机,主机ping到客人,主机ping到2001:6a0:200:172 :: 1,但客人不ping到2001:6a0:200:172 :: 1。 来宾试图ping主机(通过tcdump)我可以捕获它的数据包,但主机不会发送到2001:6a0:200:172 :: 1。 我在configuration中错过了什么?

检查命令的输出

  sysctl -a | grep ipv6 | grep forward 

对于您要转发的所有networking,这应显示为1。 您应该能够使用以下命令启用转发:

 sysctl net.ipv6.conf.all.forwarding=1 

我会认真考虑设置一个iptables防火墙,所以你不要完全打开你的系统到IPv6互联网。 与IPv4不同,您不具有阻止入站连接的NAT设备。 Shorewall防火墙有一个IPv6版本,应该给你一个简单的设置防火墙。 示例双界面设置应该是一个很好的起点,可以设置为启用转发。

我在OpenWRT(Linux)路由器上设置IPv6的文章可能会给你一些提示。 configuration你的主机作为路由器。

编辑:我回顾了SixXS的文档,并validation了隧道只有:: 1(P0P和:: 2(你的端点)地址是有效的。你应该已经提供了一个默认路由/ 64,你可以在你的networking上使用(传统的:: 1地址就是路由器)你可能要configuration一个radvd守护进程来通告内部networking的路由,如果你使用radvd你的虚拟机箱映像应该自动configuration一个地址和路线。

如果要路由其他本地设备,则根据需要将eth1或eth0添加到网桥。