K2路由器插上网线,WIFI是不支持IPv6的,需要开启nat6功能才能在wifi中使用ipv6。
理论上,原生openwrt(!原生openwrt下面过程不适用,需要修改一下)也可以,但是原生openwrt对K2路由器支持不好,2G信号差,速度慢。于是就用了Pandorabox这个固件。信号贼好,木有发现什么问题。
方法1
Step1:刷Pandorabox固件,下载链接,找到K2的固件。
Step2:使路由器连接上网络,用putty登陆路由器
Step3:在putty里面输入
opkg update && opkg install kmod-ipt-nat6
opkg install iputils-tracepath6
Step4:
uci set network.globals.ula_prefix="$(uci get network.globals.ula_prefix | sed 's/^./d/')"
uci commit network
Step5:
uci set dhcp.lan.ra_default='1'
uci commit dhcp
Step6:
touch /etc/init.d/nat6
vi /etc/init.d/nat6
#!/bin/sh /etc/rc.common
# NAT6 init script for OpenWrt // Depends on package: kmod-ipt-nat6
START=55
# Options
# -------
# Use temporary addresses (IPv6 privacy extensions) for outgoing connections? Yes: 1 / No: 0
PRIVACY=1
# Maximum number of attempts before this script will stop in case no IPv6 route is available
# This limits the execution time of the IPv6 route lookup to (MAX_TRIES+1)*(MAX_TRIES/2) seconds. The default (15) equals 120 seconds.
MAX_TRIES=15
# An initial delay (in seconds) helps to avoid looking for the IPv6 network too early. Ideally, the first probe is