Pages

Sunday 16 January 2011

DD-WRT IPv6 Support

Right, I suppose I started writing some technical content!

Recently, I purchased a Netgear WNR3500L router, basically because it is marketed as an open source router. The main features that make it particularly useful are its relatively large flash size, a USB port, and 64MB RAM, which make it more than good enough to run a few extra applications. This seemed like a good choice, as support for IPv6 in routers (including custom firmware) is limited, and there is some patchy documentation on getting everything working. I started off by flashing it to DD-WRT, a free custom firmware with basic IPv6 support.

My current ISP does not currently have support for native IPv6, so I need to use either 6to4 or a tunnel broker. As 6to4 is way down on the priority list, I headed over to SixXs and requested a tunnel. Signing up and requesting tunnels and subnets from them requires manual approval by staff, so some people may prefer to use Hurricane Electric instead.

While leaving the requests to go though, it's a good idea to start preparing the router. Basic set up was pretty simple, from here the fun begins. You need some space in which to install extra applications. This can either be in free space on the internal flash, or on an external USB stick (or even in RAM). I took the USB stick approach. You'll need to format it to a filesystem supported by the router. FAT32 is fine, but it's better to use ext2 (some packages need symbolic links). Once it's formatted, enable USB support through the Web UI, and set up automatic mounting, and plug it in. Also make sure to enable Jffs2 support, even if you're not going to use it, as the ipkg command will complain otherwise.

Most of the rest of this setup needs to be done via ssh. Make sure the USB stick is mounted to your chosen mount point. I chose /opt. To actually use the tunnel we need aiccu, which automatically sets up dynamic tunnels (I wont cover static tunnels here). To install it, issue the following command:

ipkg -d /opt install http://downloads.openwrt.org/kamikaze/8.09.2/brcm47xx/packages/aiccu_20070115-2.1_mipsel.ipk

Now to configure it. Assuming you've had your account and tunnel requests accepted, you should have a username and password. The DD-WRT includes 'vi', a popular text editor (Again, I'll assume you know how to use it). Open /opt/etc/config/aiccu and clear it. It needs to look something like this:

username ABCD-SIXXS # SixXs username
password ******** # SixXs password
protocol tic
server tic.sixxs.net
ipv6_interface sixxs
tunnel_id T***** # SixXs tunnel ID
verbose false
daemonize true
requiretls true # optional
defaultroute true


Now just get it up and running by issuing this command:

aiccu start /opt/etc/config/aiccu

That's it, you should now have tunnelled IPv6 connectivity to your DD-WRT router. Try using and online ping6 utility to ping it. I'm sure you'll also want to start the tunnel on boot; so from the web interface, modify the startup script to contain the line you just executed.

Now having IPv6 end at your router is not massively helpful, so my next post will be about how to configure router advertisement and distribute a routed subnet to your local network.

Until next time,
Andee out.

4 comments:

  1. I'm struggling to install aiccu even after enabling jffs2

    ipkg -force-depends install http://downloads.openwrt.org/kamikaze/8.09.2/brcm47xx/packages/aiccu_20070115-2.1_mipsel.ipk
    Downloading http://downloads.openwrt.org/kamikaze/8.09.2/brcm47xx/packages/aiccu_20070115-2.1_mipsel.ipk
    Installing aiccu (20070115-2.1) to /opt/...
    Nothing to be done
    An error ocurred, return value: 28.
    Collected errors:
    Only have 0 available blocks on filesystem /, pkg aiccu needs 97

    # mount
    rootfs on / type rootfs (rw)
    /dev/root on / type squashfs (ro)
    none on /dev type devfs (rw)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    ramfs on /tmp type ramfs (rw)
    devpts on /dev/pts type devpts (rw)
    devpts on /proc/bus/usb type usbfs (rw)
    /dev/discs/disc0/part1 on /opt type ext3 (rw,noatime,data=ordered)
    /dev/sda3 on /jffs type ext3 (rw,noatime,data=ordered)
    /dev/sda4 on /mnt type ext3 (rw,noatime,data=ordered)


    # df -h
    Filesystem Size Used Avail Use% Mounted on
    rootfs 6.3M 6.3M 0 100% /
    /dev/root 6.3M 6.3M 0 100% /
    /dev/discs/disc0/part1
    1.5G 261M 1.2G 19% /opt
    /dev/sda3 504M 17M 462M 4% /jffs
    /dev/sda4 13G 160M 12G 2% /mnt


    I can install other ipkgs just fine. So not sure what is going on.

    ReplyDelete
  2. try:

    ipkg -d /jffs -force-depends install http://downloads.openwrt.org/kamikaze/8.09.2/brcm47xx/packages/aiccu_20070115-2.1_mipsel.ipk

    ReplyDelete
  3. Hi, I've purchased TP-Link1034 with DD-WRT. Can you please guide what configurations I've to enable and make IPv6 running. (Right now i just want my router to assign IPv6 to wired and wireless clients through DHCP & Static). No interaction with ISP yet. Can you guide me for any tutorial/guide form which i can do it,i m a newbie.
    bilalsultan86@gmail.com

    ReplyDelete
  4. Please read this post also:

    http://www.jonisdumb.com/2011/01/dd-wrt-ipv6-to-your-local-network.html

    ReplyDelete