Linux 6RD HOWTO

© 2010-2011 Nathan Lutchansky, All Rights Reserved

Last modified: 2011-01-23

Introduction

This document describes how to install extremely basic 6RD support on Linux with an emphasis on Ubuntu 10.04. Network interface and routing setup must be done by hand: don't try this if you're not intimately familiar with manually configuring IPv6. These instructions are not for IPv6 or Linux novices!

What is 6RD?

IPv6 Rapid Deployment on IPv4 Infrastructures, or 6RD for short, is an automatic tunneling mechanism recently standardized by the IETF which allows ISPs to easily deploy IPv6 as an overlay on an existing IPv4 network. Using the ISP-assigned IPv4 address and a static set of configuration parameters received in the DHCPv4 6RD option, home routers can assign IPv6 prefixes to LAN-side subnets and configure a default route through an IPv6-in-IPv4 tunnel to the ISP's 6RD border router.

This mechanism easily scales to a large number of customers as neither the ISP's 6RD border router nor DHCPv4 server require any per-customer configuration for 6RD.

What are the requirements to use 6RD?

First, your ISP must provide 6RD connectivity. As of this writing, only a handful of ISPs are deploying 6RD, the most prominent being Comcast who is deploying 6RD in a controlled trial.

Second, your home router must support 6RD. Most don't. If you have a standalone wireless router such as those made by Linksys, D-Link, etc, then try searching Google to see if your router supports 6RD.

If you use a standard Linux system as your home router, it must have kernel version 2.6.33 or later with the CONFIG_IPV6_SIT_6RD option enabled, and iproute2 2.6.33 (sometimes known as ss100224) or later.

To check if your kernel supports 6RD, run:

$ grep 6RD /boot/config-$(uname -r)
CONFIG_IPV6_SIT_6RD=y
$ 

If grep returns CONFIG_IPV6_SIT_6RD=y, then your kernel supports 6RD. Otherwise, if you get no result or "CONFIG_IPV6_SIT_6RD is not set", then your kernel does not support 6RD.

To check if iproute2 supports 6RD, run:

$ ip tunnel help
Usage: ip tunnel { add | change | del | show | prl | 6rd } [ NAME ]
          [ mode { ipip | gre | sit | isatap } ] [ remote ADDR ] [ local ADDR ]
...

Your iproute2 supports 6RD if 6rd is shown on the first line.

If you're running Ubuntu 10.04 (Lucid), your kernel and iproute2 are too old, so you'll need to install the versions for Maverick that have been backported to Lucid. The Maverick kernel is available as an optional package from the official Lucid updates repository, and the Maverick iproute2 can be installed from my iproute ppa.

Installation of these packages can be done as follows:

# add-apt-repository ppa:nathan-launchpad/iproute-lucid-ppa
# apt-get update
# apt-get install iproute linux-headers-generic-lts-backport-maverick linux-image-generic-lts-backport-maverick

Running add-apt-repository may prompt you to install python-software-properties, which you will then need to do before continuing. After the new packages are installed, you will need to reboot the system, of course, to start using the new kernel.

How do I enable 6RD?

If you're using a standalone router device that supports 6RD, it's quite possible that you're already using 6RD! After all, the whole idea behind 6RD is that it can be configured and enabled with no input from the end user. Check our front page to see if you've connected to this web server with IPv6. If not, you'll need to contact your ISP or seek help elsewhere.

To enable 6RD on a standard Linux system, you'll first need to obtain your ISP's 6RD parameters. (Comcast users can obtain this information from the Comcast 6RD page.) You will need the 6RD prefix and the IPv4 address of the 6RD border router. If your ISP does not provide these to you directly, you'll need to modify your DHCP client to display the contents of the 6RD DHCP option, as follows:

[TBD - insert directions to install this dhclient script]

Once you have the 6RD parameters, you can determine your delegated prefix. This is the IPv6 address block you will be using for your local network.

The delegated prefix is constructed by appending your ISP-assigned IPv4 address to the 6RD prefix. For example, if your 6RD prefix is 2001:db8::/32, your ISP-assigned IPv4 address is 192.0.2.100, and your home network is connected to your router on interface eth0, you would configure your LAN address as follows:

# printf "%02x%02x:%02x%02x\n" 192 0 2 100
c000:0264
# ip addr add 2001:db8:c000:0264::1/64 dev eth0
#

Next, you will need to bring up the 6RD tunnel interface. Assuming your ISP's 6RD border router is at 1.2.3.4:

# ip tunnel add 6rd mode sit local 192.0.2.100 ttl 64
# ip tunnel 6rd dev 6rd 6rd-prefix 2001:db8::/32
# ip addr add 2001:db8:c000:0264::1/32 dev 6rd
# ip link set 6rd up
# ip route add ::/0 via ::1.2.3.4 dev 6rd
#

That's it! Your border router should now be able to ping IPv6 addresses such as ipv6.google.com.

Now you may configure radvd, ip6tables, or any other IPv6-related settings that are necessary for your network.