… | |
… | |
28 | found on a specific host, you will either need to hardwire the MAC address |
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 |
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 |
30 | possible), or you need to send a packet from these hosts into the vpn |
31 | network to tell gvpe the local interface address. |
31 | network to tell gvpe the local interface address. |
32 | |
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 | |
33 | =head2 native/linux |
40 | =head2 native/linux |
34 | |
41 | |
35 | TAP-device; already part of the kernel (only 2.4+ supported, but see |
42 | TAP-device; already part of the kernel (only 2.4+ supported, but see |
36 | tincd/linux). This is the configuration tested best, as gvpe is being |
43 | tincd/linux). This is the configuration tested best, as gvpe is being |
37 | developed on this platform. |
44 | developed on this platform. |
38 | |
45 | |
39 | To configure the interface, use either iproute2: |
46 | C<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 | |
|
|
45 | Or C<ifconfig>: |
|
|
46 | |
|
|
47 | ifconfig $IFNAME hw ether $MAC mtu $MTU |
|
|
48 | ifconfig $IFNAME 10.11.12.13 netmask 255.0.0.0 |
|
|
49 | |
47 | |
50 | To hardwire ARP addresses, use iproute2 (C<arp> can do it, too): |
48 | To hardwire ARP addresses, use iproute2 (C<arp> can do it, too): |
51 | |
49 | |
52 | MAC=fe:fd:80:00:00:$(printf "%02x" $NODEID) |
50 | MAC=fe:fd:80:00:00:$(printf "%02x" $NODEID) |
53 | ip neighbour add 10.11.12.13 lladdr $MAC nud permanent dev $IFNAME |
51 | ip neighbour add 10.11.12.13 lladdr $MAC nud permanent dev $IFNAME |
54 | |
52 | |
55 | =head2 tincd/linux |
53 | =head2 tincd/linux |
56 | |
54 | |
57 | TAP-device; already part of the kernel (2.2+ supported). See |
55 | TAP-device; already part of the kernel (2.2 only). See |
58 | C<native/linux> for more info. |
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. |
59 | |
60 | |
60 | =head2 native/cygwin |
61 | =head2 native/cygwin |
61 | |
62 | |
62 | TAP-device; The TAP device to be used must either be the CIPE driver |
63 | TAP-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 |
64 | (C<http://cipe-win32.sourceforge.net/>), or (highly recommended) the newer |
64 | TAP-Win32 driver bundled with openvpn (http://openvpn.sf.net/). Just |
65 | TAP-Win32 driver bundled with openvpn (http://openvpn.sf.net/). Just |
65 | download and run the openvpn installer. The only option you need to select |
66 | download and run the openvpn installer. The only option you need to select |
66 | is the TAP driver. |
67 | is the TAP driver. |
67 | |
68 | |
68 | The MAC need not be set (and in fact I<cannot> be set). The MAC address |
69 | C<ifname> should be set to the name of the device, found in the registry |
69 | is dynamically being patched into packets and ARP-requests, so only IPv4 |
70 | at (no kidding :): |
70 | works with ARP on this platform. |
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. |
71 | |
76 | |
72 | =head2 tincd/freebsd |
77 | =head2 tincd/freebsd |
73 | |
78 | |
74 | TAP-device; part of the kernel (since 4.x, maybe earlier). To initialize |
79 | TAP-device; part of the kernel (since 4.x, maybe earlier). |
75 | the interface, use this command: |
|
|
76 | |
80 | |
77 | ifconfig $IFNAME ether $MAC mtu $MTU up |
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. |
78 | |
83 | |
79 | These commands might be helpful examples: |
84 | These commands might be helpful examples: |
80 | |
85 | |
81 | ifconfig $IFNAME 10.0.0.$NODEID |
86 | ifconfig $IFNAME 10.0.0.$NODEID |
82 | route add -net 10.0.0.0 -netmask 255.255.255.0 -interface $IFNAME 10.0.0.$NODEID |
87 | route add -net 10.0.0.0 -netmask 255.255.255.0 -interface $IFNAME 10.0.0.$NODEID |
83 | |
88 | |
84 | =head2 tincd/netbsd |
89 | =head2 tincd/netbsd |
85 | |
90 | |
86 | TUN-device; The interface is a point to point-device. To initialize it, |
91 | TUN-device; The interface is a point-to-point device. To initialize it, |
87 | you currently need to configure it as such, giving it an address on your |
92 | you currently need to configure it as a point-to-point device, giving it |
88 | vpn (the exact address doesn't matter), like this: |
93 | an address on your vpn (the exact address doesn't matter), like this: |
89 | |
94 | |
90 | ifconfig $IFNAME mtu $MTU up |
95 | ifconfig $IFNAME mtu $MTU up |
91 | ifconfig $IFNAME 10.11.12.13 10.55.66.77 |
96 | ifconfig $IFNAME 10.11.12.13 10.55.66.77 |
92 | route add -net 10.0.0.0 10.55.66.77 255.0.0.0 |
97 | route add -net 10.0.0.0 10.55.66.77 255.0.0.0 |
93 | ping -c1 10.55.66.77 # ping once to tell gvpe your gw ip |
98 | ping -c1 10.55.66.77 # ping once to tell gvpe your gw ip |
94 | |
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 | |
95 | =head2 tincd/openbsd |
106 | =head2 tincd/openbsd |
96 | |
107 | |
97 | TUN-device; already part of the kernel. See C<tincd/netbsd> for more information. |
108 | TUN-device; already part of the kernel. See C<tincd/netbsd> for more information. |
98 | |
109 | |
99 | =head2 native/darwin |
110 | =head2 native/darwin |
… | |
… | |
106 | |
117 | |
107 | There are two drivers, the one to use is the "tap" driver. It driver must |
118 | There are two drivers, the one to use is the "tap" driver. It driver must |
108 | be loaded before use, read the docs on how to install it as a startup |
119 | be loaded before use, read the docs on how to install it as a startup |
109 | item. |
120 | item. |
110 | |
121 | |
111 | To initialize the interface, use this command: |
122 | C<ifname> should be set to the path of a tap device, |
112 | |
123 | e.g. C</dev/tap0>. The interface will be named accordingly. |
113 | ifconfig $IFNAME ether $MAC mtu $MTU up |
|
|
114 | |
124 | |
115 | These commands might be helpful examples: |
125 | These commands might be helpful examples: |
116 | |
126 | |
117 | ifconfig $IFNAME 10.0.0.$NODEID |
127 | ifconfig $IFNAME 10.0.0.$NODEID |
118 | route add -net 10.0.0.0 -interface $IFNAME 255.255.255.0 |
128 | route add -net 10.0.0.0 -interface $IFNAME 255.255.255.0 |
… | |
… | |
124 | |
134 | |
125 | The necessary kernel extension can be found here: |
135 | The necessary kernel extension can be found here: |
126 | |
136 | |
127 | http://chrisp.de/en/projects/tunnel.html |
137 | http://chrisp.de/en/projects/tunnel.html |
128 | |
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 | |
129 | The driver must be loaded before use: |
142 | The driver must be loaded before use: |
130 | |
143 | |
131 | kmodload tunnel |
144 | kmodload tunnel |
132 | |
145 | |
133 | =head2 tincd/solaris |
146 | =head2 tincd/solaris |
… | |
… | |
138 | |
151 | |
139 | Some precompiled tun drivers might be available here: |
152 | Some precompiled tun drivers might be available here: |
140 | |
153 | |
141 | http://www.monkey.org/~dugsong/fragroute/ |
154 | http://www.monkey.org/~dugsong/fragroute/ |
142 | |
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 | |
143 | See C<tincd/netbsd> for more information. |
159 | See C<tincd/netbsd> for more information. |
144 | |
160 | |
145 | Completely unstested so far. |
161 | Completely unstested so far. |
146 | |
162 | |
147 | =head2 tincd/mingw |
163 | =head2 tincd/mingw |
148 | |
164 | |
149 | TAP-device; see C<native/cygwin> for more information. |
165 | TAP-device; see C<native/cygwin> for more information. |
150 | |
166 | |
|
|
167 | The setup is likely to be similar to C<native/cygwin>. |
|
|
168 | |
151 | Completely untested so far. |
169 | Completely untested so far. |
152 | |
170 | |
153 | =head2 tincd/raw_socket |
171 | =head2 tincd/raw_socket |
154 | |
172 | |
155 | TAP-device; purpose unknown and untested, probably binds itself on an |
173 | TAP-device; purpose unknown and untested, probably binds itself on an |
156 | existing ethernet device (given by C<ifname>), which should probably not |
174 | existing ethernet device (given by C<ifname>). It must be down prior to |
157 | be configured in any way, except for setting it I<up>. |
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. |
158 | |
179 | |
159 | =head2 tincd/uml_socket |
180 | =head2 tincd/uml_socket |
160 | |
181 | |
161 | TAP-device; purpose unknown and untested, probably creates a unix datagram |
182 | TAP-device; purpose unknown and untested, probably creates a unix datagram |
162 | socket (path given by C<ifname>) and reads and writes raw packets, so |
183 | socket (path given by C<ifname>) and reads and writes raw packets, so |
163 | might be useful in other than UML contexts. |
184 | might be useful in other than UML contexts. |
164 | |
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 | |
165 | =head2 tincd/cygwin |
192 | =head2 tincd/cygwin |
166 | |
193 | |
167 | Known to be broken, use C<native/cygwin> instead. |
194 | Known to be broken, use C<native/cygwin> instead. |
168 | |
195 | |
169 | =head1 SEE ALSO |
196 | =head1 SEE ALSO |