openwrt IPV6设置
简介:
ipv6其实已经算普及了,联通,电信,我在用的光纤宽带在郑州已经可以正常使用了,虽然IPV6也有墙。
https://test-ipv6.com/
这里可以测试。
但是需要魔法的时候,需要安装dnsmasq-full,删除dnsmasq,然后就没有IPV6了。
下面说下解决方案。
一:刷入官方版本的固件
这都会的。
| Hostname | OpenWrt |
| Model | To be filled by O.E.M. To be filled by O.E.M. |
| Architecture | Intel(R) Celeron(R) CPU 3215U @ 1.70GHz |
| Target Platform | x86/64 |
| Firmware Version | OpenWrt 21.02.2 r16495-bf0c965af0 / LuCI openwrt-21.02 branch git-22.046.85957-59c3392 |
| Kernel Version | 5.4.179 |
二:备份DHCP配置
shell上去
cp /etc/config/dhcp /etc/config/dhcp.old
就是备份/etc/config/dhcp文件
三:删除dnsmasq,安装dnsmasq-full
可以在软件管理里干,也可以shell干
opkg update
opkg remove dnsmasq
rm /etc/config/dhcp
opkg install dnsmasq-full
四:修改dhcp配置文件
dhcp.old
config dhcp 'lan'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
dhcp
config dhcp lan
option interface lan
option start 100
option limit 150
option leasetime 12h
少了几行,我也没去找luci在什么地方配置。
直接改配置文件重启openwrt就好了。
更简单的办法就是直接用old覆盖新的文件,当然,配置文件也可能变为dhcp.opkg