oreilly.comSafari Books Online.Conferences.


Getting Connected with 6to4

by Hubert Feyrer

This article will concentrate on how to get network connectivity for IPv6 -- as it's still not easy to get native IPv6 connectivity today -- and talk in length about the alternatives to native v6 connectivity as a transitional method until native v6 peers are available.

If you find an ISP that offers IPv6 natively, you are lucky. What you need next is a router that will be able to handle the traffic. To date, not all router manufacturers offer IPv6 support for their machines, and even if they do, it's unlikely that they offer hardware accelerated v6 routing or switching. A rather cheap alternative to the router hardware commonly in use today is a standard PC configured as a router, by using a Linux- or BSD-derived operating system like NetBSD, and using software like Zebra for handling the routing protocols. This solution is rather common today for sites that want IPv6 connectivity. The drawbacks are that you need an ISP that supports IPv6, and that you need dedicated uplink only for IPv6.

If this is not an option for you, you can still get IPv6 connectivity through tunnels. Instead of talking using IPv6 on the wire, the v6 packets are encapsulated in v4 packets. Using the existing infrastructure, the encapsulated packets are sent to a v6-capable uplink that will then remove the encapsulation, and forward the v6 packets via native IPv6.

Diagram of tunneling IPv6 in IPv4 packets.
A frequently used method for transition is tunneling IPv6 in IPv4 packets.

When using tunnels, there are two possibilities. One is to use a so-called "configured" tunnel, the other is called an "automatic" tunnel. A configured tunnel is one that requires preparation from both ends of the tunnel, usually connected with some kind of registration to exchange setup information. An example for such a configured tunnel is the IPv6-over-IPv4 encapsulation described in [RFC1933], and that's implemented by the "gif" device found in the KAME-derived BSD-stacks like NetBSD.

Previously in this series:

Introduction to IPv6

Comment on this articleBased on what you've read in this article, do you think it's time for you to start playing with IPv6? What are your thoughts?
Post your comments

An "automatic" tunnel consists of a public server that has IPv6 connectivity, such as via 6Bone. This type of server has made its connectivity data public, and also runs a tunneling protocol that does not require an explicit registration of the sites using it as an uplink. A well-used example of such a protocol is the 6to4 mechanism described in [RFC3056], and implemented by the "sit" device found in Linux or in "stf" found on KAME-derived BSD stacks. Another mechanism that does not require registration of v6-information is the 6over4 mechanism, which implements transporting of IPv6 over a multicast-enabled IPv4 network, instead of Ethernet or FDDI. 6over4 is documented in [RFC2529]. Its main drawback is that you do need existing multicast infrastructure. If you don't have that, setting it up is about as much effort as setting up a configured v6 tunnel directly, so it's usually not worth bothering in that case.

Getting 6to4 IPv6 up and running

This section will talk in length about setting up a automatic tunnel using 6to4. 6to4 is rather easy to setup, esp. with the background given in the previous sections. Example configurations will be given for RedHat Linux 7.0 and NetBSD 1.5.

6to4 is an easy way to get IPv6 connectivity for hosts that only have an IPv4 uplink. It can be used with static as well as dynamically assigned IPv4 numbers, as found in modem dial-up scenarios today. When using dynamic v4 addresses, note that a dynamic change of IP numbers will be a problem for incoming traffic, you can't run persistent servers.

Obtaining IPv6 address space for 6to4

The 6to4 setup on your side doesn't consist of one single IPv6 number. Instead, you get a whole /48 network! The IPv6 addresses are derived from your (single) IPv4 address. The address prefix "2002:" is reserved for 6to4 based addresses (such as v6 addresses derived from IPv4 addresses). The next 32 bits are your IPv4 address. This results in a /48 network that you can use for your very own purposes. It leaves 16 bits of space for 216 IPv6 subnets, which can take up to 264 nodes each. Thanks to the 6to4 prefix and your worldwide unique IPv4 address, this address block is also unique, and it's mapped to you.

6to4 derives a IPv6 from an IPv4 address
6to4 derives a IPv6 from an IPv4 address.

Pages: 1, 2, 3

Next Pagearrow

Sponsored by: