OpenWrt Forum Archive

Topic: OpenWRT on WRT54GS ( Experiencing problems with IPv6)

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi. I am a new user on this forum, I was browsing in Internet and looking for information if any companies were planning on creating a switch/hub that would have support for IPv6 and surprisingly I found out that some people had tweaked their LinkSYS WRT54(gs)'s to support IPv6 by installing linux to those devices, found also other tweaks like serial ports in same devices, well I am not in to that so much, since computer I mainly use is a laptop that doesn't even have a serial port.. Interesting tweak anyway.. So, I immediately checked out that my funding was on very low, but if I'd order it right a way, it would have been mailed to me on the same day that my paycheck would arrive, so I ordered it, while working and waiting for it's arrival I readed more stuff about the process so I'd be more ready for it.

Okay, that was the intro.. Now, I'd like to get some information, since I wouldn't love to go though de-bricking, so here are my questions about this..

1) Is there risks that installing openwrt while having specific firmware would brick my device more easier? Should I install another firmware to it before starting this (meaning maybe better to install openwrt with older firmware?)

2) Strange.. On Linksys's website.. Newest firmware seems to be 2.07.1 but my Linksys is saying that it would be running currently on 2.09.1 (Jul. 3, 2004)

3) In openwrt userguide it sayes that if my firmware has upgrade possibility with using webpage I could use that instead of using ftp connection during bootwait.. Which would be better idea? Using that or using ftp during boot_wait? Ofcourse it would be easier to use webpage upgrade but I'm ready to use even harder way if it lowers the possibility to brick my device.

4) Manual is saying:
Disconnect the power from the router, open tftp and connect to 192.168.1.1, switch to binary mode and start sending the firmware while the router is unplugged. Immediately after the tftp client starts sending, plug in the router. Note that unplugging is just an easy way to reboot the router, reboot any way you like just be sure to have tftp sending when it boots up again.

So if I disconnect power from my linksys.. (by taking power-cord off from the wall) how can I connect to 192.168.1.1 as it's powered down? Or does this mean that I should take off the power, put it back in and immediately connect to it?

5) Anything else that you'd like to tell to this newbie? I am familiar with linux and BSD's (mostly netbsd) so that shouldn't be so big problem, I just would love to get this right at once..

Some answers in no particular order:

So if I disconnect power from my linksys.. (by taking power-cord off from the wall) how can I connect to 192.168.1.1 as it's powered down? Or does this mean that I should take off the power, put it back in and immediately connect to it?

Manual is a little bit ambiguous there, but yes, you should do exactly as it says: power off, type the TFTP commands (AND connect!), THEN power on.

TFTP of course can't really connect when the power is off, but it will just keep trying until you power on.

Also note that the manual says you should use the ping-hack to enable boot_wait ! Make sure you do this before upgrading (through TFTP or webinterface). Having practiced the TFTP method is a good thing, just to know the drill. Other than that upgrading through the webinterface works well too.

GL

Thanx for tips.. First I tryied to compile it on one of my linux boxes.. Unfortunately I seemed that I ran out of disk space (it took much more than 2 linux kernel source trees  big_smile ) and it was really slow on a pentium 75mhz +24mb ram.. So I downloaded a pre-compiled snapshot.. Then I tryied to install with tftp.. Finally I almost succeeded as it no longer said invalid password.. But instead I timed out  sad  Next phase was to take a risk.. I opened web interface, downloaded openwrt-gs binary to my windows machine and installed from net interface.. First I was scared.. It saied that it's complete.. I tryied to telnet to it and blam!!! Success.. First I typed help and tryied ls.. it worked.. next command was reboot so I'd see if it would work even after a reboot.. And it did  big_smile Thanx.. This is great.. Next I need to find another editor than vim as I never got familiar with it big_smile Maybe need to check if there's nano or something similar in 3rd party list.. But thanx! This is really cool, a linux router  big_smile  big_smile  big_smile (And doesn't take space as much as my earlier linux router which was blown by my gf who spilled water on it  big_smile smile

Okay.. Now I have been getting myself comfortable with openwrt.. and have encountered some problems..

The toughest challenge is getting IPv6..
The damned thing doesn't work  sad

My experiences with ipv6 earlier have been with using tspc of freenet6.. Well, I installed my openwrt as a CVS snapshot.. ( 03.10.2004 ) And I noticed it didn't have ipv6 support compiled inside, so I installed modules and all the ipv6 stuff told in ipv6 howto. Then I installed tspc package. I had to edit it a little as I must use broker.freenet6.net instead of tsps*.freenet6.net as the service has changed in there..

After making bunch of changes I almost got it working.. expect now I get errors when it tryies to make changes to interface with ifconfig..

At default it uses sit1, which didn't seem to exist hmm So I tryied
ifconfig create sit1

But busybox doesn't seem to support this as there's no device sit1 hmm
I changed settings again so instead of sit1 I used sit0.. And I still got some errors, as it uses command:
ifconfig sitX tunnel ::ipv4

I thought it was a bug, so I removed :: from the corresponding line and thought that I'd be more near to solution.. No, I still wasn't able to make it hmm
My ISP doesn't offer IPv6 so I need to use tunnel broker to provide it, and using freenet6 is no more a requirement, as it doesn't seem to be any easier that using other techniques as it ain't so easy on openwrt, so if anyone is able to give me a good quick howto on getting ipv6 connectivity.. I'd be more than glad..

you need kmod-ipv6 and iproute2 package. There is a wiki telling you how to do it for 6to4. Freenet6 is similar. you need to find the tspc package.

