ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/doc/gvpe.osdep.5.pod
(Generate patch)

Comparing gvpe/doc/gvpe.osdep.5.pod (file contents):
Revision 1.5 by pcg, Thu Mar 17 23:59:37 2005 UTC vs.
Revision 1.11 by pcg, Tue Jun 21 08:46:53 2005 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines