File added to CABAL (hopefully)
[tinc] / doc / HOWTO
1                                 ==============
2                                 The TINC HOWTO
3                                 ==============
4
5                                 Wessel Dankers
6                                wsl@nl.linux.org
7 \f
8 Introduction
9 ------------
10 Tinc is a system to create a virtual ethernet network on top of an existing
11 infrastructure. This infrastructure can be anything from modem lines to
12 gigabit ethernet networks, as long as they talk IP. Once you install and
13 configure tinc, your host will get an extra IP address, just like it would
14 when you stick an extra ethernet card into it. Using this IP address, it can
15 communicate with all hosts in its virtual network using strong encryption.
16
17 If you install Tinc on a router (and pick your numbers correctly) you can
18 have the router forward all packets. This way you can---instead of
19 connecting hosts---connect entire sites together! Now you need only one
20 outgoing network connection for both internet and intranet.
21 \f
22 Architecture
23 ------------
24 FIXME
25 \f
26 Getting Tinc
27 ------------
28 Before you fetch the latest tarball, you might want to check if there's a
29 package for your Linux distribution. One of the main authors is a Debian
30 Developer, so you can expect the Debian packages to be very up to date.
31
32 The official website for Tinc can be found at http://tinc.nl.linux.org/.
33 There you can find Debian packages, RPM's and of course... the tarball!
34 Since we run Doohickey Linux Pro 1.0, for which no package exists (or
35 indeed the distribution itself) we shall compile the package ourselves.
36 \f
37 Building
38 --------
39 The Tinc source adheres to so many standards it makes you head spin.
40 Even the debug messages have been localized! Amazing. Tinc also comes
41 with a configuration script. If you like to see what is there to
42 configure run ./configure --help | more. If you don't have time for such
43 nonsense:
44
45         ./configure --sysconfdir=/etc
46
47 This will see if your system is nice enough to run tinc on, and will
48 create some Makefiles and other stuff which will together build tinc.
49
50         make
51         make install
52
53 The first will do the actual build, the second copies all files into place.
54 \f
55 The kernel
56 ----------
57 FIXME
58 \f
59 Picking your numbers
60 --------------------
61 The first thing we should do is pick network numbers. Tinc has a very
62 peculiar taste for network numbers, which is caused by the way it routes
63 traffic. However, it turns out to be really handy if you want to use
64 your tinc host as a router for a site.
65
66 The numbers have to be in a range that is not yet in use in your existing,
67 real network! In this example we will use numbers from the 192.168.0/16
68 range. This is standard CIDR notation for all IP addresses from 192.168.0.0
69 to 192.168.255.255. The /16 means that the first 16 bits form the network
70 part.
71
72 It is common practice for Tinc networks to use private (RFC 1918) addresses.
73 This is not necessary, but it would be a waste to use official addresses
74 for a private network!
75
76 In the example we will connect three machines: f00f, fdiv and hlt. We will
77 give each an address, but not just that, also a slice of our address space
78 to play with.
79
80       Host          Real address           Tinc network
81       ---------------------------------------------------
82       f00f          126.202.37.20          192.168.1.1/24
83       fdiv          126.202.37.81          192.168.2.1/24
84       hlt           103.22.1.218           192.168.3.1/24
85
86 It is very important that none of the Tinc netmasks overlap! Note how the
87 192.168.0/16 network covers the entire address space of the three hosts.
88 We will refer to the 192.168.0/16 network as the `umbrella' from now on.
89 As you can see we can fit 256 hosts into this umbrella this way, which is
90 also the practical maximum for tinc.
91 \f
92 The configuration file
93 ----------------------
94 Let's create a configuration file for f00f. We have to put it in /etc/tinc,
95 unless you participate in multiple umbrella's (more on that later).
96
97         MyOwnVPNIP = 192.168.1.1/24
98         VpnMask    = 255.255.0.0
99         ConnectTo  = 126.202.37.81
100         ConnectTo  = 103.22.1.218
101
102 The first two lines tell Tinc about the numbers we have chosen above.
103 Using the ConnectTo lines, the daemon will seek contact with the rest of
104 the umbrella. It's possible to configure any number of ConnectTo lines,
105 you can even omit them so that it just sits and waits until someone else
106 contacts it. Until someone does, the poor daemon won't be able to send
107 any data because it doesn't know where everybody is.
108 \f
109 The passphrases
110 ---------------
111 We will have to generate keys for ourselves, and get a key from everybody
112 we want to ConnectTo. 
113
114 --
115 $Id: HOWTO,v 1.2.2.1 2000/06/30 20:50:47 wsl Exp $