用 radvd 实现路由 IPv6
我花了一个多小时在运行 5.4r11 的 Juniper NS5GT 上调试,让它能够建立到 Hurricane Electric 的隧道。手动 IPv6in4 隧道的 IPv6 支持仍然有点难以配置,而且我发现因为 HE.NET 提供了一个 /64 的点对点路由链路,并且还可以应要求提供一个 /48,路由会稍微复杂一些。我可能会再把这台设备开起来,让它再做一次广告路由,但短期内我把所有东西都切换到了隧道这边的 Gentoo Linux 主机,启动了带有相应配置的 RADVD,然后 bingo,我们就从 OS X Leopard 通过自动配置地址获得了完整的 IPv6 路由。
从 OS X 上的 iTerm:
[tboyes @ squidrock.local : ~]>ifconfig en1 [16:11:49 on 08-09-18 : s003]
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::21f:5bff:fece:280a%en1 prefixlen 64 scopeid 0×6
inet 192.168.0.208 netmask 0xffffff00 broadcast 192.168.0.255
inet6 2001:470:8859:beef:21f:5bff:fece:280a prefixlen 64 autoconf
ether 00:1f:5b:ce:28:0a
media: autoselect status: active
supported media: autoselect
对 www.ietf.org 的 traceroute:
[tboyes @ squidrock.local : ~]>traceroute6 www.ietf.org [16:12:48 on 08-09-18 : s000]
traceroute6 to www.ietf.org (2001:1890:1112:1::20) from 2001:470:8859:beef:21f:5bff:fece:280a, 30 hops max, 12 byte packets
1 2001:470:8859:beef::1 2.043 ms 10.194 ms 1.724 ms
2 suspicious.tunnel.tserv4.nyc4.ipv6.he.net 18.608 ms 16.084 ms 15.263 ms
3 gige-g3-8.core1.nyc4.he.net 16.59 ms 29.209 ms 19.843 ms
4 10gigabitethernet1-2.core1.nyc1.he.net 16.487 ms 20.58 ms 23.133 ms
5 100m-0-0.nyc.ipv6.he.net 14.066 ms 30.769 ms 14.993 ms
6 2001:470:0:53::2 15.311 ms 28.348 ms 13.311 ms
7 r1.mdtnj.ipv6.att.net 106.617 ms 105.346 ms 107.647 ms
8 2001:1890:61:9017::2 102.941 ms 103.469 ms 102.332 ms
9 mail.ietf.org 104.159 ms 104.125 ms 103.82 ms/etc/radvd.conf 的内容:
inanna scripts # cat /etc/radvd.conf
interface eth1
{
AdvSendAdvert on;
MaxRtrAdvInterval 300;
prefix 2001:470:8859:beef::/64
{
AdvOnLink on;
AdvAutonomous on;
};
};
设置到 Hurricane Electric 隧道的脚本:
inanna scripts # cat ipv6-tunnel-route2.sh
ip tunnel add he-ipv6 mode sit remote x.x.x.x local y.y.y.y ttl 255
ip link set he-ipv6 up
ip addr add 2001:470:1f06:248::2/64 dev he-ipv6
ip route add ::/0 dev he-ipv6
ip -f inet6 addr
最初发表于 truman.net。查看存档副本。