However, ifconfig has some problem. You have to use "ip" instead. But the linux.sh used by tspc expect "ip" to be in a different place than what is in openwrt. Change the script and tspc should work perfectly.

you need kmod-ipv6 and iproute2 package. There is a wiki telling you how to do it for 6to4. Freenet6 is similar. you need to find the tspc package.

However, ifconfig has some problem. You have to use "ip" instead. But the linux.sh used by tspc expect "ip" to be in a different place than what is in openwrt. Change the script and tspc should work perfectly.

Thanks for tips. Just got off from my job and I'll try to edit linux.sh to use ip instead of ifconfig..

I already have installed kmod-ipv6 and iproute2.. ip(2) is part of iproute2 afaik.. I was wondering if I should use something else than freenet6 as last night when I tryied to install it, I got many times errors that freenet6's server doesn't respond sad But trying now again with tspc.. Maybe changing to other provider later on..

I corrected path of ip to /usr/sbin/ip (seems to be there) and switched sit0 back to sit1 as it was as default and executed tspc..

Now I get different error:
Error while executing /usr/sbin/ip
   Command: /usr/sbin/ip tunnel add sit1 mode sit ttl 64 remote 206.123.31.116

Btw.. Go to address http://broker.freenet6.net
Does the page look familiar?  big_smile

EDIT: Fixed! Forgot to "insmod ipv6" after rebooting..
------

Now I have different problem again..
Error while executing /sbin/radvd
   Command: /sbin/radvd -C /etc/radvd.conf

(Changed config file to /etc/radvd.conf in linux.sh)

If I execute /sbin/radvd -C /etc/radvd.conf I get no errors.. Log file doesn't explain this also..

radvd doesn't seem to daemonize.. but it doesn't also report any errors.. hmm..

which version of tspc you used ? I like the 1.0 better than 2.1, less cumbersome. Though both worked after some tweaking here and there. just check where it puts the radvd.conf file and you can launch it manually.

You can tell radvd to output to stderr instead of syslog. Alternatively, try syslogd -R  and setup syslogd on a remote host to receive the error and see what is wrong.

I have tried both freenet6 and 6to4 but both have problem accessing certain ipv6 sites making me think that this ipv6 is still not quite functional and didn't bother to go further, though both setup did work, just routing at the remote side that forced me to give up. I could see the dancing turtle at kame.org in both case.

I have 1.0.1 (only version that I was able to find for openwrt)

Propably radvd -m must be used to make it report to stderr.. I don't know correct parameter so I tryied "radvd -C /etc/radvd.conf -m stderr" after this it outputted:
[date] radvd: version 0.7.2 started
still didn't daemonize..

@OpenWrt:/etc/tspc# radvd -C /etc/radvd.conf -d 4 -m stderr
[Jan 01 01:00:51] radvd: version 0.7.2 started
[Jan 01 01:00:51] radvd: Insecure file permissions, but continuing anyway
[Jan 01 01:00:51] radvd: inet_pton returned 1
[Jan 01 01:00:51] radvd: hardware type for br0 is 1
[Jan 01 01:00:51] radvd: link layer token length for br0 is 48
[Jan 01 01:00:51] radvd: prefix length for br0 is 64
[Jan 01 01:00:51] radvd: interface definition for br0 is ok
[Jan 01 01:00:51] radvd: sending RA on br0
[Jan 01 01:00:51] radvd: setting timer: 600.00 secs
[Jan 01 01:00:51] radvd: calling alarm: 599 secs, 999923 usecs
[Jan 01 01:00:51] radvd: recvmsg len=56
[Jan 01 01:00:51] radvd: if_index 4
[Jan 01 01:00:51] radvd: found Interface: br0

I trashed the idea with tspc and started to set up a tun6to4.. Well, after few try'es.. I was able to set it up without errors.. Then I decided to give it a try and commanded "ping6 www.sixxs.net" and it resolved and pings started to reply. I was amazed. Finally.. Then I tryied to another address, I tryied multiple addresses, "www.kame.net" "www.6bone.net" and many more, also tryied to few ipv6 ircnet servers.. And I had to face it.. It didn't work after all.. It seemed that I was able to connect with sixxs.net with ipv6.. But not to anywhere else hmm

I am lost in ipv6 space..

I finally succeeded, now I can ping6 to ipv6 hosts, also kame.net and others than sixxs.net only, here's the script I created to setup tunnel to sixxs.

ip tunnel add sixxs mode sit local [yourIPv4] remote [POP's IPv4]
ip link set sixxs up
ip link set mtu 1280 dev sixxs
ip tunnel change sixxs ttl 64
ip -6 addr add [myIPv6]/prefix dev sixxs
ip -6 ro add default via [POP's IPv6] dev sixxs
ip -6 ro add 2000://3 via [POP's IPv6] dev sixxs
ping6 -c 3 [myIPv6]
ping6 -c 2 [POP's IPv6]

Next.. Native IPv6 router could pass ipv6 to client computers big_smile

damndamndamn.. Requested sixxs for a subnet but as I am not so familiar with ipv6.. Couldn't get it work.. Someone to help..?

Okay. It's working now. Cool.

Posting later on some examples here so ppl could easily get ipv6 without requiring to study this much.. well.. study anyway.. it won't make u worse..

Compiling openwrt now, installed a snapshot earlier..
I was wondering.. Is there possibility to make changes to kernel? As I'd love to have ipv6 compiled into kernel natively, and not as modules.. Checked out main Makefile and atleast it wasn't there to be configured..

I haven't tried with ipv6 but you can probably do CONFIG_IPV6=y in linux.conf and recompile.

CONFIG_IPv6 is set to y as default.
But it compiles it as module, and I'd like native better..

The discussion might have continued from here.