|
|
问题是关机时openwrt没通告pd失效,而客户和openwrt直接串接了设备端口也不会down导致重启前的pd在客户端一直有效,解决方法加个脚本,在关机的时候先提前把wan口关闭了,让odhcpd发pd失效报文给客户端。
在/etc/init.d/目录中建立ipv6-fix脚本,内容如下,然后执行
chmod +x /etc/init.d/ipv6-fix
/etc/init.d/ipv6-fix enable
- #!/bin/sh /etc/rc.common
- STOP=80
- USE_PROCD=1
- stop_service() {
- ifdown wan
- sleep 1
- }
复制代码
同时把pd有效期改短点,禁用dhcpv6
- uci set dhcp.lan.dhcpv6='server'
- uci set dhcp.lan.ra='server'
- uci set dhcp.lan.ra_slaac='1'
- uci del dhcp.lan.ra_flags
- uci add_list dhcp.lan.ra_flags='other-config'
- uci set dhcp.lan.dhcpv6_na='0'
- uci set dhcp.lan.ra_useleasetime='1'
- uci set dhcp.lan.preferred_lifetime='30m'
- uci add_list dhcp.@dnsmasq[0].notinterface='pppoe-wan'
- uci commit
复制代码 |
|