问题
我尝试手动编辑/etc/network/interfaces,并使用静态IPV6地址,并且我可以使用IPV6,但我只想使用自动配置。
尝试了
sudo sysctl -w net.ipv6.conf.all.autoconf=1
sudo sysctl -w net.ipv6.conf.all.accept_ra=1
但不能工作。
我在dmesg中得到了这个:
root@natty-150:~# dmesg |grep IPv6
[ 26.239607] eth0: no IPv6 routers present
[ 657.365194] eth0: no IPv6 routers present
[ 719.101383] eth0: no IPv6 routers present
[32864.604234] eth0: no IPv6 routers present
[33267.619767] eth0: no IPv6 routers present
[33341.507307] eth0: no IPv6 routers present
[33971.214920] eth0: no IPv6 routers present
root@natty-150:/# cat /proc/sys/net/ipv6/conf/eth0/forwarding
0
我将转发设置添加到sysctl.conf文件:
net.ipv6.conf.all.autoconf = 1
net.ipv6.conf.all.accept_ra = 1
net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.lo.forwarding = 1
net.ipv6.conf.eth0.forwarding = 1
然后运行sysctl-p/etc/init.d/networking restart,但仍然不能工作。
答案1
禁用转发应解决你的问题。
另一个提示:启用转发>禁用无状态自动配置
答案2
iface eth0 inet6 auto
你还需要一个auto eth0
子句,所以最小可工作的IPv6配置如下所示:
auto eth0
iface eth0 inet6 auto
相关文章