[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 7. Platform specific information

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 7.1 Interface configuration

When configuring an interface, one normally assigns it an address and a netmask. The address uniquely identifies the host on the network attached to the interface. The netmask, combined with the address, forms a subnet. It is used to add a route to the routing table instructing the kernel to send all packets which fall into that subnet to that interface. Because all packets for the entire VPN should go to the virtual network interface used by tinc, the netmask should be such that it encompasses the entire VPN.

For IPv4 addresses:

Linux | `ifconfig` interface address `netmask` netmask
Linux iproute2 | `ip addr add` address`/`prefixlength `dev` interface
FreeBSD | `ifconfig` interface address `netmask` netmask
OpenBSD | `ifconfig` interface address `netmask` netmask
NetBSD | `ifconfig` interface address `netmask` netmask
Solaris | `ifconfig` interface address `netmask` netmask
Darwin (MacOS/X) | `ifconfig` interface address `netmask` netmask
Windows | `netsh interface ip set address` interface `static` address netmask

For IPv6 addresses:

Linux | `ifconfig` interface `add` address`/`prefixlength
FreeBSD | `ifconfig` interface `inet6` address `prefixlen` prefixlength
OpenBSD | `ifconfig` interface `inet6` address `prefixlen` prefixlength
NetBSD | `ifconfig` interface `inet6` address `prefixlen` prefixlength
Solaris | `ifconfig` interface `inet6 plumb up`
| `ifconfig` interface `inet6 addif` address address
Darwin (MacOS/X) | `ifconfig` interface `inet6` address `prefixlen` prefixlength
Windows | `netsh interface ipv6 add address` interface `static` address/prefixlength

On some platforms, when running tinc in switch mode, the VPN interface must be set to tap mode with an ifconfig command:

OpenBSD | `ifconfig` interface `link0`

On Linux, it is possible to create a persistent tun/tap interface which will continue to exist even if tinc quit, although this is normally not required. It can be useful to set up a tun/tap interface owned by a non-root user, so tinc can be started without needing any root privileges at all.

Linux | `ip tuntap add dev` interface `mode` tun|tap `user` username

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 7.2 Routes

In some cases it might be necessary to add more routes to the virtual network interface. There are two ways to indicate which interface a packet should go to, one is to use the name of the interface itself, another way is to specify the (local) address that is assigned to that interface (local_address). The former way is unambiguous and therefore preferable, but not all platforms support this.

Adding routes to IPv4 subnets:

Linux | `route add -net` network_address `netmask` netmask interface
Linux iproute2 | `ip route add` network_address`/`prefixlength `dev` interface
FreeBSD | `route add` network_address`/`prefixlength local_address
OpenBSD | `route add` network_address`/`prefixlength local_address
NetBSD | `route add` network_address`/`prefixlength local_address
Solaris | `route add` network_address`/`prefixlength local_address `-interface`
Darwin (MacOS/X) | `route add` network_address`/`prefixlength local_address
Windows | `netsh routing ip add persistentroute` network_address netmask interface local_address

Adding routes to IPv6 subnets:

Linux | `route add -A inet6` network_address`/`prefixlength interface
Linux iproute2 | `ip route add` network_address`/`prefixlength `dev` interface
FreeBSD | `route add -inet6` network_address`/`prefixlength local_address
OpenBSD | `route add -inet6` network_address local_address `-prefixlen` prefixlength
NetBSD | `route add -inet6` network_address local_address `-prefixlen` prefixlength
Solaris | `route add -inet6` network_address`/`prefixlength local_address `-interface`
Darwin (MacOS/X) | ?
Windows | `netsh interface ipv6 add route` network address/prefixlength interface

[ << ] | [ >> ] |  |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated on May 11, 2014 using texi2html 1.82.