![IPv6 在 14.04 上不起作用](https://linux22.com/image/1146127/IPv6%20%E5%9C%A8%2014.04%20%E4%B8%8A%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
我尝试在 Ubuntu 14.04 上运行 IPv6,但失败了。但是 IPv4 运行良好,而在 Win 10 上两者都运行良好。
它只能获取 IPv6 地址,但在测试时https://ipv6-test.com,它失败了,如下所示:
运行命令时ip -6 addr
,我得到:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 fe80::6af7:28ff:fe26:5aec/64 scope link
valid_lft forever preferred_lft forever
10: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 state UNKNOWN qlen 3
inet6 2001:250:1001:2500:fc08:5666:3adb:923/64 scope global temporary dynamic
valid_lft 258228sec preferred_lft 82394sec
inet6 2001:250:1001:2500:d82d:cb77:2a26:f019/64 scope global dynamic
valid_lft 258228sec preferred_lft 171828sec
inet6 fe80::d82d:cb77:2a26:f019/10 scope link
valid_lft forever preferred_lft forever
我已经尝试了Ipv6-连接:网络不可访问。但运行失败sudo modprobe ipv6
。
对于ip -6 route
,结果如下所示:
2001:250:1001:2500::/64 dev ppp0 proto kernel metric 256 expires 258403sec mtu 1491
fe80::/64 dev eth0 proto kernel metric 256
fe80::/64 dev wlan0 proto kernel metric 256
fe80::/10 dev ppp0 metric 1 mtu 1491
fe80::/10 dev ppp0 proto kernel metric 256 mtu 1491
default via fe80::cecc:81ff:fec0:d75d dev ppp0 proto ra metric 1024 expires 1003sec mtu 1491
通过 DSL 连接,我不知道是否要修复eth0
。ppp0
有人有想法吗?
答案1
现在它对我有用了。我将发布我的解决方案,以防有人遇到同样的问题。
ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 state UNKNOWN qlen 3
inet6 2001:250:1001:2500:fc08:5666:3adb:923/64 scope global temporary dynamic
valid_lft 258228sec preferred_lft 82394sec
inet6 2001:250:1001:2500:d82d:cb77:2a26:f019/64 scope global dynamic
valid_lft 258228sec preferred_lft 171828sec
inet6 fe80::d82d:cb77:2a26:f019/10 scope link
valid_lft forever preferred_lft forever
分配了两个全局 IPv6 地址,但是检查路由器时只需要全局地址,因此我们直接删除该地址。
/etc/sysctl.d/10-ipv6-privacy.conf
在最后一行编辑:
net.ipv6.conf.default.use_tempaddr = 2
到net.ipv6.conf.default.use_tempaddr = 0
然后重启网络。
sudo sysctl --system
sudo service network-manager restart
完毕!