If you want to setup your IPv6 using the routers internal memory instead of Samba Click Here.
After reading about all the nifty stuff DD-WRT does I decided to attack ipv6. Thinking it would be neat having my router not only give out ipv4 address's on my network but ipv6 address's too. After some googling it looked easy enough. Get some info off he.net and copy and paste. Well it wasn't exactly like that. There are many Firmwares based on linux for the WRT54Gs so each has it's own little quirk. Here will be the setup for ipv6 tunneling over ipv4 on a Linksys WRT54Gs v4 running DD-WRT 23.
Setting up the Router for IPv6
Go on your routers httpd server and click on "Administration" then scroll down to "IPv6 Support". Click on IPv6 enabled but don't bother clicking on Radvd enabled since the nifty little script I found can automaticly fire it up for you. Save your settings and also go to "Security" and make sure "Block Anonymous Internet Requests" is turned off. If this is turned on you will never get your authentication from the tunnelbroker thus no ipv6. Save your settings then get ready for the fun part. Telnet or SSH into the router and login. If your not sure how to do this Read this and it should get you a little more familiar with getting connected to the router. Because my router is a v4 I have half the space of the other versions. This restricts me from using jffs which means my entire filesystem is read only. That's okay because I can use Samba (Windows File Shares) as more storage space for the router. If your lost on setting up a SMB share click here for more information. Now your router should be more or less setup for ipv6. If you have jffs feel free to use that also since why not have it all contained on the router and not depend on another running machine. For me it's not too much of an inconvienence becuase that extra machine on my network is my server and it's on 24/7 anyways. For people running desktop machines it might not be as convienent.
Setting up the Tunnel
To setup a ipv4 -> ipv6 tunnel simply goto http://tunnelbroker.net and sign up for a ipv6 address. Once that is done if you followed my instructions on stopping the router from blocking the broker from checking if your really who you say you are it should be good to go in ~ 1 - 24 hours. (yeah it's annoying). Once that is all running we can jump to the next part. Editing the script and setting up your clients to hop on the 6bone.
If your intrested in doing this not using SAMBA or /jffs then go here. It's about the same amount of difficulty just a different way of looking at things.
Fixing the Script for your Needs
Okay, so now you got your ipv6 address and your wondering "How do I put it on that script". Click on Administration -> Tunnel details and you should get a screen similar to below. Download this Script and slap it somewhere your router can read (on the router or on a smb share on your network which your router has access too
On the script you only need to edit a few lines.
Oviously change the values as needed to what your tunnel is setup as. Your WAN IP is automaticly found in the script so you don't have to worry about it.
/usr/sbin/ip -6 addr add 2001:470:1F00:2046::/64 dev br0
Change this also to what your value is.
/sbin/radvd -C /tmp/smbshare/router/radvd.conf
You need to make a radvd.conf somewhere your router can also get information off of. Being your JFFS partition or your smbshare. Simply download that conf and edit this one line:
Simply change that to your assigned ipv6 address.
Okay ... now you got the script all configured and radvd.conf all setup. Now to setup the clients
Setting up the Clients
Setting up the clients has to be the easiest thing in the world to do if it works.
Windows XP: Start -> Run -> ipv6 install
Windows 2000: Read this
Windows 9x/ME: Get a new operating system ... your not supported
Linux: type as root "modprobe ipv6" (if you get an error about no ipv6 module you need to compile the module for your kernel) and im not getting into that)
Anything else read the manual or google it or somthing im not going to get into that.
Now that the clients are setup the script should fire up nicely with no errors. On the router goto the directory of the script and type "./ip.sh". If you happen to fire it up 2x you will see a few "we already got that" errors but don't worry since it's already running nothing will be hurt. Once you see it up and running go on one of the machines and type in:
Windows: ping6 ftp.netbsd.org
Linux: ping6 ftp.netbsd.org
If you get a ping back ... welcome to the 6bone if not continue reading.
This website is also hosted on ipv6 so if you goto http://solosoft.org and it works well welcome to the 6bone. The only way that link I gave you would work is if ipv6 was enabled.
Okay so it doesn't work
First on the router go "ifconfig" and see if you see the network adapter "sixbone" if you do not then there is somthing wrong with your script make sure everything is fine and that you didn't change somthing in the script you shouldn't have. If you have sixbone on your ifconfig then type "ps aux" and see if you find any process with "radvd". If those are both working, Well lets take a peek at your network settings maybe for some reason your clients don't have ipv6 installed lets see:
Ethernet adapter Internet:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.102
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 2001:470:1f00:2046:955f:6a1c:55e6:2ad3
IP Address. . . . . . . . . . . . : 2001:470:1f00:2046:211:d8ff:fe06:1a8d
IP Address. . . . . . . . . . . . : fe80::211:d8ff:fe06:1a8d%9
Default Gateway . . . . . . . . . : 192.168.1.1
Okay ... well as you can see mine has gotten the response from radvd. If yours does not have this reboot the windows machine and it should get an IP address if your router is setup properly and your client is also.
Linux: (in root) ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BA:28:03:2A
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2001:470:1f00:2046:250:baff:fe28:32a/64 Scope:Global
inet6 addr: fe80::250:baff:fe28:32a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32030955 errors:0 dropped:0 overruns:0 frame:4
TX packets:38321862 errors:1 dropped:0 overruns:1 carrier:0
RX bytes:1561580199 (1.4 GiB) TX bytes:2824989104 (2.6 GiB)
Interrupt:177 Base address:0x9100
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 MTU:16436 Metric:1
RX packets:90725 errors:0 dropped:0 overruns:0 frame:0
TX packets:90725 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:8526677 (8.1 MiB) TX bytes:8526677 (8.1 MiB)
As you can see I have ipv6 address's nicely in my ifconfig so my machine is correctly configured. If you happen not to have them what you can do is reboot the box or restart the network adapter (im not going to get into that there is too many versions and distros of linux)
Okay, this is how to autoload your script when the router reboots or restarts, it's only if you used Samba if you have not used samba then take a peek here. If you used SMB then don't worry it's easy as clicking on one button and typing in "ip.sh". Goto Administration on the main page and find where you setup your smb share and simply type in "ip.sh" on the startup script. For the router to find your file it has to be on the root of your share. In my case it's my home dir on my linux box. Simply mv your file to your root of your home dir and it will manage everything when you reboot.
Well, if it still doesn't work or you think there is somthing missing to this conf or you even know a better way to configure things then please don't be shy and email me. Maybe I forgot somthing maybe I didn't but if it does work please give me a shout. If it doesn't work ... well please also give me a shout. I don't know somthing is broken unless someone tells me. I check my email often so im sure i'll get to you before you get mad and set your router on fire.
If you have any questions or comments on my projects just toss an email to firstname.lastname@example.org
(c) Solosoft.org 2011