Projet

Général

Profil

IPv6-ADSL » Historique » Version 5

Raphaël Durand, 05/03/2013 23:09

1 3 Laurent GUERBY
{{>toc}}
2 3 Laurent GUERBY
3 1 Raphaël Durand
h1. IPv6-ADSL
4 1 Raphaël Durand
5 1 Raphaël Durand
Cette méthode décrit les modifications à apporter à une configuration OpenWRT pour utiliser IPv6 sur une connexion ADSL Tetaneutral.net .
6 1 Raphaël Durand
Elle a été testée avec un routeur Linksys WRT54GL et un modem Linksys AM200. Si vous avez pu l'essayé avec d'autres matériels, merci de le signaler.
7 1 Raphaël Durand
Ce n'est pas la seule configuration possible, mais c'est la plus simple dans notre cas.
8 1 Raphaël Durand
9 3 Laurent GUERBY
h2. Routage
10 2 Raphaël Durand
11 1 Raphaël Durand
La premiere chose à faire est d'activer le routage IPv6 entre les différentes interfaces.
12 1 Raphaël Durand
Cela permet de ne configurer l'adresse que sur l'interface LAN, très pratique dans le cadre d'un préfixe IPv6 statique.
13 1 Raphaël Durand
14 2 Raphaël Durand
15 1 Raphaël Durand
Pour celà il faut éditer le fichier /etc/sysctl.conf et décommenter la ligne suivante :
16 3 Laurent GUERBY
<pre>
17 1 Raphaël Durand
net.ipv6.conf.all.forwarding=1
18 3 Laurent GUERBY
</pre>
19 2 Raphaël Durand
20 3 Laurent GUERBY
h2. Interfaces
21 1 Raphaël Durand
22 1 Raphaël Durand
Ensuite il faut configurer les interfaces réseau :
23 1 Raphaël Durand
24 3 Laurent GUERBY
<pre>
25 1 Raphaël Durand
config 'interface' 'lan'
26 1 Raphaël Durand
        option 'type' 'bridge'
27 1 Raphaël Durand
        option 'ifname' 'eth0.0'
28 1 Raphaël Durand
        option 'proto' 'static'
29 1 Raphaël Durand
        option 'ipaddr' '192.168.1.1'
30 1 Raphaël Durand
        option 'netmask' '255.255.255.0'
31 4 Raphaël Durand
        #Entrez ici votre prefixe en /56 attribué par Tetaneutral
32 4 Raphaël Durand
        option 'ip6addr' '2a01:6600:8080:xxxx::/56'
33 4 Raphaël Durand
        option 'ip6prefix' '2a01:6600:8080:xxxx::/56'
34 3 Laurent GUERBY
</pre>
35 1 Raphaël Durand
36 1 Raphaël Durand
Ici on configure une adresse IPv6 et le préfixe sur le LAN.
37 1 Raphaël Durand
38 3 Laurent GUERBY
<pre>
39 1 Raphaël Durand
config 'interface' 'wan'
40 1 Raphaël Durand
        option 'ifname' 'eth0.1'
41 1 Raphaël Durand
        option '_orig_ifname' 'eth0.1'
42 1 Raphaël Durand
        option '_orig_bridge' 'false'
43 1 Raphaël Durand
        option 'proto' 'pppoe'
44 1 Raphaël Durand
        option 'password' 'motdepassePPP'
45 1 Raphaël Durand
        option 'username' 'monsieur.dupond%ttn@fdn.nerim'
46 4 Raphaël Durand
        option 'ipv6' '1'
47 5 Raphaël Durand
        option 'accept_ra' '0'
48 1 Raphaël Durand
        option 'send_rs' '0'
49 3 Laurent GUERBY
</pre>
50 2 Raphaël Durand
51 1 Raphaël Durand
Ici on active IPv6 sur le WAN en mettant l'option ipv6 à 1.
52 1 Raphaël Durand
53 1 Raphaël Durand
54 1 Raphaël Durand
Normalement à ce stade vous avez de l'IPv6 jusqu'au routeur.
55 2 Raphaël Durand
Vous pouvez faire un ping6 depuis le routeur pour vérifier.
56 3 Laurent GUERBY
57 3 Laurent GUERBY
h2. RADVD
58 3 Laurent GUERBY
59 2 Raphaël Durand
En configurant une adresse IP statique ça peut fonctionner mais on va plutôt utiliser un mécanisme d'auto-configuration.
60 1 Raphaël Durand
61 1 Raphaël Durand
62 1 Raphaël Durand
Pour celà il faut d'abord installer radvd sur OpenWRT.
63 1 Raphaël Durand
64 2 Raphaël Durand
65 1 Raphaël Durand
Tapez donc la commande 
66 3 Laurent GUERBY
67 3 Laurent GUERBY
<pre>
68 1 Raphaël Durand
opkg update && opkg install radvd
69 3 Laurent GUERBY
</pre>
70 2 Raphaël Durand
71 1 Raphaël Durand
Et ensuite éditez le fichier /etc/config/radvd avec les paramètres suivants :
72 1 Raphaël Durand
73 3 Laurent GUERBY
<pre>
74 1 Raphaël Durand
config interface
75 1 Raphaël Durand
        option interface        'lan'
76 1 Raphaël Durand
        option AdvSendAdvert    1
77 1 Raphaël Durand
        option AdvManagedFlag   0
78 1 Raphaël Durand
        option AdvOtherConfigFlag 0
79 1 Raphaël Durand
        list client             ''
80 1 Raphaël Durand
        option AdvLinkMTU       1452
81 1 Raphaël Durand
        option ignore           0
82 1 Raphaël Durand
83 1 Raphaël Durand
84 1 Raphaël Durand
config prefix
85 1 Raphaël Durand
        option interface        'lan'
86 1 Raphaël Durand
        # If not specified, a non-link-local prefix of the interface is used
87 1 Raphaël Durand
        list prefix             ''
88 4 Raphaël Durand
        #Entrez ici votre prefixe en /64
89 1 Raphaël Durand
        option prefix           '2a01:6600:8080:xxxx::/64'
90 1 Raphaël Durand
        option AdvOnLink        1
91 1 Raphaël Durand
        option AdvAutonomous    1
92 1 Raphaël Durand
        option AdvRouterAddr    0
93 1 Raphaël Durand
        option ignore           0
94 1 Raphaël Durand
95 2 Raphaël Durand
96 1 Raphaël Durand
config rdnss
97 1 Raphaël Durand
        option interface        'lan'
98 1 Raphaël Durand
        # If not specified, the link-local address of the interface is used
99 1 Raphaël Durand
        list addr               ''
100 1 Raphaël Durand
        option ignore           0
101 3 Laurent GUERBY
</pre>
102 2 Raphaël Durand
103 1 Raphaël Durand
Les mécanismes d'autoconfiguration fonctionnent avec un /64, il faut bien configurer le préfixe avec cette taille là.
104 1 Raphaël Durand
Les lignes "option ignore 0" peuvent aussi être supprimés.
105 1 Raphaël Durand
106 2 Raphaël Durand
107 1 Raphaël Durand
Normalement à ce stade les machines de votre réseau récupèrent une adresse IPv6 automatique et fonctionnelle.
108 1 Raphaël Durand
Vous pouvez vérifier votre IPv6 et son fonctionnement en visitant cette page :
109 1 Raphaël Durand
http://whatismyv6.com/
110 2 Raphaël Durand
111 1 Raphaël Durand
112 1 Raphaël Durand
Profitez bien de votre IPv6 !