Next: , Up: Platform specific information   [Contents][Index]


9.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:

Linuxifconfig interface addressnetmasknetmask
Linux iproute2ip addr add address/prefixlengthdevinterface
FreeBSDifconfig interface addressnetmasknetmask
OpenBSDifconfig interface addressnetmasknetmask
NetBSDifconfig interface addressnetmasknetmask
Solarisifconfig interface addressnetmasknetmask
Darwin (MacOS/X)ifconfig interface addressnetmasknetmask
Windowsnetsh interface ip set address interfacestaticaddress netmask

For IPv6 addresses:

Linuxifconfig interfaceaddaddress/prefixlength
FreeBSDifconfig interfaceinet6addressprefixlenprefixlength
OpenBSDifconfig interfaceinet6addressprefixlenprefixlength
NetBSDifconfig interfaceinet6addressprefixlenprefixlength
Solarisifconfig interfaceinet6 plumb up
ifconfig interfaceinet6 addifaddress address
Darwin (MacOS/X)ifconfig interfaceinet6addressprefixlenprefixlength
Windowsnetsh interface ipv6 add address interfacestaticaddress/prefixlength

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.

Linuxip tuntap add dev interfacemodetun|tapuserusername