DESCRIPTION

This file tries to capture OS-dependent configuration or build issues, quirks and platform limitations, as known.

TUN vs. TAP interface

Most operating systems nowadays support something called a tunnel-device, which makes it possible to divert IPv4 (and often other protocols, too) into a user space daemon like \*(C`gvpe\*(C'. This is being referred to as a TUN-device.

This is fine for point-to-point tunnels, but for a virtual ethernet, an additional ethernet header is needed. This functionality (called a \s-1TAP\s0 device here) is only provided by a subset of the configurations.

On platforms only supporting a TUN-device, gvpe will invoke it's magical ethernet emulation package, which currently only handles \s-1ARP\s0 requests for the IPv4 protocol (but more could be added, bu the tincd network drivers might need to be modified for this to work). This means that on those platforms, only IPv4 will be supported.

Also, since there is no way (currently) to tell gvpe which \s-1IP\s0 subnets are found on a specific host, you will either need to hardwire the \s-1MAC\s0 address for TUN-style hosts on all networks (and avoid \s-1ARP\s0 altogether, which is possible), or you need to send a packet from these hosts into the vpn network to tell gvpe the local interface address.

Interface Initialisation

Unless otherwise notes, the network interface will be initialized with the expected \s-1MAC\s0 address and correct \s-1MTU\s0 value. With most interface drivers, this is done by running \*(C`/sbin/ifconfig\*(C', so make sure that this command exists.

Interface Types

\$1

TAP-device; already part of the kernel (only 2.4+ supported, but see tincd/linux). This is the configuration tested best, as gvpe is being developed on this platform.

\*(C`ifname\*(C' should be set to the name of the network device.

To hardwire \s-1ARP\s0 addresses, use iproute2 (\*(C`arp\*(C' can do it, too):

  MAC=fe:fd:80:00:00:$(printf "%02x" $NODEID)
  ip neighbour add 10.11.12.13 lladdr $MAC nud permanent dev $IFNAME

TAP-device; already part of the kernel (2.2 only). See \*(C`native/linux\*(C' for more info.

\*(C`ifname\*(C' should be set to the path of a tap device, e.g. \*(C`/dev/tap0\*(C'. The interface will be named accordingly. TAP-device; The \s-1TAP\s0 device to be used must either be the \s-1CIPE\s0 driver (\*(C`http://cipe-win32.sourceforge.net/\*(C'), or (highly recommended) the newer TAP-Win32 driver bundled with openvpn (http://openvpn.sf.net/). Just download and run the openvpn installer. The only option you need to select is the \s-1TAP\s0 driver.

\*(C`ifname\*(C' should be set to the name of the device, found in the registry at (no kidding :):

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\<adapterid>\Connection\Name

The \s-1MAC\s0 address is dynamically being patched into packets and ARP-requests, so only IPv4 works with \s-1ARP\s0 on this platform. TAP-device, maybe; migth work for many bsd variants.

This driver is a newer version of the \*(C`tincd/*bsd\*(C' drivers. It might provide a \s-1TAP\s0 device, or might not work at all. You might try this interface type first, and, if it doesn't work, try one of the OS-specific drivers. TAP-device; part of the kernel (since 4.x, maybe earlier).

\*(C`ifname\*(C' should be set to the path of a tap device, e.g. \*(C`/dev/tap0\*(C'. The interface will be named accordingly.

These commands might be helpful examples:

ifconfig $IFNAME 10.0.0.$NODEID route add -net 10.0.0.0 -netmask 255.255.255.0 -interface $IFNAME 10.0.0.$NODEID TUN-device; The interface is a point-to-point device. To initialize it, you currently need to configure it as a point-to-point device, giving it an address on your vpn (the exact address doesn't matter), like this:

ifconfig $IFNAME mtu $MTU up ifconfig $IFNAME 10.11.12.13 10.55.66.77 route add -net 10.0.0.0 10.55.66.77 255.0.0.0 ping -c1 10.55.66.77 # ping once to tell gvpe your gw ip

The ping is required to tell the \s-1ARP\s0 emulator inside \s-1GVPE\s0 the local \s-1IP\s0 address.

\*(C`ifname\*(C' should be set to the path of a tun device, e.g. \*(C`/dev/tun0\*(C'. The interface will be named accordingly. TUN-device; already part of the kernel. See \*(C`tincd/netbsd\*(C' for more information. TAP-device;

The necessary kernel extension can be found here:

http://www-user.rhrk.uni-kl.de/~nissler/tuntap/

There are two drivers, the one to use is the \*(L"tap\*(R" driver. It driver must be loaded before use, read the docs on how to install it as a startup item.

\*(C`ifname\*(C' should be set to the path of a tap device, e.g. \*(C`/dev/tap0\*(C'. The interface will be named accordingly.

These commands might be helpful examples:

ifconfig $IFNAME 10.0.0.$NODEID route add -net 10.0.0.0 -interface $IFNAME 255.255.255.0 TUN-device; See \*(C`tincd/netbsd\*(C' for more information. \*(C`native/darwin\*(C' is preferable.

The necessary kernel extension can be found here:

http://chrisp.de/en/projects/tunnel.html

\*(C`ifname\*(C' should be set to the path of a tun device, e.g. \*(C`/dev/tun0\*(C'. The interface will be named accordingly.

The driver must be loaded before use:

kmodload tunnel TUN-device; already part of the kernel(?), or available here:

http://vtun.sourceforge.net/tun/

Some precompiled tun drivers might be available here:

http://www.monkey.org/~dugsong/fragroute/

The interface \s-1MAC\s0 and \s-1MTU\s0 are \s-1NOT\s0 set up for you. Please try it out and send me an \*(C`ifconfig\*(C' command invocation that does that.

See \*(C`tincd/netbsd\*(C' for more information.

Completely untested so far. TAP-device; see \*(C`native/cygwin\*(C' for more information.

The setup is likely to be similar to \*(C`native/cygwin\*(C'.

Completely untested so far. TAP-device; purpose unknown and untested, probably binds itself on an existing ethernet device (given by \*(C`ifname\*(C'). It must be down prior to running the command, and \s-1GVPE\s0 will try to set it's \s-1MAC\s0 address and \s-1MTU\s0 to the \*(L"correct\*(R" values.

Completely untested so far. TAP-device; purpose unknown and untested, probably creates a \s-1UNIX\s0 datagram socket (path given by \*(C`ifname\*(C') and reads and writes raw packets, so might be useful in other than \s-1UML\s0 contexts.

No network interface is created, and the \s-1MAC\s0 and \s-1MTU\s0 must be set as appropriate on the other side of the socket. \s-1GVPE\s0 will exit if the \s-1MAC\s0 address doesn't match what it expects.

Completely untested so far. Known to be broken, use \*(C`native/cygwin\*(C' instead.

RELATED TO gvpe.osdep…

gvpe\|(5).

AUTHOR

Marc Lehmann <[email protected]>