ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/doc/gvpe.osdep.5.pod
Revision: 1.8
Committed: Wed Mar 23 21:55:39 2005 UTC (19 years, 2 months ago) by pcg
Branch: MAIN
Changes since 1.7: +52 -25 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 =head1 NAME
2
3 gvpe.osdep - os dependent information
4
5 =head1 DESCRIPTION
6
7 This file tries to capture OS-dependent configuration or build issues,
8 quirks and platform limitations, as known.
9
10 =head2 TUN vs. TAP interface
11
12 Most operating systems nowadays support something called a
13 I<tunnel>-device, which makes it possible to divert IPv4 (and often other
14 protocols, too) into a userspace daemon like C<gvpe>. This is being
15 referred to as a TUN-device.
16
17 This is fine for point-to-point tunnels, but for a virtual ethernet, an
18 additional ethernet header is needed. This functionality (called a TAP
19 device here) is only provided by a subset of the configurations.
20
21 On platforms only supporting a TUN-device, gvpe will invoke it's magical
22 ethernet emulation package, which currently only handles ARP requests for
23 the IPv4 protocol (but more could be added, bu the tincd network drivers
24 might need to be modified for this to work). This means that on those
25 platforms, only IPv4 will be supported.
26
27 Also, since there is no way (currently) to tell gvpe which IP subnets are
28 found on a specific host, you will either need to hardwire the MAC address
29 for TUN-style hosts on all networks (and avoid ARP altogether, which is
30 possible), or you need to send a packet from these hosts into the vpn
31 network to tell gvpe the local interface address.
32
33 =head2 Interface Initialisation
34
35 Unless otherwise notes, the network interface will be set "UP" with the
36 correct MAC address and correct MTU value. With most interface drivers,
37 this is done by running C</sbin/ifconfig>, so make sure that this command
38 exists.
39
40 =head2 native/linux
41
42 TAP-device; already part of the kernel (only 2.4+ supported, but see
43 tincd/linux). This is the configuration tested best, as gvpe is being
44 developed on this platform.
45
46 C<ifname> should be set to the name of the network device.
47
48 To hardwire ARP addresses, use iproute2 (C<arp> can do it, too):
49
50 MAC=fe:fd:80:00:00:$(printf "%02x" $NODEID)
51 ip neighbour add 10.11.12.13 lladdr $MAC nud permanent dev $IFNAME
52
53 =head2 tincd/linux
54
55 TAP-device; already part of the kernel (2.2 only). See
56 C<native/linux> for more info.
57
58 C<ifname> should be set to the path of a tap device,
59 e.g. C</dev/tap0>. The interface will be named accordingly.
60
61 =head2 native/cygwin
62
63 TAP-device; The TAP device to be used must either be the CIPE driver
64 (C<http://cipe-win32.sourceforge.net/>), or (highly recommended) the newer
65 TAP-Win32 driver bundled with openvpn (http://openvpn.sf.net/). Just
66 download and run the openvpn installer. The only option you need to select
67 is the TAP driver.
68
69 C<ifname> should be set to the name of the device, found in the registry
70 at (no kidding :):
71
72 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\<adapterid>\Connection\Name
73
74 The MAC address is dynamically being patched into packets and
75 ARP-requests, so only IPv4 works with ARP on this platform.
76
77 =head2 tincd/freebsd
78
79 TAP-device; part of the kernel (since 4.x, maybe earlier).
80
81 C<ifname> should be set to the path of a tap device,
82 e.g. C</dev/tap0>. The interface will be named accordingly.
83
84 These commands might be helpful examples:
85
86 ifconfig $IFNAME 10.0.0.$NODEID
87 route add -net 10.0.0.0 -netmask 255.255.255.0 -interface $IFNAME 10.0.0.$NODEID
88
89 =head2 tincd/netbsd
90
91 TUN-device; The interface is a point-to-point device. To initialize it,
92 you currently need to configure it as a point-to-point device, giving it
93 an address on your vpn (the exact address doesn't matter), like this:
94
95 ifconfig $IFNAME mtu $MTU up
96 ifconfig $IFNAME 10.11.12.13 10.55.66.77
97 route add -net 10.0.0.0 10.55.66.77 255.0.0.0
98 ping -c1 10.55.66.77 # ping once to tell gvpe your gw ip
99
100 The ping is required to tell the ARP emulator inside GVPE the local IP
101 address.
102
103 C<ifname> should be set to the path of a tun device,
104 e.g. C</dev/tun0>. The interface will be named accordingly.
105
106 =head2 tincd/openbsd
107
108 TUN-device; already part of the kernel. See C<tincd/netbsd> for more information.
109
110 =head2 native/darwin
111
112 TAP-device;
113
114 The necessary kernel extension can be found here:
115
116 http://www-user.rhrk.uni-kl.de/~nissler/tuntap/
117
118 There are two drivers, the one to use is the "tap" driver. It driver must
119 be loaded before use, read the docs on how to install it as a startup
120 item.
121
122 C<ifname> should be set to the path of a tap device,
123 e.g. C</dev/tap0>. The interface will be named accordingly.
124
125 These commands might be helpful examples:
126
127 ifconfig $IFNAME 10.0.0.$NODEID
128 route add -net 10.0.0.0 -interface $IFNAME 255.255.255.0
129
130 =head2 tincd/darwin
131
132 TUN-device; See C<tincd/netbsd> for more information. C<native/darwin> is
133 preferable.
134
135 The necessary kernel extension can be found here:
136
137 http://chrisp.de/en/projects/tunnel.html
138
139 C<ifname> should be set to the path of a tun device,
140 e.g. C</dev/tun0>. The interface will be named accordingly.
141
142 The driver must be loaded before use:
143
144 kmodload tunnel
145
146 =head2 tincd/solaris
147
148 TUN-device; already part of the kernel(?), or available here:
149
150 http://vtun.sourceforge.net/tun/
151
152 Some precompiled tun drivers might be available here:
153
154 http://www.monkey.org/~dugsong/fragroute/
155
156 The interface MAC and MTU are I<NOT> set up for you. Please try it out and
157 send me an C<ifconfig> command invocation that does that.
158
159 See C<tincd/netbsd> for more information.
160
161 Completely unstested so far.
162
163 =head2 tincd/mingw
164
165 TAP-device; see C<native/cygwin> for more information.
166
167 The setup is likely to be similar to C<native/cygwin>.
168
169 Completely untested so far.
170
171 =head2 tincd/raw_socket
172
173 TAP-device; purpose unknown and untested, probably binds itself on an
174 existing ethernet device (given by C<ifname>). It must be down prior to
175 running the command, and GVPE will try to set it's MAC address and MTU to
176 the "correct" values.
177
178 Completely untested so far.
179
180 =head2 tincd/uml_socket
181
182 TAP-device; purpose unknown and untested, probably creates a unix datagram
183 socket (path given by C<ifname>) and reads and writes raw packets, so
184 might be useful in other than UML contexts.
185
186 No network interface is created, and the MAC and MTU must be set as
187 approriate on the other side of the socket. GVPE will exit if the MAC
188 address doesn't match what it expects.
189
190 Completely untested so far.
191
192 =head2 tincd/cygwin
193
194 Known to be broken, use C<native/cygwin> instead.
195
196 =head1 SEE ALSO
197
198 gvpe(5).
199
200 =head1 AUTHOR
201
202 Marc Lehmann <gvpe@plan9.de>
203