A few weeks ago I had a look at IPv6, again. Here’s what I did to get it running.
My goal
First I just wanted to get IPv6 running on my Mac, but as that’s pretty easy, my goal ended up being : Get IPv6 up and running on my home-network on all IPv6-enabled devices, using my old Linksys WRT54G v2.0.
Find a tunnelbroker
There’s a few tunnelbrokers out there, which most guides is aimed on, Sixxs.net and Hurricane Electric. I chose Sixxs, as I first got to know about HE.net later on. I registered and requested a tunnel, and a few days later I got approved.
To register and request a tunnel, just follow the instructions at Sixxs.net faq. It’ll take a few days to get approved, but then you’re in business.
Testing the tunnel
I’m running AYIYA although I could use a static tunnel. But AYIYA is the safe choice. Sixxs supplies a tool to get AYIYA running, called Aiccu, so I grabbed the OSX-version and installed. AICCU needs TunTap to run, so I got that as well. Be sure to rename the aiccu.exe to aiccu-mac-i386 (or just aiccu).
Now, all you have to do, is edit the config-file. You only need to put in your Sixxs login-information, and try it out with
sudo aiccu-mac-i386 start <path to config>
You’ll get some output like this:
Tunnel Information for T1234:
POP Id : dkcph01
IPv6 Local : 2001:16d8:dd00:01::2/64
IPv6 Remote : 2001:16d8:dd00:01::1/64
Tunnel Type : ayiya
Adminstate : enabled
Userstate : enabled
Check if the tunnel actually works by pinging an ipv6-enabled site, fx. ipv6.google.com:
Nicolai:~ Nicolai$ ping6 ipv6.google.com
PING6(56=40+8+8 bytes) 2001:16d8:::1234:4321:feed:beef --> 2a00:1450:8003::63
16 bytes from 2a00:1450:8003::63, icmp_seq=0 hlim=55 time=47.835 ms
16 bytes from 2a00:1450:8003::63, icmp_seq=1 hlim=55 time=47.565 ms
The next step is to request a subnet from Sixxs, there’s instructions on how to do that, when you’re logged in.
Moving to OpenWRT
I’ve tried running OpenWRT on my Linksys WRT54G several years ago, and although it worked, configuration was handled through setting variables in NVRam. In later versions (Kamikaze) a web-interface was added, and it worked almost as well as the standard Linksys firmware.
But before going for OpenWRT, I had a look at DD-WRT. DD-WRT is a lot prettier than OpenWRT, and generally seems very polished. However, I found a lot of inconsistencies, fx. the recommended standard distribution, didn’t have IPv6-support, although it was supposed to. Trying different versions, I finally found a version with IPv6 enabled, but then it was too big, and there wasn’t room for any packages.
So after a lot of hairpulling, tftp’ing different firmwares, hard-resets, stripping headers of firmwares etc, I finally managed to get an OpenWRT-firmware with IPv6-support, lot’s of space for packages, a decent interface and good stability. I’m running Backfire 10.03, bcrm-2.4 now, and I’m very happy with this solution.
Getting IPv6 up and running
Having OpenWRT running, the next steps are getting Aiccu working and announcing my subnet to my internal network through radvd. Sixxs has a very good guide on how to do this. To sum it up:
- Install the required packages
- Make sure the router has a correct time set, use ntpclient to fix this
- Configure aiccu, which means adding your Sixxs-credentials to a config-file
- Configure you lan-interface, add the subnet you got from Sixxs
- Configure radvd, add the subnet
- Reboot and check if everything works
During the installation you can check that every step works as it should. When you’ve setup aiccu, check the log (using logread) and also do an ifconfig sixxs. You should have a tunnel-interface with 2 IPv6-addresses, 1 link-local (fe80::xxxx) and your tunnel-IP (2001::xxxx).
root@OpenWrt:~# ifconfig sixxs
sixxs Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet6 addr: 2001:1234::c0::2/64 Scope:Global
inet6 addr: fe80::1234::2/64 Scope:Link
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1280 Metric:1
RX packets:2596 errors:0 dropped:0 overruns:0 frame:0
TX packets:2643 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:417589 (407.8 KiB) TX bytes:235813 (230.2 KiB)
When configuring your lan-interface, check that it gets an IPv6 address from the routers network configuration, ifconfig br-lan.
root@OpenWrt:~# ifconfig br-lan
br-lan Link encap:Ethernet HWaddr 00:0F:12:34:56:78
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
inet6 addr: 2001:1234:1234::1/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:476533 errors:0 dropped:0 overruns:0 frame:0
TX packets:826159 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:58305513 (55.6 MiB) TX bytes:955237445 (910.9 MiB)
Next, configure radvd by editing it’s configfile and add your subnet again. Start it with radvd start and check on a client, if it has generated a global ipv6-adresse.
Nicolai:~ Nicolai$ ifconfig en2
en2: flags=8863 mtu 1500
ether 00:17:12:34:56:78
inet6 fe80::217:f2ff:feed:beef%en2 prefixlen 64 scopeid 0x6
inet 10.0.0.105 netmask 0xffffff00 broadcast 10.0.0.255
inet6 2001:16d8::217:f2ff:feed:beef prefixlen 64 autoconf
media:
status: active
Looks great, and now the final test. Check connectivity using ping6, traceroute6 or browse to ipv6.google.com
Final words
Getting ipv6 up and running isn’t very hard. There’s lots of help in the forums, so it all comes down to how you want to connect. I spend most of the time getting OpenWRT working.
But why run IPv6 at all? Well, I’m just interested and want to try out different networking tools, firewalls and check how applications handle IPv6. And I also like to have tried and understood IPv6, before I tell everybody to go ahead.
One of the major concerns in going IPv6 is that your clients is directly connected. Most homeusers run NAT, and clients isn’t directly visible from the net. With IPv6.. They are..
One very welcome advantage just dropped by last wee, when Google announced their Instant Search. This is only available in some countries in the beginning, but it’s worldwide on their IPv6-site. This is a great way to push more people into IPv6, by launching new cool services on IPv6-networks, before IPv4.
Have fun!