IPv6, successor to IPv4, is a new version of the IP protocol designed to fix its flaws, most notably the scarcity of available IP addresses. This protocol handles the network layer; its purpose is to provide a way to address machines, to convey data to their intended destination, and to handle data fragmentation if needed (in other words, to split packets into chunks with a size that depends on the network links to be used on the path and to reassemble the chunks in their proper order on arrival).
Debian kernels include IPv6 handling in the core kernel (which was not always the case; the ipv6
module used to be optional). Basic tools such as ping
and traceroute
have their IPv6 equivalents in ping6
and traceroute6
, available respectively in the iputils-ping and iputils-tracepath packages.
The IPv6 network is configured similarly to IPv4, in /etc/network/interfaces
. But if you want that network to be globally available, you must ensure that you have an IPv6-capable router relaying traffic to the global IPv6 network.
Example 10.10. Example of IPv6 configuration
iface eth0 inet6 static
address 2001:db8:1234:5::1:1
netmask 64
# Disabling auto-configuration
# up echo 0 >/proc/sys/net/ipv6/conf/all/autoconf
# The router is auto-configured and has no fixed address
# (/proc/sys/net/ipv6/conf/all/accept_ra). If it had:
# gateway 2001:db8:1234:5::1
If a native IPv6 connection is not available, the fallback method is to use a tunnel over IPv4. Freenet6 is one (free) provider of such tunnels:
To use a Freenet6 tunnel, you need to register on the website, then install the tspc package and configure the tunnel. This requires editing the /etc/tsp/tspc.conf
file: userid
and password
lines received by e-mail should be added, and server
should be replaced with broker.freenet6.net
.
IPv6 connectivity is proposed to all machines on a local network by adding the three following directives to the /etc/tsp/tspc.conf
file (assuming the local network is connected to the eth0 interface):
host_type=router
prefix_len=48
if_prefix=eth0
The machine then becomes the access router for a subnet with a 48-bit prefix. Once the tunnel is aware of this change, the local network must be told about it; this implies installing the radvd
daemon (from the similarly-named package). This IPv6 configuration daemon has a role similar to dhcpd
in the IPv4 world.
The /etc/radvd.conf
configuration file must then be created (see /usr/share/doc/radvd/examples/simple-radvd.conf
as a starting point). In our case, the only required change is the prefix, which needs to be replaced with the one provided by Freenet6; it can be found in the output of the ifconfig
command, in the block concerning the tun
interface.
Then run /etc/init.d/tspc restart
and /etc/init.d/radvd start
, and the IPv6 network should work.