IPv6 OpenWRT Broadcaster

From Catholicpenguin

Contents

The need for IPv6

IPv6 is the next generation protocol for the Internet, developed because the current Internet protocol (IP) is running out of space as more people and devices become Internet connected. Yet even though it has been ready for use for more then a decade, it is not widely used for a variety of reasons. Mostly, this is due to a chicken-and-egg problem: there aren't many applications which utilize IPv6, so there is little incentive for users to demand IPv6 support.

There's little end users can do about corporate environments; however, substantial benefits to IPv6 exist today for home users. Mostly, IPv6 provides a way for home users to regain end-to-end connectivity, which currently does not exist as almost universally home users are behind NAT routers as a result of the IP shortage.

IPv6 enabled home users gain benefit in a variety of ways. [utorrent link Modern BitTorrent clients] automatically utilize IPv6 to enable higher speeds for downloads. Aside from BitTorrent, several free long-retention IPv6-only news servers exist, allowing high speed file sharing without the need to pay for a site like [ GigaNews]. Furthermore, promising Apple and Microsoft technologies including [ipv6 support link LiveMesh] and remote access applications utilize or require IPv6.

Problem

Despite the usefulness of IPv6 toward home users, it is currently very difficult for most home users to obtain IPv6 service. Almost no North American ISP, and very few in other countries provide IPv6 directly to customers. As a result, IPv6 tunnels over the existing Internet connection are the current means for home users to obtain IPv6 connectivity. Standards exist which allow routers and computers to automatically [ construct IPv6 tunnels] and obtain connectivity without any user intervention, and several organizations and companies provide free IPv6 tunnels which may offer better performance then the automatically configured variants. Most operation systems today automatically configure these tunnels, but the configuration does not work if these operating systems are placed behind a wireless (NAT) router, which is the dominant use case for today's home users.

Unfortunately, no major wireless router other than the Apple Airport Extreme has support for IPv6. Many wireless routers run a software operating system based upon the open source Linux, and as such, several community projects (OpenWRT,DD-WRT, etc) exist which provide alternate operating system for the router. Upon these operating systems, it is possible to add IPv6 support. Installing these alternative operating systems is difficult and time-consuming, even for technologically savvy computer users. Further enabling IPv6 support is even more difficult and time consuming. Furthermore, many users are uncomfortable making modifications to the router providing their only means to the Internet, for fear that if something goes wrong, they will be without Internet.

What's required for a solution

Given the above discussion, any solution to providing end-users with IPv6 support in the near-term will have to operate with users' existing wireless routers, and existing Internet connections. As with most new technology, the easier it is to setup and use, the more successful it will be. Although low cost or free is often a benefit, users are often willing to pay a reasonable price if 1. they see benefit in doing so, and 2. there is a solution available for purchase.

One of my side projects is to develop such a product, but until that time, savvy technical users can use the instructions in this guide to construct such a solution for themselves and family members.

OpenWRT Fonera IPv6 broadcaster

This guide describes how to construct a device which one simply plugs into an electrical outlet somewhere in the house. After initial setup, this device then automatically provides IPv6 service to the home network.

We base this device on a router that supports the OpenWRT linux distribution, a distribution specifically taylored for running on wireless routers. Any device with support for OpenWrt can be used (at home, we use a Buffalo router) but this guide uses a [first generation Fonera ]. This guide focuses on setting up a solution that is simple for home users to maintain; as a consequence, we setup our IPv6 box such that it automatically connects wirelessly to the Internet via the user's existing router.

In addition to a wireless router and operating system, we need IPv6 address space to distribute to the network, and as mentioned above, most ISPs currently do not provide it. This guide describes using the tunnel broker [SixXS]. Of all the tunnel brokers, SixXS has (the author's opinion) arguably the most difficult setup, but provides by far the best service in terms of latency of all the tunnel options.

Obtaining and setting up the hardware

Any wireless router which is supported by OpenWRT should work. Since this is a rapidly moving target, however, this guide selects a specific router, the [ La Fonera] 1st generation (model FON2100). [FON] is currently selling the second generation of these routers, which claim significant improvements in thermal management. When I have time, I plan to make the default IPv6 platform the 2nd generation La Fonera, but if you wish to follow this guide, currently you should use the 1st generation hardware.

1st generation La Foneras are still sold on FON's website, and are also low cost and plentiful on sites such as eBay.

Once requisite Fonera is in your possession, do not plug it in to your network! Instead, follow the OpenWRT instructions to install OpenWRT on the device. Even though more recent versions of OpenWRT exist, I would recommend using version 7.09, as all the IPv6 software required is stable in this version, and more recent versions have at the time of this writing problems with certain components.

By default, OpenWRT configures the Fonera so that it functions as regular wireless router. This means that when plugged in, the Fonera will request an IP address via DHCP over the Ethernet port, and broadcast an unencrypted access point titled 'OpenWrt'.

TODO: Finish and fix this below. For the purposes of this guide, setup OpenWRT such that you have SSH access to the device, connected over the Ethernet port. (Do not use wireless at this point.)

Configuring OpenWRT to connect to the wireless router

This part is a little tricky.

By default, OpenWRT configures the wireless router to function as, well, a wireless router. Thankfully, the Fonera and many other routers have the ability to instead act as a wireless client, and connect to another wireless router. We will utilize this feature to free the user from having to physically connect our device to the network via Ethernet.

The file /etc/config/wireless should look like this:


config wifi-device  wifi0
        option type     atheros
        option channel  auto

        # REMOVE THIS LINE TO ENABLE WIFI:
        #option disabled 1

config wifi-iface
        option device   wifi0
        option network  wlan
        option mode     sta
        option ssid     linksys
        # Note, use psk2 for WPA2
        option encryption psk
        option key      wpapassword

And, the file /etc/config/network should look like this:

# Copyright (C) 2006 OpenWrt.org

config interface loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

config interface wlan
        option ifname   ath0
        option proto    dhcp


config interface lan
        option ifname   eth0
        #option type    bridge
        option proto    static
        # Use whatever IP range you'd like here, it's for administrative purposes later.
        option ipaddr   192.168.137.10
        option netmask  255.255.255.0

</code>

Issue a reboot, and confirm that OpenWRT joins your wireless router. If so, great! Move on.

If not, you'll want t

Links to document

)