Posted: Wed Jul 28, 2021 15:49 Post subject: Working IPv6 6to4 on any recent DD-WRT build?
Hi all! I just jumped back on the DD-WRT train with my TP-Link Archer C7 v4. Took me a bit of tinkering to figure out some stable settings (needed to use Vanilla 5GHz or my Android phones would drop every couple minutes, for example), but all seems to be working better than stock now.
Only thing I'm still struggling with is IPv6 6to4. I used to have it working on my old router with older DD-WRT by following the Wiki, https://wiki.dd-wrt.com/wiki/index.php/IPv6#6to4_Setup, but it unfortunately appears outdated since it doesn't mention any of the new IPv6 pages or options.
Has anyone managed to get it working on modern DD-WRT and can share how?
Stock and TomatoUSB both have a 6to4 option built in, so would be nice if it got simplified on DD-WRT at some point too.. Thanks!
Last edited by osm0sis on Wed Aug 11, 2021 1:48; edited 8 times in total
Only thing I'm still struggling with is IPv6 6to4. Has anyone managed to get it working on modern DD-WRT and can share how? Stock and OpenWRT both have a 6to4 option built in, so would be nice if it got simplified on DD-WRT at some point too. Thanks!
For IPv6 6in4 set MTU -40 of WAN's MTU. _________________ Home Network on Telus 1Gb PureFibre - 10GbE Copper Backbone
2x R7800 - Gateway & WiFi & 3xWireGuard - DDWRT r53562 Std k4.9
Off Site 1
R7000 - Gateway & WiFi & WireGuard - DDWRT r54517 Std
E3000 - Station Bridge - DDWRT r49626 Mega K4.4
Off Site 2
R7000 - Gateway & WiFi - DDWRT r54517 Std
E2000 - Wired ISP IPTV PVR Blocker - DDWRT r35531
Hi, it's 6to4 I'm trying to setup, not 6in4; judging by the "6in4 Static Tunnel" options added in the UI it seems like these are different things.
I saw the default IPv6 MTU was already 1452 so I tried changing it to 1452 in the wiki scripts in case that helped, but no luck. I also just tried 1460, same.
So, here's what I've tried so far...
I set IPv6 type to "DHCPv6 with Prefix Delegation" since that seemed to introduce the least unnecessary fields which could interfere with 6to4, blanked out those fields (since it looks like it's just for generating an radvd config, and 6to4 uses custom), enabled radvd and set the custom script to:
#
# IPv6 setup
#
insmod /lib/modules/`uname -r`/ipv6.ko
sleep 5
radvd -C /tmp/radvd.conf start
sleep 5
WANIP="$(ifconfig vlan2 | sed -n '/inet /{s/.*addr://;s/ .*//;p}')"
if [ -n "$WANIP" ]; then
V6PREFIX=$(printf '2002:%02x%02x:%02x%02x' $(echo $WANIP | tr . ' '))
ip tunnel add tun6to4 mode sit ttl 255 remote any local $WANIP
ip link set tun6to4 mtu 1460
ip link set tun6to4 up
ip addr add $V6PREFIX:0::1/16 dev tun6to4
ip addr add $V6PREFIX:1::1/64 dev br0
ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4
kill -HUP $(cat /var/run/radvd.pid)
fi
sleep 10
radvd -C /tmp/radvd.conf start
I've verified there are no issues with the startup script commands themselves, i.e. no syntax problems or errors. The Status even shows an IPv6 address after, but no connectivity actually seems to happen, ipv6.google.com continues to not work.
Last edited by osm0sis on Tue Aug 10, 2021 20:37; edited 1 time in total
Was hopeful this might start working with the new build (r47142) Switch fixes, where I noticed the WebUI showed vlan0 + vlan1 in use so changed it to ensure it properly uses vlan1 + vlan2. Still no luck though.
Here's my current ifconfig output from using the above WIP scripts if anyone could please help.
Hmm thanks, I saw that thread, but WANIP="$(ifconfig vlan2 | sed -n '/inet /{s/.*addr://;s/ .*//;p}')" appears to work correctly and get the WAN IP without issue on my device.
Does that mean it actually cannot be used? By definition deprecated means not recommended for use. Stock firmware still seems to use 6to4 without issue.