Problems with HE IPv6 tunnel on WRT160N

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
dougb
DD-WRT Novice


Joined: 06 Feb 2010
Posts: 20

PostPosted: Sat Feb 06, 2010 21:12    Post subject: Problems with HE IPv6 tunnel on WRT160N Reply with quote
Howdy,

I'm using ftp://dd-wrt.com/others/eko/V24-K26/svn13575/dd-wrt.v24-13575_NEWD-2_K2.6_std_nokaid_small.bin on a WRT160N v.3, and everything except IPv6 is working fine.

[snipped problem description and old script]

Any help here would be greatly appreciated.

BTW, it's a bit frustrating to have just a little bit of IPv6 support, but none of the real tools that are needed, like ping6, ip6tables, etc. How would I go about making a request to have those things included in the category of IPv6 support, and where can I get versions of them that will work on the image I'm using?

Doug


Last edited by dougb on Sun Feb 07, 2010 8:23; edited 1 time in total
Sponsor
dougb
DD-WRT Novice


Joined: 06 Feb 2010
Posts: 20

PostPosted: Sun Feb 07, 2010 8:22    Post subject: Solved! Reply with quote
I'm a bit embarrassed, but happy that I figured out my mistake. It turns out that the /64 prefix for the tunnel is subtly different from the /64 prefix for the actual routed addresses. For example, if your tunnel endpoint ("Client IPv6 address" on the Tunnel Details page) is 2001:470:xxx1:abcd::2/64 your routed /64 (and therefore the prefix you need for radvd.conf!) is likely going to be 2001:470:xxx2:abcd::/64 ("Routed /64" on the tunnel details page). Once I got this bit fixed I was all set. This also explains why it accidentally worked for me a few times previously. The last time I did this I actually used my routed /48 (which has a totally different prefix) so I didn't run into this problem.

[See new/improved startup script below.]

And for radvd.conf:
Code:
interface br0 {
        AdvSendAdvert on;
        prefix 2001:470:xxx2:abcd::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
        };
};


I hope this saves someone the hours (eek) of frustration that I experienced.

I should also say explicitly how much I appreciate those in the community who have contributed suggestions that I cribbed from in the above, especially crushedhat.


Doug


Last edited by dougb on Fri Aug 03, 2012 8:50; edited 1 time in total
duncanidahoe
DD-WRT User


Joined: 29 Nov 2009
Posts: 354
Location: Dark Side of the Moon

PostPosted: Sat Feb 13, 2010 17:21    Post subject: This code works! Reply with quote
This code works on a wrt160n v3 the only thing I did that isn't on here is enable jffs in telnet. I'm not sure why but radvd wouldn't work without doing that.
Run this script in telnet and it will enable jffs on this firmware.


nvram set jffs_mounted=1
nvram set enable_jffs2=1
nvram set sys_enable_jffs2=1
nvram set clean_jffs2=1
nvram set sys_clean_jffs2=1
nvram commit
reboot



If it's not needed please reply and say so, but I just know that after running this script the code in the thread above works fine.

Just an addition jffs2 is not needed to enable ipv6. When I upgraded to the next build I did not have to enable it.

By the way I'm running ftp://dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/02-03-10-r13832/broadcom_K26/dd-wrt.v24-13832_NEWD-2_K2.6_std_nokaid_small.bin on WRT160N v3


Last edited by duncanidahoe on Fri Mar 12, 2010 12:33; edited 1 time in total
dougb
DD-WRT Novice


Joined: 06 Feb 2010
Posts: 20

PostPosted: Sat Feb 13, 2010 19:34    Post subject: Re: This code works! Reply with quote
duncanidahoe wrote:
This code works on a wrt160n v3 the only thing I did that isn't on here is enable jffs in telnet. I'm not sure why but radvd wouldn't work without doing that.
...
By the way I'm running ftp://dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/02-03-10-r13832/broadcom_K26/dd-wrt.v24-13832_NEWD-2_K2.6_std_nokaid_small.bin on WRT160N v3


You're running a different firmware than I am, so that may account for the difference. It was not necessary for me to enable jffs. What I did have to do (that I forgot to mention, sorry) was to input the radvd.conf into the web interface so that it would get created at each boot.

hth,

Doug
duncanidahoe
DD-WRT User


Joined: 29 Nov 2009
Posts: 354
Location: Dark Side of the Moon

PostPosted: Sun Feb 14, 2010 14:16    Post subject: Thanks for the info. Reply with quote
I thought I was having the same problem and messed with it for a few hours trying to fix the problem and nothing worked. Turned out that my wireless connection status was not detecting the ipv6. After working on it for a while I went to the Kame project and the turtle was dancing even though my wireless connection status said I had no ipv6 internet. Must be a problem with the program or the wireless card driver. Thanks for the info. There are probably a lot of other wrt160n v3 owners out there that can use this info for their own HE tunnels. Kudos.
dougb
DD-WRT Novice


Joined: 06 Feb 2010
Posts: 20

PostPosted: Fri Aug 03, 2012 8:49    Post subject: New and improved startup script Reply with quote
The old command to get the WIP doesn't work anymore, so here is a new version, with some other minor improvements.

It goes under Administration -> Commands -> Save Startup
Code:

#!/bin/sh

insmod ipv6
insmod sit
sleep 5

WIP=$(ifconfig vlan2 | awk '/inet / {print $2}' | cut -f 2 -d':')
if [ -z "$WIP" ]; then
   echo 'Cannot find WAN IP Address on vlan2'  > /tmp/ipv6-startup.debug
   exit 1
fi

# Tunnel Server IPv4 Address
TIP="X.X.X.X"

# Client/Server IPv6 Tunnel /64
TUNNEL="2001:470:xxx1.abcd"

# Routed /64
ROUTED="2001:470:xxx2.abcd"

echo "Configuring tunnel, remote $TIP local $WIP" > /tmp/ipv6-startup.debug

ip tunnel add he-ipv6 mode sit remote $TIP local $WIP ttl 255
ip link set he-ipv6 up
ip addr add ${TUNNEL}::2/64 dev he-ipv6
ip route add ::/0 dev he-ipv6

# Not strictly necessary, but handy
ip -f inet6 addr add ${ROUTED}::1/64 dev br0

killall radvd
echo 'Starting radvd' >> /tmp/ipv6-startup.debug
radvd -C /tmp/radvd.conf &
crashfly
DD-WRT Guru


Joined: 24 Feb 2009
Posts: 2026
Location: Sol System > Earth > USA > Arkansas

PostPosted: Sat Aug 04, 2012 6:06    Post subject: Reply with quote
You guys have probably used the DD-WRT wiki and tried setting it up from there: http://www.dd-wrt.com/wiki/index.php/IPv6

Instead of doing that, I found that someone created an "alternate" configuration that has worked for me. Here are the instructions I used: http://www.dd-wrt.com/wiki/index.php/IPv6_setup_Hurricane_Electric_Tunnel_Broker

It worked like a charm for me on the first try.

_________________
E3000 22200M KongVPN K26
WRT600n v1.1 refirb mega 18767 BS K24 NEWD2 [not used]
WRT54G v2 16214 BS K24 [access point]

Try Dropbox for syncing files - get 2.5gb online for free by signing up.

Read! Peacock thread
*PLEASE* upgrade PAST v24SP1 or no support.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC 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 can attach files in this forum
You can download files in this forum