Get On IPv6 Right Now

From Sfvlug

(Difference between revisions)
Line 1: Line 1:
 +
There are currently three ways to get on the IPv6 Internet today.  They are either sign up with an ISP that provides native IPv6 connectivity, register with a tunnel broker, or use 6 to 4 relay.  I don't believe any ISPs in the United States currently offer IPv6.  Using a tunnel broker requires additional software and although the software and the account are usually free, this is kind of a hassle.  But using a 6 to 4 relay tunnel is easy to configure and you already have the software necessary to make the connection.
 +
 +
You must configure the 6 to 4 relay tunnel on an Internet-facing interface.  Doing this on a computer behind a NAT will not work.
 +
 +
A 6 to 4 tunnel derives your IPv6 address from your IPv4 address.  To figure out what it is, just convert your IPv4 address to hexadecimal and prefix it with 2002 (8194 in decimal).  This produces a 48-bit prefix.  In IPv6, networks are 64 bits wide, and the other 64 bits of the 128-bit address is the host portion.  You are free to assign the next 16 bits for up to 65,535 networks.  Well, the first network, zero, will be used as an external gateway to your IPv6 internal network.  If you don't know which IP to use, it is the one associated with your default route.  If you don't know that, try this:
 +
 +
<pre>
 +
lynx -dump www.whatismyip.org
 +
</pre>
 +
Identify your IPv6 prefix.
Identify your IPv6 prefix.

Revision as of 05:44, 25 August 2009

There are currently three ways to get on the IPv6 Internet today. They are either sign up with an ISP that provides native IPv6 connectivity, register with a tunnel broker, or use 6 to 4 relay. I don't believe any ISPs in the United States currently offer IPv6. Using a tunnel broker requires additional software and although the software and the account are usually free, this is kind of a hassle. But using a 6 to 4 relay tunnel is easy to configure and you already have the software necessary to make the connection.

You must configure the 6 to 4 relay tunnel on an Internet-facing interface. Doing this on a computer behind a NAT will not work.

A 6 to 4 tunnel derives your IPv6 address from your IPv4 address. To figure out what it is, just convert your IPv4 address to hexadecimal and prefix it with 2002 (8194 in decimal). This produces a 48-bit prefix. In IPv6, networks are 64 bits wide, and the other 64 bits of the 128-bit address is the host portion. You are free to assign the next 16 bits for up to 65,535 networks. Well, the first network, zero, will be used as an external gateway to your IPv6 internal network. If you don't know which IP to use, it is the one associated with your default route. If you don't know that, try this:

lynx -dump www.whatismyip.org

Identify your IPv6 prefix.

echo $IPV4ADDR | awk -F. '{ printf("2002:%x%02x:%x%02x\
", $1, $2, $3, $4) }'

Configure your IPv6-to-IPv4 tunnel device.

iptables -I INPUT -p 41 -i eth0.1 -j ACCEPT
ip tunnel add tun6to4 mode sit ttl 64 remote any local $IPV4ADDR
ip link set dev tun6to4 up
ip -6 addr add $IPV6PRE::1 dev tun6to4
ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4 metric 1

If you want to act as an IPv6 gateway, enable forwarding and add an IPv6 subnet to your internal interface.

echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
ip -6 addr add $IPV6PRE:1::1/64 dev br-lan

If you want to enable automatic address configuration, create a radvd.conf file like this.

interface br-lan {
    AdvSendAdvert on;
    prefix $IPV6PRE:1::0/64 {
        AdvOnLink on;
        AdvAutonomous on;
    };
};

And start radvd (use -C /path/to/radvd.conf if necessary).

Personal tools