Subject: Re: [Govpn-devel] build from last tarball

From: [email-masked]
Date: Thu, 28 Jan 2016 13:46:14 +0300

Greetings!

*** Alan Holt <[email-masked]> [Thu, 28 Jan 2016 12:26:35 +0200]:
>*Can I add another client in the same file, like:*
>alex:
>    iface: tap10

You can, but they must not share the same TAP interface.

>------------------------------------------------------------
>Client connecting to 172.16.0.2, TCP port 5001
>TCP window size: 45.0 KByte (default)
>------------------------------------------------------------
>[  3] local 172.16.0.1 port 55274 connected with 172.16.0.2 port 5001
>[ ID] Interval       Transfer     Bandwidth
>[  3]  0.0-10.0 sec   105 MBytes  *87.7* Mbits/sec

As I can see, not the full 100Mbps is used. This is because GoVPN
actually has relatively high delays. I assume that your CPU load was not
high, that means that it can process much more packets, but because of
delays, TCP layer has lower throughput.

I tested GoVPN 4.x with 1Gbps network between two notebooks with Intel
i5 CPU under FreeBSD 10.2 amd64 with Go 1.5.1. It gave me 786 Mbps of
throughput of UDP packets.

Delays is the main problem with performance in real-life applications. I
use GoVPN at home and scp over 1Gbps link give me 40-50 MiB/s throughput
over IPv6 endpoints. By the way, I do not know why, but GoVPN is slower
when using it over IPv6.

>*In this case 2 clients from Tel-Aviv connected to the same server in
>Amsterdam, one of users get disconnected:*

Yes, only one client can use single TAP interface.

>*So how I do one server serf multiple clients?*
>*Is it possible? *

Only one user per TAP-interface. If you want to connect them together,
then it can be done easily with the bridge/bond between those
interfaces. I do not currently have GNU/Linux under the hand, but it
should be like this:

    # brctl addbr bridge0
    # brctl addif bridge0 tap0
    # brctl addif bridge0 tap1

where tap0 is interface for the first user, tap1 is for the second.
Using up.sh, that is executed after client connects, you can do it
dynamically like this (only crude example):

    #!/bin/sh
    tapname=$(tunctl -u someuser)
    brctl addif bridge0 $tapname
    echo $tapname

here we create new TAP interface and add it to the bridge (to the
shared network interface) and echo it so GoVPN will understand what
TAP-interface it must use.

-- 
Happy hacking, Sergey Matveev