我正在运行 Debian 7 并尝试配置静态 IPv6 地址……
我每隔几秒钟就会在 /var/log/kern.log 中收到此错误消息。
Apr 27 09:25:30 orion kernel: ICMPv6: RA: ndisc_router_discovery failed to add default route
Apr 27 09:25:35 orion kernel: ICMPv6: RA: ndisc_router_discovery failed to add default route
Apr 27 09:25:40 orion kernel: ICMPv6: RA: ndisc_router_discovery failed to add default route
Apr 27 09:25:45 orion kernel: ICMPv6: RA: ndisc_router_discovery failed to add default route
我已经按照本教程进行操作但似乎无法使其发挥作用。 https://linode.com/docs/networking/linux-static-ip-configuration/#debian
这是我的当前版本:/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet6 static
address 2600:3c00::f03c:91ff:fe37:92b1/64
gateway fe80::1
iface eth0 inet6 static
address 2600:3c00:e000:01d8::1/64
iface eth0 inet static
address 104.237.137.8/24
gateway 104.237.137.1
我已经完成重启并且 ifconfig 显示的 IPv6 地址为:
philip@orion:~# sudo ifconfig
eth0 Link encap:Ethernet HWaddr f2:3c:91:37:92:b1
inet addr:104.237.137.8 Bcast:104.237.137.255 Mask:255.255.255.0
inet6 addr: 2600:3c00:e000:1d8::1/64 Scope:Global
inet6 addr: fe80::f03c:91ff:fe37:92b1/64 Scope:Link
inet6 addr: 2600:3c00::f03c:91ff:fe37:92b1/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:37970 errors:0 dropped:0 overruns:0 frame:0
TX packets:31070 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8795804 (8.3 MiB) TX bytes:18187830 (17.3 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:26708 errors:0 dropped:0 overruns:0 frame:0
TX packets:26708 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11657907 (11.1 MiB) TX bytes:11657907 (11.1 MiB)
答案1
如果有人找到这篇文章,就会发现答案很简单。RA 试图告诉我的服务器有一个 IPv6 网关,因此当我删除时:
网关 fe80::1
重新启动后,一切又恢复到了预期的样子。
IPv6 中的 RA 代表路由器通告。网络中的路由器会通告它们已存在并准备将您的数据包路由到它们指定的网络。
希望这对某人有帮助。