1 | v1.4 10th Jan 2002, Pekka Savola <pekkas@netcore.fi> |
---|
2 | |
---|
3 | HOW TO SET UP AN IPV6 TUNNEL |
---|
4 | ---------------------------- |
---|
5 | |
---|
6 | ASSUMPTIONS |
---|
7 | ----------- |
---|
8 | |
---|
9 | 1. You're running Red Hat Linux 7.1 or later. |
---|
10 | |
---|
11 | This is required for correct IPv6 by default settings, and IPv6 being |
---|
12 | enabled as a kernel module by default. You also need recent enough |
---|
13 | initscripts, provided in RHL71. |
---|
14 | |
---|
15 | 2. You have a static, globally unique IPv4 address. |
---|
16 | |
---|
17 | 3. Protocol 41 (IPv6-in-IPv4) is not being filtered in any IPv4 firewall. |
---|
18 | |
---|
19 | 4. 'iproute' package is installed. This is used by default for a lot |
---|
20 | more powerful tunneling capabilities. |
---|
21 | |
---|
22 | INFORMATION NEEDED |
---|
23 | ------------------ |
---|
24 | |
---|
25 | You need to know: |
---|
26 | |
---|
27 | 1. The IPv4 address of your tunnel end point |
---|
28 | 2. The IPv6 address used in your tunnel |
---|
29 | |
---|
30 | The other end needs to know the same things about your setup. |
---|
31 | |
---|
32 | NOTE: It is also possible to set up unnumbered tunnels (no global IPv6 |
---|
33 | addresses). |
---|
34 | |
---|
35 | You must get these from a party (tunnel broker) who's assigning IPv6 tunnels. See: |
---|
36 | http://www.bieringer.de/linux/IPv6/IPv6-HOWTO/IPv6-HOWTO-1.html#joinIPv6backbone |
---|
37 | |
---|
38 | Example from http://old.freenet6.net: |
---|
39 | --- |
---|
40 | This script will create a tunnel between this computer |
---|
41 | and the Freenet6 server (tunnels server) |
---|
42 | Your IPv6 address (your tunnel end point) is |
---|
43 | 3ffe:b00:c18:1fff:0:0:0:7f5 |
---|
44 | We establish a tunnel to the Freenet6 server at |
---|
45 | 3ffe:b00:c18:1fff:0:0:0:7f4 |
---|
46 | Your IPv4 address is : 193.xxx.yyy.zzz |
---|
47 | The IPv4 address of the Freenet6 server is : 206.123.31.102 |
---|
48 | --- |
---|
49 | |
---|
50 | With this information, a tunnel can be set up: |
---|
51 | |
---|
52 | SETTING UP THE TUNNEL CONFIGURATION |
---|
53 | ----------------------------------- |
---|
54 | |
---|
55 | Now, set up the configuration as follows: |
---|
56 | |
---|
57 | 1. Enable IPv6 and set tunnel as default gateway in /etc/sysconfig/network: |
---|
58 | |
---|
59 | echo "IPV6_DEFAULTDEV=sit1">> /etc/sysconfig/network |
---|
60 | |
---|
61 | 2. Create /etc/sysconfig/network-scripts/ifcfg-sit1, with the following: |
---|
62 | |
---|
63 | --- |
---|
64 | DEVICE=sit1 |
---|
65 | BOOTPROTO=none |
---|
66 | ONBOOT=yes |
---|
67 | IPV6INIT=yes |
---|
68 | IPV6TUNNELIPV4=206.123.31.102 |
---|
69 | IPV6ADDR=3ffe:b00:c18:1fff:0:0:0:7f5/128 |
---|
70 | --- |
---|
71 | |
---|
72 | NOTE: You must use _sit1_ (or sit2,...). sit0 cannot be used, this is a |
---|
73 | special device. |
---|
74 | |
---|
75 | NOTE: Some tunnel endpoints might require a different kind of prefix length; |
---|
76 | for example, Cisco's usually favour /126. Using /0 creates a default route |
---|
77 | through that interface. |
---|
78 | |
---|
79 | NOTE: If you're not directly connected to the Internet, you may want to use |
---|
80 | ONBOOT=no instead. |
---|
81 | |
---|
82 | TUNNELING |
---|
83 | --------- |
---|
84 | |
---|
85 | Tunnel can be brought up and down with: |
---|
86 | |
---|
87 | ifup sit1 |
---|
88 | ifdown sit1 |
---|
89 | |
---|
90 | NOTE: In initscripts < 6.02 (ie. IPV6_TUNNELMODE=NBMA), even though sit1 is used, |
---|
91 | 'ifconfig' sees the tunnel as sit0. This is due to an "interesting" implementation |
---|
92 | of tunneling -- else multiple tunnels couldn't be used extensibly. |
---|
93 | |
---|
94 | NOTE: iproute tools give more reliable data, try e.g. '/sbin/ip addr ls'. |
---|
95 | |
---|
96 | MORE INFORMATION |
---|
97 | ---------------- |
---|
98 | |
---|
99 | http://www.bieringer.de/linux/IPv6/IPv6-HOWTO/IPv6-HOWTO.html is a good |
---|
100 | source of IPv6 related Linux-information. |
---|