我有以下问题。
我正在尝试在家中设置一个 ipv6 网络,使用我的服务器和 ipv6 隧道作为网关。
这是我的设置
服务器:
服务器接口:
he-ipv6 Link encap:IPv6-in-IPv4
inet6 addr: 2001:xxx:xx:xxx::x/64 Scope:Global
eth1 Link encap:Ethernet HWaddr 00:22:3f:f0:2a:a1
inet addr:172.16.1.1 Bcast:172.16.1.255 Mask:255.255.255.0
inet6 addr: 2002:c000:203::1/64 ##self assign ipv6 address for my home lan
IPv6 路由表:
ip -6 route
2001:470:6e:40f::1 dev he-ipv6 metric 1024
2002:xxxx:xxx::/64 dev eth1 proto kernel metric 256
default dev he-ipv6 metric 1024
ping google 尝试:
ping6 google.com
PING google.com(mil02s06-in-x00.1e100.net) 56 data bytes
64 bytes from mil02s06-in-x00.1e100.net: icmp_seq=1 ttl=56 time=103 ms
64 bytes from mil02s06-in-x00.1e100.net: icmp_seq=2 ttl=56 time=103 ms
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
到目前为止,一切都很好
客户
客户端界面:
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether d8:30:62:61:73:39
inet6 2002:c000:203::3 prefixlen 64
inet 172.16.1.134 net mask 0xffffff00 broadcast 172.16.1.255
ping 服务器尝试:ping6 2002:c000:203::1 PING6(56=40+8+8 字节)2002:c000:203::3 --> 2002:c000:203::1 来自 2002:c000:203::1 的 16 字节,icmp_seq=0 hlim=64 时间=0.516 毫秒
ping google 尝试:
ping6 google.com
PING6(56=40+8+8 bytes) 2002:c000:203::3 --> 2a00:1450:400c:c09::66
--- google.com ping6 statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
谜:
当我在服务器上执行 tcpdump 时,我正在从客户端进行 ping 操作。
tcpdump -i eth1 -vv ip6
23:41:03.957019 IP6 (flowlabel 0x84719, hlim 64, next-header ICMPv6 (58) payload length: 16) 2002:c000:203::3 > mil01s18-in-x01.1e100.net: [icmp6 sum ok] ICMP6, echo request, seq 0
23:41:04.959517 IP6 (flowlabel 0x84719, hlim 64, next-header ICMPv6 (58) payload length: 16) 2002:c000:203::3 > mil01s18-in-x01.1e100.net: [icmp6 sum ok] ICMP6, echo request, seq 1
23:41:05.957182 IP6 (flow label 0x84719, hlim 64, next-header ICMPv6 (58) payload length: 16) 2002:c000:203::3 > mil01s18-in-x01.1e100.net: [icmp6 sum ok] ICMP6, echo request, seq 2
有什么帮助吗?提前致谢
答案1
以 开头的地址2002:
是 6to4 地址。这些是特殊的 IPv6 地址,而不是您通过隧道获得的地址。您应该改用通过隧道获得的地址。通常,您会通过隧道获得一个路由块,例如 /48。请将该块中的 /64 用于您的 LAN。
一般来说,除非您清楚自己在做什么,否则您应该远离 6to4。