Working IPv6 6to4 on any recent DD-WRT build?

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
osm0sis
DD-WRT Novice


Joined: 28 Jul 2021
Posts: 11
Location: Canada

PostPosted: Wed Jul 28, 2021 15:49    Post subject: Working IPv6 6to4 on any recent DD-WRT build? Reply with quote
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. Very Happy

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
Sponsor
mac913
DD-WRT Guru


Joined: 02 May 2008
Posts: 1848
Location: Canada

PostPosted: Wed Jul 28, 2021 15:59    Post subject: Re: TP-Link Archer C7 v4 IPv6 6to4 Reply with quote
osm0sis wrote:
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


YAMon 3.4.6 | DNSCrypt-Proxy V2
osm0sis
DD-WRT Novice


Joined: 28 Jul 2021
Posts: 11
Location: Canada

PostPosted: Thu Jul 29, 2021 2:50    Post subject: Re: TP-Link Archer C7 v4 IPv6 6to4 Reply with quote
mac913 wrote:
For IPv6 6in4 set MTU -40 of WAN's MTU.


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:
Code:

interface br0 {
  MinRtrAdvInterval 3;
  MaxRtrAdvInterval 10;
  AdvLinkMTU 1460;
  AdvSendAdvert on;
  prefix 0:0:0:1::/64 {
    AdvOnLink on;
    AdvAutonomous on;
    AdvValidLifetime 86400;
    AdvPreferredLifetime 86400;
    Base6to4Interface vlan2;
  };
};
 


Then made a Startup script as follows:
Code:

#
# 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
osm0sis
DD-WRT Novice


Joined: 28 Jul 2021
Posts: 11
Location: Canada

PostPosted: Tue Aug 10, 2021 20:25    Post subject: Reply with quote
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.

Code:

root@my:~# ifconfig
br0       Link encap:Ethernet  HWaddr 70:4F:57:BE:57:95
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: 2002:4042:d225:1::1/64 Scope:Global
          inet6 addr: fe80::724f:57ff:febe:5795/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16104 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14615 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:9692880 (9.2 MiB)  TX bytes:5054596 (4.8 MiB)

eth0      Link encap:Ethernet  HWaddr 70:4F:57:BE:57:95
          inet6 addr: fe80::724f:57ff:febe:5795/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45184 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15016 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6391303 (6.0 MiB)  TX bytes:9862671 (9.4 MiB)
          Interrupt:4

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MULTICAST  MTU:65536  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1009 (1009.0 B)  TX bytes:1009 (1009.0 B)

tun6to4   Link encap:IPv6-in-IPv4
          inet6 addr: 2002:4042:d225::1/16 Scope:Global
          inet6 addr: ::4042:d225/96 Scope:Compat
          UP RUNNING NOARP  MTU:1460  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vlan1     Link encap:Ethernet  HWaddr 70:4F:57:BE:57:95
          inet6 addr: fe80::724f:57ff:febe:5795/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:278 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1394 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:81077 (79.1 KiB)  TX bytes:221791 (216.5 KiB)

vlan2     Link encap:Ethernet  HWaddr 70:4F:57:BE:57:95
          inet addr:64.66.210.37  Bcast:64.66.211.255  Mask:255.255.254.0
          inet6 addr: fe80::724f:57ff:febe:5795/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:44905 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13612 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5496872 (5.2 MiB)  TX bytes:9579948 (9.1 MiB)

wlan0     Link encap:Ethernet  HWaddr 70:4F:57:BE:57:94
          inet6 addr: fe80::724f:57ff:febe:5794/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9710 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7544 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8728234 (8.3 MiB)  TX bytes:1291087 (1.2 MiB)

wlan1     Link encap:Ethernet  HWaddr 70:4F:57:BE:57:97
          inet6 addr: fe80::724f:57ff:febe:5797/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6701 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10128 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1249965 (1.1 MiB)  TX bytes:4800280 (4.5 MiB)
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Tue Aug 10, 2021 21:30    Post subject: Reply with quote
Re: [IPv6] 6to4 Tunnel Broken
osm0sis
DD-WRT Novice


Joined: 28 Jul 2021
Posts: 11
Location: Canada

PostPosted: Wed Aug 11, 2021 1:35    Post subject: Reply with quote
blkt wrote:
Re: [IPv6] 6to4 Tunnel Broken


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.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6858
Location: Romerike, Norway

PostPosted: Wed Aug 11, 2021 18:22    Post subject: Reply with quote
The standard was deprecated in 2015.

https://en.wikipedia.org/wiki/6to4
osm0sis
DD-WRT Novice


Joined: 28 Jul 2021
Posts: 11
Location: Canada

PostPosted: Thu Aug 12, 2021 4:21    Post subject: Reply with quote
Per Yngve Berg wrote:
The standard was deprecated in 2015.

https://en.wikipedia.org/wiki/6to4


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.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum