Getting IPv6 to work on this router wasn't easy. Finally figured it out by reading

I've pretty much written my own script, but I'm not including everything that I should include... This is just a very basic script which gets the job done. I may later on write a more comprehensive script which includes this fix like

So, here is /jffs/etc/config/ipv6.startup


insmod ipv6
insmod ip_tunnel
insmod sit
sleep 10


CLIENT_IPV4_ADDR="$(nvram get wan_ipaddr)"

echo "External IP:" $CLIENT_IPV4_ADDR > $LOG
if [ -n $CLIENT_IPV4_ADDR ]; then
echo "configuring tunnel" >> $LOG

ip tunnel add he-ipv6 mode sit remote $SERVER_IPV4_ADDR local $CLIENT_IPV4_ADDR ttl 255 2>> $LOG
ip link set he-ipv6 up 2>> $LOG
ip addr add $CLIENT_IPV6_ADDR/64 dev he-ipv6 2>> $LOG
ip route add ::/0 dev he-ipv6 2>> $LOG
ip -f inet6 addr
ip -6 addr add $ROUTED_64_ADDR"1/64" dev br0 2>> $LOG

echo "nameserver 2620:0:ccc::2" >> /tmp/resolv.dnsmasq
echo "nameserver 2620:0:ccd::2" >> /tmp/resolv.dnsmasq

killall radvd 2>> $LOG

echo "interface br0 {" > $RADVD_CONFIG
echo "AdvSendAdvert on;" >> $RADVD_CONFIG
echo "prefix "$ROUTED_64_ADDR"/64 {" >> $RADVD_CONFIG
echo "AdvOnLink on;" >> $RADVD_CONFIG
echo "AdvAutonomous on;" >> $RADVD_CONFIG
echo "AdvRouterAddr on;" >> $RADVD_CONFIG
echo "};" >> $RADVD_CONFIG
echo "};" >> $RADVD_CONFIG

echo "starting radvd" >> $LOG
radvd -C $RADVD_CONFIG 2>> $LOG &

This should do it. Simply run the script manually if you want to have IPv6 applied immediately before reboot. Also be sure you chmod +x /jffs/etc/config/ipv6.startup that file, otherwise it won't be executable.

Previous Post Next Post