IPv6 router guide/fr

Basic kernel configuration
N'importe quel arbre basé sur un noyau 2.6 disponible dans Gentoo prend facilement en charge les connexions IPv6. La nouvelle pile IPv6 USAGI est intégrée das le noyau depuis Linux 2.6.0.

Vous êtes désormais prêt à entrer dans le répertoire des sources du noyau et à commencer la configuration de votre noyau.

Testing IPv6 support
After enabling the recommended options, recompile the kernel and reboot into the new IPv6-enabled kernel.

If is not yet installed, it is seriously recommended to do so. iproute2 is a network configuration suite that contains, the famous replacement for , , and others...

Si IPv6 fonctionne, le périphérique de boucle de retour (loopback device) devrait indiquer une adresse IPv6 :

Before going any further, make sure to add ipv6 to the list of USE variables in, so that future emerges of packages will include IPv6 support.

Basic configuration
Most ISPs still do not offer any native IPv6 connections. To get around this limitation, there are several "tunnel brokers" around the globe that offer free IPv6 tunnels. This will allow to tunnel all the IPv6 connections through an IPv4 connection.

Ci-dessous, nous présentons deux exemples de création de tunnel avec deux courtiers populaires nord américains, Hurricane Electric (s'applique tout aussi bien aux tunnels non heartbeat de sixx) et Freenet6.

Hurricane Electric
Hurricane Electric (HE for short) offers free IPv6 tunnels and allocates a /64 block of addresses for each customer. It also allows configuration of reverse DNS. Getting a tunnel from HE is as easy as going to https://www.tunnelbroker.net/ and filling out a one page form.

After a tunnel is approved and a /64 block is allocated, start to configure the system. HE provides sample configurations based on and the  utilities. The following two examples assume that the following configuration is used:

Using the package and the  command, do the following.

Créer un tunnel entre l'IPv4 local (eth0) et l'adresse IPv4 distante de HE.

Extraire le surcoût du « tunnelling » du MTU :

Démarrer le tunnel :

Assigner l'adresse IPv6 à ce tunnel :

Route all global unicast IPv6 addresses through our 'he6' tunnel device:

The following example shows how to establish this at boot time:

To make this device start on boot:

When tunneling IPv6 over IPv4, the packets will first come through the IPv4 chain before being passed to the IPv6 chain.

Freenet6
Freenet6 is another free tunnel broker. Optional registration only requires a username and a valid email address. They have chosen to turn the tunnel management into a client/server setup and have created the  client. The client is available in Portage. To install it do:

Now when choosing to connect with authentication, configure  by editing. Only the userid and passwd fields need to be changed to match those assigned from Freenet6 and change the gateway server. Below is a sample config file.

Testing the connection
Now that the tunnel is configured, test the connection. The easiest way to do this is to use the  utility and try to ping an IPv6 host.

Further work is currently in progress to add better IPv6 support to the network init scripts. To know the status of this and/or help out, please email.

Réinstaller des paquets
Unless  was already set in  previously, it is probably necessary to re-emerge a bunch of packages to compile in IPv6 support for them. To get a list of all the installed packages which are affected by USE flag changes, use Portage's   option:

When many USE flags have been changed, the list could be quite long. It's suggested to keep the system up-to-date, so it won't hurt if all affected packages are rebuilt.

IPv6 specific packages
Il existe quelques paquets qui concernent spécifiquement des items IPv6. La plupart est localisée dans.

IPv6 et DNS
Tout comme DNS utilise des enregistrements A pour l'IPv4, DNS utilise des enregistrements AAAA pour IPv6.(Ceci est dû au fait que IPv4 est un espace d'adressage de 2^32 alors que IPv6 est un espace d'adressage de 2^128). Pour le DNS inverse, la norme INT est déconseillée, car en voie d'obsolescence,  mais encore largement prise en charge. ARPA est la norme actuelle. La prise en charge du format ARPA sera décrite ici.

Configuration de BIND
Recent versions of BIND include excellent IPv6 support. This section will assume at least minimal knowledge about the configuration and use of BIND. We will assume that bind is not running in a chroot. If this assumption is wrong, simply append the chroot prefix to most of the paths in the following section.

First add entries for both forward and reverse DNS zone files in.

Maintenant vous devez créer ces fichiers de zone et ajouter des entrées pour tous vos hôtes :

Configuration de DJBDNS
There are currently some third-party patches to DJBDNS available at http://www.fefe.de/dns/ that allow it to do IPv6 name serving. DJBDNS can be installed with these patches by emerging it with  in the USE variable.

After djbdns is installed, it can be setup by running and answering a few questions about which IP addresses to bind to, where to install tinydns, etc.

Assuming we've installed into, we can now edit. This file will contain all the data needed to get tinydns handling DNS for the IPv6 delegation.

Lines prefixed with a  will have both an AAAA and a PTR record created. Those prefixed with a  will only have an AAAA record created. Besides manually editing the file, it is possible to use the scripts  and  to add new entries. After changes are made to the file, simply run   from. This will create, which tinydns will use as its source of information for DNS requests.

Configurer le routage
Des compléments doivent être apportés à la configuration si vous voulez utiliser votre système comme un routeur pour d'autres clients désireux de se connecter au monde extérieur en IPv6. Vous devez activer le transfert de paquets IPv6. Cela peut se faire de deux manières :


 * Either we set the value 1 in the forwarding pseudo-file:




 * Or we use the command:



To enable forwarding at boot, edit and add the following line.

Le trafic devrait maintenant être transféré de ce système à travers le tunnel que vous avez établi chez votre courtier.

Pour attribuer des adresses IPv6 aux clients, la spécification IPv6 autorise à la fois l'attribution d'adresses IP sans état et avec état. Les attributions sans état utilisent un processus appelé Router Advertisement (publicité de routeur) et permettent aux clients d'obtenir une adresse IP et une route par défaut en activant une interface. Elles sont appelées sans état parce qu'il n'y a pas d'enregistrement de l'adresse IP attribuée et de l'hôte auquel elle est attribué.L'attribution avec état est prise en charge par DHCPv6. Elle est dite avec état parce que le serveur conserve un état du client qui a requis les adresses IP et les a reçues.

Stateless configuration
Stateless configuration is easily accomplished using the Router Advertisement Daemon, or :

After having emerged, we need to create that contains information about what IP block to assign IPs from. Here is a sample file using the prefix we've been assigned from our tunnel broker.

Further information is available in. We can now start and set it to start at boot.

Stateful configuration
To have a stateful configuration, install and configure.

Vous devez maintenant configurer le client dibbler en éditant le fichier.

Vous pouvez maintenant démarrer le client dibbler, et le configurer pour qu'il soit lancé au démarrage

Utiliser radvd
Clients behind this router should now be able to connect to the rest of the net via IPv6. If using radvd, configuring hosts should be as easy as bringing the interface up. (This is probably already done by the net.ethX init scripts).

Should this not work ensure that the IPv6 firewall is allowing ICMPv6 packets through:

External resources
There are many excellent resources online pertaining to IPv6.


 * www.ipv6.org - General IPv6 information
 * www.linux-ipv6.org/ - USAGI project
 * www.deepspace6.net - Linux/IPv6 site
 * www.kame.net - *BSD implementation

On IRC, try the channel on Freenode. Connect to the Freenode servers using an IPv6 enabled client by connecting to irc.ipv6.freenode.net.