Differences between revisions 3 and 4
Revision 3 as of 2006-04-13 17:12:12
Size: 1857
Editor: ?JeroenMassar
Comment: Added information on how to setup IPv6 tunnels
Revision 4 as of 2007-03-25 21:00:48
Size: 2918
Editor: JoeyHess
Comment: add 6to4 interfaces example
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## Auto-converted by kwiki2moinmoin v2005-10-07
Line 10: Line 9:
. = IPv6 6to4 Configuration =

You may not know this, but you already have IPv6 addresses. There is a feature called 6 to 4 which means any IPv4 address can be translated not only into one IPv6 address but many. For details, see <http://people.debian.org/~csmall/ipv6/setup624.html>

To configure 6to4, you need to calculate an IPv6 address, based on your existing IPv4 address. You can do so using the shell. In this example the IPv4 address is 192.0.2.3, you'll replace that with your actual public internet address.

{{{
$ printf "2002:%02x%02x:%02x%02x::1\n" 192 0 2 3
2002:c000:0203::1
}}}

Now edit /etc/network/interfaces, and add a stanza like this:

{{{
auto sit0
iface sit0 inet6 static
        address 2002:c000:0203::1
        netmask 64
        gateway ::192.88.99.1
}}}

The 192.88.99.1 address is a special anycast address that points to the nearest 6to4 router. Assuming that your nearest 6to4 router work, all you should need to do is ifup sit0 and enjoy your new IPv6 connectivity!
Line 13: Line 33:
Debian can be configured using /etc/network/interfaces on Debian (woody, sid and up):
An IPv6 tunn
el can be configured using /etc/network/interfaces on Debian (woody, sid and up):
Line 20: Line 41:
Which will load the IPv6 module when it is not present on your system yet (or do a ''modprobe ipv6'' for a similar effect) Which will load the IPv6 module when it is not present on your system yet (or do a ''modprobe ipv6'' for a similar effect). This is not needed with current versions of Debian, which should autoload ipv6.
Line 39: Line 60:

Debian ["IPv6"] Project

The purpose of the project is to provide a central place to find out about IP version 6 in Debian. All computers that talk on the Internet use a communications protocol called IP (Internet Protocol) and they all use version 4 of this protocol.

["IPv6"] is the new version (there was no 5 really) and is easy to setup in Debian.

There is a [http://people.debian.org/~csmall/ipv6/ Debian IPv6 page] available, which is run by ["CSmall"]

IPv6 6to4 Configuration

You may not know this, but you already have IPv6 addresses. There is a feature called 6 to 4 which means any IPv4 address can be translated not only into one IPv6 address but many. For details, see <http://people.debian.org/~csmall/ipv6/setup624.html>

To configure 6to4, you need to calculate an IPv6 address, based on your existing IPv4 address. You can do so using the shell. In this example the IPv4 address is 192.0.2.3, you'll replace that with your actual public internet address.

$ printf "2002:%02x%02x:%02x%02x::1\n" 192 0 2 3
2002:c000:0203::1

Now edit /etc/network/interfaces, and add a stanza like this:

auto sit0
iface sit0 inet6 static
        address 2002:c000:0203::1
        netmask 64
        gateway ::192.88.99.1

The 192.88.99.1 address is a special anycast address that points to the nearest 6to4 router. Assuming that your nearest 6to4 router work, all you should need to do is ifup sit0 and enjoy your new IPv6 connectivity!

IPv6 Tunnel Configuration

An IPv6 tunnel can be configured using /etc/network/interfaces on Debian (woody, sid and up):

Add to /etc/modules:

ipv6

Which will load the IPv6 module when it is not present on your system yet (or do a modprobe ipv6 for a similar effect). This is not needed with current versions of Debian, which should autoload ipv6.

Add to /etc/network/interfaces:

auto 6in4
iface 6in4 inet6 v4tunnel
  address [Your IPv6 Endpoint]
  netmask [Prefix Length]
  endpoint [PoP IPv4 Endpoint]
  ttl 64
  up ip link set mtu 1280 dev 6in4
  up ip route add default via [PoP IPv6 Endpoint] dev 6in4

Now you can use ifup(8) and ifdown(8) to control your tunnel. What's even better about it, is that the tunnel is set up at boot time, because in /etc/init.d/networking, "ifup -a" is called, which brings up all interfaces from /etc/network/interfaces configured with the "auto" option. More info about configuring IPv6 in Debian is at: [http://people.debian.org/~csmall/ipv6/setup.html Setup]. Note that on Linux <2.4.20 one needs to use 2000::/3, the reason for this is explained in the [http://marc.theaimsgroup.com/?l=linux-net&m=104067759607753&w=2 linux-net archives].

Automated Tunnel Configuration

Try the 'aiccu', for [http://www.sixxs.net SixXS] or 'tspc', for [http://www.hexago.com Hexago] package to automate most of the tunnel configuration.