ip-6路由在Linux中积累条目是否正常?

在通过路由器的radvd-advertised隧道连接到ipv6互联网的Linux机器上, ip -6 route累积最近的地址。 为什么会这样呢? 它是预期的行为,还是机器configuration错误? 在直接连接到ipv6隧道的另一台机器上, ip -6 route保留一个较短的列表。

在客户端(这是积累最近的地址作为路线):

 ip -6 route # after pinging ipv6.google.com and www.kame.net 2001:200:dff:fff1:216:3eff:feb1:44d7 via fe80::216:1ff:fe14:444 dev eth0 proto static metric 1024 2001:470:8:e7c::/64 dev eth0 proto kernel metric 256 expires 86407sec 2607:f8b0:4002:801::1011 via fe80::216:1ff:fe14:444 dev eth0 proto static metric 1024 fe80::/64 dev eth0 proto kernel metric 256 default via fe80::216:1ff:fe14:444 dev eth0 proto kernel metric 1024 

在路由器上:

  ip -6 route ::/96 via :: dev tun6to4 metric 256 mtu 1280 advmss 1220 2001:470:7:e7c::/64 via :: dev he-ipv6 metric 256 mtu 1480 advmss 1420 2001:470:8:e7c::/64 dev br0 metric 256 mtu 1500 advmss 1440 2002:62b4:2270:1::/64 dev br0 metric 256 mtu 1500 advmss 1440 2002::/16 dev tun6to4 metric 256 mtu 1280 advmss 1220 2000::/3 dev he-ipv6 metric 1024 mtu 1480 advmss 1420 fe80::/64 dev eth0 metric 256 mtu 1500 advmss 1440 fe80::/64 dev vlan0 metric 256 mtu 1500 advmss 1440 fe80::/64 dev eth1 metric 256 mtu 1500 advmss 1440 fe80::/64 dev br0 metric 256 mtu 1500 advmss 1440 fe80::/64 dev vlan1 metric 256 mtu 1500 advmss 1440 fe80::/64 via :: dev he-ipv6 metric 256 mtu 1480 advmss 1420 fe80::/64 dev tun6to4 metric 256 mtu 1280 advmss 1220 ff00::/8 dev eth0 metric 256 mtu 1500 advmss 1440 ff00::/8 dev vlan0 metric 256 mtu 1500 advmss 1440 ff00::/8 dev eth1 metric 256 mtu 1500 advmss 1440 ff00::/8 dev br0 metric 256 mtu 1500 advmss 1440 ff00::/8 dev vlan1 metric 256 mtu 1500 advmss 1440 ff00::/8 dev he-ipv6 metric 256 mtu 1480 advmss 1420 ff00::/8 dev tun6to4 metric 256 mtu 1280 advmss 1220 default dev he-ipv6 metric 1024 mtu 1480 advmss 1420 ip -6 a 1: lo: <LOOPBACK,MULTICAST,UP> inet6 ::1/128 scope host 3: eth0: <BROADCAST,MULTICAST,PROMISC,UP> inet6 fe80::216:1ff:fe14:444/64 scope link 4: eth1: <BROADCAST,MULTICAST,PROMISC,UP> inet6 fe80::216:1ff:fe14:446/64 scope link 5: vlan0: <BROADCAST,MULTICAST,PROMISC,UP> inet6 fe80::216:1ff:fe14:444/64 scope link 6: vlan1: <BROADCAST,MULTICAST,UP> inet6 fe80::216:1ff:fe14:445/64 scope link 8: br0: <BROADCAST,MULTICAST,PROMISC,UP> inet6 fe80::216:1ff:fe14:444/64 scope link inet6 2002:62b4:2270:1::1/64 scope global inet6 2001:470:8:e7c::1/64 scope global 12: he-ipv6: <POINTOPOINT,NOARP,UP> inet6 2001:470:7:e7c::2/64 scope global inet6 fe80::62b4:2270/128 scope link 13: tun6to4: <NOARP,UP> inet6 2002:62b4:2270::1/16 scope global inet6 ::98.180.34.112/128 scope global 

radvd.conf:

 interface br0 { AdvSendAdvert on; prefix 2001:470:8:e7c::/64 { AdvOnLink on; AdvAutonomous on; AdvRouterAddr off; }; }; 

我怀疑这里发生的事情是路由器在2001:888:0:18::范围内没有地址,所以路由器使用其本地链路地址( fe80::444 )来广播它的路由通告。

由于fe80:: range与特定的接口没有关联,因此客户端机器需要跟踪将数据包发送到fe80::444时要使用哪个接口,因此它会在其路由表中添加一个条目。

如果你的路由器在同一个networking上select一个地址,比如2001:888:0:18::1 ,那么我怀疑这个行为可能会改变。