=head1 NAME gvpe.osdep - os dependent information =head1 DESCRIPTION This file tries to capture OS-dependent configuration or build issues, quirks and platform limitations, as known. =head2 TUN vs. TAP interface Most operating systems nowadays support something called a I-device, which makes it possible to divert IPv4 (and often other protocols, too) into a userspace daemon like 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 TAP 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 ARP 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 IP subnets are found on a specific host, you will either need to hardwire the MAC address for TUN-style hosts on all networks (and avoid ARP 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. =head2 native/linux 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. To configure the interface, use either iproute2: ip set $IFNAME address $MAC mtu $MTU up ip addr add $IFNAME 10.11.12.13 ip route add $IFNAME 10.11.12.13/8 Or ifconfig: ifconfig $IFNAME hw ether $MAC mtu $MTU ifconfig $IFNAME 10.11.12.13 netmask 255.0.0.0 To hardwire ARP addresses, use iproute2 (ifconfig 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 =head2 tincd/linux TAP-device; already part of the kernel (2.2+ supported). See C for more info. =head2 native/cygwin TAP-device; The TAP device to be used must either be the CIPE driver (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 TAP driver. The MAC need not be set (and in fact I be set). The MAC address is dynamically being patched into packets and ARP-requests, so only IPv4 works with ARP on this platform. =head2 tincd/freebsd TAP-device; part of the kernel (since 4.x, maybe earlier). To initialize the interface, use this command: ifconfig $IFNAME ether $MAC mtu $MTU up =head2 tincd/netbsd TUN-device; The interface is a point to point-device. To initialize it, you currently need to configure it as such, 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 =head2 tincd/openbsd TUN-device; already part of the kernel. See C for more information. =head2 tincd/darwin TUN-device; See C for more information. The necessary kernel extension can be found here: http://chrisp.de/en/projects/tunnel.html A newer (and reportedly much more stable) driver that also supports TAP operations is available here: http://www-user.rhrk.uni-kl.de/~nissler/tuntap/ But GVPE has not been used with it, and has not been ported to it's TAP interface. Patches are welcome. =head2 tincd/solaris TUN-device; already part of the kernel. see C for more information. Completely untested so far. =head2 tincd/mingw TAP-device; see C for more information. Completey untested so far. =head2 tincd/cygwin Known to be broken. =head1 SEE ALSO gvpe(5). =head1 AUTHOR Marc Lehmann