I've gotten the tunnel to work on AdvancedTomato, which lacks a formal 6rd option.
Notably, I had to combine a couple of resources. I give credit to the the calculator tool linked on the first page, for showing me what values to expect, and for the following page for showing how to get the _correct_ ipv6 address division:
http://www.dslreports.com/forum/remark,28220947 -- in essence, you merely replace "2602:30" with "2602:24", and the v4 gateway with Sonic's v4 gateway.
Here's the portion of my 'firewall' script (since wan-up never seems to run):
Code: Select all
insmod v4tunnel
insmod sit
WANIP=$(nvram get wan_ipaddr)
if [ -n "$WANIP" ]; then
ip tunnel del tun6rd
#WRONG:
#V6PREFIX=$(printf '2602:%02x:%02x%02x:%02x00' $(echo $WANIP | tr . ' '))
#CORRECT:
V6PREFIX="$(printf '%02x%02x%02x%02x' $(echo $WANIP | tr . ' ') | awk '{print "2602:24" substr($1,1,1) ":" substr($1,2,4) ":" substr($1,6) "0"}')"
ip tunnel add tun6rd mode sit local $WANIP ttl 64
ip addr add ${V6PREFIX}::1/28 dev tun6rd
ip addr add ${V6PREFIX}::1/64 dev br0
ip addr add ::$WANIP/128 dev tun6rd
ip link set tun6rd mtu 1472 # not certain if this is actually needed
ip link set tun6rd up
ip -6 route add ::/0 via ::184.23.144.1 dev tun6rd
fi
EDIT: Argh, it works until the WAN IP renews... then dies. The wan_up script is definitely not running, or the IP would be re-created.
EDIT again: I gave up on AdvancedTomato, and switched to the regular Shibby builds. No reset was needed, because AdvancedTomato is merely a UI change. Now I no longer even need the script -- the GUI has formal configuration options for it. However, I did have to configure it with prefix '32' instead of '28', and then ssh to run:
Code: Select all
nvram set ipv6_6rd_prefix_length=28
nvram commit